add junctionpay(vaap)
This commit is contained in:
@@ -11,6 +11,7 @@ class SalePayment < ApplicationRecord
|
||||
def process_payment(invoice, action_by, cash_amount, payment_method,remark=nil)
|
||||
self.sale = invoice
|
||||
self.received_amount = cash_amount
|
||||
self.payment_reference = remark
|
||||
amount_due = invoice.grand_total
|
||||
|
||||
#get all payment for this invoices
|
||||
@@ -305,7 +306,7 @@ class SalePayment < ApplicationRecord
|
||||
#Next time - validate if the vochure number is valid - within
|
||||
self.payment_method = "JunctionPay"
|
||||
self.payment_amount = self.received_amount
|
||||
self.payment_reference = self.voucher_no
|
||||
# self.payment_reference = self.payment_reference
|
||||
self.outstanding_amount = self.sale.grand_total- self.received_amount
|
||||
self.payment_status = "paid"
|
||||
payment_method = self.save!
|
||||
|
||||
Reference in New Issue
Block a user