This commit is contained in:
2023-11-24 14:14:28 +07:00
parent 3d31e6f6a5
commit 8f254758dd
@@ -219,7 +219,16 @@ const _generateCashIn = async (uniqueCode) => {
item.c_invoice_no
);
for (const detail of reserv) {
data.push({
// data.push({
// i_cash_in: cashIn.i_cash_in,
// c_reservation_no: detail.c_reservation_no,
// m_amount: detail.i_reservation_amount,
// c_payment_recon_no: detail.c_payment_recon_no,
// d_payment: detail.d_payment,
// d_payment_recon: detail.d_payment_recon,
// c_load_balance_no: detail.c_load_balance_no,
// });
let temp = {
i_cash_in: cashIn.i_cash_in,
c_reservation_no: detail.c_reservation_no,
m_amount: detail.i_reservation_amount,
@@ -227,7 +236,7 @@ const _generateCashIn = async (uniqueCode) => {
d_payment: detail.d_payment,
d_payment_recon: detail.d_payment_recon,
c_load_balance_no: detail.c_load_balance_no,
});
};
let reserveNo = detail.c_reservation_no;
@@ -238,6 +247,7 @@ const _generateCashIn = async (uniqueCode) => {
};
await model.updateIntoReserve(trx, dataReserve, reserveNo);
await model.insertCashInDetail(trx, temp);
}
await wait(5000);
winston.logger.info(
@@ -245,7 +255,7 @@ const _generateCashIn = async (uniqueCode) => {
dataCahsIn
)}`
);
await model.insertCashInDetail(trx, data);
// await model.insertCashInDetail(trx, data);
// await model.insertPostingEt(code, item, trx)
});
}