update
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user