diff --git a/app/models/sale_payment.rb b/app/models/sale_payment.rb index e0d3d434..71793f4c 100644 --- a/app/models/sale_payment.rb +++ b/app/models/sale_payment.rb @@ -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! diff --git a/app/views/settings/menu_categories/show.html.erb b/app/views/settings/menu_categories/show.html.erb index a85b89c7..f151a356 100644 --- a/app/views/settings/menu_categories/show.html.erb +++ b/app/views/settings/menu_categories/show.html.erb @@ -27,7 +27,7 @@