mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 11:56:27 +00:00
Update invoice
This commit is contained in:
@@ -446,8 +446,10 @@ const _postingInvoice = async (uniqueCode) => {
|
||||
)}`
|
||||
);
|
||||
|
||||
const invoice = await model.getInvoice(item.reference, trx)
|
||||
|
||||
const cms = await model.setReturnSAP(
|
||||
{ c_invoice_no: item.reference },
|
||||
invoice,
|
||||
resSAP,
|
||||
trx,
|
||||
false
|
||||
|
||||
@@ -239,11 +239,24 @@ const getParameterSetting = async(trx, code) => {
|
||||
|
||||
}
|
||||
|
||||
const getInvoice = async(code, trx) => {
|
||||
|
||||
const result = await trx('payment.t_d_invoice').select([
|
||||
"*"
|
||||
])
|
||||
.where('c_invoice_no', '=', code)
|
||||
.first()
|
||||
|
||||
return result
|
||||
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
generateInvoice,
|
||||
insertPostingEt,
|
||||
setReturnSAP,
|
||||
getPostingEt,
|
||||
writePaynentHistory,
|
||||
getParameterSetting
|
||||
getParameterSetting,
|
||||
getInvoice
|
||||
};
|
||||
Reference in New Issue
Block a user