| | |
| | | if (record.sup_accounting && record.supAccounts) { |
| | | record.supAccounts.forEach(item => { |
| | | if (item.sup_acc_type === 'supplier') { |
| | | val += item.suppliercode ? '_' + item.suppliercode : '' |
| | | val += item.suppliercode ? '_' + item.suppliercode + ' ' + item.suppliername : '' |
| | | } else if (item.sup_acc_type === 'customer') { |
| | | val += item.customercode ? '_' + item.customercode : '' |
| | | val += item.customercode ? '_' + item.customercode + ' ' + item.customername : '' |
| | | } else if (item.sup_acc_type === 'department') { |
| | | val += item.co_pro_code ? '_' + item.co_pro_code : '' |
| | | val += item.co_pro_code ? '_' + item.co_pro_code + ' ' + item.co_pro_name : '' |
| | | } else if (item.sup_acc_type === 'project') { |
| | | val += item.projectcode ? '_' + item.projectcode : '' |
| | | val += item.projectcode ? '_' + item.projectcode + ' ' + item.projectname : '' |
| | | } else if (item.sup_acc_type === 'inventory') { |
| | | val += item.productcode ? '_' + item.productcode : '' |
| | | val += item.productcode ? '_' + item.productcode + ' ' + item.productname : '' |
| | | } else if (item.sup_acc_type === 'employee') { |
| | | val += item.workercode ? '_' + item.workercode : '' |
| | | val += item.workercode ? '_' + item.workercode + ' ' + item.workername : '' |
| | | } else if (item.sup_acc_type === 'cash_flow') { |
| | | val += item.cash_flow_code ? '_' + item.cash_flow_code : '' |
| | | val += item.cash_flow_code ? '_' + item.cash_flow_code + ' ' + item.cash_flow_name : '' |
| | | } else if (item.sup_acc_code) { |
| | | val += '_' + item.sup_acc_code |
| | | val += '_' + item.sup_acc_code + ' ' + item.sup_acc_name |
| | | } |
| | | }) |
| | | } |