# Generated by Django 2.0.2 on 2018-03-06 02:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=16)),
                ('order_id', models.CharField(blank=True, max_length=16, null=True)),
                ('invoice_date', models.DateTimeField()),
                ('terms', models.CharField(choices=[('due_receipt', 'Due of Receipt'), ('due_end_next_month', 'Due End of Next Month'), ('due_end_month', 'Due End of Month')], default='due_receipt', max_length=16)),
                ('due_date', models.DateTimeField()),
                ('notes', models.TextField(blank=True, null=True)),
                ('conditions', models.CharField(blank=True, max_length=28, null=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('status', models.CharField(choices=[('sent', 'Sent'), ('draft', 'Draft')], default='draft', max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('details', models.CharField(max_length=255)),
                ('quantity', models.PositiveIntegerField(default=0)),
                ('rate', models.DecimalField(decimal_places=2, default=Decimal('0.0'), max_digits=15)),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='invoices.Invoice')),
            ],
        ),
    ]
