dashboard query changes

This commit is contained in:
phyusin
2018-06-25 16:13:40 +06:30
parent 99c2325aab
commit 9a86ff976a
3 changed files with 85 additions and 24 deletions

View File

@@ -120,7 +120,8 @@ class HomeController < ApplicationController
@inventories = StockJournal.inventory_balances(today,@from,@to,@from_time,@to_time).sum(:balance)
@total_trans = Sale.total_trans(today,current_user,@from,@to,@from_time,@to_time)
@total_payment_trans = Sale.total_payment_trans(today,current_user,@from,@to,@from_time,@to_time)
@total_card = Sale.total_card_sale(today,current_user,@from,@to,@from_time,@to_time)
@total_credit = Sale.credit_payment(today,current_user,@from,@to,@from_time,@to_time)
@sale_data = Array.new
@total_payment_methods = Sale.total_payment_methods(today,current_user,@from,@to,@from_time,@to_time)