mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: display expense formatted amount.
This commit is contained in:
@@ -12,11 +12,13 @@ import {
|
||||
MenuDivider,
|
||||
} from '@blueprintjs/core';
|
||||
import intl from 'react-intl-universal';
|
||||
import clsx from 'classnames';
|
||||
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { ExpenseAction, AbilitySubject } from '../../../common/abilityOption';
|
||||
import {
|
||||
FormatDateCell,
|
||||
FormattedMessage as T,
|
||||
Money,
|
||||
Icon,
|
||||
If,
|
||||
Can,
|
||||
@@ -98,13 +100,6 @@ export function ActionsCell(props) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Total amount accessor.
|
||||
*/
|
||||
export function TotalAmountAccessor(row) {
|
||||
return <Money amount={row.total_amount} currency={row.currency_code} />;
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish accessor.
|
||||
*/
|
||||
@@ -149,11 +144,12 @@ export function useExpensesTableColumns() {
|
||||
{
|
||||
id: 'amount',
|
||||
Header: intl.get('full_amount'),
|
||||
accessor: TotalAmountAccessor,
|
||||
accessor: 'formatted_amount',
|
||||
className: 'amount',
|
||||
align: 'right',
|
||||
width: 150,
|
||||
clickable: true,
|
||||
className: clsx(CLASSES.FONT_BOLD),
|
||||
},
|
||||
{
|
||||
id: 'payment_account',
|
||||
|
||||
Reference in New Issue
Block a user