fix(costs): keep display-currency payments settled, count them as typed in the plan and the PDF, and file every booking type under its Costs key

A display-currency payment whose halves pointed opposite ways no longer
stayed settled (#1445), the plan sidebar and the PDF total still went
through the trip currency, and a zero-decimal display currency was not
rounded. Every booking type now maps to one Costs key on every path; a
cost the old map filed under 'other' still moves with a type change.
This commit is contained in:
Maurice
2026-11-05 13:02:28 +01:00
parent c0f7f81e23
commit 3a8191fc07
15 changed files with 227 additions and 58 deletions
@@ -1122,7 +1122,7 @@ function useDayPlanSidebar(props: DayPlanSidebarProps) {
const budgetItems = useTripStore(s => s.budgetItems)
const costsEnabled = useAddonStore(s => s.isEnabled('budget'))
const totalCostLabel = useMemo(() => {
const costs = planCosts({ days, assignments, reservations, budgetItems, costsEnabled, tripCurrency: currency })
const costs = planCosts({ days, assignments, reservations, budgetItems, costsEnabled, tripCurrency: currency, displayCurrency: costBase })
return formatMoneySum(costs.total, costBase, locale, fxRates)
}, [days, assignments, reservations, budgetItems, costsEnabled, currency, costBase, locale, fxRates])