# Generated by Django 5.2.10 on 2026-01-25 02:19

import django.core.validators
from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("edc_pharmacy", "0122_auto_20260125_0402"),
    ]

    operations = [
        migrations.RenameField(
            model_name="historicalrepackrequest",
            old_name="requested_qty",
            new_name="repack_item_qty",
        ),
        migrations.RenameField(
            model_name="repackrequest",
            old_name="requested_qty",
            new_name="repack_item_qty",
        ),
        migrations.AddField(
            model_name="historicalrepackrequest",
            name="container_unit_qty",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                help_text="Leave blank for default. Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AddField(
            model_name="repackrequest",
            name="container_unit_qty",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                help_text="Leave blank for default. Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AlterField(
            model_name="container",
            name="max_items_per_subject",
            field=models.IntegerField(
                blank=True,
                help_text="Maximum number of this container that may be allocated to a subject per stock request. (For example, no more than 3 bottles per subject)",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
            ),
        ),
        migrations.AlterField(
            model_name="container",
            name="unit_qty_default",
            field=models.DecimalField(
                decimal_places=2,
                help_text="May be adjusted. Default value for entry form",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Default qty",
            ),
        ),
        migrations.AlterField(
            model_name="container",
            name="unit_qty_max",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Maximum unit capacity of container",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
            ),
        ),
        migrations.AlterField(
            model_name="container",
            name="unit_qty_places",
            field=models.IntegerField(
                default=0.0,
                help_text="May NOT be adjusted at receiving",
                validators=[django.core.validators.MinValueValidator(0)],
            ),
        ),
        migrations.AlterField(
            model_name="historicalcontainer",
            name="max_items_per_subject",
            field=models.IntegerField(
                blank=True,
                help_text="Maximum number of this container that may be allocated to a subject per stock request. (For example, no more than 3 bottles per subject)",
                null=True,
                validators=[django.core.validators.MinValueValidator(0)],
            ),
        ),
        migrations.AlterField(
            model_name="historicalcontainer",
            name="unit_qty_default",
            field=models.DecimalField(
                decimal_places=2,
                help_text="May be adjusted. Default value for entry form",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Default qty",
            ),
        ),
        migrations.AlterField(
            model_name="historicalcontainer",
            name="unit_qty_max",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Maximum unit capacity of container",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
            ),
        ),
        migrations.AlterField(
            model_name="historicalcontainer",
            name="unit_qty_places",
            field=models.IntegerField(
                default=0.0,
                help_text="May NOT be adjusted at receiving",
                validators=[django.core.validators.MinValueValidator(0)],
            ),
        ),
        migrations.AlterField(
            model_name="historicalorder",
            name="item_count",
            field=models.IntegerField(
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Item count",
            ),
        ),
        migrations.AlterField(
            model_name="historicalorderitem",
            name="container_unit_qty",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AlterField(
            model_name="historicalorderitem",
            name="item_qty_ordered",
            field=models.IntegerField(
                help_text="Number of containers",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Number of containers ordered",
            ),
        ),
        migrations.AlterField(
            model_name="historicalorderitem",
            name="unit_qty_ordered",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Updated automatically (containers * unit_quantity per container)",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Unit quantity ordered",
            ),
        ),
        migrations.AlterField(
            model_name="historicalorderitem",
            name="unit_qty_pending",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Unit quantity ordered - Unit quantity received. Updated automatically",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("0.0"))],
                verbose_name="Unit quantity pending",
            ),
        ),
        migrations.AlterField(
            model_name="historicalorderitem",
            name="unit_qty_received",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Updated automatically when units are received",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("0.0"))],
                verbose_name="Unit quantity received",
            ),
        ),
        migrations.AlterField(
            model_name="historicalreceive",
            name="item_count",
            field=models.IntegerField(
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Item count",
            ),
        ),
        migrations.AlterField(
            model_name="historicalreceiveitem",
            name="container_unit_qty",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AlterField(
            model_name="historicalreceiveitem",
            name="item_qty_received",
            field=models.IntegerField(
                help_text="Partial containers should be received separately",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Number of containers received",
            ),
        ),
        migrations.AlterField(
            model_name="historicalreceiveitem",
            name="unit_qty_received",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                help_text="number of containers x container unit qty, e.g. 10 x Bottle of 128 = 1280. Quantiy will recalculate after save.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Unit quantity received",
            ),
        ),
        migrations.AlterField(
            model_name="historicalstock",
            name="dispensed",
            field=models.BooleanField(default=False, help_text="See dispenseitem."),
        ),
        migrations.AlterField(
            model_name="order",
            name="item_count",
            field=models.IntegerField(
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Item count",
            ),
        ),
        migrations.AlterField(
            model_name="orderitem",
            name="container_unit_qty",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AlterField(
            model_name="orderitem",
            name="item_qty_ordered",
            field=models.IntegerField(
                help_text="Number of containers",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Number of containers ordered",
            ),
        ),
        migrations.AlterField(
            model_name="orderitem",
            name="unit_qty_ordered",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Updated automatically (containers * unit_quantity per container)",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Unit quantity ordered",
            ),
        ),
        migrations.AlterField(
            model_name="orderitem",
            name="unit_qty_pending",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Unit quantity ordered - Unit quantity received. Updated automatically",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("0.0"))],
                verbose_name="Unit quantity pending",
            ),
        ),
        migrations.AlterField(
            model_name="orderitem",
            name="unit_qty_received",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Updated automatically when units are received",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("0.0"))],
                verbose_name="Unit quantity received",
            ),
        ),
        migrations.AlterField(
            model_name="receive",
            name="item_count",
            field=models.IntegerField(
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Item count",
            ),
        ),
        migrations.AlterField(
            model_name="receiveitem",
            name="container_unit_qty",
            field=models.DecimalField(
                decimal_places=2,
                help_text="Number of units in the container(s). Must be the same for all containers in the record.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Container unit quantity",
            ),
        ),
        migrations.AlterField(
            model_name="receiveitem",
            name="item_qty_received",
            field=models.IntegerField(
                help_text="Partial containers should be received separately",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="Number of containers received",
            ),
        ),
        migrations.AlterField(
            model_name="receiveitem",
            name="unit_qty_received",
            field=models.DecimalField(
                blank=True,
                decimal_places=2,
                help_text="number of containers x container unit qty, e.g. 10 x Bottle of 128 = 1280. Quantiy will recalculate after save.",
                max_digits=10,
                null=True,
                validators=[django.core.validators.MinValueValidator(Decimal("1.0"))],
                verbose_name="Unit quantity received",
            ),
        ),
        migrations.AlterField(
            model_name="stock",
            name="dispensed",
            field=models.BooleanField(default=False, help_text="See dispenseitem."),
        ),
    ]
