Skip to content

Commit

Permalink
add admin for PaymentInvoice objects
Browse files Browse the repository at this point in the history
  • Loading branch information
czue committed Jan 23, 2025
1 parent c093241 commit 9ed013a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions commcare_connect/opportunity/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
OpportunityClaim,
OpportunityClaimLimit,
Payment,
PaymentInvoice,
PaymentUnit,
UserInvite,
UserVisit,
Expand Down Expand Up @@ -132,6 +133,12 @@ class PaymentAdmin(admin.ModelAdmin):
search_fields = ["opportunity_access__user__username", "opportunity_access__opportunity__name"]


@admin.register(PaymentInvoice)
class PaymentInvoiceAdmin(admin.ModelAdmin):
list_display = ["invoice_number", "opportunity", "amount", "date"]
search_fields = ["opportunity__name", "invoice_number"]


@admin.register(PaymentUnit)
class PaymentUnitAdmin(admin.ModelAdmin):
list_display = ["name", "get_opp_name"]
Expand Down

0 comments on commit 9ed013a

Please sign in to comment.