# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-12-11 03:26
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('parametros', '0001_initial'),
        ('finanzas', '0001_initial'),
        ('inventarios', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clt_frsname', models.CharField(max_length=15, verbose_name='Primer Nombre')),
                ('clt_midname', models.CharField(max_length=15, verbose_name='Segundo Nombre')),
                ('clt_secmane', models.CharField(max_length=25, verbose_name='Apellidos')),
                ('clt_fechnac', models.DateField(verbose_name='Fecha de Nacimiento')),
                ('clt_direcci', models.CharField(max_length=50, verbose_name='Direccion Domiciliaria')),
                ('clt_telefon', models.CharField(blank=True, max_length=15, verbose_name='Telefono')),
                ('clt_celular', models.CharField(blank=True, max_length=15, verbose_name='Celular')),
                ('clt_correoe', models.EmailField(max_length=254, verbose_name='e-mail')),
                ('clt_imgclte', models.ImageField(blank=True, upload_to='clientes')),
                ('clt_rgunico', models.CharField(blank=True, max_length=20, verbose_name='Registro Unico')),
                ('cli_country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Pais')),
                ('clt_categor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Categoria')),
                ('clt_ciudade', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Ciudad')),
                ('clt_estados', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Provincia')),
                ('clt_zipcodg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Zipcodigo')),
            ],
        ),
        migrations.CreateModel(
            name='Factura',
            fields=[
                ('fac_idfactu', models.AutoField(primary_key=True, serialize=False, verbose_name='Núm. de Factura')),
                ('fac_fechfac', models.DateField(default=django.utils.timezone.now, verbose_name='Fecha de la factura')),
                ('fac_cotizac', models.DecimalField(blank=True, decimal_places=2, max_digits=9, null=True, verbose_name='Cotización')),
                ('fac_totitms', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total de items')),
                ('fac_totvlor', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total del valor')),
                ('fac_totdsct', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total de descuentos')),
                ('fac_totrkrg', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total de recaregos')),
                ('fac_totflet', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total por deliver (transporte)')),
                ('fac_totaran', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total aranceles')),
                ('fac_tottaxs', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Total taxes')),
                ('fac_pgoefec', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Cash')),
                ('fac_pgocheq', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Cheque')),
                ('fac_pgotjcr', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='T./Crédito')),
                ('fac_pgocred', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Crédito personal')),
                ('fac_otropgo', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True, verbose_name='Internet (Paypal)')),
                ('fac_cajanum', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='finanzas.Caja', verbose_name='Núm. de caja')),
                ('fac_cajeras', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='finanzas.Cajera', verbose_name='Cód. de Cajera')),
                ('fac_cliente', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comercial.Cliente', verbose_name='Cód. de Cliente')),
                ('fac_monedas', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='finanzas.Moneda', verbose_name='Núm. de Moneda')),
            ],
        ),
        migrations.CreateModel(
            name='Movinvent',
            fields=[
                ('mvi_nummovi', models.AutoField(primary_key=True, serialize=False, verbose_name='Núm. de movimiento')),
                ('mvi_fechmov', models.DateField(verbose_name='Fecha')),
                ('mvi_tipomov', models.PositiveIntegerField(choices=[(1, 'Ingresos'), (2, 'Egresos'), (3, 'Transferencias')], verbose_name='Tipo de movimiento')),
                ('mvi_unidade', models.CharField(max_length=5, verbose_name='Unidad')),
                ('mvi_talla01', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 01')),
                ('mvi_talla02', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 02')),
                ('mvi_talla03', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 03')),
                ('mvi_talla04', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 04')),
                ('mvi_talla05', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 05')),
                ('mvi_talla06', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 06')),
                ('mvi_talla07', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 07')),
                ('mvi_talla08', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 08')),
                ('mvi_talla09', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 09')),
                ('mvi_talla10', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 10')),
                ('mvi_talla11', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 11')),
                ('mvi_talla12', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 12')),
                ('mvi_talla13', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Talla 13')),
                ('mvi_kntidad', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Cantidad Total')),
                ('mvi_precios', models.DecimalField(blank=True, decimal_places=2, max_digits=13, null=True, verbose_name='Precio')),
                ('mvi_desctos', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Descuentos')),
                ('mvi_rcargos', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Recargos')),
                ('mvi_deliver', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Transporte')),
                ('mvi_arancel', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Aranceles')),
                ('mvi_impuest', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='Impuestos IVA.')),
                ('mvi_cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comercial.Cliente')),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('ped_npedido', models.AutoField(primary_key=True, serialize=False, verbose_name='Núm. de Pedido')),
                ('ped_tipomov', models.PositiveIntegerField(choices=[(1, 'Ingresos'), (2, 'Egresos'), (3, 'Transferencias')], default=2, verbose_name='Tipo de movimiento')),
                ('ped_fechped', models.DateField(verbose_name='Fecha de pedido')),
                ('ped_statreg', models.CharField(default=1, max_length=1, verbose_name='Status del Registro')),
                ('ped_cliente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comercial.Cliente')),
            ],
        ),
        migrations.CreateModel(
            name='Proveedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prv_frsname', models.CharField(max_length=15, verbose_name='Primer Nombre')),
                ('prv_midname', models.CharField(max_length=15, verbose_name='Segundo Nombre')),
                ('prv_secmane', models.CharField(max_length=25, verbose_name='Apellidos')),
                ('prv_fechnac', models.DateField(verbose_name='Fecha de Nacimiento')),
                ('prv_direcci', models.CharField(max_length=45, verbose_name='Direccion Domiciliaria')),
                ('prv_telefon', models.CharField(max_length=15, verbose_name='Telefono')),
                ('prv_celular', models.CharField(max_length=15, verbose_name='Celular')),
                ('prv_correoe', models.EmailField(max_length=254, verbose_name='e-mail')),
                ('prv_imgprov', models.ImageField(blank=True, upload_to='proveedores')),
                ('prv_rgunico', models.CharField(blank=True, max_length=20, verbose_name='Registro Unico')),
                ('prv_categor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Categoria')),
                ('prv_ciudade', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Ciudad')),
                ('prv_country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Pais')),
                ('prv_estados', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Provincia')),
                ('prv_zipcodg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Zipcodigo')),
            ],
        ),
        migrations.CreateModel(
            name='Vendedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vnd_frsname', models.CharField(max_length=15, verbose_name='Primer Nombre')),
                ('vnd_midname', models.CharField(max_length=15, verbose_name='Segundo Nombre')),
                ('vnd_secmane', models.CharField(max_length=25, verbose_name='Apellidos')),
                ('vnd_fechnac', models.DateField(verbose_name='Fecha de Nacimiento')),
                ('vnd_direcci', models.CharField(max_length=45, verbose_name='Direccion Domiciliaria')),
                ('vnd_telefon', models.CharField(blank=True, max_length=15, verbose_name='Telefono')),
                ('vnd_ncelula', models.CharField(blank=True, max_length=15, verbose_name='Celular')),
                ('vnd_correoe', models.EmailField(max_length=254, verbose_name='e-mail')),
                ('vnd_addrimg', models.ImageField(blank=True, upload_to='vendedores')),
                ('vnd_rgunico', models.CharField(blank=True, max_length=20, verbose_name='Registro Unico')),
                ('vnd_categor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Categoria')),
                ('vnd_ciudade', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Ciudad')),
                ('vnd_country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Pais')),
                ('vnd_estados', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Provincia')),
                ('vnd_zipcodg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parametros.Zipcodigo')),
            ],
        ),
        migrations.AddField(
            model_name='pedido',
            name='ped_vendedo',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comercial.Vendedor'),
        ),
        migrations.AddField(
            model_name='movinvent',
            name='mvi_npedido',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comercial.Pedido', verbose_name='Núm. de pedido'),
        ),
        migrations.AddField(
            model_name='movinvent',
            name='mvi_product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventarios.Existencia'),
        ),
        migrations.AddField(
            model_name='movinvent',
            name='mvi_vendedo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comercial.Vendedor'),
        ),
        migrations.AddField(
            model_name='factura',
            name='fac_npedido',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comercial.Pedido', verbose_name='Núm. de Pedido'),
        ),
        migrations.AddField(
            model_name='factura',
            name='fac_vendedo',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='comercial.Vendedor', verbose_name='Cód. de Vendedor'),
        ),
    ]
