diff --git a/README.md b/README.md index 25086cce..fcc35040 100755 --- a/README.md +++ b/README.md @@ -163,7 +163,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 *** @@ -175,13 +174,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 } 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/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/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 f0ad6c7e..10b48a18 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/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 @@
| 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 | +
|
+ 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 + |
+