Redeem amount validation

This commit is contained in:
Phyo
2017-06-13 12:04:31 +06:30
parent 9e4c8cef68
commit 99d00f6d2a
3 changed files with 37 additions and 33 deletions

View File

@@ -4,6 +4,7 @@ class Origami::RedeemPaymentsController < BaseOrigamiController
payment_method = params[:payment_method]
@membership_rebate_balance=0
sale_data = Sale.find_by_sale_id(@sale_id)
@food_prices, @beverage_prices = SaleItem.calculate_food_beverage(sale_data.sale_items)
if sale_data
if sale_data.customer_id
customer_data= Customer.find_by_customer_id(sale_data.customer_id)
@@ -28,8 +29,8 @@ class Origami::RedeemPaymentsController < BaseOrigamiController
else
@out = false,0
end
else
@out = false, 0
end