Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
superuser
2017-06-26 20:02:39 +06:30
125 changed files with 3941 additions and 636 deletions

View File

@@ -13,6 +13,7 @@ module SXRestaurants
# -- all .rb files in that directory are automatically loaded.
config.active_record.time_zone_aware_types = [:datetime, :time]
config.active_job.queue_adapter = :sidekiq
config.time_zone = 'Asia/Rangoon'
end
end

View File

@@ -78,6 +78,10 @@ Rails.application.routes.draw do
post 'moving' => "movetable#moving"
get "/table/:table_id/sale/:sale_id/edit" => "sale_edit#edit"
post 'item_void' => "sale_edit#item_void"
post 'item_void_cancel' => "sale_edit#item_void_cancel"
post 'cancel_all_void' => 'sale_edit#cancel_all_void'
post 'apply_void' => 'sale_edit#apply_void'
get 'table/:dining_id/movetable' => "movetable#move_dining"
get 'table/:dining_id/moveroom' => "moveroom#move_dining"
get 'sale/:sale_id' => 'sales#show'
@@ -90,7 +94,7 @@ Rails.application.routes.draw do
get "/:id/discount" => "discounts#index"
post "/:id/discount" => "discounts#create"
post "/:id/request_bills" => "request_bills#print" ,:defaults => { :format => 'json' }
post "/:id/request_bills" => "request_bills#print",:as => "request_bill" ,:defaults => { :format => 'json' }
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
#--------- Payment ------------#
get 'sale/:sale_id/payment' => 'payments#show'
@@ -101,6 +105,7 @@ Rails.application.routes.draw do
post 'payment/master' => "master#create"
post 'payment/visa' => "visa#create"
post 'payment/paypar' => 'paypar_payments#create'
post 'payment/credit' => 'credit_payments#create'
get 'sale/:sale_id/payment/credit_payment' => "credit_payments#index"
get 'sale/:sale_id/payment/others_payment' => "others_payments#index"
@@ -110,11 +115,20 @@ Rails.application.routes.draw do
get 'sale/:sale_id/payment/others_payment/JCB' => "jcb#index"
get 'sale/:sale_id/payment/others_payment/Redeem' => "redeem_payments#index"
#---------Void --------------#
post 'sale/:sale_id/void' => 'void#overall_void'
#---------Multiple Invoices --------------#
get 'table/:table_id/table_invoices' => "table_invoices#index" , :as => "table_invoice_index"
get 'table/:table_id/table_invoice/:invoice_id' => "table_invoices#show" , :as => "table_invoice_show"
get 'room/:room_id/room_invoices' => "room_invoices#index" , :as => "room_invoice_index"
get 'room/:room_id/room_invoice/:invoice_id' => "room_invoices#show" , :as => "room_invoice_show"
#---------Add Customer --------------#
#resources :customers
get '/:sale_id/customers', to: "customers#add_customer"
get '/:customer_id/get_customer' => 'home#get_customer',:as => "show_customer_details"
post '/:sale_id/update_sale' , to: "customers#update_sale_by_customer"#update customer id in sale table
post '/:sale_id/update_sale' , to: "customers#update_sale_by_customer" # update customer id in sale table
end
#--------- Waiter/Ordering Station ------------#
@@ -144,6 +158,10 @@ Rails.application.routes.draw do
post 'update_delivery', to: "home#update_delivery_status"
# qty update
get "/:id/edit", to: "edit#index"
post "/:id", to: "edit#update"
# Pass assigned_order_item_id
get 'print/print/:id', to: "print#print"
get 'print/print_order_summary/:id', to: "print#print_order_summary"
@@ -210,6 +228,7 @@ Rails.application.routes.draw do
namespace :transactions do
resources :sales
resources :orders
resources :credit_notes
get "/sales/:sale_id/manual_complete_sale" =>"manual_sales#manual_complete_sale", :as => "manual_complete_sale"
get "/sales/:sale_id/void" =>"manual_sales#void", :as => "void"
@@ -219,8 +238,8 @@ Rails.application.routes.draw do
#--------- Reports Controller Sections ------------#
namespace :reports do
resources :receipt_no, :only => [:index, :show]
resources :daily_sale, :only => [:index, :show]
resources :sale_item, :only => [:index, :show]
resources :daily_sales, :only => [:index, :show]
resources :sale_items, :only => [:index, :show]
# resources :sales, :only => [:index, :show]
# resources :orders, :only => [:index, :show]
# resources :customers, :only => [:index, :show]