Ajout du type Intérêt plateforme pour les remboursements
This commit is contained in:
1 parent
37f9f8b8a7
commit
1bab97b5b3
9 files changed
+248
-66
No files matched your search
@@ -850,6 +850,8 @@ export default function Plateformes() {
|
||||
: (r.capital || 0) + (r.cashback || 0) + (r.interets_bruts || 0);
|
||||
} else if (r.type === 'bonus_parrainage' || r.type === 'bonus_plateforme') {
|
||||
balance += r.cashback || 0;
|
||||
} else if (r.type === 'interets_plateforme') {
|
||||
balance += r.net_recu || 0;
|
||||
}
|
||||
}
|
||||
for (const inv of allRows) {
|
||||
@@ -964,6 +966,7 @@ export default function Plateformes() {
|
||||
const out = [];
|
||||
for (const r of allRembs) {
|
||||
const isBonus = r.type === 'bonus_parrainage' || r.type === 'bonus_plateforme';
|
||||
const isInteretsPlateforme = r.type === 'interets_plateforme';
|
||||
const plat = plats.find(p => p.id === r.plateforme_id);
|
||||
const base = {
|
||||
_rembId: r.id,
|
||||
@@ -999,7 +1002,7 @@ export default function Plateformes() {
|
||||
out.push({
|
||||
...base,
|
||||
id: `remb_${r.id}`,
|
||||
type: 'remboursement',
|
||||
type: isInteretsPlateforme ? 'interets_plateforme' : 'remboursement',
|
||||
montant: grossMontant,
|
||||
_isFlatTax: isFlatTax,
|
||||
_isAutoSweep: r.methode_remboursement === 'compte_courant',
|
||||
@@ -2406,6 +2409,7 @@ export default function Plateformes() {
|
||||
<option value="remboursement">Remboursements</option>
|
||||
<option value="bonus">Bonus</option>
|
||||
<option value="cashback">Cashback</option>
|
||||
<option value="interets_plateforme">Intérêts plateforme</option>
|
||||
<option value="souscription">Souscriptions</option>
|
||||
<option value="prelevement_ir">Prélèvements IR</option>
|
||||
<option value="prelevement_csg">Prélèvements CSG</option>
|
||||
@@ -2493,9 +2497,10 @@ export default function Plateformes() {
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
if (r.type === 'remboursement' || r.type === 'bonus' || r.type === 'cashback') {
|
||||
if (r.type === 'remboursement' || r.type === 'bonus' || r.type === 'cashback' || r.type === 'interets_plateforme') {
|
||||
const isBonus = r.type === 'bonus';
|
||||
const isCashback = r.type === 'cashback';
|
||||
const isInteretsPlateforme = r.type === 'interets_plateforme';
|
||||
return (
|
||||
<tr key={r.id}
|
||||
className={`dr-row${mvSelectedRow?.id === r.id ? ' dr-row-selected' : ''}`}
|
||||
@@ -2511,9 +2516,11 @@ export default function Plateformes() {
|
||||
padding: '2px 7px', borderRadius: 4,
|
||||
background: (isBonus || isCashback)
|
||||
? 'color-mix(in srgb, var(--warning) 18%, transparent)'
|
||||
: 'color-mix(in srgb, var(--success) 15%, transparent)',
|
||||
color: (isBonus || isCashback) ? 'var(--warning)' : 'var(--success)',
|
||||
}}>{isBonus ? 'bonus' : isCashback ? 'cashback' : 'remboursement'}</span>
|
||||
: isInteretsPlateforme
|
||||
? 'color-mix(in srgb, var(--primary) 18%, transparent)'
|
||||
: 'color-mix(in srgb, var(--success) 15%, transparent)',
|
||||
color: (isBonus || isCashback) ? 'var(--warning)' : isInteretsPlateforme ? 'var(--primary)' : 'var(--success)',
|
||||
}}>{isBonus ? 'bonus' : isCashback ? 'cashback' : isInteretsPlateforme ? 'intérêts plateforme' : 'remboursement'}</span>
|
||||
</td>
|
||||
<td className="text-muted">{r._projet || '—'}</td>
|
||||
<td className="num success">
|
||||
|
||||
Reference in new issue
Block a user