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

This commit is contained in:
Aung Myo
2017-06-29 15:42:45 +06:30
38 changed files with 878 additions and 186 deletions

View File

@@ -70,6 +70,8 @@ Rails.application.routes.draw do
#--------- Cashier ------------#
namespace :origami do
resources :cash_ins, only:[:new, :create]
resources :cash_outs, only:[:new, :create]
root "home#index"
get "table/:dining_id" => "home#show" do #origami/:booking_id will show
# resources :discounts, only: [:index,:new, :create ] #add discount type
@@ -89,16 +91,32 @@ Rails.application.routes.draw do
get 'room/:room_id' => 'rooms#show'
get 'order/:order_id' => "orders#show"
post '/:booking_id' => 'home#item_show'
# post '/:booking_id' => 'home#item_show'
get "/:id/discount" => "discounts#index"
post "/:id/discount" => "discounts#create"
get "/:id/remove_all_discount" => "discounts#remove_all_discount"
post "/:id/remove_discount_items" => "discounts#remove_discount_items"
post "/:id/request_bills" => "request_bills#print",:as => "request_bill" ,:defaults => { :format => 'json' }
get "/:id/request_bills" => "request_bills#print",:as => "request_bill"
get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
#---------Shift ---------------#
resources :shifts, only: [:index, :new, :create, :edit]
post 'close_shift' => 'shifts#update_shift'
get 'shift/close' => 'shifts#show'
#shift - index (open/close shift landing page)
#shift - show (sales summary display)
#shift - new (open shift)
#shift - edit (close shift)
resources :cash_mgmt, only: [:new, :create]
#payment - accepting or expending money from cashier - [Cash Journal]
#payment - Incoming payments - [accept all payment types (cash, other payments (except rebate))
#payment - Outing payments - Cash only [ *Misc expeness tracking]
#--------- Payment ------------#
get 'sale/:sale_id/first_bill' => 'payments#first_bill', :defaults => { :format => 'json' }
get 'sale/:sale_id/payment' => 'payments#show'
post 'payment/cash' => 'payments#create'