update
This commit is contained in:
@@ -8,9 +8,15 @@ class Api::BillController < Api::ApiController
|
||||
|
||||
#create Bill by Booking ID
|
||||
if (params[:booking_id])
|
||||
@sale = Sale.new
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(params[:booking_id], current_login_employee.name)
|
||||
|
||||
booking = Booking.find(params[:booking_id])
|
||||
if booking
|
||||
if booking.sale_id.nil?
|
||||
@sale = Sale.new
|
||||
@status, @sale_id = @sale.generate_invoice_from_booking(params[:booking_id], current_login_employee.name)
|
||||
else
|
||||
@status = true
|
||||
end
|
||||
end
|
||||
elsif (params[:order_id])
|
||||
@sale = Sale.new
|
||||
@status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee.name)
|
||||
|
||||
@@ -24,8 +24,8 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
if spay.payment_method == "cash"
|
||||
@cash = spay.payment_amount
|
||||
end
|
||||
if spay.payment_method == "mpu"
|
||||
@other = spay.payment_amount
|
||||
if spay.payment_method == "mpu" || spay.payment_method == "paypar"
|
||||
@other += spay.payment_amount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user