This commit is contained in:
2023-02-20 22:49:18 +07:00
parent 36b61697dd
commit 1524d643c6
@@ -1121,8 +1121,6 @@ const loadingBalanceInsert = async (param) => {
fraudReservationNumber
);
// log debug
winston.logger.debug(`${uniqueCode} XXX ${getReservationPending.length}`);
if (getReservationPending.length < 1) {
result = {
code: '414',
@@ -1146,8 +1144,6 @@ const loadingBalanceInsert = async (param) => {
getReservationPending.forEach((rsv) => {
amountTopup += parseInt(rsv.i_reservation_amount);
});
// log debug
winston.logger.debug(`${uniqueCode} XXX ${getReservationPending.length}`);
if (amount != amountTopup) {
result = {
@@ -1254,17 +1250,15 @@ const loadingBalanceInsert = async (param) => {
};
// log debug
winston.logger.debug(`${uniqueCode} getting reservation detail 2...`);
// log debug
winston.logger.debug(`${uniqueCode} XXX ${getReservationPending.length}`);
winston.logger.debug(`${uniqueCode} getting reservation detail...`);
let detail = [];
reservation_number = [];
for (let index = 0; index < getReservationPending.length; index++) {
reservation_number.push(getReservationPending.c_reservation_no);
reservation_number.push(getReservationPending[index].c_reservation_no);
let reservation = await model.findReservation(
getReservationPending.reservation_number
getReservationPending[index].reservation_number
);
if (!reservation) {