From c7a4adc7cc3085a8e42596468d293e7ed9ec2533 Mon Sep 17 00:00:00 2001 From: Min Zeya Phyo Date: Mon, 29 May 2017 18:46:03 +0630 Subject: [PATCH] sale voucher wrong spelling --- app/models/sale_payment.rb | 8 ++++---- app/views/settings/menu_categories/show.html.erb | 2 +- config/routes.rb | 11 ++++++++++- 3 files changed, 15 insertions(+), 6 deletions(-) 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 @@ - <%= @settings_menu_category.menu %> + <%= @settings_menu_category.menu.name %> <%= @settings_menu_category.name rescue "-" %> <%= @settings_menu_category.alt_name %> <%= @settings_menu_category.order_by %> diff --git a/config/routes.rb b/config/routes.rb index 1527bc48..ed2cdab0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -124,7 +124,7 @@ Rails.application.routes.draw do #cashier_terminals resources :cashier_terminals #order_job_stations - resources :order_job_stations + #order_queue_stations resources :order_queue_stations do resources :processing_items, :only => [:new, :create] @@ -143,6 +143,15 @@ Rails.application.routes.draw do 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' #--------- Reports ------------#