fix: update financial forms to use new formatted amount utilities and add adjustment fields

This commit is contained in:
Ahmed Bouhuolia
2024-12-03 17:53:37 +02:00
parent 542763ddf5
commit 3a19518440
21 changed files with 128 additions and 133 deletions

View File

@@ -8,21 +8,25 @@ import {
TotalLineBorderStyle,
TotalLineTextStyle,
} from '@/components';
import { useExpensesTotals } from './utils';
import {
useExpenseSubtotalFormatted,
useExpenseTotalFormatted,
} from './utils';
export function ExpenseFormFooterRight() {
const { formattedSubtotal, formattedTotal } = useExpensesTotals();
const totalFormatted = useExpenseTotalFormatted();
const subtotalFormatted = useExpenseSubtotalFormatted();
return (
<ExpensesTotalLines>
<TotalLine
title={<T id={'expense.label.subtotal'} />}
value={formattedSubtotal}
value={subtotalFormatted}
borderStyle={TotalLineBorderStyle.None}
/>
<TotalLine
title={<T id={'expense.label.total'} />}
value={formattedTotal}
value={totalFormatted}
textStyle={TotalLineTextStyle.Bold}
/>
</ExpensesTotalLines>