# Generated by Django 5.2.2 on 2025-06-18 09:02

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


class Migration(migrations.Migration):

    dependencies = [
        ("plans", "0015_recurringuserplan_last_renewal_attempt"),
    ]

    operations = [
        migrations.AddField(
            model_name="invoice",
            name="cancellation_reason",
            field=models.TextField(blank=True, verbose_name="Cancellation reason"),
        ),
        migrations.AddField(
            model_name="invoice",
            name="credit_note_for",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="issued_credit_notes",
                to=settings.PLANS_INVOICE_MODEL,
                verbose_name="Credit note for",
            ),
        ),
        migrations.AlterField(
            model_name="invoice",
            name="type",
            field=models.IntegerField(
                choices=[
                    (1, "Invoice"),
                    (2, "Invoice Duplicate"),
                    (3, "Order confirmation"),
                    (4, "Credit note"),
                ],
                db_index=True,
                default=1,
            ),
        ),
    ]
