This commit is contained in:
Nweni
2017-06-12 19:35:05 +06:30
parent 3bc3419243
commit c904451110
3 changed files with 12 additions and 6 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -157,7 +157,7 @@ member_actions= MembershipAction.create([{membership_type:"get_account_balance",
])
payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http//192.168.1.47:3006"})
payment_methods = PaymentMethodSetting.create({payment_method:"JCB",gateway_url: "http//192.168.1.47:3006"})
payment_methods = PaymentMethodSetting.create({payment_method:"REDEEMREBATE",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})