<filename>invoices/migrations/0001_initial.py<gh_stars>0
# Generated by Django 2.2.3 on 2019-07-21 01:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('inventory', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('company', models.CharField(blank=True, max_length=35, null=True, verbose_name='nazwa firmy')),
                ('name', models.CharField(blank=True, max_length=35, null=True, verbose_name='imię i nazwisko')),
                ('street', models.CharField(blank=True, max_length=35, null=True, verbose_name='ulica')),
                ('city', models.CharField(blank=True, max_length=35, null=True, verbose_name='miasto')),
                ('tax_id', models.CharField(blank=True, help_text='tylko cyfry', max_length=35, null=True, unique=True, verbose_name='NIP')),
                ('email', models.EmailField(blank=True, max_length=50, null=True)),
                ('phone', models.CharField(blank=True, max_length=35, null=True, verbose_name='telefon')),
                ('postal_code', models.CharField(blank=True, max_length=6, null=True, verbose_name='kod pocztowy')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'klient',
                'verbose_name_plural': 'klienci',
            },
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('number', models.CharField(max_length=35, verbose_name='numer faktury')),
                ('issued', models.DateField(verbose_name='data wystawienia')),
                ('transaction', models.DateField(verbose_name='data sprzedaży')),
                ('due', models.DateField(verbose_name='termin płatności')),
                ('payment', models.CharField(choices=[('1', 'gotówka'), ('2', 'karta'), ('3', 'przelew')], default='1', max_length=1, verbose_name='sposób płatności')),
                ('issue_place', models.CharField(choices=[('1', 'Ustroń'), ('2', 'Wisła'), ('3', 'Cieszyn')], default='1', max_length=1, verbose_name='miejsce wydania faktury')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='invoices.Customer', verbose_name='klient')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='InvoiceItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='cena brutto')),
                ('vat', models.FloatField(default=23)),
                ('qty', models.FloatField(default=1, verbose_name='ilość')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='invoices.Invoice')),
                ('make', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Make', verbose_name='towar')),
            ],
        ),
    ]

<filename>invoices/migrations/0001_initial.py<gh_stars>0
# Generated by Django 2.2.3 on 2019-07-21 01:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('inventory', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('company', models.CharField(blank=True, max_length=35, null=True, verbose_name='nazwa firmy')),
                ('name', models.CharField(blank=True, max_length=35, null=True, verbose_name='imię i nazwisko')),
                ('street', models.CharField(blank=True, max_length=35, null=True, verbose_name='ulica')),
                ('city', models.CharField(blank=True, max_length=35, null=True, verbose_name='miasto')),
                ('tax_id', models.CharField(blank=True, help_text='tylko cyfry', max_length=35, null=True, unique=True, verbose_name='NIP')),
                ('email', models.EmailField(blank=True, max_length=50, null=True)),
                ('phone', models.CharField(blank=True, max_length=35, null=True, verbose_name='telefon')),
                ('postal_code', models.CharField(blank=True, max_length=6, null=True, verbose_name='kod pocztowy')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'klient',
                'verbose_name_plural': 'klienci',
            },
        ),
        migrations.CreateModel(
            name='Invoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('number', models.CharField(max_length=35, verbose_name='numer faktury')),
                ('issued', models.DateField(verbose_name='data wystawienia')),
                ('transaction', models.DateField(verbose_name='data sprzedaży')),
                ('due', models.DateField(verbose_name='termin płatności')),
                ('payment', models.CharField(choices=[('1', 'gotówka'), ('2', 'karta'), ('3', 'przelew')], default='1', max_length=1, verbose_name='sposób płatności')),
                ('issue_place', models.CharField(choices=[('1', 'Ustroń'), ('2', 'Wisła'), ('3', 'Cieszyn')], default='1', max_length=1, verbose_name='miejsce wydania faktury')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='invoices.Customer', verbose_name='klient')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='InvoiceItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='cena brutto')),
                ('vat', models.FloatField(default=23)),
                ('qty', models.FloatField(default=1, verbose_name='ilość')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='invoices.Invoice')),
                ('make', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Make', verbose_name='towar')),
            ],
        ),
    ]

# Generated by Django 2.2.3 on 2019-07-21 01:32