# Generated by Django 5.2.15 on 2026-06-29 22:16 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('compta', '0003_depense_regime_tva_depense_taux_tva_and_more'), ] operations = [ migrations.CreateModel( name='Paiement', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date', models.DateField()), ('libelle', models.CharField(max_length=255, verbose_name='Libellé bancaire')), ('montant_total', models.DecimalField(decimal_places=2, max_digits=12)), ('sens', models.CharField(choices=[('debit', 'Débit (achat)'), ('credit', 'Crédit (encaissement)')], default='debit', max_length=6)), ('cree_le', models.DateTimeField(auto_now_add=True)), ('entreprise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='paiements', to='compta.entreprise')), ], options={ 'verbose_name': 'Paiement', 'verbose_name_plural': 'Paiements', 'ordering': ['-date'], }, ), migrations.AddField( model_name='depense', name='paiement', field=models.ForeignKey(blank=True, help_text='Opération bancaire dont cette dépense fait partie (achat groupé éclaté).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='depenses', to='compta.paiement'), ), ]