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