Merge pull request #8528 from artoscinote/ma_SCI_11903

Fix default ZPL 203dpi templates to properly break long text [SCI-11903]
This commit is contained in:
Martin Artnik 2025-06-10 16:13:14 +02:00 committed by GitHub
commit 3ee93b287f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View file

@ -710,7 +710,7 @@ class Extends
^CF0,15
^FO0,5^FD{{ITEM_ID}}^FS
^FO0,13^BQN,2,3^FDMA,{{ITEM_ID}}^FS
^FO70,27^FB100,2,0,L^FD{{NAME}}^FS^FS
^FO70,27^FB100,4,0,L^FD{{NAME}}^FS^FS
^XZ
HEREDOC
}

View file

@ -0,0 +1,19 @@
# frozen_string_literal: true
class FixDefault201dpiLabelTemplates < ActiveRecord::Migration[7.0]
def up
LabelTemplate.where(
content: "^XA\n^MTT\n^MUD,200,200\n^PR2\n^MD30\n^LH0,8\n^PW180\n^CF0,15\n^FO0,5^FD{{ITEM_ID}}^FS\n^FO0,13^BQN,2,3^FDMA,{{ITEM_ID}}^FS\n^FO70,27^FB100,2,0,L^FD{{NAME}}^FS^FS\n^XZ\n"
).update!(
content: "^XA\n^MTT\n^MUD,200,200\n^PR2\n^MD30\n^LH0,8\n^PW180\n^CF0,15\n^FO0,5^FD{{ITEM_ID}}^FS\n^FO0,13^BQN,2,3^FDMA,{{ITEM_ID}}^FS\n^FO70,27^FB100,4,0,L^FD{{NAME}}^FS^FS\n^XZ\n"
)
end
def down
LabelTemplate.where(
content: "^XA\n^MTT\n^MUD,200,200\n^PR2\n^MD30\n^LH0,8\n^PW180\n^CF0,15\n^FO0,5^FD{{ITEM_ID}}^FS\n^FO0,13^BQN,2,3^FDMA,{{ITEM_ID}}^FS\n^FO70,27^FB100,4,0,L^FD{{NAME}}^FS^FS\n^XZ\n"
).update!(
content: "^XA\n^MTT\n^MUD,200,200\n^PR2\n^MD30\n^LH0,8\n^PW180\n^CF0,15\n^FO0,5^FD{{ITEM_ID}}^FS\n^FO0,13^BQN,2,3^FDMA,{{ITEM_ID}}^FS\n^FO70,27^FB100,2,0,L^FD{{NAME}}^FS^FS\n^XZ\n"
)
end
end