print settings

This commit is contained in:
phyusin
2018-04-06 10:45:14 +06:30
parent 55e2a06422
commit dac1a58b64
4 changed files with 12 additions and 3 deletions

View File

@@ -432,3 +432,8 @@ iframe {
height: 100%; height: 100%;
} }
/* End iframe */ /* End iframe */
/* section class for webview */
.section-margin {
}

View File

@@ -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")

View File

@@ -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 %>

View File

@@ -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