Update invoice

This commit is contained in:
Nuranggi Hermawan
2022-11-30 13:34:37 +07:00
parent 9d79e83421
commit af90fa7681
2 changed files with 17 additions and 2 deletions
@@ -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
};