From 657f8cfc048e26bdd45af8760def4b07c4d471eb Mon Sep 17 00:00:00 2001 From: Shrikrishna Singh <krishnasingh.ss30@gmail.com> Date: Tue, 12 Apr 2022 11:03:11 +0530 Subject: [PATCH] Remove unnecessary fields from invoice --- ..._remove_unnecessary_fields_from_invoice.py | 25 +++++++++++++++++++ hypha/apply/projects/models/payment.py | 8 ------ 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 hypha/apply/projects/migrations/0051_remove_unnecessary_fields_from_invoice.py diff --git a/hypha/apply/projects/migrations/0051_remove_unnecessary_fields_from_invoice.py b/hypha/apply/projects/migrations/0051_remove_unnecessary_fields_from_invoice.py new file mode 100644 index 000000000..11ad637d5 --- /dev/null +++ b/hypha/apply/projects/migrations/0051_remove_unnecessary_fields_from_invoice.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.12 on 2022-04-12 05:32 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('application_projects', '0050_add_new_invoice_status'), + ] + + operations = [ + migrations.RemoveField( + model_name='invoice', + name='amount', + ), + migrations.RemoveField( + model_name='invoice', + name='date_from', + ), + migrations.RemoveField( + model_name='invoice', + name='date_to', + ), + ] diff --git a/hypha/apply/projects/models/payment.py b/hypha/apply/projects/models/payment.py index c639732a7..e1b76047d 100644 --- a/hypha/apply/projects/models/payment.py +++ b/hypha/apply/projects/models/payment.py @@ -122,14 +122,6 @@ class InvoiceDeliverable(models.Model): class Invoice(models.Model): project = models.ForeignKey("Project", on_delete=models.CASCADE, related_name="invoices") by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="invoices") - date_from = models.DateTimeField() - date_to = models.DateTimeField() - amount = models.DecimalField( - default=0, - max_digits=10, - decimal_places=2, - validators=[MinValueValidator(decimal.Decimal('0.01'))], - ) paid_value = models.DecimalField( max_digits=10, decimal_places=2, -- GitLab