mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 12:16:28 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa7a38c713 | |||
| d13ac26b95 | |||
| 6e7e390ac8 | |||
| 3c8fc4d81d | |||
| 22ce0b611a | |||
| a6c6146933 | |||
| 0113e6dbb1 | |||
| 8d2f4bcda2 | |||
| 9aa3428620 | |||
| e8c73abf2e | |||
| 6275d8cf86 | |||
| 8af96b9a5f | |||
| d9f3516d56 | |||
| b7dec2613f | |||
| d540308d2d |
@@ -262,6 +262,12 @@ const _generateCashIn = async (uniqueCode) => {
|
|||||||
item.c_invoice_no
|
item.c_invoice_no
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// winston.logger.info(
|
||||||
|
// `SCHEDULER-FB70-${uniqueCode} cashIn reserv ${code} DATA : ${JSON.stringify(
|
||||||
|
// reserv
|
||||||
|
// )}`
|
||||||
|
// );
|
||||||
|
|
||||||
//TOTAL AMOUNT CASH-IN
|
//TOTAL AMOUNT CASH-IN
|
||||||
let cashInAmount = 0;
|
let cashInAmount = 0;
|
||||||
for (const itemCI of reserv) {
|
for (const itemCI of reserv) {
|
||||||
@@ -269,6 +275,12 @@ const _generateCashIn = async (uniqueCode) => {
|
|||||||
}
|
}
|
||||||
dataCahsIn.i_amount = cashInAmount;
|
dataCahsIn.i_amount = cashInAmount;
|
||||||
|
|
||||||
|
winston.logger.info(
|
||||||
|
`SCHEDULER-FB70-${uniqueCode} cashInAmount ${code} DATA : ${JSON.stringify(
|
||||||
|
cashInAmount
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
|
||||||
if(cashInAmount > 0) {
|
if(cashInAmount > 0) {
|
||||||
//INSERT CASH-IN
|
//INSERT CASH-IN
|
||||||
const cashIn = await model.insertCashIn(trx, dataCahsIn);
|
const cashIn = await model.insertCashIn(trx, dataCahsIn);
|
||||||
|
|||||||
@@ -299,9 +299,11 @@ const getReserve = async (trx, code, date, invoice) => {
|
|||||||
.where('tdpr.c_status', '=', 'S')
|
.where('tdpr.c_status', '=', 'S')
|
||||||
.whereNotNull('tdi.c_return_sap')
|
.whereNotNull('tdi.c_return_sap')
|
||||||
.whereNotNull('tdrb.c_load_balance_no')
|
.whereNotNull('tdrb.c_load_balance_no')
|
||||||
.whereRaw(
|
.whereNull('tdrb.c_cash_in_no')
|
||||||
`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)`
|
// .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;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ const insertLoadingBalance = async (
|
|||||||
let loadDetail = [];
|
let loadDetail = [];
|
||||||
detail.forEach((element) => {
|
detail.forEach((element) => {
|
||||||
loadDetail.push({
|
loadDetail.push({
|
||||||
i_load_balance: id,
|
i_load_balance: id.i_load_balance,
|
||||||
i_reservation_balance: element.i_reservation_balance,
|
i_reservation_balance: element.i_reservation_balance,
|
||||||
c_reservation_no: element.c_reservation_no,
|
c_reservation_no: element.c_reservation_no,
|
||||||
i_amount: element.i_amount,
|
i_amount: element.i_amount,
|
||||||
@@ -336,7 +336,7 @@ const insertLoadingBalance = async (
|
|||||||
let loadDetail = [];
|
let loadDetail = [];
|
||||||
detail.forEach((element) => {
|
detail.forEach((element) => {
|
||||||
loadDetail.push({
|
loadDetail.push({
|
||||||
i_load_balance: id,
|
i_load_balance: id.i_load_balance,
|
||||||
i_reservation_balance: element.i_reservation_balance,
|
i_reservation_balance: element.i_reservation_balance,
|
||||||
c_reservation_no: element.c_reservation_no,
|
c_reservation_no: element.c_reservation_no,
|
||||||
i_amount: element.i_amount,
|
i_amount: element.i_amount,
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const callbackOy = async (req, res) => {
|
|||||||
`${uniqueCode} [ RESPONSE REFUND-KMT ]: ${JSON.stringify(result)}`
|
`${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
|
// check trx_id yang di request match
|
||||||
let checkRequest = await model.checkRedeem(
|
let checkRequest = await model.checkRedeem(
|
||||||
partner_trx_id,
|
partner_trx_id,
|
||||||
@@ -129,11 +129,14 @@ const callbackOy = async (req, res) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const unixTimeZero = Date.parse(last_updated_date);
|
const date_reimbursement = moment(last_updated_date, 'DD-MM-YYYY HH:mm:ss').format(
|
||||||
const date_reimbursement = moment(unixTimeZero).format(
|
|
||||||
'YYYY-MM-DD HH:mm:ss'
|
'YYYY-MM-DD HH:mm:ss'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
winston.logger.warn(
|
||||||
|
`${uniqueCode} [ log date_reimbusement ]: ${JSON.stringify(date_reimbursement)}`
|
||||||
|
);
|
||||||
|
|
||||||
//Update Card Replacement
|
//Update Card Replacement
|
||||||
await model.updateReplacementComplete(
|
await model.updateReplacementComplete(
|
||||||
checkRequest.i_card_replacement,
|
checkRequest.i_card_replacement,
|
||||||
@@ -141,6 +144,7 @@ const callbackOy = async (req, res) => {
|
|||||||
date_reimbursement
|
date_reimbursement
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
//Notif Email
|
//Notif Email
|
||||||
let urlCMS = '';
|
let urlCMS = '';
|
||||||
if (process.env.SERVER_FOR == 'production') {
|
if (process.env.SERVER_FOR == 'production') {
|
||||||
@@ -170,7 +174,8 @@ const callbackOy = async (req, res) => {
|
|||||||
status: 'complete',
|
status: 'complete',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('urlCMS', url);
|
*/
|
||||||
|
// console.log('urlCMS', url)
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
code: '00',
|
code: '00',
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ const updateReplacementComplete = (i_replacement, request_no, date_disburse) =>
|
|||||||
let result = knex("trx.t_d_card_replacement")
|
let result = knex("trx.t_d_card_replacement")
|
||||||
.where("i_card_replacement", i_replacement)
|
.where("i_card_replacement", i_replacement)
|
||||||
.where("c_request_no", request_no)
|
.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({
|
.update({
|
||||||
c_status: "A",
|
c_status: "A",
|
||||||
c_status_name: "COMPLETED",
|
c_status_name: "COMPLETED",
|
||||||
|
|||||||
@@ -2653,6 +2653,8 @@ const reservationV2 = async (req, res) => {
|
|||||||
// `${uniqueCode} [ PROCESSING RESERVATION-V2 ] inserting reservation transaction...`
|
// `${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
|
// insert transaction
|
||||||
let insert = await model.insertReservation(data);
|
let insert = await model.insertReservation(data);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "topuponline",
|
"name": "topuponline",
|
||||||
"version": "1.0.0",
|
"version": "1.5.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user