mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 20:46:28 +00:00
update cash in
This commit is contained in:
@@ -261,6 +261,12 @@ const _generateCashIn = async (uniqueCode) => {
|
||||
item.d_payment,
|
||||
item.c_invoice_no
|
||||
);
|
||||
|
||||
winston.logger.info(
|
||||
`SCHEDULER-FB70-${uniqueCode} cashIn reserv ${code} DATA : ${JSON.stringify(
|
||||
reserv
|
||||
)}`
|
||||
);
|
||||
|
||||
//TOTAL AMOUNT CASH-IN
|
||||
let cashInAmount = 0;
|
||||
@@ -269,6 +275,12 @@ const _generateCashIn = async (uniqueCode) => {
|
||||
}
|
||||
dataCahsIn.i_amount = cashInAmount;
|
||||
|
||||
winston.logger.info(
|
||||
`SCHEDULER-FB70-${uniqueCode} cashInAmount ${code} DATA : ${JSON.stringify(
|
||||
cashInAmount
|
||||
)}`
|
||||
);
|
||||
|
||||
if(cashInAmount > 0) {
|
||||
//INSERT CASH-IN
|
||||
const cashIn = await model.insertCashIn(trx, dataCahsIn);
|
||||
|
||||
@@ -299,9 +299,11 @@ const getReserve = async (trx, code, date, invoice) => {
|
||||
.where('tdpr.c_status', '=', 'S')
|
||||
.whereNotNull('tdi.c_return_sap')
|
||||
.whereNotNull('tdrb.c_load_balance_no')
|
||||
.whereRaw(
|
||||
`tdrb.c_reservation_no in (SELECT c_reservation_no FROM payment.t_d_payment_recon where c_status = 'S' ) AND tdrb.c_reservation_no NOT IN (SELECT c_reservation_no FROM payment.t_d_cash_in_detail WHERE b_reversal IS NOT TRUE)`
|
||||
);
|
||||
.whereNull('tdrb.c_cash_in_no')
|
||||
// .whereRaw(
|
||||
// `tdrb.c_reservation_no in (SELECT c_reservation_no FROM payment.t_d_payment_recon where c_status = 'S' ) AND tdrb.c_reservation_no NOT IN (SELECT c_reservation_no FROM payment.t_d_cash_in_detail WHERE b_reversal IS NOT TRUE)`
|
||||
// );
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user