Skip to content

Commit

Permalink
I put the Shipping tax component beneath the tax lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Dean committed Feb 13, 2024
1 parent fde9cd6 commit dc8cb29
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ class OrderCreateEditTotalsHelper @Inject constructor(
label = resourceProvider.getString(R.string.order_creation_payment_tax_label),
value = bigDecimalFormatter(totalTax)
)
) + if (shippingTax > BigDecimal.ZERO) {
) + taxLines.map {
TotalsSectionsState.Line.SimpleSmall(
label = "${it.label} · ${it.ratePercent}%",
value = bigDecimalFormatter(BigDecimal(it.taxTotal))
)
} + if (shippingTax > BigDecimal.ZERO) {
listOf(
TotalsSectionsState.Line.SimpleSmall(
label = resourceProvider.getString(R.string.order_creation_payment_shipping_tax_label),
Expand All @@ -183,11 +188,6 @@ class OrderCreateEditTotalsHelper @Inject constructor(
)
} else {
emptyList()
} + taxLines.map {
TotalsSectionsState.Line.SimpleSmall(
label = "${it.label} · ${it.ratePercent}%",
value = bigDecimalFormatter(BigDecimal(it.taxTotal))
)
} + TotalsSectionsState.Line.LearnMore(
text = taxBasedOnSettingLabel,
buttonText = resourceProvider.getString(R.string.learn_more),
Expand Down

0 comments on commit dc8cb29

Please sign in to comment.