Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -1039,7 +1039,7 @@ end
|
||||
else
|
||||
query = query.where("sales.sale_status = 'completed' and sp.payment_method = '#{payment_method}' and DATE_FORMAT(sales.receipt_date,'%Y-%m-%d') = ?",today)
|
||||
end
|
||||
query.sum("sp.payment_amount")
|
||||
query.select("(CASE WHEN sp.payment_method='cash' THEN (SUM(sp.payment_amount) - SUM(sales.amount_changed)) ELSE SUM(sp.payment_amount) END) as payment_amount").first()
|
||||
end
|
||||
|
||||
def self.total_customer(today)
|
||||
|
||||
Reference in New Issue
Block a user