feat(billing): Add is_expired field to TopupAdmin and TopupSerializer for better topup management

This commit is contained in:
2025-07-04 16:31:47 +05:00
parent 638c32cb80
commit d4b26074e6
2 changed files with 12 additions and 0 deletions

View File

@ -26,8 +26,11 @@ class TopupAdmin(admin.ModelAdmin):
"paid",
"paid_at",
"created_at",
"is_expired",
"expires_at",
"updated_at",
)
search_fields = (
"user__first_name",
"user__last_name",
@ -35,6 +38,10 @@ class TopupAdmin(admin.ModelAdmin):
"user__mobile",
)
@admin.display(boolean=True, description="Expired")
def is_expired(self, obj):
return obj.is_expired
admin.site.register(Payment, PaymentAdmin)
admin.site.register(BillFormula)