mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
fix filter purchase supplier repport
This commit is contained in:
@@ -191,6 +191,9 @@ func (s *purchaseService) GetAll(c *fiber.Ctx, params *validation.Query) ([]enti
|
||||
if createdTo != nil {
|
||||
db = db.Where("created_at < ?", *createdTo)
|
||||
}
|
||||
if poDateStart != nil {
|
||||
db = db.Where("purchases.po_date >= ?", *poDateStart)
|
||||
}
|
||||
|
||||
if poDateStart != nil {
|
||||
db = db.Where("purchases.po_date >= ?", *poDateStart)
|
||||
@@ -333,7 +336,6 @@ func (s *purchaseService) GetAll(c *fiber.Ctx, params *validation.Query) ([]enti
|
||||
if err := s.attachLatestApprovals(c.Context(), purchases); err != nil {
|
||||
s.Log.Warnf("Unable to attach latest approvals for purchases: %+v", err)
|
||||
}
|
||||
|
||||
return purchases, total, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -432,7 +432,6 @@ func (c *RepportController) GetProductionResult(ctx *fiber.Ctx) error {
|
||||
func parseCommaSeparatedInt64s(raw string) ([]int64, error) {
|
||||
return parseCommaSeparatedInt64sWithField(raw, "supplier_ids")
|
||||
}
|
||||
|
||||
func parseCommaSeparatedInt64sWithField(raw, field string) ([]int64, error) {
|
||||
raw = strings.TrimSpace(raw)
|
||||
if raw == "" {
|
||||
|
||||
Reference in New Issue
Block a user