# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-02-01 10:37
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('codenerix_invoicing', '0010_reasonmodification'),
    ]

    operations = [
        migrations.CreateModel(
            name='ReasonModificationLineAlbaran',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('albaran', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_albaran', to='codenerix_invoicing.SalesAlbaran', verbose_name='Albaran')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_albaran', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_albaran', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_albaran', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineBasket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('basket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_basket', to='codenerix_invoicing.SalesBasket', verbose_name='Basket')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_basket', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_basket', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_basket', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineInvoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice', to='codenerix_invoicing.SalesInvoice', verbose_name='Invoice')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineInvoiceRectification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('invoice_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice_rectification', to='codenerix_invoicing.SalesInvoiceRectification', verbose_name='Invoice Rectification')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice_rectification', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice_rectification', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_invoice_rectification', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_order', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_order', to='codenerix_invoicing.SalesOrder', verbose_name='Order')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_order', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_order', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineTicket',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket', to='codenerix_invoicing.SalesTicket', verbose_name='Ticket')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReasonModificationLineTicketRectification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket_rectification', to='codenerix_invoicing.SalesLines', verbose_name='Line')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket_rectification', to='codenerix_invoicing.ReasonModification', verbose_name='Reason')),
                ('ticket_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket_rectification', to='codenerix_invoicing.SalesTicketRectification', verbose_name='Ticket Rectification')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reason_line_ticket_rectification', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
