mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix: item & Bills & Vendor Datatable.
This commit is contained in:
@@ -26,6 +26,7 @@ import { CLASSES } from 'common/classes';
|
||||
|
||||
import withItems from 'containers/Items/withItems';
|
||||
import withItemsActions from 'containers/Items/withItemsActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import { compose, saveInvoke, isBlank, defaultToTransform } from 'utils';
|
||||
|
||||
// Items datatable.
|
||||
@@ -40,6 +41,9 @@ function ItemsDataTable({
|
||||
// #withItemsActions
|
||||
addItemsTableQueries,
|
||||
|
||||
// #withSettings
|
||||
baseCurrency,
|
||||
|
||||
// props
|
||||
onEditItem,
|
||||
onDeleteItem,
|
||||
@@ -176,7 +180,7 @@ function ItemsDataTable({
|
||||
Header: formatMessage({ id: 'sell_price' }),
|
||||
accessor: (row) =>
|
||||
!isBlank(row.sell_price) ? (
|
||||
<Money amount={row.sell_price} currency={'USD'} />
|
||||
<Money amount={row.sell_price} currency={baseCurrency} />
|
||||
) : (
|
||||
''
|
||||
),
|
||||
@@ -187,7 +191,7 @@ function ItemsDataTable({
|
||||
Header: formatMessage({ id: 'cost_price' }),
|
||||
accessor: (row) =>
|
||||
!isBlank(row.cost_price) ? (
|
||||
<Money amount={row.cost_price} currency={'USD'} />
|
||||
<Money amount={row.cost_price} currency={baseCurrency} />
|
||||
) : (
|
||||
''
|
||||
),
|
||||
@@ -292,5 +296,8 @@ export default compose(
|
||||
itemsPagination,
|
||||
}),
|
||||
),
|
||||
withSettings(({ organizationSettings }) => ({
|
||||
baseCurrency: organizationSettings?.baseCurrency,
|
||||
})),
|
||||
withItemsActions,
|
||||
)(ItemsDataTable);
|
||||
|
||||
Reference in New Issue
Block a user