Limit paid amount for JCB, Visa and Master Card

This commit is contained in:
Phyo
2017-06-14 17:13:43 +06:30
parent af623cb474
commit 3b99016f80
11 changed files with 264 additions and 48 deletions

View File

@@ -20,6 +20,9 @@ class Origami::PaymentsController < BaseOrigamiController
@cash = 0.0
@other = 0.0
@ppamount = 0.0
@visacount= 0.0
@jcbcount= 0.0
@mastercount = 0.0
@sale_data = Sale.find_by_sale_id(sale_id)
#get customer amount
@@ -60,6 +63,12 @@ class Origami::PaymentsController < BaseOrigamiController
@other += spay.payment_amount
elsif spay.payment_method == "paypar"
@ppamount += spay.payment_amount
elsif spay.payment_method == "visa"
@visacount += spay.payment_amount
elsif spay.payment_method == "jcb"
@jcbcount += spay.payment_amount
elsif spay.payment_method == "master"
@mastercount += spay.payment_amount
end
end
end