sale voucher wrong spelling

This commit is contained in:
Min Zeya Phyo
2017-05-29 18:46:03 +06:30
parent de29de486f
commit c7a4adc7cc
3 changed files with 15 additions and 6 deletions

View File

@@ -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!