diff --git a/adapter/poadapter.js b/adapter/poadapter.js index 5c6a99e..50e7e00 100644 --- a/adapter/poadapter.js +++ b/adapter/poadapter.js @@ -1849,7 +1849,12 @@ class PoAdapter extends Adapter { try { let _idx = req.query.idxpo; - let qry = "select * from vw_po where _idx='" + _idx + "'"; + let qry = "select v.*, po.currency_id, po.rate_snapshot, " + + "c.currency AS currency_code, c.symbol AS currency_symbol " + + "from vw_po v " + + "left join tbl_po po on po._idx = v._idx " + + "left join tbl_currency c on c._idx = po.currency_id " + + "where v._idx='" + _idx + "'"; // console.log(qry); db.query(qry, [], function (err, result, fields) {