print settings
This commit is contained in:
@@ -431,4 +431,9 @@ iframe {
|
||||
width: 150%;
|
||||
height: 100%;
|
||||
}
|
||||
/* End iframe */
|
||||
/* End iframe */
|
||||
|
||||
/* section class for webview */
|
||||
.section-margin {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class PrintSetting < ApplicationRecord
|
||||
# validations
|
||||
validates_presence_of :name, :unique_code, :printer_name, :brand_name, :api_settings, :page_width, :page_height, :print_copies
|
||||
validates_presence_of :name, :unique_code, :printer_name, :brand_name, :api_settings, :page_width, :page_height, :print_copies, :header_font_size, :item_font_size
|
||||
|
||||
def self.get_precision_delimiter
|
||||
PrintSetting.find_by_unique_code("ReceiptBillPdf")
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<%= f.input :unique_code %>
|
||||
<%= f.input :template %>
|
||||
<%= f.input :font %>
|
||||
<%= f.input :header_font_size %>
|
||||
<%= f.input :item_font_size %>
|
||||
<%= f.input :printer_name, :as => :select, :collection => Printer::PrinterWorker.printers, include_blank: false %>
|
||||
<%= f.input :brand_name %>
|
||||
<%= f.input :printer_type %>
|
||||
|
||||
@@ -4,7 +4,9 @@ class CreatePrintSettings < ActiveRecord::Migration[5.1]
|
||||
t.string :name, :null => false
|
||||
t.string :unique_code, :null => false
|
||||
t.string :template
|
||||
t.string :font, :default => ""
|
||||
t.string :font, :default => ""
|
||||
t.integer :header_font_size, :null => false, :default => 11
|
||||
t.integer :item_font_size, :null => false, :default => 9
|
||||
t.string :printer_name, :null => false
|
||||
t.string :api_settings
|
||||
t.string :brand_name
|
||||
|
||||
Reference in New Issue
Block a user