Add Account Filture

This commit is contained in:
San Wai Lwin
2018-07-05 15:29:33 +06:30
parent a3c24e8bf6
commit ebaf4ad418
4 changed files with 34 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
class Reports::SaleitemController < BaseReportController
authorize_resource :class => false
def index
@account = Account.all
from, to = get_date_range_from_params
shift_sale_range = ''
@@ -23,8 +24,9 @@ class Reports::SaleitemController < BaseReportController
end
end
account_type = params[:account_type]
@type = params[:sale_type]
@sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type)
@sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type)
@sale_taxes = Sale.get_separate_tax(shift_sale_range,shift,from,to,nil)