sale voucher wrong spelling
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
class SalePayment < ApplicationRecord
|
class SalePayment < ApplicationRecord
|
||||||
belongs_to :sale
|
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)
|
def process_payment(invoice, action_by)
|
||||||
self.sale = invoice
|
self.sale = invoice
|
||||||
@@ -103,13 +103,13 @@ class SalePayment < ApplicationRecord
|
|||||||
return payment_status
|
return payment_status
|
||||||
end
|
end
|
||||||
|
|
||||||
def vochure_payment
|
def voucher_payment
|
||||||
payment_status = false
|
payment_status = false
|
||||||
|
|
||||||
#Next time - validate if the vochure number is valid - within
|
#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_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.outstanding_amount = self.sale.grand_total- self.received_amount
|
||||||
self.payment_status = "paid"
|
self.payment_status = "paid"
|
||||||
payment_method = self.save!
|
payment_method = self.save!
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= @settings_menu_category.menu %></td>
|
<td><%= @settings_menu_category.menu.name %></td>
|
||||||
<td><%= @settings_menu_category.name rescue "-" %></td>
|
<td><%= @settings_menu_category.name rescue "-" %></td>
|
||||||
<td><%= @settings_menu_category.alt_name %></td>
|
<td><%= @settings_menu_category.alt_name %></td>
|
||||||
<td><%= @settings_menu_category.order_by %></td>
|
<td><%= @settings_menu_category.order_by %></td>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ Rails.application.routes.draw do
|
|||||||
#cashier_terminals
|
#cashier_terminals
|
||||||
resources :cashier_terminals
|
resources :cashier_terminals
|
||||||
#order_job_stations
|
#order_job_stations
|
||||||
resources :order_job_stations
|
|
||||||
#order_queue_stations
|
#order_queue_stations
|
||||||
resources :order_queue_stations do
|
resources :order_queue_stations do
|
||||||
resources :processing_items, :only => [:new, :create]
|
resources :processing_items, :only => [:new, :create]
|
||||||
@@ -143,6 +143,15 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
namespace :reports do
|
||||||
|
resources :sales, :only => [:index, :show]
|
||||||
|
resources :orders, :only => [:index, :show]
|
||||||
|
resources :customers, :only => [:index, :show]
|
||||||
|
resources :products, :only => [:index, :show]
|
||||||
|
resources :inventory, :only => [:index, :show]
|
||||||
|
resources :employees, :only => [:index, :show]
|
||||||
|
end
|
||||||
|
|
||||||
#mount_compendium at: '/report' #, controller: 'reports'
|
#mount_compendium at: '/report' #, controller: 'reports'
|
||||||
|
|
||||||
#--------- Reports ------------#
|
#--------- Reports ------------#
|
||||||
|
|||||||
Reference in New Issue
Block a user