feat(BE-74-76-78-278):adjustment project flock,recording,purchase getall

This commit is contained in:
ragilap
2026-01-10 21:22:54 +07:00
parent 359e982e76
commit 3b2c6f16c3
10 changed files with 294 additions and 94 deletions
@@ -133,6 +133,7 @@ func (s *purchaseService) GetAll(c *fiber.Ctx, params *validation.Query) ([]enti
purchases, total, err := s.PurchaseRepo.GetAll(c.Context(), offset, params.Limit, func(db *gorm.DB) *gorm.DB {
db = s.withRelations(db)
db = db.Where("purchases.deleted_at IS NULL")
if params.SupplierID > 0 {
db = db.Where("supplier_id = ?", params.SupplierID)