From 58e779862fd23c08821511d187001ae25552e857 Mon Sep 17 00:00:00 2001 From: phyusin Date: Wed, 10 Jan 2018 18:57:14 +0630 Subject: [PATCH 1/2] change process flow for cb with bank_integration in lookups --- app/controllers/origami/jcb_controller.rb | 6 ++ app/controllers/origami/master_controller.rb | 6 ++ app/controllers/origami/mpu_controller.rb | 6 ++ app/controllers/origami/visa_controller.rb | 6 ++ app/views/origami/jcb/index.html.erb | 60 +++++++++++++------ app/views/origami/master/index.html.erb | 57 +++++++++++++----- app/views/origami/mpu/index.html.erb | 61 +++++++++++++------ app/views/origami/visa/index.html.erb | 62 +++++++++++++++----- 8 files changed, 198 insertions(+), 66 deletions(-) diff --git a/app/controllers/origami/jcb_controller.rb b/app/controllers/origami/jcb_controller.rb index be4cc94c..9c872325 100755 --- a/app/controllers/origami/jcb_controller.rb +++ b/app/controllers/origami/jcb_controller.rb @@ -29,7 +29,13 @@ class Origami::JcbController < BaseOrigamiController @member_discount = MembershipSetting.find_by_discount(1) @sub_total = sale_data.total_amount @membership_id = sale_data.customer.membership_id + #for bank integration @receipt_no = sale_data.receipt_no + bank_integration = Lookup.collection_of('bank_integration') + @bank_integration = 0 + if !bank_integration[0].nil? + @bank_integration = bank_integration[0][1] + end end def create diff --git a/app/controllers/origami/master_controller.rb b/app/controllers/origami/master_controller.rb index 068095ca..0ad47913 100755 --- a/app/controllers/origami/master_controller.rb +++ b/app/controllers/origami/master_controller.rb @@ -28,7 +28,13 @@ class Origami::MasterController < BaseOrigamiController @member_discount = MembershipSetting.find_by_discount(1) @sub_total = sale_data.total_amount @membership_id = sale_data.customer.membership_id + #for bank integration @receipt_no = sale_data.receipt_no + bank_integration = Lookup.collection_of('bank_integration') + @bank_integration = 0 + if !bank_integration[0].nil? + @bank_integration = bank_integration[0][1] + end end def create diff --git a/app/controllers/origami/mpu_controller.rb b/app/controllers/origami/mpu_controller.rb index d1cb3c81..51bcabb1 100755 --- a/app/controllers/origami/mpu_controller.rb +++ b/app/controllers/origami/mpu_controller.rb @@ -28,7 +28,13 @@ class Origami::MpuController < BaseOrigamiController @member_discount = MembershipSetting.find_by_discount(1) @sub_total = sale_data.total_amount @membership_id = sale_data.customer.membership_id + #for bank integration @receipt_no = sale_data.receipt_no + bank_integration = Lookup.collection_of('bank_integration') + @bank_integration = 0 + if !bank_integration[0].nil? + @bank_integration = bank_integration[0][1] + end end def create diff --git a/app/controllers/origami/visa_controller.rb b/app/controllers/origami/visa_controller.rb index a664e327..af4d31f0 100755 --- a/app/controllers/origami/visa_controller.rb +++ b/app/controllers/origami/visa_controller.rb @@ -27,7 +27,13 @@ class Origami::VisaController < BaseOrigamiController @member_discount = MembershipSetting.find_by_discount(1) @sub_total = sale_data.total_amount @membership_id = sale_data.customer.membership_id + #for bank integration @receipt_no = sale_data.receipt_no + bank_integration = Lookup.collection_of('bank_integration') + @bank_integration = 0 + if !bank_integration[0].nil? + @bank_integration = bank_integration[0][1] + end end def create diff --git a/app/views/origami/jcb/index.html.erb b/app/views/origami/jcb/index.html.erb index 1d855ad2..ada30a8b 100755 --- a/app/views/origami/jcb/index.html.erb +++ b/app/views/origami/jcb/index.html.erb @@ -20,6 +20,7 @@
+ <% if @bank_integration == '1' %>
@@ -29,7 +30,7 @@

- + <% end %>
@@ -120,25 +121,28 @@