shop code

This commit is contained in:
Myat Zin Wai Maw
2019-12-10 15:18:48 +06:30
parent c606ca73db
commit 79598c0126
115 changed files with 247 additions and 396 deletions

View File

@@ -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