Skip to content

Commit

Permalink
Update the item state to put it Buyable if you do a restock (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptTF committed Mar 27, 2024
1 parent 7b87f90 commit bb88713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/restock.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *Server) CreateRestock(c echo.Context) error {

restockItem.ItemName = item.Name
restockItem.ItemPictureUri = item.PictureUri

item.State = autogen.ItemBuyable
item.AmountLeft += restockItem.AmountOfBundle * restockItem.AmountPerBundle
item.LastTva = &restockItem.Tva
item.Prices.Coutant = uint64(math.Ceil((10000.0 + float64(restockItem.Tva)) * float64(restockItem.BundleCostHt) / (10000.0 * float64(restockItem.AmountPerBundle))))
Expand Down

0 comments on commit bb88713

Please sign in to comment.