# Generated by Django 4.2 on 2023-08-31 10:31

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('Customer', '0007_alter_customer_customerfullname'),
        ('Item', '0010_alter_pricelevelitem_price'),
    ]

    operations = [
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('TxnDate', models.DateField()),
                ('RefNumber', models.CharField(max_length=30, verbose_name='S.O. No.')),
                ('BillAddr1', models.CharField(max_length=80, verbose_name='Name/Address')),
                ('BillAddr2', models.CharField(blank=True, max_length=80, null=True)),
                ('BillAddr3', models.CharField(blank=True, max_length=80, null=True)),
                ('BillAddr4', models.CharField(blank=True, max_length=80, null=True)),
                ('BillAddr5', models.CharField(blank=True, max_length=80, null=True)),
                ('BillCity', models.CharField(blank=True, max_length=80, null=True)),
                ('BillState', models.CharField(blank=True, max_length=80, null=True)),
                ('BillPostalCode', models.CharField(blank=True, max_length=80, null=True)),
                ('BillCountry', models.CharField(blank=True, default='Indonesia', max_length=80, null=True)),
                ('BillNote', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipAddr1', models.CharField(blank=True, max_length=80, null=True, verbose_name='Ship To')),
                ('ShipAddr2', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipAddr3', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipAddr4', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipAddr5', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipCity', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipState', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipPostalCode', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipCountry', models.CharField(blank=True, max_length=80, null=True)),
                ('ShipNote', models.CharField(blank=True, max_length=200, null=True)),
                ('PONumber', models.CharField(blank=True, max_length=30, null=True, verbose_name='PO. No.')),
                ('TermsRefFullName', models.CharField(blank=True, max_length=10, null=True, verbose_name='Terms')),
                ('SalesRepRefFullName', models.CharField(blank=True, max_length=10, null=True, verbose_name='REP')),
                ('ShipDate', models.DateTimeField(blank=True, null=True)),
                ('DueDate', models.DateField(blank=True, null=True)),
                ('TotalAmount', models.DecimalField(blank=True, decimal_places=2, max_digits=14, null=True)),
                ('CustomerMsgRefFullName', models.CharField(blank=True, max_length=120, null=True)),
                ('IsToBePrinted', models.BooleanField(default=False)),
                ('IsToBeEmailed', models.BooleanField(default=False)),
                ('IsManuallyClosed', models.BooleanField(default=False)),
                ('IsFullyInvoiced', models.BooleanField(default=False)),
                ('Memo', models.CharField(blank=True, max_length=120, null=True)),
                ('NPWP', models.CharField(blank=True, max_length=20, null=True)),
                ('KTP', models.CharField(blank=True, max_length=16, null=True)),
                ('DMS_Cust_Name', models.CharField(blank=True, max_length=80, null=True)),
                ('DMS_Cust_Code', models.CharField(blank=True, max_length=80, null=True)),
                ('Special_Cust', models.BooleanField(default=False)),
                ('EFaktur_Name', models.CharField(blank=True, max_length=80, null=True)),
                ('Efaktur_Address', models.CharField(blank=True, max_length=80, null=True)),
                ('Coordinates', models.CharField(blank=True, max_length=30, null=True)),
                ('TimeCreated', models.DateTimeField(auto_now_add=True)),
                ('TimeModified', models.DateTimeField(auto_now=True)),
                ('CustomerRefFullName', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Customer.customer')),
            ],
        ),
        migrations.CreateModel(
            name='InvoiceItemLine',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Desc', models.CharField(blank=True, max_length=80, null=True)),
                ('Quantity', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
                ('Rate', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True)),
                ('Amount', models.DecimalField(blank=True, decimal_places=2, max_digits=14, null=True)),
                ('Invoiced', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
                ('LineIsManuallyClosed', models.BooleanField(blank=True, default=False, null=True)),
                ('Invoice', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Invoice.invoice')),
                ('ItemRefFullName', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Item.item')),
                ('UnitOfMeasure', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='Item.uom', verbose_name='UOM')),
            ],
        ),
    ]
