# Generated by Django 2.0.2 on 2018-03-11 05:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ForeignInvoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('folio', models.CharField(max_length=12, verbose_name='Folio de la factura')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='Monto a pagar')),
                ('discount', models.PositiveIntegerField(verbose_name='Porcentaje de descuento')),
                ('discount_applied', models.BooleanField(default=False, verbose_name='Descuento aplicado')),
                ('status', models.CharField(choices=[('1', 'Pagada'), ('2', 'Pendiente'), ('3', 'Cancelada')], max_length=1, verbose_name='Estado de la factura')),
                ('invoice_date', models.DateField(verbose_name='Fecha de la factura')),
                ('settlement_date', models.DateField(verbose_name='Fecha de liquidación')),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reference', models.CharField(max_length=20, verbose_name='Referencia del pago')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='Monto pagado')),
                ('payment_method', models.CharField(choices=[('1', 'Efectivo'), ('2', 'Deposito'), ('3', 'Transferencia'), ('4', 'Cheque ')], max_length=1, verbose_name='Método de pago')),
                ('payment_date', models.DateField(verbose_name='Fecha del pago')),
                ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Estadistica.ForeignInvoice')),
            ],
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=45, unique=True, verbose_name='Nombre del proveedor')),
                ('phone', models.CharField(max_length=12, verbose_name='Número de teléfono')),
            ],
        ),
        migrations.AddField(
            model_name='foreigninvoice',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Estadistica.Provider'),
        ),
    ]
