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
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:
@@ -458,7 +458,12 @@ export default function OrderGroupsPage() {
|
|||||||
})}
|
})}
|
||||||
</tbody>
|
</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 ? (
|
return groupTotal > 0 ? (
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr style={{ fontWeight: 700, borderTop: '2px solid var(--luncher-border)' }}>
|
<tr style={{ fontWeight: 700, borderTop: '2px solid var(--luncher-border)' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user