shop code
This commit is contained in:
@@ -2,7 +2,6 @@ class Reports::CommissionController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
from_date, to_date = get_date_range_from_params
|
||||
|
||||
commissioner = params[:commissioner].to_i
|
||||
@@ -22,7 +21,6 @@ class Reports::CommissionController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::CreditPaymentController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@filter_for_credit = [['All',''],['Paid','paid'],['Unpaid','unpaid']]
|
||||
@sources = [["All",''], ["Cashier","cashier"],["Quick Service","quick_service"],["Online Order","doemal_order"]]
|
||||
from, to = get_date_range_from_params
|
||||
@@ -43,7 +42,6 @@ authorize_resource :class => false
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
|
||||
@@ -2,7 +2,6 @@ class Reports::DailysaleController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
@sale_data = Sale.daily_sales_list(from,to,@shop.shop_code)
|
||||
@tax = SaleTax.get_tax(from,to,@shop.shop_code)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::HourlySaleitemController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@account = Account.where("shop_code='#{@shop.shop_code}'")
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@@ -65,7 +64,6 @@ class Reports::HourlySaleitemController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to, report_type = get_date_range_from_params
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||
sale_data = @sale_data
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::IndutyController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@commissioners = Commissioner.where("shop_code='#{@shop.shop_code}'") #.where("is_active='1'")
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
@@ -42,7 +41,6 @@ class Reports::IndutyController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@induty_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::OrderReservationController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@providers = [["All",''], ["Direct Delivery","direct_delivery"],["Pick-Up","pick_up"],["TURBO","turbo"],["food2u","food2u"], ["ygndoor2door","ygndoor2door"]]
|
||||
@payment_types = [["All",''], ["COD","cash_on_delivery"],["DINGA","dinga"]]
|
||||
|
||||
@@ -48,7 +47,6 @@ class Reports::OrderReservationController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::PaymentMethodController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@payments = [["All Payment",''],["Cash Payment","cash"], ["KBZ Payment", KbzPay::KBZ_PAY], ["Credit Payment","creditnote"],
|
||||
["FOC Payment","foc"], ["MPU Payment","mpu"], ["Visa Payment","visa"],
|
||||
["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"],
|
||||
@@ -42,7 +41,6 @@ class Reports::PaymentMethodController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -7,21 +7,15 @@ class Reports::ProductSaleController < BaseReportController
|
||||
@order_by = params[:order_by]
|
||||
end
|
||||
|
||||
@sale_data = Sale.get_menu_item_query(@order_by)
|
||||
@sale_data = Sale.get_menu_item_query(@order_by)
|
||||
|
||||
# get printer info
|
||||
@print_settings = PrintSetting.get_precision_delimiter()
|
||||
# get printer info
|
||||
@print_settings = PrintSetting.get_precision_delimiter()
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json
|
||||
format.json
|
||||
format.xls
|
||||
end
|
||||
end
|
||||
|
||||
#Shop Name in Navbor
|
||||
helper_method :shop_detail
|
||||
def shop_detail
|
||||
@shop = Shop.current_shop
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::ReceiptNoController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@payments = [["All Payment",''], ["Cash Payment","cash"], ["Credit Payment","creditnote"], ["FOC Payment","foc"]]
|
||||
@payment_method = PaymentMethodSetting.where("shop_code='#{@shop.shop_code}'")
|
||||
from, to = get_date_range_from_params
|
||||
@@ -54,7 +53,6 @@ authorize_resource :class => false
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
@@ -78,7 +76,7 @@ authorize_resource :class => false
|
||||
end
|
||||
|
||||
def sync_data
|
||||
|
||||
|
||||
@orders, @order_items, @sales, @sale_items, @sale_taxes, @sale_payments, @sale_orders, @sale_audits, @bookings, @assigned_order_items, @shift_sales = Booking.get_sync_data(params[:sale_id])
|
||||
|
||||
# Here comes to call the sync api
|
||||
@@ -182,7 +180,7 @@ authorize_resource :class => false
|
||||
customer= Customer.find(saleObj.customer_id)
|
||||
|
||||
#shop detail
|
||||
#shop_detail = Shop.current_shop
|
||||
#shop_detail = @shop
|
||||
# get member information
|
||||
rebate = MembershipSetting.find_by_rebate(1)
|
||||
if customer.membership_id != nil && rebate
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::ReceiptNoDetailController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@payments = [["All Payment",''], ["Cash Payment","cash"], ["Credit Payment","creditnote"], ["FOC Payment","foc"]]
|
||||
@payment_method = PaymentMethodSetting.where("shop_code='#{@shop.shop_code}'")
|
||||
from, to = get_date_range_from_params
|
||||
@@ -49,7 +48,6 @@ authorize_resource :class => false
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
class Reports::SaleitemController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
@account = Account.where("shop_code='#{@shop.shop_code}'")
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@@ -60,7 +59,6 @@ class Reports::SaleitemController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
from, to, report_type = get_date_range_from_params
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -86,7 +84,6 @@ class Reports::SaleitemController < BaseReportController
|
||||
end
|
||||
|
||||
def print_sale_items
|
||||
@shop = Shop.current_shop
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
shift_sale_range = ''
|
||||
|
||||
@@ -2,7 +2,7 @@ class Reports::ShiftsaleController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
@shift = ''
|
||||
if params[:shift_name].to_i != 0
|
||||
@@ -26,7 +26,7 @@ class Reports::ShiftsaleController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
@@ -50,7 +50,7 @@ class Reports::ShiftsaleController < BaseReportController
|
||||
end
|
||||
|
||||
def print_close_receipt
|
||||
@shop = Shop.current_shop
|
||||
|
||||
shift_id = params[:id]
|
||||
@shift = ShiftSale.find_by_id(shift_id)
|
||||
shift_obj = ShiftSale.where('id =?',shift_id)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Reports::StaffMealController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
|
||||
@account = Account.where("shop_code='#{@shop.shop_code}'")
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ class Reports::StockCheckController < BaseReportController
|
||||
# authorize_resource :class => false
|
||||
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
|
||||
# from_date = DateTime.now.beginning_of_day.utc.getlocal
|
||||
# to_date = DateTime.now.end_of_day.utc.getlocal
|
||||
# unless params[:daterange].blank?
|
||||
@@ -26,7 +26,7 @@ class Reports::StockCheckController < BaseReportController
|
||||
end
|
||||
|
||||
def show
|
||||
@shop = Shop.current_shop
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
|
||||
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED).where("shift_sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Reports::WasteAndSpoilageController < BaseReportController
|
||||
authorize_resource :class => false
|
||||
def index
|
||||
@shop = Shop.current_shop
|
||||
|
||||
from, to = get_date_range_from_params
|
||||
@sale_type = params[:sale_type]
|
||||
@sale_data = Sale.get_wastes_and_spoilages(from,to,@sale_type).where("sales.shop_code='#{@shop.shop_code}'")
|
||||
|
||||
Reference in New Issue
Block a user