oqs options printer

This commit is contained in:
May Zin
2019-04-23 15:00:53 +06:30
parent ab666e7f82
commit a88e84954a
9 changed files with 7506 additions and 20 deletions

View File

@@ -368,4 +368,4 @@ RUBY VERSION
ruby 2.4.1p111 ruby 2.4.1p111
BUNDLED WITH BUNDLED WITH
1.16.4 2.0.1

View File

@@ -30,6 +30,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
end end
def show def show
puts 'Catch me if you can.......................'
@table = DiningFacility.find(params[:table_id]) @table = DiningFacility.find(params[:table_id])
@membership = MembershipSetting::MembershipSetting @membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all @payment_methods = PaymentMethodSetting.all

View File

@@ -8,7 +8,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
end end
order_item = print_query('order_item', order_item_id) #OrderItem.find_by_item_code(item_code) 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" # 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) pdf = OrderItemPdf.new(print_settings,order_item[0], print_status, options, oqs.use_alternate_name, before_updated_qty)

View File

@@ -42,6 +42,9 @@ class Printer::PrinterWorker
printer_destination = self.printer_destination printer_destination = self.printer_destination
end end
puts printer_destination
puts '........Printer Destination..........'
copy = self.print_copies copy = self.print_copies
#Print only when printer information is not null #Print only when printer information is not null
if !self.printer_destination.nil? if !self.printer_destination.nil?

View File

@@ -88,7 +88,8 @@ class OrderItemSlimPdf < Prawn::Document
#Add Order Item #Add Order Item
add_order_items_slim(order_item_slim, options, alt_name, precision) add_order_items_slim(order_item_slim, options, alt_name, precision)
puts options
puts '............PDF OPTIONS...............'
dash(1, :space => 1, :phase => 1) dash(1, :space => 1, :phase => 1)
stroke_horizontal_line 0, (self.page_width - self.margin) stroke_horizontal_line 0, (self.page_width - self.margin)
add_updated_qty_text(before_updated_qty, order_item_slim.qty, precision) add_updated_qty_text(before_updated_qty, order_item_slim.qty, precision)

View 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

View File

@@ -20,11 +20,11 @@ class ActionController::Base
end end
else else
# check for license file # check for license file
if check_license # if check_license
current_license(ENV["SX_PROVISION_URL"]) # current_license(ENV["SX_PROVISION_URL"])
else # else
redirect_to activate_path # redirect_to activate_path
end # end
end end
end end

View File

@@ -1,11 +1,11 @@
application_path="#{File.expand_path("../..", __FILE__)}" # application_path="#{File.expand_path("../..", __FILE__)}"
directory application_path # directory application_path
#environment ENV.fetch("RAILS_ENV") { "production" } # #environment ENV.fetch("RAILS_ENV") { "production" }
environment "production" # environment "production"
pidfile "#{application_path}/tmp/puma/pid" # pidfile "#{application_path}/tmp/puma/pid"
state_path "#{application_path}/tmp/puma/state" # state_path "#{application_path}/tmp/puma/state"
stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" # stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log"
port ENV.fetch("PORT") { 62158 } # port ENV.fetch("PORT") { 62158 }
workers 2 # workers 2
preload_app! # preload_app!

7398
install Normal file

File diff suppressed because it is too large Load Diff