mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 22:56:26 +00:00
update
This commit is contained in:
@@ -1082,6 +1082,10 @@ const loadingBalanceInsert = async (param) => {
|
||||
});
|
||||
}
|
||||
|
||||
// check data load balance by reservation_number exist or not
|
||||
// log debug
|
||||
winston.logger.debug(`${uniqueCode} checking load balance transaction has been exists or not...`);
|
||||
|
||||
// log debug
|
||||
winston.logger.debug(`${uniqueCode} inserting load balance transaction...`);
|
||||
|
||||
@@ -1229,11 +1233,15 @@ const loadingBalanceUpdate = async (param) => {
|
||||
|
||||
// log debug
|
||||
winston.logger.debug(
|
||||
`${uniqueCode} inserting load balance transaction history...`
|
||||
`${uniqueCode} inserting 1 load balance transaction history...`
|
||||
);
|
||||
|
||||
let findDataLoadBalance = await model.findLoadBalance(loadBalanceNumber);
|
||||
let findDataLoadBalanceDetail = await model.findLoadBalanceDetail(loadBalanceNumber);
|
||||
// log debug
|
||||
winston.logger.debug(
|
||||
`${uniqueCode} inserting 2 load balance transaction history...`
|
||||
);
|
||||
let findDataLoadBalanceDetail = await model.findLoadBalanceDetail(findDataLoadBalance.i_load_balance);
|
||||
|
||||
let dataLoadBalance = {};
|
||||
let detailLoadBalance = [];
|
||||
@@ -1295,6 +1303,10 @@ const loadingBalanceUpdate = async (param) => {
|
||||
});
|
||||
}
|
||||
|
||||
// log debug
|
||||
winston.logger.debug(
|
||||
`${uniqueCode} inserting 3 load balance transaction history...`
|
||||
);
|
||||
// insert transaction
|
||||
await model.insertLoadingBalanceHistoryOnly(
|
||||
dataLoadBalance,
|
||||
|
||||
@@ -491,9 +491,9 @@ let findLoadBalance = (loadBalanceNumber) => {
|
||||
};
|
||||
|
||||
// FIND LOAD BALANCE DETAIL
|
||||
let findLoadBalanceDetail = (loadBalanceNumber) => {
|
||||
let findLoadBalanceDetail = (loadBalanceId) => {
|
||||
let result = knex("trx.t_d_load_balance_detail")
|
||||
.where("c_load_balance_no", loadBalanceNumber);
|
||||
.where("i_load_balance", loadBalanceId);
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user