diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 348a518a..18d24dc4 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -241,7 +241,7 @@ class Origami::PaymentsController < BaseOrigamiController @junctionpaycount = 0.0 @credit = 0.0 @sale_data = Sale.find_by_sale_id(sale_id) - @balance = 0.00 + @balance = 0 @accountable_type = '' @table_no = '' @dining = '' @@ -311,7 +311,7 @@ class Origami::PaymentsController < BaseOrigamiController if response["status"]==true response["account_data"].each do |res| if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount" - @balance += res["balance"] + @balance = @balance.to_f + res["balance"].to_f # @accountable_type = res["accountable_type"] @accountable_type = "Rebate Balance" end diff --git a/app/controllers/origami/table_invoices_controller.rb b/app/controllers/origami/table_invoices_controller.rb index a84f6ca7..5cd22054 100755 --- a/app/controllers/origami/table_invoices_controller.rb +++ b/app/controllers/origami/table_invoices_controller.rb @@ -31,6 +31,8 @@ class Origami::TableInvoicesController < BaseOrigamiController def show @table = DiningFacility.find(params[:table_id]) + @membership = MembershipSetting::MembershipSetting + @payment_methods = PaymentMethodSetting.all shop = Shop::ShopDetail @sale_array = Array.new @table.bookings.each do |booking| diff --git a/app/views/origami/table_invoices/show.html.erb b/app/views/origami/table_invoices/show.html.erb index 216e5eea..f6317dc3 100644 --- a/app/views/origami/table_invoices/show.html.erb +++ b/app/views/origami/table_invoices/show.html.erb @@ -156,6 +156,15 @@