This commit is contained in:
phyusin
2018-03-22 15:13:41 +06:30
parent ebadfff25b
commit 246f9afff5
3 changed files with 125 additions and 2 deletions

View File

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

View File

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