add junction pay

This commit is contained in:
Yan
2018-03-16 18:37:54 +06:30
parent c982da4264
commit fa125df355
8 changed files with 369 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ class Origami::PaymentsController < BaseOrigamiController
cashier_terminal = CashierTerminal.find(shift.cashier_terminal_id)
end
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
# Print for First Bill to Customer
unique_code = "ReceiptBillPdf"
@@ -89,7 +89,7 @@ class Origami::PaymentsController < BaseOrigamiController
# Mobile Print
render :json => result.to_json
end
# end
end
def create
@@ -138,7 +138,7 @@ class Origami::PaymentsController < BaseOrigamiController
end
# For Print
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
# if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
receipt_bill_a5_pdf = Lookup.collection_of("print_settings") #print_settings with name:ReceiptBillA5Pdf
unique_code = "ReceiptBillPdf"
if !receipt_bill_a5_pdf.empty?
@@ -202,8 +202,8 @@ class Origami::PaymentsController < BaseOrigamiController
booking.booking_orders.each do |order|
Order.pay_process_order_queue(order.order_id,table_id)
end
# end
end
end
end
end
@@ -221,6 +221,7 @@ class Origami::PaymentsController < BaseOrigamiController
@jcbcount= 0.0
@mastercount = 0.0
@unionpaycount = 0.0
@junctionpaycount = 0.0
@credit = 0.0
@sale_data = Sale.find_by_sale_id(sale_id)
@balance = 0.00
@@ -333,6 +334,8 @@ class Origami::PaymentsController < BaseOrigamiController
@mastercount += spay.payment_amount
elsif spay.payment_method == "unionpay"
@unionpaycount += spay.payment_amount
elsif spay.payment_method == "junctionpay"
@unionpaycount += spay.payment_amount
elsif spay.payment_method == "creditnote"
@credit += spay.payment_amount
end