mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 10:56:27 +00:00
Merge branch 'nuranggi' of https://github.com/mohamadihsan/topuponline
This commit is contained in:
@@ -105,7 +105,7 @@ const setReturnSAP = async (invoice, resSAP, trx) => {
|
||||
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = '${invoice.c_invoice_no}')`)
|
||||
|
||||
posting_et = await trx('public.posting_et').update({
|
||||
pos_status : resSAP.type == 0,
|
||||
pos_status : 0,
|
||||
status0 : resSAP.type,
|
||||
no_doksap : resSAP.data.E_DOCUMENTNUMBER ? resSAP.data.E_DOCUMENTNUMBER : null,
|
||||
status1 : resSAP.message ? resSAP.message : null
|
||||
@@ -134,6 +134,20 @@ const setReturnSAP = async (invoice, resSAP, trx) => {
|
||||
reference: invoice.c_invoice_no
|
||||
})
|
||||
|
||||
// update invoice
|
||||
t_invoice = await trx('payment.t_d_invoice').update({
|
||||
c_return_sap: resSAP.data.E_DOCUMENTNUMBER
|
||||
}, ['c_invoice_no','c_return_sap'])
|
||||
.where({
|
||||
c_invoice_no: invoice.c_invoice_no
|
||||
});
|
||||
|
||||
// update load balance
|
||||
t_load_balance = await trx('trx.t_d_load_balance').update({
|
||||
c_return_sap: resSAP.data.E_DOCUMENTNUMBER
|
||||
}, ['c_load_balance_no', 'c_return_sap'])
|
||||
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = '${invoice.c_invoice_no}')`)
|
||||
|
||||
}else{
|
||||
// update posting et
|
||||
posting_et = await trx('public.posting_et').update({
|
||||
|
||||
Reference in New Issue
Block a user