This commit is contained in:
Rizki
2026-03-25 11:30:10 +07:00
parent 64d220cd1b
commit d8b69c3c42

View File

@ -83,9 +83,12 @@ class FinanceAdapter extends Adapter{
try { try {
let idxpo = req.query.idxpo; let idxpo = req.query.idxpo;
let qry = "select * from vw_popaylist "; let qry = "select v.*, COALESCE(c.currency, 'USD') AS currency_code, COALESCE(c.symbol, '$') AS currency_symbol, po.rate_snapshot AS po_rate_snapshot ";
qry = qry + "where idxpo='" + idxpo + "' "; qry += "from vw_popaylist v ";
qry = qry + "order by idxpo asc"; qry += "left join tbl_po po on po._idx = v.idxpo ";
qry += "left join tbl_currency c on c._idx = po.currency_id ";
qry += "where v.idxpo='" + idxpo + "' ";
qry += "order by v.idxpo asc";
// console.log(qry); // console.log(qry);
db.query(qry,[],function(err,result,fields){ db.query(qry,[],function(err,result,fields){