feat(purchase

This commit is contained in:
Efril
2026-08-11 22:41:10 +07:00
parent dbc143954c
commit e6078e3c0b
19 changed files with 532 additions and 17 deletions
@@ -101,6 +101,10 @@ func (r *PurchaseOrderRepositoryImpl) List(ctx context.Context, organizationID u
if teamCategoryID, ok := value.(uuid.UUID); ok {
query = query.Where("team_category_id = ?", teamCategoryID)
}
case "team_unassigned":
if unassigned, ok := value.(bool); ok && unassigned {
query = query.Where("team_scope IS NULL")
}
case "start_date":
if startDate, ok := value.(time.Time); ok {
query = query.Where("transaction_date >= ?", startDate)
@@ -160,6 +164,10 @@ func (r *PurchaseOrderRepositoryImpl) Count(ctx context.Context, organizationID
if teamCategoryID, ok := value.(uuid.UUID); ok {
query = query.Where("team_category_id = ?", teamCategoryID)
}
case "team_unassigned":
if unassigned, ok := value.(bool); ok && unassigned {
query = query.Where("team_scope IS NULL")
}
case "start_date":
if startDate, ok := value.(time.Time); ok {
query = query.Where("transaction_date >= ?", startDate)