mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: add specific cashflow account transactions.
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
const AccountTransactionsContext = React.createContext();
|
||||
|
||||
function flattenInfinityPages(data) {
|
||||
return flatten(map(data.pages, (page) => page.cashflow_transactions));
|
||||
return flatten(map(data.pages, (page) => page.transactions));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,9 +30,10 @@ function AccountTransactionsProvider({ query, ...props }) {
|
||||
isSuccess: isCashflowTransactionsSuccess,
|
||||
fetchNextPage: fetchNextTransactionsPage,
|
||||
isFetchingNextPage,
|
||||
hasNextPage
|
||||
hasNextPage,
|
||||
} = useAccountTransactionsInfinity(accountId, {
|
||||
page_size: 50,
|
||||
account_id: accountId,
|
||||
});
|
||||
|
||||
// Memorized the cashflow account transactions.
|
||||
|
||||
@@ -49,7 +49,7 @@ export function useAccountTransactionsColumns() {
|
||||
{
|
||||
id: 'type',
|
||||
Header: intl.get('type'),
|
||||
accessor: 'reference_type_formatted',
|
||||
accessor: 'formatted_transaction_type',
|
||||
className: 'type',
|
||||
width: 140,
|
||||
textOverview: true,
|
||||
@@ -89,12 +89,21 @@ export function useAccountTransactionsColumns() {
|
||||
{
|
||||
id: 'running_balance',
|
||||
Header: intl.get('cash_flow.label.running_balance'),
|
||||
accessor: 'running_balance',
|
||||
accessor: 'formatted_running_balance',
|
||||
className: 'running_balance',
|
||||
width: 150,
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
id: 'balance',
|
||||
Header: intl.get('balance'),
|
||||
accessor: 'formatted_balance',
|
||||
className: 'balance',
|
||||
width: 150,
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user