add table no and cus id in payment ui
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user