upd
This commit is contained in:
@ -321,9 +321,12 @@ class FinanceAdapter extends Adapter{
|
|||||||
// qry = qry + "where podescription like '%" + keyword + "%' ";
|
// qry = qry + "where podescription like '%" + keyword + "%' ";
|
||||||
// qry = qry + "order by idxpo asc limit " + offset + ", " + limit;
|
// qry = qry + "order by idxpo asc limit " + offset + ", " + limit;
|
||||||
|
|
||||||
let qry = "select * from vw_financelist ";
|
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 podescription like '%" + keyword + "%' ";
|
qry += "from vw_financelist 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.podescription like '%" + keyword + "%' ";
|
||||||
|
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){
|
||||||
@ -345,9 +348,12 @@ class FinanceAdapter extends Adapter{
|
|||||||
"totalpage": pagination,
|
"totalpage": pagination,
|
||||||
"totalrows": result.length
|
"totalrows": result.length
|
||||||
});
|
});
|
||||||
qry = "select * from vw_financelist ";
|
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 podescription like '%" + keyword + "%' ";
|
qry += "from vw_financelist v ";
|
||||||
qry = qry + "order by idxpo asc limit " + offset + ", " + limit;
|
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.podescription like '%" + keyword + "%' ";
|
||||||
|
qry += "order by v.idxpo asc limit " + offset + ", " + limit;
|
||||||
db.query(qry,[],function(err,result,fields){
|
db.query(qry,[],function(err,result,fields){
|
||||||
if(err){
|
if(err){
|
||||||
apires.meta['message'] = err.toString();
|
apires.meta['message'] = err.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user