shop code filter for all reports and transactions
This commit is contained in:
@@ -11,9 +11,9 @@ class Reports::StockCheckController < BaseReportController
|
||||
# end
|
||||
from_date, to_date = get_date_range_from_params
|
||||
@item_code = params[:item_code]
|
||||
@inventory_definitions = InventoryDefinition.active.all
|
||||
@inventory_definitions = InventoryDefinition.active.where("shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@transaction = StockCheckItem.get_transaction(from_date, to_date, @item_code)
|
||||
@transaction = StockCheckItem.where("shop_code='#{@shop.shop_code}'").get_transaction(from_date, to_date, @item_code)
|
||||
@from = from_date
|
||||
@to = to_date
|
||||
# get printer info
|
||||
@@ -27,7 +27,7 @@ class Reports::StockCheckController < BaseReportController
|
||||
def show
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
date_arr = Array.new
|
||||
@sale_data.each do |sale|
|
||||
|
||||
Reference in New Issue
Block a user