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