update
This commit is contained in:
@@ -223,7 +223,7 @@ class SalePayment < ApplicationRecord
|
||||
membership_data = SalePayment.redeem(membership_setting.gateway_url,membership_setting.auth_token,customer_data.membership_id,self.received_amount,self.sale.sale_id)
|
||||
|
||||
if membership_data["status"]==true
|
||||
self.payment_method = "redeem"
|
||||
self.payment_method = "paypar"
|
||||
self.payment_amount = self.received_amount
|
||||
self.payment_reference = self.voucher_no
|
||||
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
|
||||
@@ -307,7 +307,7 @@ class SalePayment < ApplicationRecord
|
||||
paypar = sObj.sale_payments
|
||||
payparcost = 0
|
||||
paypar.each do |pp|
|
||||
if pp.payment_method == "redeem"
|
||||
if pp.payment_method == "paypar"
|
||||
payparcost = payparcost + pp.payment_amount
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user