File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
ui/src/main/java/io/snabble/sdk/ui/scanner Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.44.4]
5+
6+ ### Fixed
7+ - Handle edge case when scanning a user weighed product with a pre weighed barcode
8+
49## [ 0.44.3]
510
611### Fixed
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ allprojects {
3131 }
3232
3333 project. ext {
34- sdkVersion= ' 0.44.3 '
34+ sdkVersion= ' 0.44.4 '
3535 versionCode= 1
3636
3737 compileSdkVersion= 30
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ public void addToCart() {
317317
318318 Telemetry .event (Telemetry .Event .ConfirmedProduct , cartItem .getProduct ());
319319
320- int q = getQuantity ();
320+ int q = Math . max ( getQuantity (), cartItem . getScannedCode (). getEmbeddedData () );
321321 if (cartItem .getProduct ().getType () == Product .Type .UserWeighed && q == 0 ) {
322322 shake ();
323323 return ;
@@ -327,7 +327,9 @@ public void addToCart() {
327327 shoppingCart .add (cartItem );
328328 }
329329
330- cartItem .setQuantity (q );
330+ if (cartItem .getProduct ().getType () == Product .Type .UserWeighed ) {
331+ cartItem .setQuantity (q );
332+ }
331333
332334 shoppingCart .updatePrices (false );
333335
You can’t perform that action at this time.
0 commit comments