mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
- feat: Filter expense and payment accounts on expense form.
- feat: Make journal errors with receivable and payable accounts. - fix: Handle database big numbers. - fix: Indexing lines when add a new line on make journal form. - fix: Abstruct accounts type component.
This commit is contained in:
@@ -109,7 +109,7 @@ function MakeJournalEntriesTable({
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
useEffect(() => {
|
||||
setRows([...values.entries.map((e) => ({ ...e, rowType: 'editor' }))]);
|
||||
setRows([...values.map((e) => ({ ...e, rowType: 'editor' }))]);
|
||||
}, [values, setRows]);
|
||||
|
||||
// Final table rows editor rows and total and final blank row.
|
||||
@@ -217,6 +217,9 @@ function MakeJournalEntriesTable({
|
||||
|
||||
const handleRemoveRow = useCallback(
|
||||
(rowIndex) => {
|
||||
// Can't continue if there is just one row line or less.
|
||||
if (rows.length <= 2) { return; }
|
||||
|
||||
const removeIndex = parseInt(rowIndex, 10);
|
||||
const newRows = rows.filter((row, index) => index !== removeIndex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user