Skip to content

Commit 8838a43

Browse files
cmaierFabtron
andauthored
Fix totalPrice calculation (#194)
Co-authored-by: Fabian Bender <[email protected]>
1 parent 19e5fb3 commit 8838a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ class ShoppingCart(
451451
val totalPrice: Int
452452
get() = data.onlineTotalPrice ?: calculateTotalPrice()
453453

454-
private fun calculateTotalPrice(): Int = data.items.sumOf { it.totalDepositPrice }
454+
private fun calculateTotalPrice(): Int = data.items.sumOf { it.totalPrice } + totalDepositPrice
455455

456456
/**
457457
* Returns the total sum of deposit

0 commit comments

Comments
 (0)