diff --git a/.71c131f2ce727b13210eef32232709400762e5fb-audit.json b/.71c131f2ce727b13210eef32232709400762e5fb-audit.json index dff10bd..3572fab 100644 --- a/.71c131f2ce727b13210eef32232709400762e5fb-audit.json +++ b/.71c131f2ce727b13210eef32232709400762e5fb-audit.json @@ -6,14 +6,9 @@ "auditLog": ".71c131f2ce727b13210eef32232709400762e5fb-audit.json", "files": [ { - "date": 1658097118958, - "name": "2022-07-18-onlinetopup.log", - "hash": "29064ceb265b9682d0ff06a6ec035727282857bb2e0728da58d94250fef332b8" - }, - { - "date": 1658163610399, - "name": "2022-07-19-onlinetopup.log", - "hash": "e95cfb0806758cbef30c2ac39d9e8e62507cdc1487b8a9725864d716db73906d" + "date": 1658378143475, + "name": "2022-07-21-onlinetopup.log", + "hash": "2ac22a1348ec8402d30260be80663fdc4fb6d79a6942245d3486d5fbe0c713fc" } ], "hashType": "sha256" diff --git a/application/modules/auth/auth.controller.js b/application/modules/auth/auth.controller.js index e0fca0a..15c5a59 100644 --- a/application/modules/auth/auth.controller.js +++ b/application/modules/auth/auth.controller.js @@ -772,7 +772,7 @@ const getTIDMID = async (req, res) => { // GET PARTNER USER const getPartnerUser = async (req, res) => { try { - let partner_user_id = 58; + let partner_user_id = req.partner_user_id_token; // get partner user detail let partnerUser = await model.getPartnerUser(partner_user_id); diff --git a/application/modules/dongleorder/dongleorder.controller.js b/application/modules/dongleorder/dongleorder.controller.js index 69b2280..f37caf5 100644 --- a/application/modules/dongleorder/dongleorder.controller.js +++ b/application/modules/dongleorder/dongleorder.controller.js @@ -123,8 +123,8 @@ const updateDongleOrder = async (req, res) => { winston.logger.debug(`${uniqueCode} updating dongle order...`); let data = { - c_status: status == "G" ? "G" : "C", - c_status_name: status == "G" ? "GENERATED" : "CREATED", + c_status: status == "C" ? "C" : "I", + c_status_name: status == "C" ? "CREATED" : "INJECTED", d_modify: now, } diff --git a/application/modules/loadbalance/loadbalance.controller.js b/application/modules/loadbalance/loadbalance.controller.js index c7ce03a..643b19b 100644 --- a/application/modules/loadbalance/loadbalance.controller.js +++ b/application/modules/loadbalance/loadbalance.controller.js @@ -771,7 +771,7 @@ const loadingBalance = async (req, res) => { // log card history await model.createLoadBalanceLog({ - i_log_name: 89, + i_log_name: 21, d_log: now, c_card_number: card_number, c_source: "CMS - LOAD BALANCE", @@ -1364,7 +1364,7 @@ const loadingBalanceUpdate = async (param) => { // log card history await model.createLoadBalanceLog({ - i_log_name: 89, + i_log_name: 21, d_log: now, c_card_number: card_number, c_source: "CMS - LOAD BALANCE", @@ -1663,7 +1663,7 @@ const updateReservationAndLoadingBalanceOld = async ( // log card history await model.createLoadBalanceLog({ - i_log_name: 89, + i_log_name: 21, d_log: now, c_card_number: dataReservation.c_card_number, c_source: "CMS - LOAD BALANCE", @@ -1807,7 +1807,7 @@ const updateReservationAndLoadingBalance = async ( // log card history await model.createLoadBalanceLog({ - i_log_name: 89, + i_log_name: 21, d_log: dataLoadingBalance.d_load_balance, c_card_number: cardNumber, c_source: "CMS - LOAD BALANCE", diff --git a/application/modules/loadbalance/loadbalance.model.js b/application/modules/loadbalance/loadbalance.model.js index f0374d2..a049ad9 100644 --- a/application/modules/loadbalance/loadbalance.model.js +++ b/application/modules/loadbalance/loadbalance.model.js @@ -681,7 +681,7 @@ const getAccumulationBalanceInThisMonthFromCardHistory = ( .where("m_balance_after", ">", 0) .whereRaw("DATE_PART('YEAR', ??) = ?", ["d_log", year]) .whereRaw("DATE_PART('MONTH', ??) = ?", ["d_log", month]) - .whereIn("i_log_name", [90]) + .whereIn("i_log_name", [21]) .groupBy("c_card_number") .first(); return result; diff --git a/application/modules/reservebalance/reservebalance.controller.js b/application/modules/reservebalance/reservebalance.controller.js index ae50235..b89247d 100644 --- a/application/modules/reservebalance/reservebalance.controller.js +++ b/application/modules/reservebalance/reservebalance.controller.js @@ -793,7 +793,7 @@ const reservation = async (req, res) => { c_source: "CMS - RESERVE BALANCE", c_location: getPartner ? getPartner.terminal_name : null, m_balance_before: balance > 0 ? balance : 0, - m_amount: amount, + m_amount: 0, m_balance_after: parseInt(balance) + parseInt(amount), j_new_data: data, j_old_data: null, diff --git a/application/modules/reservebalance/reservebalance.model.js b/application/modules/reservebalance/reservebalance.model.js index e88155d..572a175 100644 --- a/application/modules/reservebalance/reservebalance.model.js +++ b/application/modules/reservebalance/reservebalance.model.js @@ -229,7 +229,7 @@ const getAccumulationBalanceInThisMonthFromCardHistory = ( .where("m_balance_after", ">", 0) .whereRaw("DATE_PART('YEAR', ??) = ?", ["d_log", year]) .whereRaw("DATE_PART('MONTH', ??) = ?", ["d_log", month]) - .whereIn("i_log_name", [90]) + .whereIn("i_log_name", [21]) .groupBy("c_card_number") .first(); return result;