mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 23:46:28 +00:00
Update
This commit is contained in:
@@ -114,9 +114,9 @@ const setReturnSAP = async (invoice, resSAP, trx, posting = false, c_invoice_no
|
||||
})
|
||||
|
||||
if(posting) {
|
||||
await writePaynentHistory(t_invoice, "SUCCESSFULLY", 102, trx)
|
||||
await writePaynentHistory(t_invoice[0], "SUCCESSFULLY", 102, trx)
|
||||
} else {
|
||||
await writePaynentHistory(t_invoice, "SUCCESS TO RETRY SAP", 118, trx)
|
||||
await writePaynentHistory(t_invoice[0], "SUCCESS TO RETRY SAP", 118, trx)
|
||||
}
|
||||
|
||||
}else {
|
||||
@@ -155,9 +155,9 @@ const setReturnSAP = async (invoice, resSAP, trx, posting = false, c_invoice_no
|
||||
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = '${c_invoice_no}')`)
|
||||
|
||||
if(posting) {
|
||||
await writePaynentHistory(t_invoice, "SUCCESSFULLY", 102, trx)
|
||||
await writePaynentHistory(t_invoice[0], "SUCCESSFULLY", 102, trx)
|
||||
} else {
|
||||
await writePaynentHistory(t_invoice, "SUCCESS TO RETRY SAP", 118, trx)
|
||||
await writePaynentHistory(t_invoice[0], "SUCCESS TO RETRY SAP", 118, trx)
|
||||
}
|
||||
|
||||
}else{
|
||||
@@ -172,15 +172,15 @@ const setReturnSAP = async (invoice, resSAP, trx, posting = false, c_invoice_no
|
||||
})
|
||||
|
||||
// update invoice
|
||||
t_invoice = await trx('payment.t_d_invoice').select(['c_invoice_no','c_return_sap','m_amount'])
|
||||
t_invoice = await trx('payment.t_d_invoice').select(['*'])
|
||||
.where({
|
||||
c_invoice_no: c_invoice_no
|
||||
});
|
||||
|
||||
if(posting) {
|
||||
await writePaynentHistory(t_invoice, `SUCCESS WITH SAP ERR: ${resSAP.message}`,102, trx)
|
||||
await writePaynentHistory(t_invoice[0], `SUCCESS WITH SAP ERR: ${resSAP.message}`,102, trx)
|
||||
} else {
|
||||
await writePaynentHistory(t_invoice, `FAIL TO RETRY WITH SAP ERR: ${resSAP.message}`,118, trx)
|
||||
await writePaynentHistory(t_invoice[0], `FAIL TO RETRY WITH SAP ERR: ${resSAP.message}`,118, trx)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user