fix filter purchase ?approval_status=approved,rejected and ?product_category_id=1,2,3

This commit is contained in:
ragilap
2026-04-01 16:06:57 +07:00
parent 65409e5efa
commit 796417d56f
3 changed files with 96 additions and 35 deletions
@@ -40,7 +40,7 @@ func (ctrl *PurchaseController) GetAll(c *fiber.Ctx) error {
SupplierID: uint(c.QueryInt("supplier_id", 0)),
AreaID: uint(c.QueryInt("area_id", 0)),
LocationID: uint(c.QueryInt("location_id", 0)),
ProductCategoryID: uint(c.QueryInt("product_category_id", 0)),
ProductCategoryID: strings.TrimSpace(c.Query("product_category_id")),
}
if query.Page < 1 || query.Limit < 1 {