data consumption credt_total_amount key mapped
This commit is contained in:
parent
4052f3fe1f
commit
919b92d10e
@ -107,9 +107,9 @@ export class CreditNoteSyncService {
|
|||||||
let totalTds = 0;
|
let totalTds = 0;
|
||||||
let totalCredit = 0;
|
let totalCredit = 0;
|
||||||
rows.forEach(row => {
|
rows.forEach(row => {
|
||||||
totalAmount += Number(row.CLAIM_AMT || row.CREDIT_AMT || 0);
|
totalAmount += Number(row.CREDITED_TOTAL_AMT || row.CLAIM_AMT || row.CREDIT_AMT || 0);
|
||||||
totalTds += Number(row.TDS_AMT || 0);
|
totalTds += Number(row.TDS_AMT || 0);
|
||||||
totalCredit += Number(row.CREDIT_AMT || row.FINAL_AMT || 0);
|
totalCredit += Number(row.CREDITED_TOTAL_AMT || row.CREDIT_AMT || row.FINAL_AMT || 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstRow = rows[0];
|
const firstRow = rows[0];
|
||||||
@ -140,10 +140,10 @@ export class CreditNoteSyncService {
|
|||||||
transactionNo: row.TRNS_UNIQ_NO,
|
transactionNo: row.TRNS_UNIQ_NO,
|
||||||
description: row.DESCRIPTION || row.MESSAGE || '',
|
description: row.DESCRIPTION || row.MESSAGE || '',
|
||||||
hsnCd: row.HSN_CODE || row.SAC_CODE || '',
|
hsnCd: row.HSN_CODE || row.SAC_CODE || '',
|
||||||
amount: Number(row.FINAL_AMT || row.CREDIT_AMT || 0),
|
amount: Number(row.CREDITED_TOTAL_AMT || row.FINAL_AMT || row.CREDIT_AMT || 0),
|
||||||
claimAmount: Number(row.CLAIM_AMT || 0),
|
claimAmount: Number(row.CREDITED_TOTAL_AMT || row.CLAIM_AMT || 0),
|
||||||
tdsAmount: Number(row.TDS_AMT || 0),
|
tdsAmount: Number(row.TDS_AMT || 0),
|
||||||
creditAmount: Number(row.FINAL_AMT || row.CREDIT_AMT || 0)
|
creditAmount: Number(row.CREDITED_TOTAL_AMT || row.FINAL_AMT || row.CREDIT_AMT || 0)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await ClaimCreditNoteItem.bulkCreate(itemsToCreate, { transaction: t });
|
await ClaimCreditNoteItem.bulkCreate(itemsToCreate, { transaction: t });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user