Feat(BE-339): make reporting purchase per supplier with filterization

This commit is contained in:
ragilap
2025-12-18 11:30:55 +07:00
parent cd739f41b9
commit e52a02b1c0
3 changed files with 14 additions and 15 deletions
@@ -106,8 +106,8 @@ func (c *RepportController) GetPurchaseSupplier(ctx *fiber.Ctx) error {
SupplierId: int64(ctx.QueryInt("supplier_id", 0)),
ProductId: int64(ctx.QueryInt("product_id", 0)),
ProductCategoryId: int64(ctx.QueryInt("product_category_id", 0)),
DateFrom: ctx.Query("date_from", ""),
DateTo: ctx.Query("date_to", ""),
StartDate: ctx.Query("start_date", ""),
EndDate: ctx.Query("end_date", ""),
SortBy: ctx.Query("sort_by", ""),
FilterBy: ctx.Query("filter_by", ""),
}
@@ -126,8 +126,8 @@ func (c *RepportController) GetPurchaseSupplier(ctx *fiber.Ctx) error {
"supplier_id": query.SupplierId,
"product_id": query.ProductId,
"product_category_id": query.ProductCategoryId,
"date_from": query.DateFrom,
"date_to": query.DateTo,
"start_date": query.StartDate,
"end_date": query.EndDate,
"sort_by": query.SortBy,
"filter_by": query.FilterBy,
}