change checkout time and checkout alert time process
This commit is contained in:
36
README.md
36
README.md
@@ -36,11 +36,12 @@ java -jar ~/Documents/Jade.jar http://192.168.1.88:3002
|
|||||||
Person and Extra Time
|
Person and Extra Time
|
||||||
category_code = SPL... //for menu categories
|
category_code = SPL... //for menu categories
|
||||||
|
|
||||||
Extra Time
|
For Extra Time
|
||||||
instance_code = Extim30, Extim60 //for morning menu
|
item_instance_code
|
||||||
instance_code = Extie30, Extie60 //for evening menu
|
* must start with 'Ext'[a..z]'_'[1..100]
|
||||||
|
* note : don't add character after '_'
|
||||||
|
|
||||||
Order Item & Order Summary Slim
|
For Order Item & Order Summary Slim
|
||||||
*** change OrderItemPdf to OrderItemSlimPdf and OrderSummaryPdf to OrderSummarySlimPdf
|
*** change OrderItemPdf to OrderItemSlimPdf and OrderSummaryPdf to OrderSummarySlimPdf
|
||||||
1) settings/print_settings
|
1) settings/print_settings
|
||||||
2) app/controllers/oqs/edit_controller.rb
|
2) app/controllers/oqs/edit_controller.rb
|
||||||
@@ -53,6 +54,33 @@ For Bank Integration setting
|
|||||||
1) rake db:migrate for card_sale_trans, card_settle_trans
|
1) rake db:migrate for card_sale_trans, card_settle_trans
|
||||||
2) settings/lookups => { type:bank_integration, name: Bank Integration, value:1 }
|
2) settings/lookups => { type:bank_integration, name: Bank Integration, value:1 }
|
||||||
|
|
||||||
|
For checkout time and checkout alert time
|
||||||
|
1) checkout time => { type: checkout_time, name: 9:00AM - 12:00 PM, value: 120 }
|
||||||
|
2) checkout alert time => { type: checkout_alert_time, name: 8:00AM - 12:00 PM, value: 60 }
|
||||||
|
* you can add multiple record for checkout time and checkout alert time
|
||||||
|
* type must be 'checkout_time' and 'checkout_alert_time'
|
||||||
|
* you can change name and value
|
||||||
|
* name must be time range [8:30 AM - 1:45 PM]
|
||||||
|
* value must be minutes[60]
|
||||||
|
|
||||||
|
For call waiter pdf
|
||||||
|
* Backend > Printer > Print Settings > New
|
||||||
|
i) Name : Calling Waiter
|
||||||
|
ii) Unique Code: CallWaiterPdf
|
||||||
|
iii)Template: ...
|
||||||
|
iv) Font: Zawgyi-One
|
||||||
|
v) Printer: #printer name
|
||||||
|
|
||||||
|
Membership Actions SQL
|
||||||
|
* update membership_actions set additional_parameter='{\"campaign_type_id\":5}' where id=10;
|
||||||
|
|
||||||
|
SQL Update after rake clear:data runned
|
||||||
|
* update seed_generators
|
||||||
|
i) TableBooking, Order, OrderItem, sale, SaleOrder, SaleItem, SaleTax, SalePayment, SaleAudit, AssignedOrderItem => { current:0, next:0 }
|
||||||
|
** Note :: do not update Customer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* ToDo list
|
* ToDo list
|
||||||
|
|
||||||
1. Cloud Sync
|
1. Cloud Sync
|
||||||
|
|||||||
@@ -16,11 +16,15 @@ class Api::CheckInProcessController < Api::ApiController
|
|||||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||||
alert_time_min = 0
|
alert_time_min = 0
|
||||||
if !lookup_checkout_time.nil?
|
if !lookup_checkout_time.nil?
|
||||||
if lookup_checkout_time[0][0] == 'min'
|
now = Time.now.utc
|
||||||
alert_time_min = (lookup_checkout_time[0][1]).to_i
|
lookup_checkout_time.each do |checkout_time|
|
||||||
else
|
arr_time = checkout_time[0].split("-")
|
||||||
alert_time_min = 15
|
start_time = Time.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||||
end
|
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||||
|
if start_time <= now && now <= end_time
|
||||||
|
alert_time_min = checkout_time[1].to_i
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time, :alert_time_min => alert_time_min, :extra_minutes => extra_minutes }
|
render :json => { :status => true, :check_in_time => check_in_time, :check_out_time => check_out_time, :alert_time_min => alert_time_min, :extra_minutes => extra_minutes }
|
||||||
@@ -39,11 +43,12 @@ class Api::CheckInProcessController < Api::ApiController
|
|||||||
if !lookup_checkout_time.empty?
|
if !lookup_checkout_time.empty?
|
||||||
checkout_at = Time.now.utc
|
checkout_at = Time.now.utc
|
||||||
|
|
||||||
if !lookup_checkout_time.nil?
|
lookup_checkout_time.each do |checkout_time|
|
||||||
if lookup_checkout_time[0][0] == 'hr'
|
arr_time = checkout_time[0].split("-")
|
||||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.hour
|
start_time = Time.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||||
else
|
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.minutes
|
if start_time <= checkout_at && checkout_at <= end_time
|
||||||
|
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
|||||||
def check_in_process
|
def check_in_process
|
||||||
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
||||||
checkout_at = Time.now.utc
|
checkout_at = Time.now.utc
|
||||||
|
|
||||||
if !lookup_checkout_time.nil?
|
if !lookup_checkout_time.nil?
|
||||||
if lookup_checkout_time[0][0] == 'hr'
|
lookup_checkout_time.each do |checkout_time|
|
||||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.hour
|
arr_time = checkout_time[0].split("-")
|
||||||
else
|
start_time = Time.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.minutes
|
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||||
|
if start_time <= checkout_at && checkout_at <= end_time
|
||||||
|
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@dining_facility = DiningFacility.find(params[:dining_id])
|
@dining_facility = DiningFacility.find(params[:dining_id])
|
||||||
|
|||||||
@@ -81,10 +81,14 @@ class DiningFacility < ApplicationRecord
|
|||||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||||
free_time_min = 0
|
free_time_min = 0
|
||||||
if !lookup_checkout_time.nil?
|
if !lookup_checkout_time.nil?
|
||||||
if lookup_checkout_time[0][0] == 'min'
|
now = Time.now.utc
|
||||||
free_time_min = (lookup_checkout_time[0][1]).to_i
|
lookup_checkout_time.each do |checkout_time|
|
||||||
else
|
arr_time = checkout_time[0].split("-")
|
||||||
free_time_min = 15
|
start_time = Time.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||||
|
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||||
|
if start_time <= now && now <= end_time
|
||||||
|
free_time_min = checkout_time[1].to_i
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -116,10 +120,14 @@ class DiningFacility < ApplicationRecord
|
|||||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||||
free_time_min = 0
|
free_time_min = 0
|
||||||
if !lookup_checkout_time.nil?
|
if !lookup_checkout_time.nil?
|
||||||
if lookup_checkout_time[0][0] == 'min'
|
now = Time.now.utc
|
||||||
free_time_min = (lookup_checkout_time[0][1]).to_i
|
lookup_checkout_time.each do |checkout_time|
|
||||||
else
|
arr_time = checkout_time[0].split("-")
|
||||||
free_time_min = 15
|
start_time = Time.parse(arr_time[0].strip).utc.strftime("%H:%M%p")
|
||||||
|
end_time = Time.parse(arr_time[1].strip).utc.strftime("%H:%M%p")
|
||||||
|
if start_time <= now && now <= end_time
|
||||||
|
free_time_min = checkout_time[1].to_i
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user