update
Some checks failed
Build and Publish / BuildAndDeployAmd64 (push) Failing after 18s
Build and Publish / BuildAndDeployArm64 (push) Has been cancelled

This commit is contained in:
2025-11-25 20:16:13 +01:00
parent e74f5ae30e
commit 4ca6c4ca23
5 changed files with 32 additions and 35 deletions

View File

@@ -39,7 +39,7 @@ func AddItem(g *CartGrain, m *messages.AddItem) error {
continue
}
existing.Quantity += int(m.Quantity)
existing.Stock = StockStatus(m.Stock)
existing.Stock = uint16(m.Stock)
// If existing had nil store but new has one, adopt it.
if existing.StoreId == nil && m.StoreId != nil {
existing.StoreId = m.StoreId
@@ -84,7 +84,7 @@ func AddItem(g *CartGrain, m *messages.AddItem) error {
Price: *pricePerItem,
TotalPrice: *MultiplyPrice(*pricePerItem, int64(m.Quantity)),
Stock: StockStatus(m.Stock),
Stock: uint16(m.Stock),
Disclaimer: m.Disclaimer,
OrgPrice: getOrgPrice(m.OrgPrice, taxRate),