Merge branch 'bank_integration' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2018-01-10 18:16:41 +06:30
37 changed files with 807 additions and 92 deletions

View File

@@ -1125,6 +1125,16 @@ end
.sum("a.qty")
end
#card sale trans data
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()
return query
end
private
def generate_custom_id