mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 23:35:43 +00:00
FIX[BE]: getting available qty from Flags instead of Product.Category
This commit is contained in:
@@ -136,7 +136,7 @@ func (s *chickinService) CreateOne(c *fiber.Ctx, req *validation.Create) ([]enti
|
||||
return nil, fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("Unknown category: %s", category))
|
||||
}
|
||||
|
||||
productWarehouses, err = s.ProductWarehouseRepo.GetByCategoryCodeAndWarehouseID(c.Context(), productCategoryCode, warehouse.Id)
|
||||
productWarehouses, err = s.ProductWarehouseRepo.GetByFlagAndWarehouseID(c.Context(), productCategoryCode, warehouse.Id)
|
||||
if err != nil || len(productWarehouses) == 0 {
|
||||
return nil, fiber.NewError(fiber.StatusNotFound, fmt.Sprintf("Product for %s category in the Kandang's warehouse not found", strings.ToLower(category)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user