Skip to content

Commit dac5f06

Browse files
committed
fix incorrect usage of amount instead of units when displaying lineitems
1 parent 7c091c5 commit dac5f06

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.33.9]
5+
6+
### Fixed
7+
- Fixed incorrect display of units when processing line items from vPOS
8+
49
## [0.33.8]
510

611
### Fixed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allprojects {
2929
}
3030

3131
project.ext {
32-
sdkVersion='0.33.8'
32+
sdkVersion='0.33.9'
3333
versionCode=1
3434

3535
compileSdkVersion=30

core/src/main/java/io/snabble/sdk/ShoppingCart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public String getFullPriceText() {
678678
public String getPriceText() {
679679
if (lineItem != null) {
680680
if (lineItem.price != 0) {
681-
if (product != null && lineItem.amount > 1
681+
if (product != null && lineItem.units != null && lineItem.units > 1
682682
|| (getUnit() != Unit.PRICE
683683
&& (getUnit() != PIECE || scannedCode.getEmbeddedData() == 0)
684684
&& getEffectiveQuantity() > 1)) {

0 commit comments

Comments
 (0)