fix(Journal): account balance with journal entries.

This commit is contained in:
a.bouhuolia
2021-03-25 12:46:36 +02:00
parent e6e165efe4
commit 40b2ba099e
9 changed files with 37 additions and 16 deletions

View File

@@ -4,12 +4,9 @@ import preferencesRoutes from 'routes/preferences'
export default function DashboardContentRoute() {
const defaultTab = '/preferences/general';
return (
<Route pathname="/preferences">
<Redirect from='/preferences' to={defaultTab} />
<Switch>
{ preferencesRoutes.map((route, index) => (
<Route

View File

@@ -24,7 +24,7 @@ export const useTrialBalanceTableColumns = () => {
Header: formatMessage({ id: 'account_name' }),
accessor: (row) => (row.code ? `${row.name} - ${row.code}` : row.name),
className: 'name',
width: 160,
width: 180,
textOverview: true,
},
{
@@ -33,14 +33,14 @@ export const useTrialBalanceTableColumns = () => {
accessor: 'formatted_credit',
className: 'credit',
width: getColumnWidth(tableRows, `credit`, {
minWidth: 95,
minWidth: 80,
}),
},
{
Header: formatMessage({ id: 'debit' }),
Cell: CellTextSpan,
accessor: 'formatted_debit',
width: getColumnWidth(tableRows, `debit`, { minWidth: 95 }),
width: getColumnWidth(tableRows, `debit`, { minWidth: 80 }),
},
{
Header: formatMessage({ id: 'balance' }),
@@ -48,7 +48,7 @@ export const useTrialBalanceTableColumns = () => {
accessor: 'formatted_balance',
className: 'balance',
width: getColumnWidth(tableRows, `balance`, {
minWidth: 95,
minWidth: 80,
}),
},
],

View File

@@ -0,0 +1,8 @@
import React from 'react';
import { Redirect } from 'react-router-dom';
export default function DefaultRoute() {
const defaultTab = '/preferences/general';
return (<Redirect from='/preferences' to={defaultTab} />);
}

View File

@@ -4,6 +4,7 @@ import Accountant from 'containers/Preferences/Accountant/Accountant';
import Accounts from 'containers/Preferences/Accounts/Accounts';
import Currencies from 'containers/Preferences/Currencies/Currencies';
import Item from 'containers/Preferences/Item/Item';
import DefaultRoute from '../containers/Preferences/DefaultRoute';
const BASE_URL = '/preferences';
@@ -33,4 +34,9 @@ export default [
component: Item,
exact: true,
},
{
path: `${BASE_URL}/`,
component: DefaultRoute,
exact: true,
},
];

View File

@@ -36,7 +36,7 @@
font-weight: 600;
}
.tr{
.tr:not(.no-results) {
height: 28px;
}

View File

@@ -160,7 +160,7 @@ export function formattedAmount(cents, currency, props) {
precision: 0,
format: {
pos: '%s%v',
neg: '%s%v',
neg: '%s-%v',
zero: parsedProps.noZero ? '' : '%s%v',
},
};