upd
This commit is contained in:
@ -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){
|
||||||
|
|||||||
Reference in New Issue
Block a user