Correctif

This commit is contained in:
ocroguennec committed 2026-08-16 11:35:21 +02:00
1 parent 9ef32cef90
commit 5273f11e05
3 files changed
+23 -6

No files matched your search

@@ -177,6 +177,7 @@ export function DetailPanel({ row, onEdit, onDeleteCorrection, onViewRemb, onVie
{ label: 'Montant', value: montantFmt, color: montantColor }, { label: 'Montant', value: montantFmt, color: montantColor },
{ label: 'Date', value: fmtDate(row.date_operation) }, { label: 'Date', value: fmtDate(row.date_operation) },
isRemb && !isBonus && row.libelle && { label: 'Projet', value: row.libelle }, isRemb && !isBonus && row.libelle && { label: 'Projet', value: row.libelle },
isBonus && row.libelle && { label: 'Projet', value: row.libelle },
isRemb && !isBonus && { label: 'Capital', value: fmtEUR(row._capital) }, isRemb && !isBonus && { label: 'Capital', value: fmtEUR(row._capital) },
isRemb && !isBonus && row._cashback > 0 && { label: 'Cashback', value: fmtEUR(row._cashback) }, isRemb && !isBonus && row._cashback > 0 && { label: 'Cashback', value: fmtEUR(row._cashback) },
isRemb && !isBonus && { label: 'Intérêts bruts', value: fmtEUR(row._interets_bruts) }, isRemb && !isBonus && { label: 'Intérêts bruts', value: fmtEUR(row._interets_bruts) },
+11 -3
View File
@@ -295,7 +295,11 @@ export default function DepotsRetraits() {
const pfuReellementRetenu = isFlatTax && !isExonere; const pfuReellementRetenu = isFlatTax && !isExonere;
const taxeLocale = r.taxe_locale || 0; const taxeLocale = r.taxe_locale || 0;
const grossInterets = r.interets_bruts_avant_local > 0 ? r.interets_bruts_avant_local : (r.interets_bruts || 0); const grossInterets = r.interets_bruts_avant_local > 0 ? r.interets_bruts_avant_local : (r.interets_bruts || 0);
const grossMontant = (r.capital || 0) + (r.cashback || 0) + grossInterets; // Le cashback est désormais toujours sorti dans sa propre ligne "Bonus / Cashback",
// même sur un remboursement de type 'normal' — le champ cashback du formulaire est
// libre et saisissable sur n'importe quel type, sans lien avec bonus_parrainage/plateforme.
const cashback = r.cashback || 0;
const grossMontant = (r.capital || 0) + grossInterets;
if (grossMontant) { if (grossMontant) {
out.push({ out.push({
@@ -307,13 +311,17 @@ export default function DepotsRetraits() {
_isAutoSweep: r.methode_remboursement === 'compte_courant', _isAutoSweep: r.methode_remboursement === 'compte_courant',
_taxeLocale: taxeLocale, _taxeLocale: taxeLocale,
_capital: r.capital || 0, _capital: r.capital || 0,
_cashback: r.cashback || 0, _cashback: 0,
_interets_bruts: r.interets_bruts || 0, _interets_bruts: r.interets_bruts || 0,
_interets_nets: r.interets_nets || 0, _interets_nets: r.interets_nets || 0,
_net_recu: r.net_recu || 0, _net_recu: r.net_recu || 0,
}); });
} }
if (cashback > 0) {
out.push({ ...base, id: `remb_${r.id}_cashback`, type: 'bonus', montant: cashback });
}
if (taxeLocale > 0) { if (taxeLocale > 0) {
out.push({ ...base, id: `remb_${r.id}_local`, type: 'prelevement_local', montant: taxeLocale }); out.push({ ...base, id: `remb_${r.id}_local`, type: 'prelevement_local', montant: taxeLocale });
} }
@@ -405,7 +413,7 @@ export default function DepotsRetraits() {
const corrPart = showCorr ? filteredCorrections.map(c => ({ ...c, _projet: '' })) : []; const corrPart = showCorr ? filteredCorrections.map(c => ({ ...c, _projet: '' })) : [];
const rembPart = filteredRembMouvements const rembPart = filteredRembMouvements
.filter(r => !filter.type || r.type === filter.type) .filter(r => !filter.type || r.type === filter.type)
.map(r => ({ ...r, _projet: r.type === 'bonus' ? '' : (r.libelle || '') })); .map(r => ({ ...r, _projet: r.libelle || '' }));
const subPart = filteredSouscriptionMouvements const subPart = filteredSouscriptionMouvements
.filter(r => !filter.type || r.type === filter.type) .filter(r => !filter.type || r.type === filter.type)
.map(r => ({ ...r, _projet: r.libelle || '' })); .map(r => ({ ...r, _projet: r.libelle || '' }));
+11 -3
View File
@@ -989,7 +989,11 @@ export default function Plateformes() {
const pfuReellementRetenu = isFlatTax && !isExonere; const pfuReellementRetenu = isFlatTax && !isExonere;
const taxeLocale = r.taxe_locale || 0; const taxeLocale = r.taxe_locale || 0;
const grossInterets = r.interets_bruts_avant_local > 0 ? r.interets_bruts_avant_local : (r.interets_bruts || 0); const grossInterets = r.interets_bruts_avant_local > 0 ? r.interets_bruts_avant_local : (r.interets_bruts || 0);
const grossMontant = (r.capital || 0) + (r.cashback || 0) + grossInterets; // Le cashback est désormais toujours sorti dans sa propre ligne "Bonus / Cashback",
// même sur un remboursement de type 'normal' — le champ cashback du formulaire est
// libre et saisissable sur n'importe quel type, sans lien avec bonus_parrainage/plateforme.
const cashback = r.cashback || 0;
const grossMontant = (r.capital || 0) + grossInterets;
if (grossMontant) { if (grossMontant) {
out.push({ out.push({
@@ -1001,13 +1005,17 @@ export default function Plateformes() {
_isAutoSweep: r.methode_remboursement === 'compte_courant', _isAutoSweep: r.methode_remboursement === 'compte_courant',
_taxeLocale: taxeLocale, _taxeLocale: taxeLocale,
_capital: r.capital || 0, _capital: r.capital || 0,
_cashback: r.cashback || 0, _cashback: 0,
_interets_bruts: r.interets_bruts || 0, _interets_bruts: r.interets_bruts || 0,
_interets_nets: r.interets_nets || 0, _interets_nets: r.interets_nets || 0,
_net_recu: r.net_recu || 0, _net_recu: r.net_recu || 0,
}); });
} }
if (cashback > 0) {
out.push({ ...base, id: `remb_${r.id}_cashback`, type: 'bonus', montant: cashback });
}
if (taxeLocale > 0) { if (taxeLocale > 0) {
out.push({ ...base, id: `remb_${r.id}_local`, type: 'prelevement_local', montant: taxeLocale }); out.push({ ...base, id: `remb_${r.id}_local`, type: 'prelevement_local', montant: taxeLocale });
} }
@@ -1106,7 +1114,7 @@ export default function Plateformes() {
const corrPart = showCorr ? mvFilteredCorrections.map(c => ({ ...c, _projet: '' })) : []; const corrPart = showCorr ? mvFilteredCorrections.map(c => ({ ...c, _projet: '' })) : [];
const rembPart = mvFilteredRembMouvements const rembPart = mvFilteredRembMouvements
.filter(r => !mvFilter.type || r.type === mvFilter.type) .filter(r => !mvFilter.type || r.type === mvFilter.type)
.map(r => ({ ...r, _projet: r.type === 'bonus' ? '' : (r.libelle || '') })); .map(r => ({ ...r, _projet: r.libelle || '' }));
const subPart = mvFilteredSouscriptionMouvements const subPart = mvFilteredSouscriptionMouvements
.filter(r => !mvFilter.type || r.type === mvFilter.type) .filter(r => !mvFilter.type || r.type === mvFilter.type)
.map(r => ({ ...r, _projet: r.libelle || '' })); .map(r => ({ ...r, _projet: r.libelle || '' }));