# Generated by Django 3.1.2 on 2020-12-07 06:02

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


class Migration(migrations.Migration):

    dependencies = [
        ('aplicacion', '0024_auto_20201207_0125'),
    ]

    operations = [
        migrations.AddField(
            model_name='departamento',
            name='numero_venta',
            field=models.PositiveIntegerField(default=0, verbose_name='numero de ventas'),
        ),
        migrations.AddField(
            model_name='departamento',
            name='precio_compra',
            field=models.DecimalField(decimal_places=2, default=0, max_digits=7, verbose_name='precio compra'),
        ),
        migrations.CreateModel(
            name='Venta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('date_sale', models.DateTimeField(verbose_name='Fecha de Venta')),
                ('count', models.PositiveIntegerField(verbose_name='Cantidad de Productos')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Monto')),
                ('type_invoce', models.CharField(choices=[('0', 'Boleta'), ('1', 'Factura'), ('2', 'Sin Comprobante')], max_length=2, verbose_name='TIPO')),
                ('type_payment', models.CharField(choices=[('0', 'Tarjeta'), ('1', 'Cash'), ('2', 'Bono'), ('3', 'Otro')], max_length=2, verbose_name='TIPO PAGO')),
                ('close', models.BooleanField(default=False, verbose_name='Venta cerrada')),
                ('anulate', models.BooleanField(default=False, verbose_name='Venta Anulada')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_venta', to=settings.AUTH_USER_MODEL, verbose_name='cajero')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ReservaDetalle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('count', models.PositiveIntegerField(verbose_name='Cantidad')),
                ('price_purchase', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Precio Compra')),
                ('price_sale', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Precio Venta')),
                ('tax', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Impuesto')),
                ('anulate', models.BooleanField(default=False)),
                ('departamento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aplicacion.departamento')),
                ('venta', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aplicacion.venta')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
