diff --git a/scipost_django/finances/migrations/0045_alter_subsidypayment_options.py b/scipost_django/finances/migrations/0045_alter_subsidypayment_options.py new file mode 100644 index 0000000000000000000000000000000000000000..107cb62bc057dc82d336a36f73a4a0029edbdade --- /dev/null +++ b/scipost_django/finances/migrations/0045_alter_subsidypayment_options.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.10 on 2024-06-26 17:18 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("finances", "0044_remove_subsidy_algorithm_and_more"), + ] + + operations = [ + migrations.AlterModelOptions( + name="subsidypayment", + options={"ordering": ["date_scheduled", "reference", "amount"]}, + ), + ] diff --git a/scipost_django/finances/models/subsidy_payment.py b/scipost_django/finances/models/subsidy_payment.py index 65543c2950a9d85d2e426d8a9608630df4042c93..c6778831a692b73b28525bf2f5b90a97c411479d 100644 --- a/scipost_django/finances/models/subsidy_payment.py +++ b/scipost_django/finances/models/subsidy_payment.py @@ -33,6 +33,9 @@ class SubsidyPayment(models.Model): objects = SubsidyPaymentQuerySet.as_manager() + class Meta: + ordering = ["date_scheduled", "reference", "amount"] + def __str__(self): return f"payment {self.reference} for {self.subsidy}"