shop code filter for all reports and transactions

This commit is contained in:
Myat Zin Wai Maw
2019-11-26 12:06:52 +06:30
parent d1ab2c194d
commit 5dd4c6e7b6
26 changed files with 281 additions and 260 deletions

View File

@@ -3,11 +3,11 @@ class Reports::DailysaleController < BaseReportController
def index
from, to = get_date_range_from_params
@sale_data = Sale.daily_sales_list(from,to)
@tax = SaleTax.get_tax(from,to)
@sale_data = Sale.daily_sales_list(from,to,@shop.shop_code)
@tax = SaleTax.get_tax(from,to,@shop.shop_code)
@from = from
@to = to
@payment_methods = PaymentMethodSetting.where("is_active='1'").pluck("payment_method")
@payment_methods = PaymentMethodSetting.where("is_active='1' and shop_code='#{@shop.shop_code}'").pluck("payment_method")
# get printer info