# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-01 08:56
from __future__ import unicode_literals

import codenerix.fields
import codenerix.lib.helpers
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('codenerix_storages', '0001_initial'),
        ('codenerix_products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='BillingSeries',
            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')),
                ('code', models.CharField(max_length=12, unique=True, verbose_name='Code')),
                ('description', models.CharField(blank=True, max_length=250, null=True, verbose_name='Description')),
                ('default', models.BooleanField(default=False, verbose_name='Default')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        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, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                ('currency', models.CharField(blank=True, max_length=250, null=True, verbose_name='Currency')),
                ('final_balance', models.CharField(blank=True, max_length=250, null=True, verbose_name='Balance')),
                ('credit', models.CharField(blank=True, max_length=250, null=True, verbose_name='Credit')),
                ('apply_equivalence_surcharge', models.BooleanField(default=False, verbose_name='Apply equivalence surcharge')),
                ('billing_series', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='billing_series', to='codenerix_invoicing.BillingSeries', verbose_name=b'Billing series')),
                ('type_tax', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='codenerix_products.TypeTax', verbose_name='Type tax')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CustomerDocument',
            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')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_documents', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LegalNote',
            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')),
                ('legal_note', models.TextField(blank=True, null=True, verbose_name='Legal_note')),
                ('public', models.BooleanField(default=False, verbose_name='Public')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='POS',
            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')),
                ('billing_series', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poss', to='codenerix_invoicing.BillingSeries', verbose_name='Billing Series')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='poss', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProductStock',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('batch', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='product_stocks', to='codenerix_storages.StorageBatch', verbose_name='Batch')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Provider',
            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')),
                ('balance', models.CharField(blank=True, max_length=250, null=True, verbose_name='Balance')),
                ('credit', models.CharField(blank=True, max_length=250, null=True, verbose_name='Credit')),
                ('shipping_tax', models.FloatField(blank=True, null=True, verbose_name='Impuesto de gastos de envio')),
                ('finance_surcharge', models.CharField(blank=True, choices=[(b'I', 'Taxable base'), (b'F', 'Total bill')], max_length=1, null=True, verbose_name='Finance surcharge')),
                ('payment_methods', models.CharField(blank=True, choices=[(b'AMA', 'Amazon'), (b'TRA', 'Wire transfer'), (b'CAR', 'Card'), (b'CRE', 'Credit'), (b'PYP', 'Paypal'), (b'30C', '30 day credit'), (b'60C', '60 day credit'), (b'90C', '90 day credit')], max_length=3, null=True, verbose_name='Payment methods')),
                ('delivery_time', models.SmallIntegerField(default=1, verbose_name='Delivery time (days)')),
                ('billing_series', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='providers', to='codenerix_invoicing.BillingSeries', verbose_name=b'Billing series')),
                ('categories', models.ManyToManyField(blank=True, related_name='providercategories', to='codenerix_products.Category')),
                ('type_tax', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='providers', to='codenerix_products.TypeTax', verbose_name='Type tax')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesAlbaran',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='albaran_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesAlbaranDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('albaran', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='albarandocument_purchases', to='codenerix_invoicing.PurchasesAlbaran', verbose_name='Albaran')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesBudget',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='budget_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesBudgetDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('budget', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='budgetdocument_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesInvoice',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoice_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesInvoiceDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoicedocument_purchases', to='codenerix_invoicing.PurchasesInvoice', verbose_name='Invoice')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesInvoiceRectification',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesInvoiceRectificationDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('invoice_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoicerectificationdocument_purchases', to='codenerix_invoicing.PurchasesInvoiceRectification', verbose_name='Invoice rectification')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineAlbaran',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('status', models.CharField(blank=True, choices=[(b'PR', 'Pending review'), (b'RV', 'Reviewed'), (b'RC', 'Rejected')], default=b'PR', max_length=2, null=True, verbose_name='Status')),
                ('invoiced', models.BooleanField(default=False, verbose_name='Invoiced')),
                ('feature_special_value', models.TextField(blank=True, null=True, verbose_name='Feature special values')),
                ('albaran', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to='codenerix_invoicing.PurchasesAlbaran', verbose_name='Albaran')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineBudget',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('budget', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_purchases', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineInvoice',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('feature_special_value', models.TextField(blank=True, null=True, verbose_name='Feature special values')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_purchases', to='codenerix_invoicing.PurchasesInvoice', verbose_name='Invoice')),
                ('line_albaran', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_purchases', to='codenerix_invoicing.PurchasesLineAlbaran', verbose_name='Line albaran')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_purchases', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineInvoiceRectification',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('invoice_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_invoicing.PurchasesInvoiceRectification', verbose_name='Invoice rectification')),
                ('line_invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_invoicing.PurchasesLineInvoice', verbose_name='Line invoice')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineOrder',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('line_budget', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_order_purchases', to='codenerix_invoicing.PurchasesLineBudget', verbose_name='Line budget')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineTicket',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('line_albaran', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_purchases', to='codenerix_invoicing.PurchasesLineAlbaran', verbose_name='Line albaran')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_purchases', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesLineTicketRectification',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('line_ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_purchases', to='codenerix_invoicing.PurchasesLineTicket', verbose_name='Line ticket')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_purchases', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesOrder',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('budget', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='order_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesOrderDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orderdocument_purchases', to='codenerix_invoicing.PurchasesOrder', verbose_name='Order')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesTicket',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('provider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesTicketDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticketdocument_purchases', to='codenerix_invoicing.PurchasesTicket', verbose_name='Ticket')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesTicketRectification',
            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')),
                ('tax', models.FloatField(verbose_name='Tax')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchasesTicketRectificationDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_path', codenerix.fields.FileAngularField(max_length=200, upload_to=codenerix.lib.helpers.upload_path, verbose_name='Doc Path')),
                ('name_file', models.CharField(max_length=254, verbose_name='Name')),
                ('code', models.CharField(max_length=256, verbose_name='Code')),
                ('date', models.DateTimeField(verbose_name='Date')),
                ('ticket_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticketrectificationdocument_purchases', to='codenerix_invoicing.PurchasesTicketRectification', verbose_name='Ticket rectification')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesAlbaran',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('tax', models.FloatField(default=0, verbose_name='Tax')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesBudget',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('status_budget', models.CharField(choices=[(b'DR', 'Draft'), (b'PP', 'Pending payment'), (b'PA', 'Payment accepted')], default=b'DR', max_length=2, verbose_name='Status')),
                ('signed', models.BooleanField(default=False, verbose_name='Signed')),
                ('public', models.BooleanField(default=False, verbose_name='Public')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='budget_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'verbose_name': 'Budget',
                'verbose_name_plural': 'Budgets',
            },
        ),
        migrations.CreateModel(
            name='SalesInvoice',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('tax', models.FloatField(default=0, verbose_name='Tax')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoice_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesInvoiceRectification',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('invoice', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='invoicerectification_sales', to='codenerix_invoicing.SalesInvoice', verbose_name='Invoice')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineAlbaran',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('invoiced', models.BooleanField(default=False, verbose_name='Invoiced')),
                ('albaran', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_sales', to='codenerix_invoicing.SalesAlbaran', verbose_name='Albaran')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineBudget',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('price_recommended', models.FloatField(verbose_name='Recomended price')),
                ('description', models.CharField(blank=True, max_length=256, null=True, verbose_name='Description')),
                ('discount', models.FloatField(default=0, verbose_name='Discount')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('budget', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_sales', to='codenerix_invoicing.SalesBudget', verbose_name='Budget')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_sales', to='codenerix_products.ProductFinal', verbose_name='Product')),
                ('type_tax', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_sales', to='codenerix_products.TypeTax', verbose_name='Type tax')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineInvoice',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('price_recommended', models.FloatField(verbose_name='Recomended price')),
                ('description', models.CharField(blank=True, max_length=256, null=True, verbose_name='Description')),
                ('discount', models.FloatField(default=0, verbose_name='Discount')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_sales', to='codenerix_invoicing.SalesInvoice', verbose_name='Invoice')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineInvoiceRectification',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('invoice_rectification', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_sales', to='codenerix_invoicing.SalesInvoiceRectification', verbose_name='Invoice rectification')),
                ('line_invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_sales', to='codenerix_invoicing.SalesLineInvoice', verbose_name='Line invoice')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineOrder',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('price_recommended', models.FloatField(verbose_name='Recomended price')),
                ('description', models.CharField(blank=True, max_length=256, null=True, verbose_name='Description')),
                ('discount', models.FloatField(default=0, verbose_name='Discount')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('line_budget', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_order_sales', to='codenerix_invoicing.SalesLineBudget', verbose_name='Line budget')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineSalesShoppingCart',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_shoppingcart_sales', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineTicket',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('price_recommended', models.FloatField(verbose_name='Recomended price')),
                ('description', models.CharField(blank=True, max_length=256, null=True, verbose_name='Description')),
                ('discount', models.FloatField(default=0, verbose_name='Discount')),
                ('price', models.FloatField(verbose_name='Price')),
                ('tax', models.FloatField(blank=True, default=0, null=True, verbose_name='Tax')),
                ('line_order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_sales', to='codenerix_invoicing.SalesLineOrder', verbose_name='Line order')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesLineTicketRectification',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('notes', models.CharField(blank=True, max_length=256, null=True, verbose_name='Notes')),
                ('line_ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_sales', to='codenerix_invoicing.SalesLineTicket', verbose_name='Line ticket')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesOrder',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('status_order', models.CharField(choices=[(b'PE', 'Pending'), (b'PA', 'Payment accepted'), (b'SE', 'Sent'), (b'DE', 'Delivered')], default=b'PE', max_length=2, verbose_name='Status')),
                ('payment_detail', models.CharField(blank=True, choices=[(b'AMA', 'Amazon'), (b'TRA', 'Wire transfer'), (b'CAR', 'Card'), (b'CRE', 'Credit'), (b'PYP', 'Paypal'), (b'30C', '30 day credit'), (b'60C', '60 day credit'), (b'90C', '90 day credit')], max_length=3, null=True, verbose_name='Payment detail')),
                ('source', models.CharField(blank=True, max_length=250, null=True, verbose_name='Source of purchase')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
                ('storage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='order_sales', to='codenerix_storages.Storage', verbose_name='Storage')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesReservedProduct',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reservedproduct_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reservedproduct_sales', to='codenerix_products.ProductFinal', verbose_name='Product')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesShoppingCart',
            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')),
                ('name', models.CharField(default=b'', max_length=64, verbose_name='Basquet name')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shoppingcart_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesTicket',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('tax', models.FloatField(default=0, verbose_name='Tax')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_sales', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesTicketRectification',
            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')),
                ('lock', models.BooleanField(default=False, verbose_name='Lock')),
                ('parent_pk', models.IntegerField(blank=True, null=True, verbose_name='Parent pk')),
                ('code', models.CharField(max_length=64, verbose_name='Code')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')),
                ('observations', models.TextField(blank=True, max_length=256, null=True, verbose_name='Observations')),
                ('ticket', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ticketrectification_sales', to='codenerix_invoicing.SalesTicket', verbose_name='Ticket')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StockMovement',
            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')),
                ('status', models.CharField(choices=[(b'R', 'Requested'), (b'S', 'Sent'), (b'D', 'Delivered')], default=b'R', max_length=1, verbose_name='Status')),
                ('batch_destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stock_movements_dst', to='codenerix_storages.StorageBatch', verbose_name='Batch destionation')),
                ('batch_source', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stock_movements_src', to='codenerix_storages.StorageBatch', verbose_name='Batch source')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StockMovementProduct',
            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')),
                ('quantity', models.FloatField(verbose_name='Quantity')),
                ('product_final', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stock_movement_products', to='codenerix_products.ProductFinal', verbose_name='Product')),
                ('stock_movement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stock_movement_products', to='codenerix_invoicing.StockMovement', verbose_name='Stock movement')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TypeDocument',
            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')),
                ('code', models.CharField(max_length=128, verbose_name='Code')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TypeDocumentTextEN',
            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')),
                ('name', models.CharField(max_length=128, verbose_name='Name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Description')),
                ('type_document', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='en', to='codenerix_invoicing.TypeDocument')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TypeDocumentTextES',
            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')),
                ('name', models.CharField(max_length=128, verbose_name='Name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Description')),
                ('type_document', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='es', to='codenerix_invoicing.TypeDocument')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WishList',
            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')),
                ('name', models.CharField(max_length=250, verbose_name='Name')),
                ('status', models.CharField(choices=[(b'PU', 'Public'), (b'PR', 'Private')], default=b'PU', max_length=2, verbose_name='Status')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wish_lists', to='codenerix_invoicing.Customer', verbose_name='Customer')),
            ],
        ),
        migrations.CreateModel(
            name='WishListProduct',
            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')),
                ('quantity', models.FloatField(default=1, verbose_name='Quantity')),
                ('priority', models.CharField(choices=[(b'XS', 'Muy baja'), (b'S', 'Baja'), (b'L', 'Media'), (b'XL', 'Alta'), (b'XXL', 'Urgente')], default=b'L', max_length=2, verbose_name='Priority')),
                ('product_final', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wish_list_products', to='codenerix_products.ProductFinal', verbose_name='Product')),
                ('wish_list', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wish_list_products', to='codenerix_invoicing.WishList', verbose_name='Wish list')),
            ],
            options={
                'default_permissions': ('add', 'change', 'delete', 'view', 'list'),
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='saleslineticketrectification',
            name='ticket_rectification',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_sales', to='codenerix_invoicing.SalesTicketRectification', verbose_name='Ticket rectification'),
        ),
        migrations.AddField(
            model_name='saleslineticket',
            name='ticket',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_sales', to='codenerix_invoicing.SalesTicket', verbose_name='Ticket'),
        ),
        migrations.AddField(
            model_name='saleslinesalesshoppingcart',
            name='shoppingcart',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_shoppingcart_sales', to='codenerix_invoicing.SalesShoppingCart', verbose_name='Budget'),
        ),
        migrations.AddField(
            model_name='saleslineorder',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_order_sales', to='codenerix_invoicing.SalesOrder', verbose_name='Order'),
        ),
        migrations.AddField(
            model_name='saleslineorder',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_order_sales', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='saleslineorder',
            name='type_tax',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_order_sales', to='codenerix_products.TypeTax', verbose_name='Type tax'),
        ),
        migrations.AddField(
            model_name='saleslineinvoice',
            name='line_order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_sales', to='codenerix_invoicing.SalesLineOrder', verbose_name='Line order'),
        ),
        migrations.AddField(
            model_name='saleslinealbaran',
            name='line_order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_sales', to='codenerix_invoicing.SalesLineOrder', verbose_name='Line orders'),
        ),
        migrations.AddField(
            model_name='salesbudget',
            name='shopping_cart',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='budget_sales', to='codenerix_invoicing.SalesShoppingCart', verbose_name='Shopping cart'),
        ),
        migrations.AlterUniqueTogether(
            name='salesalbaran',
            unique_together=set([('code', 'parent_pk')]),
        ),
        migrations.AddField(
            model_name='purchaseslineticketrectification',
            name='ticket_rectification',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_purchases', to='codenerix_invoicing.PurchasesTicketRectification', verbose_name='Ticket rectification'),
        ),
        migrations.AddField(
            model_name='purchaseslineticket',
            name='ticket',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_purchases', to='codenerix_invoicing.PurchasesTicket', verbose_name='Ticket'),
        ),
        migrations.AddField(
            model_name='purchaseslineorder',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_order_purchases', to='codenerix_invoicing.PurchasesOrder', verbose_name='Order'),
        ),
        migrations.AddField(
            model_name='purchaseslineorder',
            name='product',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_order_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='purchaseslinealbaran',
            name='line_order',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to='codenerix_invoicing.PurchasesLineOrder', verbose_name='Line orders'),
        ),
        migrations.AddField(
            model_name='purchaseslinealbaran',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='productstock',
            name='line_albaran',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_stocks', to='codenerix_invoicing.PurchasesLineAlbaran', verbose_name='Line albaran'),
        ),
        migrations.AddField(
            model_name='productstock',
            name='product_final',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_stocks', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='customerdocument',
            name='type_document',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customer_documents', to='codenerix_invoicing.TypeDocument', verbose_name='Type document'),
        ),
        migrations.AlterUniqueTogether(
            name='wishlist',
            unique_together=set([('id', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='salesticket',
            unique_together=set([('code', 'parent_pk')]),
        ),
        migrations.AlterUniqueTogether(
            name='salesorder',
            unique_together=set([('code', 'parent_pk')]),
        ),
        migrations.AlterUniqueTogether(
            name='salesinvoice',
            unique_together=set([('code', 'parent_pk')]),
        ),
    ]
