Skip to content

Commit 9a0cd09

Browse files
committed
quantity encoding for preweighed items
1 parent 89495b7 commit 9a0cd09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/java/io/snabble/sdk/encodedcodes/EncodedCodesGenerator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ public int compare(ProductInfo p1, ProductInfo p2) {
149149
}
150150
}
151151
} else if (productInfo.product.getType() == Product.Type.PreWeighed) {
152-
addScannableCode(productInfo.scannedCode.getCode(), ageRestricted);
152+
if (options.repeatCodes) {
153+
addScannableCode(productInfo.scannedCode.getCode(), ageRestricted);
154+
} else {
155+
addScannableCode("1" + options.countSeparator + productInfo.scannedCode.getCode(), ageRestricted);
156+
}
153157
} else {
154158
int q = productInfo.quantity;
155159
String transmissionCode = productInfo.product.getTransmissionCode(productInfo.scannedCode.getLookupCode());

0 commit comments

Comments
 (0)