# Generated by Django 3.1.13 on 2021-08-11 02:36

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


class Migration(migrations.Migration):

    dependencies = [
        ('trade', '0003_doc_operation'),
    ]

    operations = [
        migrations.AddField(
            model_name='category',
            name='image',
            field=models.ImageField(blank=True, upload_to='photo'),
        ),
        migrations.AddField(
            model_name='doc',
            name='buytotal',
            field=models.FloatField(default=0, verbose_name='Итого по цене закупки'),
        ),
        migrations.AddField(
            model_name='doc',
            name='saletotal',
            field=models.FloatField(default=0, verbose_name='Итого по цене продажи'),
        ),
        migrations.AlterField(
            model_name='doc',
            name='dealer',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='trade.dealer', verbose_name='Поставщик'),
        ),
        migrations.CreateModel(
            name='DocJurnal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('volume', models.FloatField(verbose_name='Количество')),
                ('buyprice', models.FloatField(verbose_name='Цена закупки')),
                ('percent', models.FloatField(verbose_name='Наценка,%')),
                ('saleprice', models.FloatField(verbose_name='Цена продажи')),
                ('buytotal', models.FloatField(default=0, verbose_name='Сумма по цене закупки')),
                ('saletotal', models.FloatField(default=0, verbose_name='Сумма по цене продажи')),
                ('iddoc', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='trade.doc', verbose_name='Документ')),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='trade.good', verbose_name='Наименование товара')),
            ],
            options={
                'verbose_name': 'Наименование',
                'verbose_name_plural': 'Наименования',
                'ordering': ['title'],
            },
        ),
    ]
