diff --git a/invoices_app/migrations/0008_auto_20200724_1318.py b/invoices_app/migrations/0008_auto_20200724_1318.py new file mode 100644 index 0000000..1a847ee --- /dev/null +++ b/invoices_app/migrations/0008_auto_20200724_1318.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.24 on 2020-07-24 13:18 +from __future__ import unicode_literals + +from decimal import Decimal +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('invoices_app', '0007_auto_20200616_1803'), + ] + + operations = [ + migrations.AlterField( + model_name='historicalinvoice', + name='net_amount', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Net amount'), + ), + migrations.AlterField( + model_name='historicalinvoice', + name='vat', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Tax Liens'), + ), + migrations.AlterField( + model_name='invoice', + name='net_amount', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Net amount'), + ), + migrations.AlterField( + model_name='invoice', + name='vat', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Tax Liens'), + ), + ] diff --git a/invoices_app/models.py b/invoices_app/models.py index 14d27df..f2c1f7e 100644 --- a/invoices_app/models.py +++ b/invoices_app/models.py @@ -47,12 +47,16 @@ class Meta: max_digits=20, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))], + blank=True, + null=True, ) vat = models.DecimalField( max_digits=20, decimal_places=2, validators=[MinValueValidator(Decimal('0.00'))], verbose_name=_('Tax Liens'), + blank=True, + null=True, ) total_amount = models.DecimalField( max_digits=20,