Lien comptes courants / enveloppes
This commit is contained in:
1 parent
f507163369
commit
9591ae400e
13 files changed
+202
-79
No files matched your search
@@ -727,7 +727,7 @@ export default function Remboursements() {
|
||||
if (next.methode_remboursement === 'compte_courant') {
|
||||
// Priorité : compte lié à l'investissement, sinon premier compte_courant
|
||||
const inherited = inv.compte_id ? comptes.find(c => c.id === inv.compte_id) : null;
|
||||
const def = inherited ?? comptes.find(c => c.type === 'compte_courant') ?? comptes[0];
|
||||
const def = inherited ?? comptes.find(c => c.compte_reglement_par_defaut) ?? comptes[0];
|
||||
if (def) setForm(f => ({ ...f, compte_id: String(def.id) }));
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user