From f079d0b649adaec84b61b66dd6ebe0beb5f83dd8 Mon Sep 17 00:00:00 2001 From: matst80 Date: Mon, 5 May 2025 16:04:25 +0200 Subject: [PATCH] cleanup --- cart-grain.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cart-grain.go b/cart-grain.go index 35847e0..d10b059 100644 --- a/cart-grain.go +++ b/cart-grain.go @@ -474,8 +474,6 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa c.PaymentInProgress = true c.Processing = true for _, item := range c.Items { - total := int(item.Price) * item.Quantity - taxAmount := int(item.Tax) * item.Quantity orderLines = append(orderLines, &Line{ Type: "physical", @@ -485,8 +483,8 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa UnitPrice: int(item.Price), TaxRate: int(item.Tax), QuantityUnit: "st", - TotalAmount: total, - TotalTaxAmount: taxAmount, + TotalAmount: int(item.TotalPrice), + TotalTaxAmount: int(item.TotalTax), ImageURL: fmt.Sprintf("https://www.elgiganten.se%s", item.Image), }) }