# Generated by Django 5.2.8 on 2025-12-10 02:17

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory', '0006_alter_supplierpayment_options_and_more'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='purchaseorder',
            options={'ordering': ['-created_at']},
        ),
        migrations.AlterModelOptions(
            name='purchaseorderitem',
            options={},
        ),
        migrations.AlterModelOptions(
            name='supplier',
            options={'ordering': ['name']},
        ),
        migrations.RenameField(
            model_name='purchaseorderitem',
            old_name='order',
            new_name='purchase_order',
        ),
        migrations.RemoveField(
            model_name='purchaseorder',
            name='created_by',
        ),
        migrations.RemoveField(
            model_name='supplier',
            name='outstanding_balance',
        ),
        migrations.RemoveField(
            model_name='supplier',
            name='total_purchase_value',
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='reference_number',
            field=models.CharField(blank=True, max_length=100),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='status',
            field=models.CharField(choices=[('draft', 'Draft'), ('ordered', 'Ordered'), ('received', 'Received'), ('cancelled', 'Cancelled')], default='draft', max_length=20),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='supplier',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchase_orders', to='inventory.supplier'),
        ),
        migrations.AlterField(
            model_name='purchaseorderitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.product'),
        ),
        migrations.AlterField(
            model_name='purchaseorderitem',
            name='unit_cost',
            field=models.DecimalField(decimal_places=2, max_digits=12),
        ),
        migrations.AlterField(
            model_name='supplierpayment',
            name='notes',
            field=models.TextField(blank=True),
        ),
    ]
