Limit paid amount for JCB, Visa and Master Card
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user