kbzpay payment updated
This commit is contained in:
@@ -177,6 +177,11 @@ class SalePayment < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
def kbz_edit_sale_payment(amt, action_by)
|
||||
self.action_by = action_by
|
||||
sale_update_payment_status(amt)
|
||||
end
|
||||
|
||||
def self.get_paypar_account(url,token,membership_id,campaign_type_id,merchant_uid,auth_token)
|
||||
# Control for Paypar Cloud
|
||||
begin
|
||||
@@ -625,7 +630,7 @@ class SalePayment < ApplicationRecord
|
||||
self.outstanding_amount = self.sale.grand_total.to_f - self.received_amount.to_f
|
||||
self.payment_status = "paid"
|
||||
payment_status = self.save!
|
||||
sale_update_payment_status(self.received_amount)
|
||||
# sale_update_payment_status(self.received_amount)
|
||||
return payment_status
|
||||
end
|
||||
|
||||
|
||||
@@ -157,6 +157,7 @@ class ShiftSale < ApplicationRecord
|
||||
SUM(case when (sale_payments.payment_method='jcb') then (sale_payments.payment_amount) else 0 end) as jcb_amount,
|
||||
SUM(case when (sale_payments.payment_method='unionpay') then (sale_payments.payment_amount) else 0 end) as unionpay_amount,
|
||||
SUM(case when (sale_payments.payment_method='alipay') then (sale_payments.payment_amount) else 0 end) as alipay_amount,
|
||||
SUM(case when (sale_payments.payment_method='KBZPay') then (sale_payments.payment_amount) else 0 end) as kbzpay_amount,
|
||||
SUM(case when (sale_payments.payment_method='dinga') then (sale_payments.payment_amount) else 0 end) as dinga_amount,
|
||||
SUM(case when (sale_payments.payment_method='giftvoucher') then (sale_payments.payment_amount) else 0 end) as giftvoucher_amount,
|
||||
SUM(case when (sale_payments.payment_method='JunctionPay') then (sale_payments.payment_amount) else 0 end) as junctionpay_amount,
|
||||
|
||||
Reference in New Issue
Block a user