# Generated manually for sales module extensions from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('accounting', '0002_seed_chart_of_accounts'), ] operations = [ migrations.CreateModel( name='SalesType', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('code', models.CharField(db_index=True, max_length=50)), ('name', models.CharField(max_length=150)), ('description', models.TextField(blank=True, default='')), ('active', models.BooleanField(default=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ], options={ 'db_table': 'accounting_sales_types', 'ordering': ['code'], }, ), migrations.CreateModel( name='PartyAdjustment', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('number', models.PositiveIntegerField(default=0)), ('kind', models.CharField(choices=[('debit', 'Debit'), ('credit', 'Credit')], max_length=20)), ('date', models.DateField()), ('amount', models.FloatField(default=0)), ('description', models.TextField(blank=True, default='')), ('created_at', models.DateTimeField(auto_now_add=True)), ('party', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='adjustments', to='accounting.party')), ], options={ 'db_table': 'accounting_party_adjustments', 'ordering': ['-date', '-number'], }, ), migrations.AddField( model_name='invoice', name='document_type', field=models.CharField( choices=[('proforma', 'Proforma'), ('invoice', 'Invoice'), ('return', 'Return')], default='invoice', max_length=20, ), ), migrations.AddField( model_name='invoice', name='related_invoice', field=models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='derived_docs', to='accounting.invoice', ), ), migrations.AddField( model_name='invoice', name='sales_type', field=models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='invoices', to='accounting.salestype', ), ), ]