From bb887137b54c93b595be85206d39d2eaeebf6180 Mon Sep 17 00:00:00 2001 From: BaptTF <34722625+BaptTF@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:56:31 +0100 Subject: [PATCH] Update the item state to put it Buyable if you do a restock (#75) --- backend/api/restock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/restock.go b/backend/api/restock.go index 17d4a76..d6146dd 100644 --- a/backend/api/restock.go +++ b/backend/api/restock.go @@ -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))))