feat: balance sheet report.

feat: trial balance sheet.
feat: general ledger report.
feat: journal report.
feat: profit/loss report.
This commit is contained in:
a.bouhuolia
2020-12-30 20:39:17 +02:00
parent de9f6d9521
commit 7ae73ed6cd
62 changed files with 2403 additions and 1850 deletions

View File

@@ -1,28 +1,34 @@
import React from 'react';
import {handleStringChange} from 'utils';
import {useIntl} from 'react-intl';
import {
RadioGroup,
Radio,
} from "@blueprintjs/core";
import { FastField } from 'formik';
import { handleStringChange } from 'utils';
import { useIntl } from 'react-intl';
import { RadioGroup, Radio } from '@blueprintjs/core';
export default function RadiosAccountingBasis(props) {
const { onChange, ...rest } = props;
const {formatMessage} = useIntl();
const { key = 'basis', ...rest } = props;
const { formatMessage } = useIntl();
return (
<RadioGroup
inline={true}
label={formatMessage({'id': 'accounting_basis'})}
name="basis"
onChange={handleStringChange((value) => {
onChange && onChange(value);
})}
className={'radio-group---accounting-basis'}
{...rest}>
<Radio label={formatMessage({id:'cash'})} value="cash" />
<Radio label={formatMessage({id:'accrual'})} value="accural" />
</RadioGroup>
<FastField name={'basis'}>
{({
form: { setFieldValue },
field: { value },
}) => (
<RadioGroup
inline={true}
label={formatMessage({ id: 'accounting_basis' })}
name="basis"
onChange={handleStringChange((value) => {
setFieldValue(key, value);
})}
className={'radio-group---accounting-basis'}
selectedValue={value}
{...rest}
>
<Radio label={formatMessage({ id: 'cash' })} value="cash" />
<Radio label={formatMessage({ id: 'accrual' })} value="accural" />
</RadioGroup>
)}
</FastField>
);
}
}