check multiple other payments in receipt

This commit is contained in:
phyusin
2018-01-11 11:46:05 +06:30
parent 0eda7543ff
commit 2d2a154c17
4 changed files with 27 additions and 24 deletions

View File

@@ -1129,8 +1129,7 @@ end
def self.getCardSaleTrans(sale_id)
query = Sale.select("cst.res_date,cst.res_time,cst.trace,cst.pan,cst.batch_no,cst.exp_date,cst.app,cst.res_type,cst.ref_no,cst.terminal_id,cst.merchant_id,cst.app_code")
.joins("JOIN card_sale_trans as cst on cst.sale_id = sales.sale_id")
.where("sales.sale_id=?",sale_id)
.first()
.where("sales.sale_id=? and status = 'Approved'",sale_id)
return query
end