Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -955,7 +955,7 @@ end
|
||||
# .joins("join sale_payments on sale_id = sales.sale_id")
|
||||
# .group("sales.sale_id")
|
||||
|
||||
query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb"',today)
|
||||
query = Sale.where('sales.sale_status = "completed" and DATE_FORMAT(sales.receipt_date,"%Y-%m-%d") = ? and (sp.payment_method = "mpu" or sp.payment_method = "visa" or sp.payment_method = "master" or sp.payment_method = "jcb")',today)
|
||||
.joins("JOIN sale_payments sp ON sp.sale_id = sales.sale_id")
|
||||
.sum("sp.payment_amount")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user