diff --git a/aleksis/apps/tezor/migrations/0002_invoice_due_date.py b/aleksis/apps/tezor/migrations/0002_invoice_due_date.py new file mode 100644 index 0000000000000000000000000000000000000000..373f9dc61f94d613cce82d789b85d50d2c1154bd --- /dev/null +++ b/aleksis/apps/tezor/migrations/0002_invoice_due_date.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2022-03-12 21:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tezor', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='invoice', + name='due_date', + field=models.DateField(null=True, verbose_name='Payment due date'), + ), + ] diff --git a/aleksis/apps/tezor/models/invoice.py b/aleksis/apps/tezor/models/invoice.py index 3ea79e3480bc510a9a2182f9412d8faf10aaae37..c67e29d627d6c74d745cfffb31dbd70e970019df 100644 --- a/aleksis/apps/tezor/models/invoice.py +++ b/aleksis/apps/tezor/models/invoice.py @@ -55,6 +55,7 @@ class Invoice(BasePayment, PureDjangoModel): ) number = models.CharField(verbose_name=_("Invoice number"), max_length=255) + due_date = models.DateField(verbose_name=_("Payment due date"), null=True) for_content_type = models.ForeignKey(ContentType, on_delete=models.SET_NULL, null=True) for_object_id = models.PositiveIntegerField() diff --git a/aleksis/apps/tezor/templates/tezor/invoice/full.html b/aleksis/apps/tezor/templates/tezor/invoice/full.html index a40e62f9ceae17f0ba351e08bef2f2492452229e..345aed939f0ef2ad1e2e8a15b58d18286c0c9eae 100644 --- a/aleksis/apps/tezor/templates/tezor/invoice/full.html +++ b/aleksis/apps/tezor/templates/tezor/invoice/full.html @@ -78,6 +78,14 @@ {{ object.get_status_display }} </td> </tr> + <tr> + <td> + <i class="material-icons iconify" data-icon="mdi:calendar-end"></i> + </td> + <td> + {{ object.due_date }} + </td> + </tr> </table> </div> {% if object.status == "waiting" or object.status == "rejected" or object.status == "input" and can_do_payment %}