Compare commits

...

15 Commits

Author SHA1 Message Date
ihsan fa7a38c713 bug fixed 2025-01-07 06:48:21 +07:00
ihsan d13ac26b95 bug fixed 2025-01-06 17:26:34 +07:00
lutfi 6e7e390ac8 update disable log cashin 2025-01-01 15:19:03 +07:00
lutfi 3c8fc4d81d update cash in 2025-01-01 14:52:36 +07:00
ihsan 22ce0b611a add version 2024-12-25 23:19:23 +07:00
ihsan a6c6146933 update 2024-11-05 21:05:25 +07:00
lutfi 0113e6dbb1 update d_disburse 2024-10-25 05:39:27 +07:00
lutfi 8d2f4bcda2 update 2024-10-17 16:12:12 +07:00
lutfi 9aa3428620 update 2024-10-17 15:37:25 +07:00
lutfi e8c73abf2e update 2024-10-17 14:39:05 +07:00
lutfi 6275d8cf86 update 2024-10-17 14:32:46 +07:00
lutfi 8af96b9a5f update 2024-10-17 14:30:20 +07:00
lutfi d9f3516d56 update 2024-10-17 14:29:11 +07:00
lutfi b7dec2613f Merge branch 'develop' of https://github.com/mohamadihsan/topuponline into develop 2024-10-17 14:06:07 +07:00
lutfi d540308d2d update 2024-10-17 12:14:47 +07:00
7 changed files with 38 additions and 10 deletions
@@ -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);
+5 -3
View File
@@ -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;
};
@@ -304,7 +304,7 @@ const insertLoadingBalance = async (
let loadDetail = [];
detail.forEach((element) => {
loadDetail.push({
i_load_balance: id,
i_load_balance: id.i_load_balance,
i_reservation_balance: element.i_reservation_balance,
c_reservation_no: element.c_reservation_no,
i_amount: element.i_amount,
@@ -336,7 +336,7 @@ const insertLoadingBalance = async (
let loadDetail = [];
detail.forEach((element) => {
loadDetail.push({
i_load_balance: id,
i_load_balance: id.i_load_balance,
i_reservation_balance: element.i_reservation_balance,
c_reservation_no: element.c_reservation_no,
i_amount: element.i_amount,
@@ -79,7 +79,7 @@ const callbackOy = async (req, res) => {
`${uniqueCode} [ RESPONSE REFUND-KMT ]: ${JSON.stringify(result)}`
);
let recipient_bank_code = recipient_bank.toLowerCase();
let recipient_bank_code = recipient_bank.toUpperCase();
// check trx_id yang di request match
let checkRequest = await model.checkRedeem(
partner_trx_id,
@@ -129,11 +129,14 @@ const callbackOy = async (req, res) => {
};
}
const unixTimeZero = Date.parse(last_updated_date);
const date_reimbursement = moment(unixTimeZero).format(
const date_reimbursement = moment(last_updated_date, 'DD-MM-YYYY HH:mm:ss').format(
'YYYY-MM-DD HH:mm:ss'
);
winston.logger.warn(
`${uniqueCode} [ log date_reimbusement ]: ${JSON.stringify(date_reimbursement)}`
);
//Update Card Replacement
await model.updateReplacementComplete(
checkRequest.i_card_replacement,
@@ -141,6 +144,7 @@ const callbackOy = async (req, res) => {
date_reimbursement
);
/*
//Notif Email
let urlCMS = '';
if (process.env.SERVER_FOR == 'production') {
@@ -170,7 +174,8 @@ const callbackOy = async (req, res) => {
status: 'complete',
},
});
console.log('urlCMS', url);
*/
// console.log('urlCMS', url)
result = {
code: '00',
@@ -32,6 +32,13 @@ const updateReplacementComplete = (i_replacement, request_no, date_disburse) =>
let result = knex("trx.t_d_card_replacement")
.where("i_card_replacement", i_replacement)
.where("c_request_no", request_no)
// .update({
// c_status: "A",
// c_status_name: "COMPLETED",
// d_disburse: date_disburse,
// c_response_code: "000",
// c_response_message: "Success"
// });
.update({
c_status: "A",
c_status_name: "COMPLETED",
@@ -2653,6 +2653,8 @@ const reservationV2 = async (req, res) => {
// `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting reservation transaction...`
// );
// (belum) ada issue disini, jadi ada case reservation number nya sama, terus error query harusnya ada handle response message nya, yg sekarang malah masuk ke blok reservation saved successfully.
// insert transaction
let insert = await model.insertReservation(data);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "topuponline",
"version": "1.0.0",
"version": "1.5.4",
"description": "",
"main": "index.js",
"scripts": {