fixed at bitp and oqs print
This commit is contained in:
@@ -17,7 +17,7 @@ class Oqs::HomeController < BaseOqsController
|
|||||||
@queue_items_details.each do |qid|
|
@queue_items_details.each do |qid|
|
||||||
dining = DiningFacility.find_by_name(qid.zone)
|
dining = DiningFacility.find_by_name(qid.zone)
|
||||||
que.order_queue_process_by_zones.each do |qz|
|
que.order_queue_process_by_zones.each do |qz|
|
||||||
if qid.station_id == qz.order_queue_station_id && qid.zone_id == dining.zone_id
|
if qid.station_id == qz.order_queue_station_id && qid.zone_id == qz.zone_id
|
||||||
zone_id = qid.zone_id
|
zone_id = qid.zone_id
|
||||||
i=i+1
|
i=i+1
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
def process_order (order, table_id)
|
def process_order (order, table_id)
|
||||||
oqs_stations = OrderQueueStation.active
|
oqs_stations = OrderQueueStation.active
|
||||||
dining=DiningFacility.find(table_id)
|
dining=DiningFacility.find(table_id)
|
||||||
oqpbz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id)
|
# oqpbz = OrderQueueProcessByZone.find_by_zone_id(dining.zone_id)
|
||||||
|
|
||||||
order_items = order.order_items
|
order_items = order.order_items
|
||||||
|
|
||||||
@@ -47,7 +47,9 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
end
|
end
|
||||||
# Auto Printing
|
# Auto Printing
|
||||||
# ToDo per item per printer
|
# ToDo per item per printer
|
||||||
if oqs.auto_print && is_auto_printed == false
|
OrderQueueProcessByZone.where("zone_id=#{dining.zone_id}").find_each do |oqpbz|
|
||||||
|
if oqs.id == oqpbz.order_queue_station_id
|
||||||
|
if oqs.auto_print
|
||||||
if oqs_order_items.length > 0
|
if oqs_order_items.length > 0
|
||||||
print_slip(oqs, order, oqs_order_items)
|
print_slip(oqs, order, oqs_order_items)
|
||||||
is_auto_printed = true
|
is_auto_printed = true
|
||||||
@@ -55,6 +57,8 @@ class OrderQueueStation < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
#Print order_items in 1 slip
|
#Print order_items in 1 slip
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class OrderItemPdf < Prawn::Document
|
class OrderItemPdf < Prawn::Document
|
||||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
||||||
def initialize(print_settings,order_item, print_status, options, alt_name)
|
def initialize(print_settings,order_item, print_status, options, alt_name)
|
||||||
self.page_width = 210
|
self.page_width = 180
|
||||||
self.page_height = 1450
|
self.page_height = 1450
|
||||||
self.margin = 5
|
self.margin = 5
|
||||||
self.price_width = 40 # No Need for item
|
self.price_width = 40 # No Need for item
|
||||||
@@ -10,7 +10,7 @@ class OrderItemPdf < Prawn::Document
|
|||||||
self.item_width = self.page_width - self.qty_width
|
self.item_width = self.page_width - self.qty_width
|
||||||
self.item_height = 15
|
self.item_height = 15
|
||||||
self.item_description_width = self.page_width - (self.price_width + self.qty_width + self.total_width)
|
self.item_description_width = self.page_width - (self.price_width + self.qty_width + self.total_width)
|
||||||
self.label_width=100
|
self.label_width=90
|
||||||
|
|
||||||
super(:margin => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
|
super(:margin => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
|
||||||
# super(:margin => [10, 5, 30, 5], :page_size => [200,400])
|
# super(:margin => [10, 5, 30, 5], :page_size => [200,400])
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class OrderSummaryPdf < Prawn::Document
|
class OrderSummaryPdf < Prawn::Document
|
||||||
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width
|
||||||
def initialize(print_settings,order, print_status, order_items = nil,alt_name)
|
def initialize(print_settings,order, print_status, order_items = nil,alt_name)
|
||||||
self.page_width = 210
|
self.page_width = 180
|
||||||
self.page_height = 1450
|
self.page_height = 1450
|
||||||
self.margin = 5
|
self.margin = 5
|
||||||
self.price_width = 40 # No Need for item
|
self.price_width = 40 # No Need for item
|
||||||
@@ -10,7 +10,7 @@ class OrderSummaryPdf < Prawn::Document
|
|||||||
self.item_width = self.page_width - (self.qty_width - self.margin)
|
self.item_width = self.page_width - (self.qty_width - self.margin)
|
||||||
self.item_height = 15
|
self.item_height = 15
|
||||||
self.item_description_width = self.page_width - (self.price_width + self.qty_width + self.total_width)
|
self.item_description_width = self.page_width - (self.price_width + self.qty_width + self.total_width)
|
||||||
self.label_width=100
|
self.label_width=90
|
||||||
|
|
||||||
super(:margin => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
|
super(:margin => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
|
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
|
||||||
<td><%= employee.role %></td>
|
<td><%= employee.role %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to 'Edit', edit_settings_employee_path(employee) %> | <%= link_to 'Destroy', employee[:setting], method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
<%= link_to 'Edit', edit_settings_employee_path(employee) %> | <%= link_to 'Destroy', settings_employee_path(employee) , method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
|
# :concurrency: 25
|
||||||
|
# :pidfile: /home/superuser/Application/production/sxrestaurant/tmp/pids/sidekiq.pid
|
||||||
|
# :logfile: /home/superuser/Application/production/sxrestaurant/log/sidekiq.log
|
||||||
|
# :queues:
|
||||||
|
# - default
|
||||||
|
# - [high_priority, 2]
|
||||||
|
# :demon: true
|
||||||
|
|
||||||
|
---
|
||||||
:concurrency: 25
|
:concurrency: 25
|
||||||
:pidfile: /home/superuser/Application/production/sxrestaurant/tmp/pids/sidekiq.pid
|
:pidfile: ./tmp/pids/sidekiq.pid
|
||||||
:logfile: /home/superuser/Application/production/sxrestaurant/log/sidekiq.log
|
:logfile: ./log/sidekiq.log
|
||||||
:queues:
|
:queues:
|
||||||
- default
|
- default
|
||||||
- [high_priority, 2]
|
- [high_priority, 2]
|
||||||
:demon: true
|
:demon: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user