# Generated by Django 3.1.4 on 2021-03-01 13:12

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('company', '0170_auto_20210228_1422'),
        ('sales', '0153_auto_20210222_0747'),
    ]

    operations = [
        migrations.CreateModel(
            name='RebateInvoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=20, verbose_name='发票代码')),
                ('number', models.CharField(max_length=30, verbose_name='发票号码')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='发票金额')),
                ('claimant', models.CharField(max_length=20, verbose_name='报销人')),
                ('uploaded', models.BooleanField(blank=True, default=False, null=True, verbose_name='已上传')),
                ('dt', models.DateField(db_index=True, default=django.utils.timezone.now, verbose_name='日期')),
                ('tm', models.DateTimeField(default=django.utils.timezone.now, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('agent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rebateinvoice_agent', to='company.company', verbose_name='开票经销商')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rebateinvoice_company', to='company.company', verbose_name='企业名称')),
                ('salesdivision', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.subsaldivision', verbose_name='战区')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='登记人')),
            ],
            options={
                'verbose_name': '经销商返利发票',
                'verbose_name_plural': '经销商返利发票',
            },
        ),
    ]
