diff --git a/app/controllers/repository_rows_controller.rb b/app/controllers/repository_rows_controller.rb index df045d04d..495159145 100644 --- a/app/controllers/repository_rows_controller.rb +++ b/app/controllers/repository_rows_controller.rb @@ -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 diff --git a/db/migrate/20210716124649_create_label_templates.rb b/db/migrate/20210716124649_create_label_templates.rb index d05296145..6ed74cfdf 100644 --- a/db/migrate/20210716124649_create_label_templates.rb +++ b/db/migrate/20210716124649_create_label_templates.rb @@ -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 )