add table no and cus id in payment ui

This commit is contained in:
Yan
2017-07-10 17:17:22 +06:30
parent 082627018f
commit 152af3a3cb
2 changed files with 10 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ class Origami::PaymentsController < BaseOrigamiController
@sale_data = Sale.find_by_sale_id(sale_id)
@balance = 0.00
@accountable_type = ''
@table_no = ''
#get customer amount
@customer = Customer.find(@sale_data.customer_id)
@@ -105,6 +106,12 @@ class Origami::PaymentsController < BaseOrigamiController
#end customer amount
@sale_data.bookings.each do |sbk|
df = DiningFacility.find(sbk.dining_facility_id)
@table_no = df.type + ' ' + df.name
break
end
@sale_data.sale_payments.each do |spay|
if spay.payment_method == "cash"
@cash = spay.payment_amount