mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 22:06:27 +00:00
Add invoice History
This commit is contained in:
@@ -126,18 +126,21 @@ const setReturnSAP = async (invoice, resSAP, trx) => {
|
||||
}
|
||||
|
||||
const writePaynentHistory = async (data, trx) => {
|
||||
|
||||
const result = await trx('public.t_log_invoice').insert({
|
||||
console.log(data)
|
||||
const result = await trx('log.t_log_invoice').insert({
|
||||
i_log_name : 27,
|
||||
d_log : trx.raw('NOW()'),
|
||||
c_invoice_no : data.c_invoice_no,
|
||||
i_partner : data.i_partner,
|
||||
c_partner_name : data.c_partner_name,
|
||||
j_new_data : trx.raw(`${JSON.stringify(data)}::jsonb`),
|
||||
c_device_type : 'WEB CMS',
|
||||
j_new_data : JSON.stringify(data),
|
||||
d_payment_date: trx.raw('NOW()'),
|
||||
c_note : 'SUKSES POSTING TO INVOICE',
|
||||
c_status : 'S',
|
||||
d_created : trx.raw('NOW()')
|
||||
d_created : trx.raw('NOW()'),
|
||||
m_amount : data.amount,
|
||||
m_mdr_amount : 0,
|
||||
m_mdr_net : data.amount
|
||||
|
||||
}, ['i_log_name', 'c_note'])
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user