Skip to content

Commit

Permalink
remove barcode field when is does not encode anything
Browse files Browse the repository at this point in the history
  • Loading branch information
bellerbrock committed Sep 25, 2023
1 parent 90c9f81 commit 5420265
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ public void onDeviceChosen(String newDeviceName) {
labelData = labelData.replace("size2", size2);
labelData = labelData.replace("size3", size3);
labelData = labelData.replace("size4", size4);
labelData = labelData.replace("barcode", barcode);
if (barcode.isEmpty()) { // remove barcode if it will not encode anything
labelData = labelData.replace("^BQ,,sizeb^FDMA,barcode^FS", "");
} else {
labelData = labelData.replace("barcode", barcode);
}
labelData = labelData.replace("sizeb", Integer.toString(barcode_size));

}
Expand Down

0 comments on commit 5420265

Please sign in to comment.