From 01f20644e186a35b041ccf873bbfb2672ca4f47f Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 26 Jun 2024 09:53:12 +0200 Subject: [PATCH] Revert "Tariffs: add tax only on positive prices (#14527)" This reverts commit 0a42b53b2d7522f620deefcd4dfe1fe5d5a32bdf. --- tariff/embed.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tariff/embed.go b/tariff/embed.go index 9072a19c8..5b171e220 100644 --- a/tariff/embed.go +++ b/tariff/embed.go @@ -6,9 +6,5 @@ type embed struct { } func (t *embed) totalPrice(price float64) float64 { - total := price + t.Charges - if total > 0 { - total *= 1 + t.Tax - } - return total + return (price + t.Charges) * (1 + t.Tax) }