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
|
||||
category_code = SPL... //for menu categories
|
||||
|
||||
Extra Time
|
||||
instance_code = Extim30, Extim60 //for morning menu
|
||||
instance_code = Extie30, Extie60 //for evening menu
|
||||
For Extra Time
|
||||
item_instance_code
|
||||
* 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
|
||||
1) settings/print_settings
|
||||
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
|
||||
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
|
||||
|
||||
1. Cloud Sync
|
||||
|
||||
@@ -16,11 +16,15 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||
alert_time_min = 0
|
||||
if !lookup_checkout_time.nil?
|
||||
if lookup_checkout_time[0][0] == 'min'
|
||||
alert_time_min = (lookup_checkout_time[0][1]).to_i
|
||||
else
|
||||
alert_time_min = 15
|
||||
end
|
||||
now = Time.now.utc
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
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
|
||||
alert_time_min = checkout_time[1].to_i
|
||||
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 }
|
||||
@@ -39,11 +43,12 @@ class Api::CheckInProcessController < Api::ApiController
|
||||
if !lookup_checkout_time.empty?
|
||||
checkout_at = Time.now.utc
|
||||
|
||||
if !lookup_checkout_time.nil?
|
||||
if lookup_checkout_time[0][0] == 'hr'
|
||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.hour
|
||||
else
|
||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.minutes
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
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 <= checkout_at && checkout_at <= end_time
|
||||
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ class Origami::CheckInProcessController < BaseOrigamiController
|
||||
def check_in_process
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_time")
|
||||
checkout_at = Time.now.utc
|
||||
|
||||
if !lookup_checkout_time.nil?
|
||||
if lookup_checkout_time[0][0] == 'hr'
|
||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.hour
|
||||
else
|
||||
checkout_at = checkout_at + (lookup_checkout_time[0][1]).to_i.minutes
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
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 <= checkout_at && checkout_at <= end_time
|
||||
checkout_at = checkout_at + (checkout_time[1]).to_i.minutes
|
||||
end
|
||||
end
|
||||
end
|
||||
@dining_facility = DiningFacility.find(params[:dining_id])
|
||||
|
||||
@@ -81,10 +81,14 @@ class DiningFacility < ApplicationRecord
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||
free_time_min = 0
|
||||
if !lookup_checkout_time.nil?
|
||||
if lookup_checkout_time[0][0] == 'min'
|
||||
free_time_min = (lookup_checkout_time[0][1]).to_i
|
||||
else
|
||||
free_time_min = 15
|
||||
now = Time.now.utc
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
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
|
||||
|
||||
@@ -116,10 +120,14 @@ class DiningFacility < ApplicationRecord
|
||||
lookup_checkout_time = Lookup.collection_of("checkout_alert_time")
|
||||
free_time_min = 0
|
||||
if !lookup_checkout_time.nil?
|
||||
if lookup_checkout_time[0][0] == 'min'
|
||||
free_time_min = (lookup_checkout_time[0][1]).to_i
|
||||
else
|
||||
free_time_min = 15
|
||||
now = Time.now.utc
|
||||
lookup_checkout_time.each do |checkout_time|
|
||||
arr_time = checkout_time[0].split("-")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user