split bill process
This commit is contained in:
@@ -186,9 +186,21 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
@table_no = ''
|
||||
@dining = ''
|
||||
|
||||
@shop = Shop::ShopDetail
|
||||
@shop = Shop::ShopDetail #show shop info
|
||||
|
||||
saleObj = Sale.find(sale_id)
|
||||
|
||||
#total customer with individual total amount
|
||||
survey = nil
|
||||
@individual_total = Array.new
|
||||
if !@sale_data.nil?
|
||||
survey = Survey.find_by_receipt_no(@sale_data.receipt_no)
|
||||
if !survey.nil?
|
||||
per_person_amount = saleObj.grand_total.to_f / survey.total_customer.to_i
|
||||
@individual_total.push({'total_customer' => survey.total_customer, 'per_person_amount' => per_person_amount.to_f })
|
||||
end
|
||||
end
|
||||
|
||||
# rounding adjustment
|
||||
if @shop.is_rounding_adj
|
||||
a = saleObj.grand_total % 25 # Modulus
|
||||
|
||||
Reference in New Issue
Block a user