more testing
All checks were successful
Build and Publish / Metadata (push) Successful in 15s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 51s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m38s

This commit is contained in:
matst80
2025-11-11 17:01:57 +01:00
parent 3f9c790dc2
commit 529e70fc68
3 changed files with 10 additions and 8 deletions

View File

@@ -69,7 +69,7 @@ func BuildCheckoutOrderPayload(grain *cart.CartGrain, meta *CheckoutMeta) ([]byt
Name: it.Meta.Name, Name: it.Meta.Name,
Quantity: it.Quantity, Quantity: it.Quantity,
UnitPrice: int(it.Price.IncVat), UnitPrice: int(it.Price.IncVat),
TaxRate: 2500, // TODO: derive if variable tax rates are introduced TaxRate: it.Tax, // TODO: derive if variable tax rates are introduced
QuantityUnit: "st", QuantityUnit: "st",
TotalAmount: int(it.TotalPrice.IncVat), TotalAmount: int(it.TotalPrice.IncVat),
TotalTaxAmount: int(it.TotalPrice.TotalVat()), TotalTaxAmount: int(it.TotalPrice.TotalVat()),

View File

@@ -37,6 +37,7 @@ type CartItem struct {
Price Price `json:"price"` Price Price `json:"price"`
TotalPrice Price `json:"totalPrice"` TotalPrice Price `json:"totalPrice"`
OrgPrice *Price `json:"orgPrice,omitempty"` OrgPrice *Price `json:"orgPrice,omitempty"`
Tax int
Stock StockStatus `json:"stock"` Stock StockStatus `json:"stock"`
Quantity int `json:"qty"` Quantity int `json:"qty"`
Discount *Price `json:"discount,omitempty"` Discount *Price `json:"discount,omitempty"`

View File

@@ -63,6 +63,7 @@ func AddItem(g *CartGrain, m *messages.AddItem) error {
ItemId: uint32(m.ItemId), ItemId: uint32(m.ItemId),
Quantity: int(m.Quantity), Quantity: int(m.Quantity),
Sku: m.Sku, Sku: m.Sku,
Tax: int(taxRate * 100),
Meta: &ItemMeta{ Meta: &ItemMeta{
Name: m.Name, Name: m.Name,
Image: m.Image, Image: m.Image,