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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('codenerix_payments', '0001_initial'),
        ('codenerix_invoicing', '0001_initial'),
        ('codenerix_products', '0008_auto_20180126_1711'),
        ('codenerix_pos', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='salesbasket',
            name='pos',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='basket_sales', to='codenerix_pos.POS', verbose_name='Point of Sales'),
        ),
        migrations.AddField(
            model_name='salesbasket',
            name='pos_slot',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='basket_sales', to='codenerix_pos.POSSlot', verbose_name='POS Slot'),
        ),
        migrations.AddField(
            model_name='purchasesticketrectificationdocument',
            name='ticket_rectification',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticketrectificationdocument_purchases', to='codenerix_invoicing.PurchasesTicketRectification', verbose_name='Ticket rectification'),
        ),
        migrations.AddField(
            model_name='purchasesticketdocument',
            name='ticket',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticketdocument_purchases', to='codenerix_invoicing.PurchasesTicket', verbose_name='Ticket'),
        ),
        migrations.AddField(
            model_name='purchasesticket',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ticket_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider'),
        ),
        migrations.AddField(
            model_name='purchasesorderdocument',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orderdocument_purchases', to='codenerix_invoicing.PurchasesOrder', verbose_name='Purchases order'),
        ),
        migrations.AddField(
            model_name='purchasesorder',
            name='budget',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='order_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget'),
        ),
        migrations.AddField(
            model_name='purchasesorder',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider'),
        ),
        migrations.AddField(
            model_name='purchaseslineticketrectification',
            name='line_ticket',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_purchases', to='codenerix_invoicing.PurchasesLineTicket', verbose_name='Line ticket'),
        ),
        migrations.AddField(
            model_name='purchaseslineticketrectification',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_ticketrectification_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        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='line_albaran',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_purchases', to='codenerix_invoicing.PurchasesLineAlbaran', verbose_name='Line albaran'),
        ),
        migrations.AddField(
            model_name='purchaseslineticket',
            name='product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_ticket_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        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='line_budget',
            field=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'),
        ),
        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='Purchase 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='purchaseslineinvoicerectification',
            name='invoice_rectification',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_invoicing.PurchasesInvoiceRectification', verbose_name='Invoice rectification'),
        ),
        migrations.AddField(
            model_name='purchaseslineinvoicerectification',
            name='line_invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_invoicing.PurchasesLineInvoice', verbose_name='Line invoice'),
        ),
        migrations.AddField(
            model_name='purchaseslineinvoicerectification',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoicerectification_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='purchaseslineinvoice',
            name='invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_purchases', to='codenerix_invoicing.PurchasesInvoice', verbose_name='Invoice'),
        ),
        migrations.AddField(
            model_name='purchaseslineinvoice',
            name='line_albaran',
            field=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'),
        ),
        migrations.AddField(
            model_name='purchaseslineinvoice',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_invoice_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='purchaseslinebudget',
            name='budget',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget'),
        ),
        migrations.AddField(
            model_name='purchaseslinebudget',
            name='product',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='line_budget_purchases', to='codenerix_products.ProductFinal', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='purchaseslinealbaran',
            name='albaran',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to='codenerix_invoicing.PurchasesAlbaran', verbose_name='Albaran'),
        ),
        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_unique',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to='codenerix_products.ProductUnique', verbose_name='Product'),
        ),
        migrations.AddField(
            model_name='purchaseslinealbaran',
            name='validator_user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='line_albaran_purchases', to=settings.AUTH_USER_MODEL, verbose_name='Validator user'),
        ),
        migrations.AddField(
            model_name='purchasesinvoicerectificationdocument',
            name='invoice_rectification',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoicerectificationdocument_purchases', to='codenerix_invoicing.PurchasesInvoiceRectification', verbose_name='Invoice rectification'),
        ),
        migrations.AddField(
            model_name='purchasesinvoicedocument',
            name='invoice',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoicedocument_purchases', to='codenerix_invoicing.PurchasesInvoice', verbose_name='Invoice'),
        ),
        migrations.AddField(
            model_name='purchasesinvoice',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invoice_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider'),
        ),
        migrations.AddField(
            model_name='purchasesbudgetdocument',
            name='budget',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='budgetdocument_purchases', to='codenerix_invoicing.PurchasesBudget', verbose_name='Budget'),
        ),
        migrations.AddField(
            model_name='purchasesbudget',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='budget_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider'),
        ),
        migrations.AddField(
            model_name='purchasesalbarandocument',
            name='albaran',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='albarandocument_purchases', to='codenerix_invoicing.PurchasesAlbaran', verbose_name='Albaran'),
        ),
        migrations.AddField(
            model_name='purchasesalbaran',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='albaran_purchases', to='codenerix_invoicing.Provider', verbose_name='Provider'),
        ),
        migrations.AddField(
            model_name='provider',
            name='billing_series',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='providers', to='codenerix_invoicing.BillingSeries', verbose_name='Billing series'),
        ),
        migrations.AddField(
            model_name='provider',
            name='categories',
            field=models.ManyToManyField(blank=True, related_name='providers', to='codenerix_products.Category'),
        ),
        migrations.AddField(
            model_name='provider',
            name='currency',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='providers', to='codenerix_payments.Currency', verbose_name='Currency'),
        ),
        migrations.AddField(
            model_name='provider',
            name='type_tax',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='providers', to='codenerix_products.TypeTax', verbose_name='Type tax'),
        ),
        migrations.AddField(
            model_name='customerdocument',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_documents', to='codenerix_invoicing.Customer', verbose_name='Customer'),
        ),
        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.AddField(
            model_name='customer',
            name='billing_series',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='codenerix_invoicing.BillingSeries', verbose_name='Billing series'),
        ),
        migrations.AddField(
            model_name='customer',
            name='currency',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='codenerix_payments.Currency', verbose_name='Currency'),
        ),
        migrations.AddField(
            model_name='customer',
            name='type_tax',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customers', to='codenerix_products.TypeTax', verbose_name='Type tax'),
        ),
        migrations.AlterUniqueTogether(
            name='salesbasket',
            unique_together=set([('code', 'parent_pk')]),
        ),
    ]
