mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix: AR aging summary report.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import React, { useEffect, useCallback, useState } from 'react';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import moment from 'moment';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import 'style/pages/FinancialStatements/TrialBalanceSheet.scss';
|
||||
|
||||
@@ -10,7 +9,6 @@ import TrialBalanceSheetHeader from './TrialBalanceSheetHeader';
|
||||
import TrialBalanceSheetTable from './TrialBalanceSheetTable';
|
||||
|
||||
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withTrialBalanceActions from './withTrialBalanceActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
import withTrialBalance from './withTrialBalance';
|
||||
@@ -21,16 +19,9 @@ import { compose } from 'utils';
|
||||
* Trial balance sheet.
|
||||
*/
|
||||
function TrialBalanceSheet({
|
||||
// #withDashboardActions
|
||||
changePageTitle,
|
||||
setDashboardBackLink,
|
||||
setSidebarShrink,
|
||||
|
||||
// #withPreferences
|
||||
organizationName,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const [filter, setFilter] = useState({
|
||||
fromDate: moment().startOf('year').format('YYYY-MM-DD'),
|
||||
toDate: moment().endOf('year').format('YYYY-MM-DD'),
|
||||
@@ -38,22 +29,6 @@ function TrialBalanceSheet({
|
||||
accountsFilter: 'all-accounts',
|
||||
});
|
||||
|
||||
// Change page title of the dashboard.
|
||||
useEffect(() => {
|
||||
changePageTitle(formatMessage({ id: 'trial_balance_sheet' }));
|
||||
}, [changePageTitle, formatMessage]);
|
||||
|
||||
useEffect(() => {
|
||||
setSidebarShrink();
|
||||
// Show the back link on dashboard topbar.
|
||||
setDashboardBackLink(true);
|
||||
|
||||
return () => {
|
||||
// Hide the back link on dashboard topbar.
|
||||
setDashboardBackLink(false);
|
||||
};
|
||||
}, [setDashboardBackLink, setSidebarShrink]);
|
||||
|
||||
// Handle filter form submit.
|
||||
const handleFilterSubmit = useCallback(
|
||||
(filter) => {
|
||||
@@ -97,7 +72,6 @@ function TrialBalanceSheet({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
withDashboardActions,
|
||||
withTrialBalanceActions,
|
||||
withTrialBalance(({ trialBalanceQuery }) => ({
|
||||
trialBalanceQuery,
|
||||
|
||||
Reference in New Issue
Block a user