change credit payment query for dashboard and daily sales
This commit is contained in:
@@ -126,8 +126,11 @@ class HomeController < ApplicationController
|
||||
if !employee_sales.nil?
|
||||
employee_sales.each do |emp|
|
||||
emp_data = []
|
||||
emp_data.push([emp.e_name, emp.payment_amount])
|
||||
@employee_sales.push({'name' => emp.payment_method, 'data' => emp_data})
|
||||
if emp.payment_amount > 0
|
||||
emp_data.push([emp.e_name, emp.payment_amount])
|
||||
|
||||
@employee_sales.push({'name' => emp.payment_method, 'data' => emp_data})
|
||||
end
|
||||
end
|
||||
end
|
||||
@inventories = StockJournal.inventory_balances(today,@from,@to,@from_time,@to_time).sum(:balance)
|
||||
|
||||
Reference in New Issue
Block a user