oqs options printer
This commit is contained in:
@@ -368,4 +368,4 @@ RUBY VERSION
|
||||
ruby 2.4.1p111
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.4
|
||||
2.0.1
|
||||
|
||||
@@ -30,6 +30,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def show
|
||||
puts 'Catch me if you can.......................'
|
||||
@table = DiningFacility.find(params[:table_id])
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
@@ -8,7 +8,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
|
||||
order_item = print_query('order_item', order_item_id) #OrderItem.find_by_item_code(item_code)
|
||||
|
||||
options = order_item[0].options
|
||||
# filename = "tmp/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
|
||||
pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name, before_updated_qty)
|
||||
@@ -34,7 +34,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
end
|
||||
end
|
||||
end
|
||||
# end
|
||||
# end
|
||||
|
||||
shop = Shop.first
|
||||
directory_name = 'public/orders_'+shop.shop_code
|
||||
@@ -43,7 +43,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
||||
filename = directory_name + "/order_item_#{order_id}_#{order_item_id}" + ".pdf"
|
||||
|
||||
pdf.render_file filename
|
||||
|
||||
|
||||
if oqs.print_copy
|
||||
#no print in cloud server
|
||||
if ENV["SERVER_MODE"] != "cloud"
|
||||
|
||||
@@ -42,6 +42,9 @@ class Printer::PrinterWorker
|
||||
printer_destination = self.printer_destination
|
||||
end
|
||||
|
||||
puts printer_destination
|
||||
puts '........Printer Destination..........'
|
||||
|
||||
copy = self.print_copies
|
||||
#Print only when printer information is not null
|
||||
if !self.printer_destination.nil?
|
||||
|
||||
@@ -88,7 +88,8 @@ class OrderItemSlimPdf < Prawn::Document
|
||||
|
||||
#Add Order Item
|
||||
add_order_items_slim(order_item_slim, options, alt_name, precision)
|
||||
|
||||
puts options
|
||||
puts '............PDF OPTIONS...............'
|
||||
dash(1, :space => 1, :phase => 1)
|
||||
stroke_horizontal_line 0, (self.page_width - self.margin)
|
||||
add_updated_qty_text(before_updated_qty, order_item_slim.qty, precision)
|
||||
|
||||
83
config.database.yml.sqlite3
Normal file
83
config.database.yml.sqlite3
Normal file
@@ -0,0 +1,83 @@
|
||||
# ## SQLIte3 --- Setup
|
||||
#
|
||||
# # SQLite version 3.x
|
||||
# # gem install sqlite3
|
||||
# #
|
||||
# # Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# # gem 'sqlite3'
|
||||
# #
|
||||
# default: &default
|
||||
# adapter: sqlite3
|
||||
# pool: 5
|
||||
# timeout: 5000
|
||||
#
|
||||
# development:
|
||||
# <<: *default
|
||||
# database: db/development.sqlite3
|
||||
#
|
||||
# # Warning: The database defined as "test" will be erased and
|
||||
# # re-generated from your development database when you run "rake".
|
||||
# # Do not set this db to the same as development or production.
|
||||
# test:
|
||||
# <<: *default
|
||||
# database: db/test.sqlite3
|
||||
#
|
||||
# production:
|
||||
# <<: *default
|
||||
# database: db/production.sqlite3
|
||||
|
||||
# Mysql --- Setup
|
||||
# MySQL. Versions 5.0 and up are supported.
|
||||
#
|
||||
# Install the MySQL driver
|
||||
# gem install mysql2
|
||||
#
|
||||
# Ensure the MySQL gem is defined in your Gemfile
|
||||
# gem 'mysql2'
|
||||
#
|
||||
# And be sure to use new-style password hashing:
|
||||
# http://dev.mysql.com/doc/refman/5.7/en/old-client.html
|
||||
#
|
||||
default: &default
|
||||
adapter: mysql2
|
||||
encoding: utf8
|
||||
pool: 5
|
||||
username: root
|
||||
password: root
|
||||
socket: /tmp/mysql.sock
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: SXRestaurants_development
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
<<: *default
|
||||
database: SXRestaurants_test
|
||||
|
||||
# As with config/secrets.yml, you never want to store sensitive information,
|
||||
# like your database password, in your source code. If your source code is
|
||||
# ever seen by anyone, they now have access to your database.
|
||||
#
|
||||
# Instead, provide the password as a unix environment variable when you boot
|
||||
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
|
||||
# for a full rundown on how to provide these environment variables in a
|
||||
# production deployment.
|
||||
#
|
||||
# On Heroku and other platform providers, you may have a full connection URL
|
||||
# available as an environment variable. For example:
|
||||
#
|
||||
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
|
||||
#
|
||||
# You can use this database configuration with:
|
||||
#
|
||||
# production:
|
||||
# url: <%= ENV['DATABASE_URL'] %>
|
||||
#
|
||||
production:
|
||||
<<: *default
|
||||
database: SXRestaurants_production
|
||||
username: root
|
||||
password: root
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
application_path="#{File.expand_path("../..", __FILE__)}"
|
||||
directory application_path
|
||||
#environment ENV.fetch("RAILS_ENV") { "production" }
|
||||
environment "production"
|
||||
pidfile "#{application_path}/tmp/puma/pid"
|
||||
state_path "#{application_path}/tmp/puma/state"
|
||||
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||
port ENV.fetch("PORT") { 62158 }
|
||||
workers 2
|
||||
preload_app!
|
||||
# application_path="#{File.expand_path("../..", __FILE__)}"
|
||||
# directory application_path
|
||||
# #environment ENV.fetch("RAILS_ENV") { "production" }
|
||||
# environment "production"
|
||||
# pidfile "#{application_path}/tmp/puma/pid"
|
||||
# state_path "#{application_path}/tmp/puma/state"
|
||||
# stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
|
||||
# port ENV.fetch("PORT") { 62158 }
|
||||
# workers 2
|
||||
# preload_app!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user