From dd3544bdff9ae0dbb9a4bf7b98684d08339a2c15 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 9 Apr 2018 09:40:58 +0630 Subject: [PATCH 1/9] fixed conflix readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index bbbd539a..ad112488 100755 --- a/README.md +++ b/README.md @@ -158,7 +158,6 @@ For CloseCashierCustomisePdf in lookups 1) settings/print_settings 2) settings/lookups => { type:print_settings, name: CloseCashierCustomisePdf, value:1 } -<<<<<<< HEAD <---- Extra Fields Script -----> For MoveTablePdf in lookups *** Both Table and Room Moving *** @@ -170,13 +169,12 @@ For MoveTablePdf in print settings ii) Unique Code: MoveTablePdf iii)Template: ... iv) Font: Zawgyi-One v) Printer: #printer name -======= + /* Tax Profile Group Types in lookups */ 1) settings/lookups => { type:tax_profiles, name: Cashier, value:cashier } 2) settings/lookups => { type:tax_profiles, name: Quick Service, value: quick_service } 3) settings/lookups => { type:tax_profiles, name: Doemal, value: doemal } /* Tax Profile Group Types in lookups */ ->>>>>>> 1c13b0469758fb968c0dfcc1f0a876ed2c5e395a Add Kitchen Role of Employee => 1) settings/lookups => { type:employee_roles, name: Kitchen, value:kitchen } From 66df760323c56c4b60408438595a2c6655fc0cb1 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 9 Apr 2018 11:51:39 +0630 Subject: [PATCH 2/9] update order & reservation --- .../origami/order_reservation_controller.rb | 12 ++++ app/views/origami/dashboard/index.html.erb | 15 ++++- .../origami/order_reservation/index.html.erb | 61 +++++++++++++++++++ config/locales/en.yml | 1 + config/locales/mm.yml | 1 + config/routes.rb | 2 + 6 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 app/controllers/origami/order_reservation_controller.rb create mode 100644 app/views/origami/order_reservation/index.html.erb diff --git a/app/controllers/origami/order_reservation_controller.rb b/app/controllers/origami/order_reservation_controller.rb new file mode 100644 index 00000000..db56d882 --- /dev/null +++ b/app/controllers/origami/order_reservation_controller.rb @@ -0,0 +1,12 @@ +class Origami::OrderReservationController < BaseOrigamiController + + def index + @webview = check_mobile + @shop = Shop::ShopDetail + + end + + + + +end diff --git a/app/views/origami/dashboard/index.html.erb b/app/views/origami/dashboard/index.html.erb index 68b09437..1b6a554e 100644 --- a/app/views/origami/dashboard/index.html.erb +++ b/app/views/origami/dashboard/index.html.erb @@ -34,6 +34,14 @@
<%= t :dine_in_cashier %>
+
+
+
+ arrow_forward +
+
<%= t :order_reservation %>
+
+
<% if !@current_user.nil? && @current_user.role != 'waiter' %> @@ -199,8 +207,11 @@ $(".qs_view").on('click', function() { document.getElementById('second_view').click(); - window.location.href = '/origami/quick_service'; - + window.location.href = '/origami/quick_service'; + }); + + $(".order_reservation").on('click', function() { + window.location.href = '/origami/order_reservation'; }); $("#second_view").on('click', function () { diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb new file mode 100644 index 00000000..e1e7c57e --- /dev/null +++ b/app/views/origami/order_reservation/index.html.erb @@ -0,0 +1,61 @@ +
+
+
+ +
+
+
+ <% @complete.each do |sale| %> +
+
+ <%= sale.receipt_no %> + <%= sale.sale_status %> +
+
+ <% end %> +
+
+ + +
+
+ <% @orders.each do |order| %> +
+
+ <%= order.order_id %> +
+
+ <% end %> +
+
+ +
+ +
+
+
+
+
+ + diff --git a/config/locales/en.yml b/config/locales/en.yml index 0e787751..e73771e5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -74,6 +74,7 @@ en: date_time: "DateTime" dine_in_cashier: "Dine-in Cashier" quick_service: "Quick Service" + order_reservation: "Order & Reservation" views: btn: diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 406bcaf4..8a7b424a 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -69,6 +69,7 @@ mm: date_time: "ရက်စွဲအချိန်" dine_in_cashier: "Dine-in Cashier" quick_service: "Quick Service" + order_reservation: "Order & Reservation" views: btn: diff --git a/config/routes.rb b/config/routes.rb index 2c25db97..148af0ba 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -257,6 +257,8 @@ scope "(:locale)", locale: /en|mm/ do post '/customer_view' => "second_display#customer_view",:as => "customer_view", :defaults => { :format => 'json' } + #order and reservation + resources :order_reservation end #--------- Waiter/Ordering Station ------------# From 46a20dc0069ba4dae80cf6a9d970aca166d7fa7d Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 9 Apr 2018 13:19:47 +0630 Subject: [PATCH 3/9] update order & reservation --- .../origami/order_reservation/index.html.erb | 66 ++++++++++--------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index e1e7c57e..22052479 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -1,6 +1,6 @@
-
+
-
-
-
- <% @complete.each do |sale| %> -
-
- <%= sale.receipt_no %> - <%= sale.sale_status %> -
-
- <% end %> -
+ +
+
+
+
rrrrr
+
+ RRRRRR + SSSSSSSSSSS +
+
-
- <% @orders.each do |order| %> -
-
- <%= order.order_id %> -
-
- <% end %> +
+
+
+ oOOOOOOOOOOOOO +
+
- -
-
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+
From 6f6e6f040539901e8207a3d2dea6b2c69a16e1da Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Mon, 9 Apr 2018 16:03:34 +0630 Subject: [PATCH 4/9] update order --- .../origami/order_reservation/index.html.erb | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index 22052479..fe23f40e 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -2,17 +2,17 @@
+ \ No newline at end of file From 4810628930fdc48184709ed92debff2bb07a6369 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Apr 2018 09:56:31 +0630 Subject: [PATCH 5/9] udate ui --- .../origami/order_reservation/index.html.erb | 261 +++++++++++++++--- 1 file changed, 225 insertions(+), 36 deletions(-) diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index fe23f40e..f22d5f09 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -2,39 +2,94 @@
-
+
-
-
rrrrr
-
- RRRRRR - SSSSSSSSSSS -
-
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
+
+
+
-
-
-
- oOOOOOOOOOOOOO -
-
+
+
+ + + + + +
No.11 (DELIVERY)0065 4321 0012
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
+
+
+
@@ -42,11 +97,84 @@
-
-
- +
+ + + + + +
No.11 + (DELIVERY) + 0065 4321
+
+
+ + + + + + + + + + + + + + + + + + + +
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
-
+ +
@@ -59,16 +187,77 @@
- - \ No newline at end of file From 0e39e4577f1e407eed2b86d7b7a8ba057f3e28bf Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Apr 2018 10:51:33 +0630 Subject: [PATCH 6/9] update request bill check from quick service --- app/views/origami/pending_order/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/origami/pending_order/show.html.erb b/app/views/origami/pending_order/show.html.erb index de208374..0cc6f949 100644 --- a/app/views/origami/pending_order/show.html.erb +++ b/app/views/origami/pending_order/show.html.erb @@ -202,13 +202,13 @@ $(document).ready(function(){ // Bill Request $('#request_bills').click(function () { var order_id = $('#save_order_id').val(); - var ajax_url = "/origami/" + order_id + "/request_bills"; + var ajax_url = "../../../origami/" +order_id+ "/request_bills"; + console.log(ajax_url) $.ajax({ type: "GET", url: ajax_url, // data: 'order_id='+ order_id, success: function (result) { - console.log(result) if (!result.status) { swal("Information!", result.error_message); } From 77adad241791c0172e70ec1f41bd439fbedaf1e3 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Apr 2018 15:19:46 +0630 Subject: [PATCH 7/9] update order_reservaiotn ui fishe --- .../origami/order_reservation/index.html.erb | 470 +++++++++++++----- 1 file changed, 339 insertions(+), 131 deletions(-) diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index f22d5f09..42628dd9 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -1,101 +1,228 @@
-
-
+
+
-
-
-
-
-
- +
+
+
+
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
+ 1 + + 3:30 PM + + 13000 + + STATUS +
+ 2 + + 3:30 PM + + 13000 + + STATUS +
+ 3 + + 3:30 PM + + 13000 + + STATUS +
+ 4 + + 3:30 PM + + 13000 + + STATUS +
-
-
+
-
-
-
- - - - - -
No.11 (DELIVERY)0065 4321 0012
-
-
-
- +
+
+
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
aaaaaaaassss
+ 1 + + 3:30 PM + + 13000 + + STATUS +
+ 2 + + 3:30 PM + + 13000 + + STATUS +
-
-
+
+
+ +
+
+ +
+
+ +
+
+ +
-
+
@@ -108,68 +235,101 @@
- - - - - - - - - - - - - - - - - - - -
- MENU ITEM 01 -
2 X700 -
1400.00
- MENU ITEM 01 -
2 X700 -
1400.00
- MENU ITEM 01 -
2 X700 -
1400.00
- MENU ITEM 01 -
2 X700 -
1400.00
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+ MENU ITEM 01 +
2 X700 +
1400.00
+
+
-
-
-
+
+
+
+ + + + +
CUSTOMER & DELIVERY INFORMATION +
+
- + + + + + + + + + + + + + + + +
+ NAME
+ DAW AYE AYE +
+ PHONE
+ 09 8765 4321 098 +
+ ADDRESS
+ No. (12), 3rd floor, zay kyee Street, kyi myin dine + infront of Nya Zay Main Entrance +
+ DELEVER TO
+ HOME +
@@ -196,7 +391,7 @@ } .nav-tabs .nav-link { - padding: 0.9286em .35em; + padding: 0.5286em .33em; } .nav-tabs li a.active { color: #111 !important; @@ -218,7 +413,8 @@ .nav-tabs.tab-col-teal > li > a:before { border-bottom: 0px solid #009688; } -.nav-item .a .nav-link { +.nav-tabs .nav-item{ + margin-bottom: 2px ; } .num{ color:#fff; @@ -234,30 +430,42 @@ .table .header-td{ border-top:0px solid !important; border-bottom: 0px solid !important; - padding:0px 7px !important; + padding:3px 7px !important; border-top:0px solid !important; border-bottom: 0px solid !important; } -.card-block .table td:first-child, -.card-block .table td:nth-child(2), -.card-footer .table td:first-child, -.card-footer .table td:nth-child(2){ +.custom-card-block .table td:first-child, +.custom-card-block .table td:nth-child(2), +.custom-card-footer .table td:first-child, +.custom-card-footer .table td:nth-child(2){ border-top:0px solid !important; } -/*.card-block .table .body-td:last-child, -.card-footer .table .body-td:last-child{ +.custom-card-footer .footer-td , +.grand-card-footer .footer-td { + border-top:0px solid !important; border-bottom:0px solid !important; -}*/ + font-weight: bold; + padding:5px 10px; +} .custom-card-header{ border-bottom: 1px solid #F8BBD0 !important; + padding:13px 5px !important; } .custom-card-footer{ border-top: 1px solid #F8BBD0 !important; } -.custom-card-header, .custom-card-block, +.grand-card-footer, .custom-card-footer{ padding :5px !important; } +.custom-table{ + background-color:#F3E5F5; +} +.custom-table tbody tr td, +.custom-table tbody tr th{ + border-top: 1px solid #FFEBEE; + border-bottom: 1px solid #FFEBEE; +} \ No newline at end of file From 0e5269c66fb93975b0de84eec913f9c418f8acdb Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Apr 2018 17:29:02 +0630 Subject: [PATCH 8/9] update request bill msg box error --- app/assets/javascripts/addorder.js | 8 +++++--- .../origami/quick_service_controller.rb | 7 +++++-- .../origami/request_bills_controller.rb | 7 ++++++- app/models/sale.rb | 1 + app/views/origami/pending_order/index.html.erb | 18 +++++++++--------- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app/assets/javascripts/addorder.js b/app/assets/javascripts/addorder.js index 30ed8af2..07511458 100755 --- a/app/assets/javascripts/addorder.js +++ b/app/assets/javascripts/addorder.js @@ -974,7 +974,7 @@ console.log(d_option) dataType: "json", success:function(result){ if (result.status) { - + console.log(result) if (result.data == null){ swal({ title: "Please Open Shift !", @@ -984,11 +984,13 @@ console.log(d_option) confirmButtonText: "Ok", closeOnConfirm: false }, function () { - window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text(); + window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text(); }); + }else if(result.data == 'OK'){ + window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text(); }else{ - window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment" + window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment" } } } diff --git a/app/controllers/origami/quick_service_controller.rb b/app/controllers/origami/quick_service_controller.rb index d2194bb5..d5d3437b 100644 --- a/app/controllers/origami/quick_service_controller.rb +++ b/app/controllers/origami/quick_service_controller.rb @@ -154,10 +154,13 @@ class Origami::QuickServiceController < ApplicationController result = {:status=> true, :data => @sale } render :json => result.to_json - end + end + elsif (params[:sale_id][0,3] == "BKI") + result = {:status=> true, :data => 'OK' } + render :json => result.to_json else result = {:status=> true, :data => nil } - render :json => result.to_json + render :json => result.to_json end end diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index cdd1f442..05dbdce4 100755 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -16,7 +16,12 @@ class Origami::RequestBillsController < ApplicationController bk_order = BookingOrder.find_by_order_id(order_id) order = Order.find(order_id) check_booking = Booking.find_by_booking_id(bk_order.booking_id) - table = DiningFacility.find(check_booking.dining_facility_id) + if check_booking.dining_facility_id.to_i > 0 + table = DiningFacility.find(check_booking.dining_facility_id) + else + table = nil + end + if check_booking.sale_id.nil? # Create Sale if it doesn't exist @status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee, current_user, order.source) diff --git a/app/models/sale.rb b/app/models/sale.rb index b9c0717e..f6ba19b8 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -2592,6 +2592,7 @@ end query = query.joins("join sale_orders as sale_orders on sale_orders.sale_id = sales.sale_id") .joins("join orders as orders on orders.order_id = sale_orders.order_id") query = query.where("sales.sale_status = 'new' AND orders.status = 'billed' AND orders.source =? ","quick_service") + .group("sales.sale_id") end def self.pending_order query = Booking.all diff --git a/app/views/origami/pending_order/index.html.erb b/app/views/origami/pending_order/index.html.erb index 2d4ba1d4..447612d1 100644 --- a/app/views/origami/pending_order/index.html.erb +++ b/app/views/origami/pending_order/index.html.erb @@ -10,19 +10,19 @@
<% @sale.each do |sale| %> -
+
<%= sale.receipt_no %>Billed
-
+
<% end %> - <% @order.each do |order| %> -
-
- <%= order.booking_id %>new -
-
- <% end %> + <% @order.each do |order| %> +
+
+ <%= order.booking_id %>new +
+
+ <% end %>
From 7a9fe91fa336cc3a4fcb41cd8015aded9bb2daa9 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Tue, 10 Apr 2018 17:42:07 +0630 Subject: [PATCH 9/9] open liscen for master --- config/initializers/action_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index b063f28e..26255b59 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -20,11 +20,11 @@ class ActionController::Base end else #check for license file - # if check_license - # current_license(ENV["SX_PROVISION_URL"]) - # else - # redirect_to activate_path - # end + if check_license + current_license(ENV["SX_PROVISION_URL"]) + else + redirect_to activate_path + end end end