add restrict for expense,purchase,adjustment transfer: unfinished

This commit is contained in:
ragilap
2025-12-09 15:16:01 +07:00
parent 7094d90034
commit 0fbf04fc1d
18 changed files with 681 additions and 395 deletions
@@ -79,7 +79,7 @@ func (r *ExpenseRepositoryImpl) CountUnfinishedByProjectFlockKandang(ctx context
if err := r.DB().WithContext(ctx).
Table("expenses").
Scopes(r.WithProjectFlockKandangFilter(pfkID, kandangID)).
Group("expenses.id").
Group("expenses.id").Where("expenses.deleted_at IS NULL").
Pluck("expenses.id", &ids).Error; err != nil {
return 0, err
}