fix: Expense amounts should not be rounded

This commit is contained in:
Ahmed Bouhuolia
2024-01-26 23:46:45 +02:00
parent 21eb88ef53
commit de5920f910
5 changed files with 46 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ import {
TotalLineTextStyle,
} from '@/components';
import { useExpenseDrawerContext } from './ExpenseDrawerProvider';
import { FormatNumber, TotalLine } from '@/components';
import { TotalLine } from '@/components';
/**
* Footer details of expense readonly details.
@@ -22,12 +22,12 @@ export default function ExpenseDrawerFooter() {
<ExpenseTotalLines labelColWidth={'180px'} amountColWidth={'180px'}>
<TotalLine
title={<T id={'expense.details.subtotal'} />}
value={<FormatNumber value={expense.total_amount} />}
value={expense.formatted_amount}
borderStyle={TotalLineBorderStyle.SingleDark}
/>
<TotalLine
title={<T id={'expense.details.total'} />}
value={<FormatNumber value={expense.formatted_amount} />}
value={expense.formatted_amount}
borderStyle={TotalLineBorderStyle.DoubleDark}
textStyle={TotalLineTextStyle.Bold}
/>

View File

@@ -36,8 +36,7 @@ export const useExpenseReadEntriesColumns = () => {
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
accessor: 'amount_formatted',
width: getColumnWidth(categories, 'amount', {
minWidth: 60,
magicSpacing: 5,