mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
update
This commit is contained in:
@@ -625,7 +625,7 @@ const updateReservationAndLoadingBalance = async (
|
||||
.then(() => {
|
||||
// insert load balance history
|
||||
winston.logger.debug(
|
||||
`${reservationNumber} result insert t_d_load_balance_history updateReservationAndLoadingBalance success`
|
||||
`${reservationNumber} proses insert t_d_load_balance_history updateReservationAndLoadingBalance`
|
||||
);
|
||||
return knex('trx.t_d_load_balance_history')
|
||||
.transacting(trx)
|
||||
@@ -653,7 +653,7 @@ const updateReservationAndLoadingBalance = async (
|
||||
});
|
||||
|
||||
winston.logger.debug(
|
||||
`${reservationNumber} result insert t_d_load_balance_history_detail updateReservationAndLoadingBalance success`
|
||||
`${reservationNumber} proses insert t_d_load_balance_history_detail updateReservationAndLoadingBalance`
|
||||
);
|
||||
// insert detail load balance
|
||||
return knex('trx.t_d_load_balance_history_detail')
|
||||
@@ -663,7 +663,7 @@ const updateReservationAndLoadingBalance = async (
|
||||
.then(() => {
|
||||
// update reservation
|
||||
winston.logger.debug(
|
||||
`${reservationNumber} result insert t_d_reservation_balance updateReservationAndLoadingBalance success`
|
||||
`${reservationNumber} proses update t_d_reservation_balance updateReservationAndLoadingBalance`
|
||||
);
|
||||
return knex('trx.t_d_reservation_balance')
|
||||
.transacting(trx)
|
||||
@@ -683,16 +683,16 @@ const updateReservationAndLoadingBalance = async (
|
||||
})
|
||||
.then(() => {
|
||||
winston.logger.debug(
|
||||
`${reservationNumber} commit update t_d_reservation_balance updateReservationAndLoadingBalance`
|
||||
`${reservationNumber} commit transaction updateReservationAndLoadingBalance`
|
||||
);
|
||||
trx.commit();
|
||||
})
|
||||
.catch((error) => {
|
||||
winston.logger.debug(
|
||||
`${reservationNumber} rollback update t_d_reservation_balance updateReservationAndLoadingBalance: ${error.message}`
|
||||
`${reservationNumber} rollback transaction updateReservationAndLoadingBalance: ${error.message}`
|
||||
);
|
||||
trx.rollback(); // Rollback transaction
|
||||
throw error; // Rethrow error to outer catch
|
||||
// throw error; // Rethrow error to outer catch
|
||||
});
|
||||
})
|
||||
.then((result) => {
|
||||
|
||||
Reference in New Issue
Block a user