mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Ratteb
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);
|
||||
|
||||
@@ -17,11 +17,11 @@ import moment from 'moment';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import Icon from 'components/Icon';
|
||||
import { compose, saveInvoke } from 'utils';
|
||||
import { compose, saveInvoke, isBlank } from 'utils';
|
||||
import { CLASSES } from 'common/classes';
|
||||
import { useIsValuePassed } from 'hooks';
|
||||
|
||||
import { LoadingIndicator, Choose, If } from 'components';
|
||||
import { LoadingIndicator, Money, Choose, If } from 'components';
|
||||
import DataTable from 'components/DataTable';
|
||||
import BillsEmptyStatus from './BillsEmptyStatus';
|
||||
|
||||
@@ -32,6 +32,7 @@ import withViewDetails from 'containers/Views/withViewDetails';
|
||||
import withBills from './withBills';
|
||||
import withBillActions from './withBillActions';
|
||||
import withCurrentView from 'containers/Views/withCurrentView';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
|
||||
// Bills transactions datatable.
|
||||
function BillsDataTable({
|
||||
@@ -52,6 +53,9 @@ function BillsDataTable({
|
||||
// #withView
|
||||
viewMeta,
|
||||
|
||||
// #withSettings
|
||||
baseCurrency,
|
||||
|
||||
// #ownProps
|
||||
loading,
|
||||
onFetchData,
|
||||
@@ -166,7 +170,12 @@ function BillsDataTable({
|
||||
{
|
||||
id: 'amount',
|
||||
Header: formatMessage({ id: 'amount' }),
|
||||
accessor: 'amount',
|
||||
accessor: (row) =>
|
||||
!isBlank(row.amount) ? (
|
||||
<Money amount={row.amount} currency={baseCurrency} />
|
||||
) : (
|
||||
''
|
||||
),
|
||||
width: 140,
|
||||
className: 'amount',
|
||||
},
|
||||
@@ -284,5 +293,8 @@ export default compose(
|
||||
billsCurrentViewId,
|
||||
}),
|
||||
),
|
||||
withSettings(({ organizationSettings }) => ({
|
||||
baseCurrency: organizationSettings?.baseCurrency,
|
||||
})),
|
||||
withViewDetails(),
|
||||
)(BillsDataTable);
|
||||
|
||||
@@ -128,7 +128,7 @@ function VendorsList({
|
||||
return (
|
||||
<DashboardInsider
|
||||
loading={fetchResourceViews.isFetching}
|
||||
name={'vendors-list'}
|
||||
name={'customers-list'}
|
||||
>
|
||||
<VendorActionsBar selectedRows={selectedRows} />
|
||||
<DashboardPageContent>
|
||||
|
||||
Reference in New Issue
Block a user