fix: oprava zaokrouhlování
CI / Generate TypeScript types (push) Successful in 38s
CI / Build server (push) Successful in 25s
CI / Build client (push) Successful in 45s
CI / Playwright E2E tests (push) Successful in 1m18s
CI / Server unit tests (push) Successful in 3m20s
CI / Build and push Docker image (push) Successful in 9m29s
CI / Notify (push) Successful in 10s

This commit is contained in:
2026-05-07 13:35:44 +02:00
parent 3e6ecd4e6a
commit 94b8f0a452
+6 -1
View File
@@ -458,7 +458,12 @@ export default function OrderGroupsPage() {
})}
</tbody>
{(() => {
const groupTotal = memberEntries.reduce((sum, [, m]) => sum + getMemberTotal(m), 0);
const sumBase = memberEntries.reduce((sum, [, m]) => sum + (m.amount ?? 0) + (m.surchargeAmount ?? 0), 0);
const dv = group.discountValue ?? 0;
const totalDiscount = dv > 0
? (group.discountType === 'percent' ? Math.round(sumBase * dv / 100) : dv)
: 0;
const groupTotal = sumBase + totalFees - totalDiscount;
return groupTotal > 0 ? (
<tfoot>
<tr style={{ fontWeight: 700, borderTop: '2px solid var(--luncher-border)' }}>