diff --git a/osinaweb/billing/__pycache__/models.cpython-310.pyc b/osinaweb/billing/__pycache__/models.cpython-310.pyc index 5bebdfb3..9e7b5544 100644 Binary files a/osinaweb/billing/__pycache__/models.cpython-310.pyc and b/osinaweb/billing/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/billing/migrations/0025_remove_item_project_item_customer.py b/osinaweb/billing/migrations/0025_remove_item_project_item_customer.py new file mode 100644 index 00000000..cab185f3 --- /dev/null +++ b/osinaweb/billing/migrations/0025_remove_item_project_item_customer.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.5 on 2024-04-11 19:30 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0065_alter_customerprofile_status'), + ('billing', '0024_remove_item_active'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='project', + ), + migrations.AddField( + model_name='item', + name='customer', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.customerprofile'), + ), + ] diff --git a/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-310.pyc b/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-310.pyc new file mode 100644 index 00000000..611ca040 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-310.pyc differ diff --git a/osinaweb/billing/models.py b/osinaweb/billing/models.py index 96805bb1..1ad96577 100644 --- a/osinaweb/billing/models.py +++ b/osinaweb/billing/models.py @@ -19,7 +19,7 @@ class Item(models.Model): ) title = models.CharField(max_length=200) description = models.TextField(blank=True) - project = models.ForeignKey(Project, null=True, blank=True, on_delete=models.CASCADE) + customer = models.ForeignKey(CustomerProfile, null=True, blank=True, on_delete=models.CASCADE) type = models.ForeignKey(ProjectType, on_delete=models.CASCADE, null=True, blank=True) amount = models.FloatField(null=True) recurring = models.BooleanField(default=False) diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 895117d6..73087dbb 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ