Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -237,12 +237,16 @@
|
|||||||
<!-- Waiter Buttons -->
|
<!-- Waiter Buttons -->
|
||||||
<button type="button" class="btn btn-primary btn-lg btn-block"> Foc </button>
|
<button type="button" class="btn btn-primary btn-lg btn-block"> Foc </button>
|
||||||
<button type="button" class="btn btn-primary btn-lg btn-block"> Void </button>
|
<button type="button" class="btn btn-primary btn-lg btn-block"> Void </button>
|
||||||
<button type="button" class="btn btn-primary btn-lg btn-block" onclick="window.location.href = '/origami';"> Back </button>
|
<button type="button" class="btn btn-primary btn-lg btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
|
else {
|
||||||
|
$('#cash').text(localStorage.getItem("cash"));
|
||||||
|
}
|
||||||
update_balance();
|
update_balance();
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -301,6 +305,7 @@ $( document ).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#card_payment').click(function() {
|
$('#card_payment').click(function() {
|
||||||
|
localStorage.setItem("cash",$('#cash').text() );
|
||||||
var sale_id = $('#sale_id').text();
|
var sale_id = $('#sale_id').text();
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment"
|
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment"
|
||||||
return false;
|
return false;
|
||||||
@@ -315,10 +320,12 @@ $( document ).ready(function() {
|
|||||||
var credit = $('#credit').text();
|
var credit = $('#credit').text();
|
||||||
var card = $('#card').text();
|
var card = $('#card').text();
|
||||||
var sale_id = $('#sale_id').text();
|
var sale_id = $('#sale_id').text();
|
||||||
|
|
||||||
$.ajax({type: "POST",
|
$.ajax({type: "POST",
|
||||||
url: "<%= origami_payment_cash_path %>",
|
url: "<%= origami_payment_cash_path %>",
|
||||||
data: "cash="+ cash + "&sale_id=" + sale_id,
|
data: "cash="+ cash + "&sale_id=" + sale_id,
|
||||||
success:function(result){
|
success:function(result){
|
||||||
|
localStorage.removeItem("cash");
|
||||||
if($('#balance').text() < 0){
|
if($('#balance').text() < 0){
|
||||||
alert("Changed amount " + $('#balance').text() * (-1) )
|
alert("Changed amount " + $('#balance').text() * (-1) )
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
9
config/puma.rb.production
Normal file
9
config/puma.rb.production
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
application_path = '/home/superuser/Application/production/sxrestaurant'
|
||||||
|
directory application_path
|
||||||
|
environment 'production'
|
||||||
|
daemonize true
|
||||||
|
pidfile "#{application_path}/tmp/pids/puma.pid"
|
||||||
|
state_path "#{application_path}/tmp/pids/puma.state"
|
||||||
|
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||||
|
bind 'tcp://0.0.0.0:9292'
|
||||||
|
workers 2
|
||||||
10
db/seeds.rb
10
db/seeds.rb
@@ -87,12 +87,12 @@ customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_
|
|||||||
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"})
|
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"})
|
||||||
|
|
||||||
#Default ZOne
|
#Default ZOne
|
||||||
zone = Zone.create({id:1, name: "Normal Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
# zone = Zone.create({id:1, name: "Normal Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
zone2 = Zone.create({id:2, name: "VIP Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
# zone2 = Zone.create({id:2, name: "VIP Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
|
|
||||||
#Default dining_facilities
|
#Default dining_facilities
|
||||||
table = Table.create({name:"Table 1", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
# table = Table.create({name:"Table 1", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
room = Room.create({name:"Table 2", zone: zone2, status:"available", seater: 4 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
# room = Room.create({name:"Table 2", zone: zone2, status:"available", seater: 4 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
|
||||||
#Tax Profile
|
#Tax Profile
|
||||||
tax_profiles = TaxProfile.create({id:1, name: "Commerical Tax", rate:5.0, order_by:1, created_by:"SYSTEM DEFAULT"})
|
tax_profiles = TaxProfile.create({id:1, name: "Commerical Tax", rate:5.0, order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
@@ -138,7 +138,7 @@ zone_order_queue_station = OrderQueueStation.create({station_name: "Zone 1 Queue
|
|||||||
|
|
||||||
|
|
||||||
#Default Order Queue Process By Zone
|
#Default Order Queue Process By Zone
|
||||||
zone_queue_station = OrderQueueProcessByZone.create({order_queue_station: zone_order_queue_station, zone: zone2})
|
#zone_queue_station = OrderQueueProcessByZone.create({order_queue_station: zone_order_queue_station, zone: zone2})
|
||||||
|
|
||||||
|
|
||||||
#Create Adminstrator employee
|
#Create Adminstrator employee
|
||||||
|
|||||||
@@ -576,5 +576,44 @@ menu_category19 = MenuCategory.create({menu: menu, code:"C0018", name: "Beer", a
|
|||||||
menu_category20 = MenuCategory.create({menu: menu, code:"C0019", name: "Signature Hot Tea", alt_name: "Chicken", order_by: 19, created_by: "SYSTEM DEFAULT"})
|
menu_category20 = MenuCategory.create({menu: menu, code:"C0019", name: "Signature Hot Tea", alt_name: "Chicken", order_by: 19, created_by: "SYSTEM DEFAULT"})
|
||||||
puts "Beauty in the pot's menu setup"
|
puts "Beauty in the pot's menu setup"
|
||||||
|
|
||||||
|
zone = Zone.create({id:1, name: "H1", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"61", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"62", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"53", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"54", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"24", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"25", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"26", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"34", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"35", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"45", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"46", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"47", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"48", zone: zone, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
|
||||||
|
zone2 = Zone.create({id:2, name: "H2", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"51", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"52", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"11", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"12", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"21", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"22", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"23", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"31", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"32", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"33", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"41", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"42", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"43", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"44", zone: zone2, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
zone3 = Zone.create({id:3, name: "H3", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"71", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"72", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"73", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"74", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"75", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"76", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"77", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
|
table = Table.create({name:"78", zone: zone3, status:"available", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user