mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 17:16:27 +00:00
Update cash in
This commit is contained in:
@@ -315,11 +315,11 @@ const getPartnerRecon = async(trx) => {
|
||||
|
||||
const generateCode = async (trx, c_partner_code, d_payment_recon) => {
|
||||
let code = ""
|
||||
let prefix = `CI${c_partner_code}${d_payment_recon}`
|
||||
let prefix = `CIN${c_partner_code}${d_payment_recon}`
|
||||
|
||||
let result =await trx.select([trx.raw(`substring(c_cash_in_no, 12, 3) AS code`)])
|
||||
let result =await trx.select([trx.raw(`substring(c_cash_in_no, 13, 3) AS code`)])
|
||||
.from("payment.t_d_cash_in")
|
||||
.whereRaw(`substring(c_cash_in_no, 1, 11) = '${prefix}'`)
|
||||
.whereRaw(`substring(c_cash_in_no, 1, 12) = '${prefix}'`)
|
||||
// .where("d_project_date", projectDate)
|
||||
.orderBy('c_cash_in_no', 'DESC')
|
||||
.first()
|
||||
|
||||
Reference in New Issue
Block a user