Fix Gesamt-Provision: shop minus employee share
Gesamt-Provision represents what the shop keeps after paying the employee, not the sum of both. Update both the frontend KPI card calculation and the /api/provisionen total_gesamt_provision field so they agree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b88938a1f6
commit
65395c0cae
2 files changed
+3
-2
No files matched your search
+2
-1
@@ -2338,7 +2338,8 @@ function updateProvisionenTable(schaltungen, totalShopProvision, totalMitarbeite
|
||||
tbody.appendChild(tr);
|
||||
});
|
||||
|
||||
const totalGesamt = (totalShopProvision || 0) + (totalMitarbeiterProvision || 0);
|
||||
// Gesamt-Provision = what the shop keeps after paying out the employee share.
|
||||
const totalGesamt = (totalShopProvision || 0) - (totalMitarbeiterProvision || 0);
|
||||
if (totalShopSpan) totalShopSpan.textContent = formatEuro(totalShopProvision);
|
||||
if (totalMitarbeiterSpan) totalMitarbeiterSpan.textContent = formatEuro(totalMitarbeiterProvision);
|
||||
if (totalGesamtSpan) totalGesamtSpan.textContent = formatEuro(totalGesamt);
|
||||
|
||||
Reference in new issue
Block a user