36996-vm/accounting/migrations/0003_invoice_invoiceitem.py
Flatlogic Bot 4713dc6305 beta
2025-12-16 14:42:48 +00:00

37 lines
1.5 KiB
Python

# Generated by Django 5.2.7 on 2025-12-16 14:16
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounting', '0002_journalentry_ledger'),
]
operations = [
migrations.CreateModel(
name='Invoice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('customer_name', models.CharField(max_length=255)),
('invoice_date', models.DateField()),
('due_date', models.DateField()),
('total_amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
('paid', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='InvoiceItem',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.CharField(max_length=255)),
('quantity', models.PositiveIntegerField(default=1)),
('unit_price', models.DecimalField(decimal_places=2, max_digits=15)),
('total', models.DecimalField(decimal_places=2, max_digits=15)),
('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='accounting.invoice')),
],
),
]