shop_code
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Reports::VoidSaleController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
# @shift_sale_range = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
@@ -9,10 +9,10 @@ authorize_resource :class => false
|
||||
if params[:shift_name].to_i != 0
|
||||
shift_sale = ShiftSale.find(params[:shift_name])
|
||||
if to.blank?
|
||||
@shift = ShiftSale.where("shift_started_at = ? and shift_closed_at is NULL and shop_code='#@shop.shop_code' ",shift_sale.shift_started_at)
|
||||
@shift = ShiftSale.where("shift_started_at = ? and shift_closed_at is NULL and shop_code='#{@shop.shop_code}' ",shift_sale.shift_started_at)
|
||||
else
|
||||
|
||||
@shift = ShiftSale.where("shift_started_at = ? and shift_closed_at = ? and shop_code='#@shop.shop_code' ",shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||
@shift = ShiftSale.where("shift_started_at = ? and shift_closed_at = ? and shop_code='#{@shop.shop_code}' ",shift_sale.shift_started_at, shift_sale.shift_closed_at)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user