From 6cc2ba511083a9f96c9545a9d20f73981dac1e13 Mon Sep 17 00:00:00 2001 From: San Wai Lwin Date: Tue, 6 Mar 2018 18:24:19 +0630 Subject: [PATCH] To add only Other Payment Name beside SX Resturant --- app/controllers/origami/jcb_controller.rb | 1 + app/controllers/origami/master_controller.rb | 1 + app/controllers/origami/mpu_controller.rb | 3 ++- .../origami/redeem_payments_controller.rb | 1 + app/controllers/origami/visa_controller.rb | 1 + app/pdf/receipt_bill_a5_pdf.rb | 2 +- app/pdf/receipt_bill_pdf.rb | 2 +- app/views/layouts/_header.html.erb | 11 ++++++++++- app/views/origami/jcb/index.html.erb | 1 - app/views/origami/master/index.html.erb | 1 - app/views/origami/mpu/index.html.erb | 1 - app/views/origami/redeem_payments/index.html.erb | 1 - app/views/origami/visa/index.html.erb | 1 - config/initializers/action_controller.rb | 14 +++++++------- 14 files changed, 25 insertions(+), 16 deletions(-) diff --git a/app/controllers/origami/jcb_controller.rb b/app/controllers/origami/jcb_controller.rb index e17c773e..06ee6087 100755 --- a/app/controllers/origami/jcb_controller.rb +++ b/app/controllers/origami/jcb_controller.rb @@ -9,6 +9,7 @@ class Origami::JcbController < BaseOrigamiController @jcbcount = 0 others = 0 + @payment_method_setting_nav = PaymentMethodSetting.all @shop = Shop::ShopDetail if @shop.is_rounding_adj new_total = Sale.get_rounding_adjustment(sale_data.grand_total) diff --git a/app/controllers/origami/master_controller.rb b/app/controllers/origami/master_controller.rb index 95710f11..77ae99d2 100755 --- a/app/controllers/origami/master_controller.rb +++ b/app/controllers/origami/master_controller.rb @@ -9,6 +9,7 @@ class Origami::MasterController < BaseOrigamiController @mastercount = 0 others = 0 + @payment_method_setting_nav = PaymentMethodSetting.all @shop = Shop::ShopDetail if @shop.is_rounding_adj new_total = Sale.get_rounding_adjustment(sale_data.grand_total) diff --git a/app/controllers/origami/mpu_controller.rb b/app/controllers/origami/mpu_controller.rb index 6eb2a0a0..c3f74133 100755 --- a/app/controllers/origami/mpu_controller.rb +++ b/app/controllers/origami/mpu_controller.rb @@ -7,7 +7,8 @@ class Origami::MpuController < BaseOrigamiController total = sale_data.grand_total @mpucount = 0 others = 0 - + + @payment_method_setting_nav = PaymentMethodSetting.all @shop = Shop::ShopDetail if @shop.is_rounding_adj new_total = Sale.get_rounding_adjustment(sale_data.grand_total) diff --git a/app/controllers/origami/redeem_payments_controller.rb b/app/controllers/origami/redeem_payments_controller.rb index 347fd3ea..bcb8f9ae 100755 --- a/app/controllers/origami/redeem_payments_controller.rb +++ b/app/controllers/origami/redeem_payments_controller.rb @@ -6,6 +6,7 @@ class Origami::RedeemPaymentsController < BaseOrigamiController @membership_rebate_balance=0 sale_data = Sale.find_by_sale_id(@sale_id) + @payment_method_setting_nav = PaymentMethodSetting.all @shop = Shop::ShopDetail # if @shop.is_rounding_adj # new_total = Sale.get_rounding_adjustment(sale_data.grand_total) diff --git a/app/controllers/origami/visa_controller.rb b/app/controllers/origami/visa_controller.rb index f04ec001..788704eb 100755 --- a/app/controllers/origami/visa_controller.rb +++ b/app/controllers/origami/visa_controller.rb @@ -8,6 +8,7 @@ class Origami::VisaController < BaseOrigamiController @visacount = 0 others = 0 + @payment_method_setting_nav = PaymentMethodSetting.all @shop = Shop::ShopDetail if @shop.is_rounding_adj new_total = Sale.get_rounding_adjustment(sale_data.grand_total) diff --git a/app/pdf/receipt_bill_a5_pdf.rb b/app/pdf/receipt_bill_a5_pdf.rb index fbe28541..ee9a1bda 100644 --- a/app/pdf/receipt_bill_a5_pdf.rb +++ b/app/pdf/receipt_bill_a5_pdf.rb @@ -2,7 +2,7 @@ class ReceiptBillA5Pdf < Prawn::Document include ActionView::Helpers::NumberHelper attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width, :line_move - def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,survey) + def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data) self.page_width = printer_settings.page_width self.page_height = printer_settings.page_height self.margin = 15 diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 99ae474d..0f02d506 100755 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -2,7 +2,7 @@ class ReceiptBillPdf < Prawn::Document include ActionView::Helpers::NumberHelper attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width, :line_move - def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data,survey) + def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance,card_data) self.page_width = printer_settings.page_width self.page_height = printer_settings.page_height self.margin = 0 diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 5f1fe42d..907c5e88 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -23,6 +23,11 @@ Logo SX Restaurant + <% if @payment_method_setting_nav.present? %> + /   +   Payment + + <% end %> @@ -73,4 +78,8 @@ --> - \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/origami/jcb/index.html.erb b/app/views/origami/jcb/index.html.erb index 1fe49080..f7f43812 100755 --- a/app/views/origami/jcb/index.html.erb +++ b/app/views/origami/jcb/index.html.erb @@ -12,7 +12,6 @@ --> -
JCB Payment
diff --git a/app/views/origami/master/index.html.erb b/app/views/origami/master/index.html.erb index 2e663b7a..03d90a07 100755 --- a/app/views/origami/master/index.html.erb +++ b/app/views/origami/master/index.html.erb @@ -12,7 +12,6 @@
--> -
Master Payment
diff --git a/app/views/origami/mpu/index.html.erb b/app/views/origami/mpu/index.html.erb index f95b3773..caa0c9e9 100755 --- a/app/views/origami/mpu/index.html.erb +++ b/app/views/origami/mpu/index.html.erb @@ -12,7 +12,6 @@
--> -
MPU Payment
diff --git a/app/views/origami/redeem_payments/index.html.erb b/app/views/origami/redeem_payments/index.html.erb index 1d29e563..169eb026 100755 --- a/app/views/origami/redeem_payments/index.html.erb +++ b/app/views/origami/redeem_payments/index.html.erb @@ -9,7 +9,6 @@
--> -
Reedem Payment
diff --git a/app/views/origami/visa/index.html.erb b/app/views/origami/visa/index.html.erb index 60f62caa..3cdca7df 100755 --- a/app/views/origami/visa/index.html.erb +++ b/app/views/origami/visa/index.html.erb @@ -12,7 +12,6 @@
--> -
VISA Payment
diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 8f310dab..3f69a55e 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -18,13 +18,13 @@ class ActionController::Base # redirect_to root_url(:host => request.domain) + "store_error" render :json => [{ status: false, message: 'Invalid Access!'}] end - else - # check for license file - if check_license - current_license(ENV["SX_PROVISION_URL"]) - else - redirect_to activate_path - end + # else + # # check for license file + # if check_license + # current_license(ENV["SX_PROVISION_URL"]) + # else + # redirect_to activate_path + # end end end