mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-27 10:08:11 +08:00
Amended label template, truncate item name before print [SCI_6025]
This commit is contained in:
parent
7621deeb2a
commit
289095ecbc
2 changed files with 6 additions and 5 deletions
|
@ -99,7 +99,7 @@ class RepositoryRowsController < ApplicationController
|
|||
label_printer,
|
||||
LabelTemplate.first.render( # Currently we will only use the default template
|
||||
item_id: repository_row.code,
|
||||
item_name: repository_row.name
|
||||
item_name: repository_row.name.truncate(64)
|
||||
),
|
||||
params[:copies].to_i
|
||||
).job_id
|
||||
|
|
|
@ -24,10 +24,11 @@ class CreateLabelTemplates < ActiveRecord::Migration[6.1]
|
|||
content:
|
||||
<<~HEREDOC
|
||||
^XA
|
||||
^CF0,21
|
||||
^FO10,0^FD{{item_id}}^FS
|
||||
^FO5,3^BY3,3.0,25^BQN,2,4^FDMA\\{{item_id}}^FS
|
||||
^FO100,39^FB190,20,5,L^FD{{item_name}}^FS^FS
|
||||
^LH20,20
|
||||
^CF0,23
|
||||
^FO0,0^FDIT68329^FS
|
||||
^FO0,20^BQN,2,4^FDMA\{{item_id}}^FS
|
||||
^FO95,30^FB180,4,0,L^FD{{item_name}}^FS^FS
|
||||
^XZ
|
||||
HEREDOC
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue