delete shop scope in model
This commit is contained in:
@@ -791,7 +791,7 @@ def self.daily_sales_list(from,to)
|
||||
SUM(case when (sale_payments.payment_method='giftvoucher') then sale_payments.payment_amount else 0 end) as giftvoucher_amount,
|
||||
SUM(case when (sale_payments.payment_method='foc') then sale_payments.payment_amount else 0 end) as foc_amount")
|
||||
.along_with_sale_payments_except_void_between(from, to)
|
||||
.where("(sale_status = ? OR sale_status = ?) AND sales.receipt_date between ? AND ? ", 'completed', 'void', from, to).shop
|
||||
.where("(sale_status = ? OR sale_status = ?) AND sales.receipt_date between ? AND ? ", 'completed', 'void', from, to)
|
||||
.group("sale_id").to_sql
|
||||
|
||||
daily_total = connection.select_all("SELECT
|
||||
|
||||
Reference in New Issue
Block a user