This commit is contained in:
Felix Baumann
2026-06-28 10:20:36 +00:00
parent 64b32d0b44
commit 148efd919d
86 changed files with 2475 additions and 760 deletions
+67 -1
View File
@@ -7,7 +7,9 @@ from .models import (
Invoice,
InvoiceItem,
Unit,
Reminder
Reminder,
InvoicePayment,
InvoicePaymentAllocation,
)
@admin.register(Unit)
@@ -273,3 +275,67 @@ class ReminderAdmin(admin.ModelAdmin):
)
ordering = ("-created_at",)
@admin.register(InvoicePayment)
class InvoicePaymentAdmin(admin.ModelAdmin):
list_display = (
"invoice",
"amount",
"date",
"payment_method",
"created_by",
"created_at",
)
list_filter = (
"payment_method",
"date",
"created_at",
)
search_fields = (
"invoice__invoice_number",
"invoice__customer__company_name",
"note",
)
readonly_fields = (
"created_at",
"created_by",
)
@admin.register(InvoicePaymentAllocation)
class InvoicePaymentAllocationAdmin(admin.ModelAdmin):
list_display = (
"payment",
"amount",
"reminder",
)