diff --git a/hypha/apply/dashboard/views.py b/hypha/apply/dashboard/views.py index 26a81ef34ba6cc57dc88c6802622b1613dc5d806..ac7a22f69742c0ee3453ac163546ea4002e84a6c 100644 --- a/hypha/apply/dashboard/views.py +++ b/hypha/apply/dashboard/views.py @@ -164,7 +164,7 @@ class FinanceDashboardView(MyFlaggedMixin, TemplateView): if self.request.user.is_finance_level_2: invoices = Invoice.objects.approved_by_finance_1() else: - invoices = Invoice.objects.approved_by_staff() + invoices = Invoice.objects.for_finance_1() return { 'count': invoices.count(), diff --git a/hypha/apply/projects/models/payment.py b/hypha/apply/projects/models/payment.py index d873b189012323f075815a3e3d6f0293255598ce..94ac5b67b744c7736a3df7625dcd4f0f57a4b0cb 100644 --- a/hypha/apply/projects/models/payment.py +++ b/hypha/apply/projects/models/payment.py @@ -77,6 +77,9 @@ class InvoiceQueryset(models.QuerySet): def approved_by_finance_1(self): return self.filter(status=APPROVED_BY_FINANCE_1) + def for_finance_1(self): + return self.filter(status__in=[APPROVED_BY_STAFF, CHANGES_REQUESTED_BY_FINANCE_2]) + def rejected(self): return self.filter(status=DECLINED)