sale voucher wrong spelling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class SalePayment < ApplicationRecord
|
||||
belongs_to :sale
|
||||
|
||||
:attr_accessor :received_amount, :card_payment_reference, :vochure_no, :giftcard_no, :customer_id, :external_payment_status
|
||||
:attr_accessor :received_amount, :card_payment_reference, :voucher_no, :giftcard_no, :customer_id, :external_payment_status
|
||||
|
||||
def process_payment(invoice, action_by)
|
||||
self.sale = invoice
|
||||
@@ -103,13 +103,13 @@ class SalePayment < ApplicationRecord
|
||||
return payment_status
|
||||
end
|
||||
|
||||
def vochure_payment
|
||||
def voucher_payment
|
||||
payment_status = false
|
||||
|
||||
#Next time - validate if the vochure number is valid - within
|
||||
self.payment_method = "vochure"
|
||||
self.payment_method = "voucher"
|
||||
self.payment_amount = self.received_amount
|
||||
self.payment_reference = self.vochure_no
|
||||
self.payment_reference = self.voucher_no
|
||||
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