Read NFC
This commit is contained in:
@@ -2,7 +2,7 @@ class Reports::ReceiptNoController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@payments = [["All Payment",''], ["Cash Payment","cash"], ["Credit Payment","creditnote"], ["FOC Payment","foc"]]
|
||||
@payment_method = PaymentMethodSetting.where("shop_code='#{@shop.shop_code}'")
|
||||
@payment_method = PaymentMethodSetting.all
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@shift_sale_range = ''
|
||||
@@ -14,17 +14,17 @@ authorize_resource :class => false
|
||||
|
||||
@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",@shift_sale.shift_started_at)
|
||||
else
|
||||
if @shift_sale.shift_closed_at.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",@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 = ?",@shift_sale.shift_started_at, @shift_sale.shift_closed_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@lookup = Lookup.find_by_lookup_type_and_shop_code('reprint_receipt',@shop.shop_code)
|
||||
@lookup = Lookup.find_by_lookup_type('reprint_receipt')
|
||||
if @lookup.nil?
|
||||
@lookup = Lookup.create_reprint_receipt_lookup(@shop.shop_code)
|
||||
end
|
||||
@@ -32,7 +32,7 @@ authorize_resource :class => false
|
||||
payment_type = params[:payment_type]
|
||||
@sale_data = Sale.get_shift_sales_by_receipt_no(@shift_sale_range,@shift,from,to,payment_type).where("sales.shop_code='#{@shop.shop_code}'")
|
||||
@sale_taxes = Sale.get_separate_tax(@shift_sale_range,@shift,from,to,payment_type).where("sales.shop_code='#{@shop.shop_code}'")
|
||||
@tax_profiles = TaxProfile.where("shop_code='#{@shop.shop_code}'").group('name').order('order_by asc') #.limit(2)
|
||||
@tax_profiles = TaxProfile.group('name').order('order_by asc') #.limit(2)
|
||||
|
||||
@from = from
|
||||
@to = to
|
||||
|
||||
Reference in New Issue
Block a user