Spaces:
Running
Running
Update src/modules/loans_engine.py
Browse files- src/modules/loans_engine.py +14 -1
src/modules/loans_engine.py
CHANGED
|
@@ -652,7 +652,20 @@ def show_loans_engine(client, sheet_name):
|
|
| 652 |
# 6. TABLEAU AMORTISSEMENT
|
| 653 |
date_debut = date.today()
|
| 654 |
# On génère le tableau normalement
|
| 655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 656 |
|
| 657 |
# INSERTION DE LA COLONNE TYPE : Juste ici avant l'affichage
|
| 658 |
if not df_amort.empty:
|
|
|
|
| 652 |
# 6. TABLEAU AMORTISSEMENT
|
| 653 |
date_debut = date.today()
|
| 654 |
# On génère le tableau normalement
|
| 655 |
+
# ✅ CORRECTION : Passage de dates_versements pour le type PERSONNALISÉ
|
| 656 |
+
if type_code == "PERSONNALISE":
|
| 657 |
+
# Pour le type personnalisé, on passe explicitement les dates
|
| 658 |
+
df_amort = generer_tableau_amortissement(
|
| 659 |
+
type_code, montant, taux_hebdo, duree_semaines,
|
| 660 |
+
montant_versement, nb_versements, date_debut,
|
| 661 |
+
dates_versements=dates_versements # ✅ AJOUT CRITIQUE
|
| 662 |
+
)
|
| 663 |
+
else:
|
| 664 |
+
# Pour les autres types, pas besoin de dates personnalisées
|
| 665 |
+
df_amort = generer_tableau_amortissement(
|
| 666 |
+
type_code, montant, taux_hebdo, duree_semaines,
|
| 667 |
+
montant_versement, nb_versements, date_debut
|
| 668 |
+
)
|
| 669 |
|
| 670 |
# INSERTION DE LA COLONNE TYPE : Juste ici avant l'affichage
|
| 671 |
if not df_amort.empty:
|