Fix: currency_code in Customers&Vendors Table.

This commit is contained in:
elforjani3
2020-11-28 21:31:11 +02:00
parent 9ad5f4e462
commit 1ddd8a3e72
2 changed files with 6 additions and 3 deletions

View File

@@ -137,7 +137,9 @@ const CustomerTable = ({
{
id: 'receivable_balance',
Header: formatMessage({ id: 'receivable_balance' }),
accessor: (r) => <Money amount={r.closing_balance} currency={'USD'} />,
accessor: (r) => (
<Money amount={r.closing_balance} currency={r.currency_code} />
),
className: 'receivable_balance',
width: 100,
},
@@ -189,7 +191,6 @@ const CustomerTable = ({
customersCurrentViewId === -1,
customers.length === 0,
].every((condition) => condition === true);
return (
<div className={classNames(CLASSES.DASHBOARD_DATATABLE)}>
<LoadingIndicator loading={customersLoading && !isLoadedBefore}>

View File

@@ -136,7 +136,9 @@ function VendorsTable({
{
id: 'receivable_balance',
Header: formatMessage({ id: 'receivable_balance' }),
accessor: (r) => <Money amount={r.closing_balance} currency={'USD'} />,
accessor: (r) => (
<Money amount={r.closing_balance} currency={r.currency_code} />
),
className: 'receivable_balance',
width: 100,
},