diff --git a/packages/desktop-client/src/components/Modals.tsx b/packages/desktop-client/src/components/Modals.tsx
index e47d026b138..643ef4a0899 100644
--- a/packages/desktop-client/src/components/Modals.tsx
+++ b/packages/desktop-client/src/components/Modals.tsx
@@ -11,6 +11,7 @@ import { type CommonModalProps } from '../types/modals';
import CloseAccount from './modals/CloseAccount';
import ConfirmCategoryDelete from './modals/ConfirmCategoryDelete';
+import ConfirmTransactionEdit from './modals/ConfirmTransactionEdit';
import CreateAccount from './modals/CreateAccount';
import CreateEncryptionKey from './modals/CreateEncryptionKey';
import CreateLocalAccount from './modals/CreateLocalAccount';
@@ -124,6 +125,15 @@ export default function Modals() {
/>
);
+ case 'confirm-transaction-edit':
+ return (
+
+ );
+
case 'load-backup':
return (
{
+ lockTransactions = async () => {
+ this.setState({ workingHard: true });
+
+ let { accountId } = this.props;
+
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ cleared: true, reconciled: false, account: accountId })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
+ let transactions = ungroupTransactions(data);
+
+ let changes = { updated: [] };
+
+ transactions.forEach(trans => {
+ let { diff } = updateTransaction(transactions, {
+ ...trans,
+ reconciled: true,
+ });
+
+ transactions = applyChanges(diff, transactions);
+
+ changes.updated = changes.updated
+ ? changes.updated.concat(diff.updated)
+ : diff.updated;
+ });
+
+ await send('transactions-batch-update', changes);
+ await this.refetchTransactions();
+ };
+
+ onReconcile = async balance => {
this.setState({ reconcileAmount: balance });
};
- onDoneReconciling = () => {
+ onDoneReconciling = async () => {
+ let { accountId } = this.props;
+ let { reconcileAmount } = this.state;
+
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ cleared: true, account: accountId })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
+ let transactions = ungroupTransactions(data);
+
+ let cleared = 0;
+
+ transactions.forEach(trans => {
+ if (!trans.is_parent) {
+ cleared += trans.amount;
+ }
+ });
+
+ let targetDiff = reconcileAmount - cleared;
+
+ if (targetDiff === 0) {
+ await this.lockTransactions();
+ }
+
this.setState({ reconcileAmount: null });
};
@@ -708,6 +765,7 @@ class AccountInternal extends PureComponent {
id: 'temp',
account: this.props.accountId,
cleared: true,
+ reconciled: false,
amount: diff,
date: currentDay(),
notes: 'Reconciliation balance adjustment',
@@ -716,7 +774,7 @@ class AccountInternal extends PureComponent {
// Optimistic UI: update the transaction list before sending the data to the database
this.setState({
- transactions: [...this.state.transactions, ...reconciliationTransactions],
+ transactions: [...reconciliationTransactions, ...this.state.transactions],
});
// sync the reconciliation transaction
@@ -756,6 +814,12 @@ class AccountInternal extends PureComponent {
const idSet = new Set(ids);
transactions.forEach(trans => {
+ if (name === 'cleared' && trans.reconciled) {
+ // Skip transactions that are reconciled. Don't want to set them as
+ // uncleared.
+ return;
+ }
+
if (!idSet.has(trans.id)) {
// Skip transactions which aren't actually selected, since the query
// above also retrieves the siblings & parent of any selected splits.
@@ -792,6 +856,26 @@ class AccountInternal extends PureComponent {
}
};
+ if (name === 'amount' || name === 'payee' || name === 'account') {
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ id: { $oneof: ids }, reconciled: true })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
+ let transactions = ungroupTransactions(data);
+
+ if (transactions.length > 0) {
+ this.props.pushModal('confirm-transaction-edit', {
+ onConfirm: () => {
+ this.props.pushModal('edit-field', { name, onSubmit: onChange });
+ },
+ confirmReason: 'batchEditWithReconciled',
+ });
+ return;
+ }
+ }
+
if (name === 'cleared') {
// Cleared just toggles it on/off and it depends on the data
// loaded. Need to clean this up in the future.
@@ -802,72 +886,108 @@ class AccountInternal extends PureComponent {
};
onBatchDuplicate = async ids => {
- this.setState({ workingHard: true });
+ let onConfirmDuplicate = async ids => {
+ this.setState({ workingHard: true });
- let { data } = await runQuery(
- q('transactions')
- .filter({ id: { $oneof: ids } })
- .select('*')
- .options({ splits: 'grouped' }),
- );
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ id: { $oneof: ids } })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
- let changes = {
- added: data
- .reduce((newTransactions, trans) => {
- return newTransactions.concat(
- realizeTempTransactions(ungroupTransaction(trans)),
- );
- }, [])
- .map(({ sort_order, ...trans }) => ({ ...trans })),
- };
+ let changes = {
+ added: data
+ .reduce((newTransactions, trans) => {
+ return newTransactions.concat(
+ realizeTempTransactions(ungroupTransaction(trans)),
+ );
+ }, [])
+ .map(({ sort_order, ...trans }) => ({ ...trans })),
+ };
- await send('transactions-batch-update', changes);
+ await send('transactions-batch-update', changes);
- await this.refetchTransactions();
+ await this.refetchTransactions();
+ };
+
+ await this.checkForReconciledTransactions(
+ ids,
+ 'batchDuplicateWithReconciled',
+ onConfirmDuplicate,
+ );
};
onBatchDelete = async ids => {
- this.setState({ workingHard: true });
+ let onConfirmDelete = async ids => {
+ this.setState({ workingHard: true });
- let { data } = await runQuery(
- q('transactions')
- .filter({ id: { $oneof: ids } })
- .select('*')
- .options({ splits: 'grouped' }),
- );
- let transactions = ungroupTransactions(data);
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ id: { $oneof: ids } })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
+ let transactions = ungroupTransactions(data);
- let idSet = new Set(ids);
- let changes = { deleted: [], updated: [] };
+ let idSet = new Set(ids);
+ let changes = { deleted: [], updated: [] };
- transactions.forEach(trans => {
- let parentId = trans.parent_id;
+ transactions.forEach(trans => {
+ let parentId = trans.parent_id;
- // First, check if we're actually deleting this transaction by
- // checking `idSet`. Then, we don't need to do anything if it's
- // a child transaction and the parent is already being deleted
- if (!idSet.has(trans.id) || (parentId && idSet.has(parentId))) {
- return;
- }
+ // First, check if we're actually deleting this transaction by
+ // checking `idSet`. Then, we don't need to do anything if it's
+ // a child transaction and the parent is already being deleted
+ if (!idSet.has(trans.id) || (parentId && idSet.has(parentId))) {
+ return;
+ }
- let { diff } = deleteTransaction(transactions, trans.id);
+ let { diff } = deleteTransaction(transactions, trans.id);
- // TODO: We need to keep an updated list of transactions so
- // the logic in `updateTransaction`, particularly about
- // updating split transactions, works. This isn't ideal and we
- // should figure something else out
- transactions = applyChanges(diff, transactions);
+ // TODO: We need to keep an updated list of transactions so
+ // the logic in `updateTransaction`, particularly about
+ // updating split transactions, works. This isn't ideal and we
+ // should figure something else out
+ transactions = applyChanges(diff, transactions);
- changes.deleted = diff.deleted
- ? changes.deleted.concat(diff.deleted)
- : diff.deleted;
- changes.updated = diff.updated
- ? changes.updated.concat(diff.updated)
- : diff.updated;
- });
+ changes.deleted = diff.deleted
+ ? changes.deleted.concat(diff.deleted)
+ : diff.deleted;
+ changes.updated = diff.updated
+ ? changes.updated.concat(diff.updated)
+ : diff.updated;
+ });
- await send('transactions-batch-update', changes);
- await this.refetchTransactions();
+ await send('transactions-batch-update', changes);
+ await this.refetchTransactions();
+ };
+
+ await this.checkForReconciledTransactions(
+ ids,
+ 'batchDeleteWithReconciled',
+ onConfirmDelete,
+ );
+ };
+
+ checkForReconciledTransactions = async (ids, confirmReason, onConfirm) => {
+ let { data } = await runQuery(
+ q('transactions')
+ .filter({ id: { $oneof: ids }, reconciled: true })
+ .select('*')
+ .options({ splits: 'grouped' }),
+ );
+ let transactions = ungroupTransactions(data);
+ if (transactions.length > 0) {
+ this.props.pushModal('confirm-transaction-edit', {
+ onConfirm: () => {
+ onConfirm(ids);
+ },
+ confirmReason: confirmReason,
+ });
+ } else {
+ onConfirm(ids);
+ }
};
onBatchUnlink = async ids => {
diff --git a/packages/desktop-client/src/components/mobile/MobileForms.js b/packages/desktop-client/src/components/mobile/MobileForms.js
index f0092359a6e..a2fb719f941 100644
--- a/packages/desktop-client/src/components/mobile/MobileForms.js
+++ b/packages/desktop-client/src/components/mobile/MobileForms.js
@@ -111,9 +111,10 @@ export function TapField({
);
}
-export function BooleanField({ checked, onUpdate, style }) {
+export function BooleanField({ checked, onUpdate, style, disabled = false }) {
return (
onUpdate(e.target.checked)}
diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx
new file mode 100644
index 00000000000..837872dd9bc
--- /dev/null
+++ b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx
@@ -0,0 +1,87 @@
+import React from 'react';
+
+import { type CommonModalProps } from '../../types/modals';
+import Block from '../common/Block';
+import Button from '../common/Button';
+import Modal from '../common/Modal';
+import View from '../common/View';
+
+type ConfirmTransactionEditProps = {
+ modalProps: Partial;
+ onConfirm: () => void;
+ confirmReason: string;
+};
+
+function ConfirmTransactionEdit({
+ modalProps,
+ onConfirm,
+ confirmReason,
+}: ConfirmTransactionEditProps) {
+ return (
+
+ {() => (
+
+ {confirmReason === 'batchDeleteWithReconciled' ? (
+
+ Deleting reconciled transactions may bring your reconciliation out
+ of balance.
+
+ ) : confirmReason === 'batchEditWithReconciled' ? (
+
+ Editing reconciled transactions may bring your reconciliation out
+ of balance.
+
+ ) : confirmReason === 'batchDuplicateWithReconciled' ? (
+
+ Duplicating reconciled transactions may bring your reconciliation
+ out of balance.
+
+ ) : confirmReason === 'editReconciled' ? (
+
+ Saving your changes to this reconciled transaction may bring your
+ reconciliation out of balance.
+
+ ) : confirmReason === 'deleteReconciled' ? (
+
+ Deleting this reconciled transaction may bring your reconciliation
+ out of balance.
+
+ ) : (
+ Are you sure you want to edit this transaction?
+ )}
+
+
+
+
+
+
+
+
+ )}
+
+ );
+}
+
+export default ConfirmTransactionEdit;
diff --git a/packages/desktop-client/src/components/schedules/StatusBadge.tsx b/packages/desktop-client/src/components/schedules/StatusBadge.tsx
index e7c91568f67..1b018e48361 100644
--- a/packages/desktop-client/src/components/schedules/StatusBadge.tsx
+++ b/packages/desktop-client/src/components/schedules/StatusBadge.tsx
@@ -9,13 +9,14 @@ import CheckCircle1 from '../../icons/v2/CheckCircle1';
import CheckCircleHollow from '../../icons/v2/CheckCircleHollow';
import EditSkull1 from '../../icons/v2/EditSkull1';
import FavoriteStar from '../../icons/v2/FavoriteStar';
+import Lock from '../../icons/v2/LockClosed';
import ValidationCheck from '../../icons/v2/ValidationCheck';
import { theme } from '../../style';
import Text from '../common/Text';
import View from '../common/View';
// Consists of Schedule Statuses + Transaction statuses
-type StatusTypes = ScheduleStatusType | 'cleared' | 'pending';
+type StatusTypes = ScheduleStatusType | 'cleared' | 'pending' | 'reconciled';
export function getStatusProps(status: StatusTypes) {
switch (status) {
case 'missed':
@@ -66,6 +67,12 @@ export function getStatusProps(status: StatusTypes) {
backgroundColor: theme.tableRowHeaderBackground,
Icon: CheckCircle1,
};
+ case 'reconciled':
+ return {
+ color: theme.noticeTextLight,
+ backgroundColor: theme.tableRowHeaderBackground,
+ Icon: Lock,
+ };
default:
return {
color: theme.buttonNormalDisabledText,
diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.js
index 0ff83a3aae9..f6105f8a9c5 100644
--- a/packages/desktop-client/src/components/transactions/MobileTransaction.js
+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.js
@@ -52,6 +52,7 @@ import CheveronLeft from '../../icons/v1/CheveronLeft';
import SvgTrash from '../../icons/v1/Trash';
import ArrowsSynchronize from '../../icons/v2/ArrowsSynchronize';
import CheckCircle1 from '../../icons/v2/CheckCircle1';
+import Lock from '../../icons/v2/LockClosed';
import SvgPencilWriteAlternate from '../../icons/v2/PencilWriteAlternate';
import { styles, theme } from '../../style';
import Button from '../common/Button';
@@ -200,32 +201,50 @@ class TransactionEditInner extends PureComponent {
};
onSave = async () => {
- let { transactions } = this.state;
- const [transaction, ..._childTransactions] = transactions;
- const { account: accountId } = transaction;
- let account = getAccountsById(this.props.accounts)[accountId];
+ let onConfirmSave = async () => {
+ let { transactions } = this.state;
+ const [transaction, ..._childTransactions] = transactions;
+ const { account: accountId } = transaction;
+ let account = getAccountsById(this.props.accounts)[accountId];
+
+ if (transactions.find(t => t.account == null)) {
+ // Ignore transactions if any of them don't have an account
+ // TODO: Should we display validation error?
+ return;
+ }
- if (transactions.find(t => t.account == null)) {
- // Ignore transactions if any of them don't have an account
- // TODO: Should we display validation error?
- return;
- }
+ // Since we don't own the state, we have to handle the case where
+ // the user saves while editing an input. We won't have the
+ // updated value so we "apply" a queued change. Maybe there's a
+ // better way to do this (lift the state?)
+ if (this._queuedChange) {
+ let [transaction, name, value] = this._queuedChange;
+ transactions = await this.onEdit(transaction, name, value);
+ }
- // Since we don't own the state, we have to handle the case where
- // the user saves while editing an input. We won't have the
- // updated value so we "apply" a queued change. Maybe there's a
- // better way to do this (lift the state?)
- if (this._queuedChange) {
- let [transaction, name, value] = this._queuedChange;
- transactions = await this.onEdit(transaction, name, value);
- }
+ if (this.props.adding) {
+ transactions = realizeTempTransactions(transactions);
+ }
- if (this.props.adding) {
- transactions = realizeTempTransactions(transactions);
- }
+ this.props.onSave(transactions);
+ this.props.navigate(`/accounts/${account.id}`, { replace: true });
+ };
- this.props.onSave(transactions);
- this.props.navigate(`/accounts/${account.id}`, { replace: true });
+ const { transactions } = this.state;
+ const [transaction] = transactions;
+
+ if (transaction.reconciled) {
+ // On mobile any save gives the warning.
+ // On the web only certain changes trigger a warning.
+ // Should we bring that here as well? Or does the nature of the editing form
+ // make this more appropriate?
+ this.props.pushModal('confirm-transaction-edit', {
+ onConfirm: onConfirmSave,
+ confirmReason: 'editReconciled',
+ });
+ } else {
+ onConfirmSave();
+ }
};
onSaveChild = childTransaction => {
@@ -276,15 +295,29 @@ class TransactionEditInner extends PureComponent {
};
onDelete = () => {
- this.props.onDelete();
+ let onConfirmDelete = () => {
+ this.props.onDelete();
+
+ const { transactions } = this.state;
+ const [transaction, ..._childTransactions] = transactions;
+ const { account: accountId } = transaction;
+ if (accountId) {
+ this.props.navigate(`/accounts/${accountId}`, { replace: true });
+ } else {
+ this.props.navigate(-1);
+ }
+ };
const { transactions } = this.state;
- const [transaction, ..._childTransactions] = transactions;
- const { account: accountId } = transaction;
- if (accountId) {
- this.props.navigate(`/accounts/${accountId}`, { replace: true });
+ const [transaction] = transactions;
+
+ if (transaction.reconciled) {
+ this.props.pushModal('confirm-transaction-edit', {
+ onConfirm: onConfirmDelete,
+ confirmReason: 'deleteReconciled',
+ });
} else {
- this.props.navigate(-1);
+ onConfirmDelete();
}
};
@@ -579,21 +612,35 @@ class TransactionEditInner extends PureComponent {
}
/>
-
-
-
-
- this.onEdit(transaction, 'cleared', checked)
- }
- style={{
- margin: 'auto',
- width: 22,
- height: 22,
- }}
- />
-
+ {transaction.reconciled ? (
+
+
+
+
+ ) : (
+
+
+
+ this.onEdit(transaction, 'cleared', checked)
+ }
+ style={{
+ margin: 'auto',
+ width: 22,
+ height: 22,
+ }}
+ />
+
+ )}
@@ -954,6 +1001,7 @@ class Transaction extends PureComponent {
: categoryName;
let isPreview = isPreviewId(id);
+ let isReconciled = transaction.reconciled;
let textStyle = isPreview && {
fontStyle: 'italic',
color: theme.pageTextLight,
@@ -1016,16 +1064,27 @@ class Transaction extends PureComponent {
marginTop: 3,
}}
>
-
+ {isReconciled ? (
+
+ ) : (
+
+ )}
{showCategory && (
{
+ setShowReconciliationWarning(false);
+ onUpdateAfterConfirm(name, value);
+ },
+ confirmReason: 'editReconciled',
+ });
+ }
+ } else {
+ onUpdateAfterConfirm(name, value);
}
+ }
+ }
- // If entering an amount in either of the credit/debit fields, we
- // need to clear out the other one so it's always properly
- // translated into the desired amount (see
- // `deserializeTransaction`)
- if (name === 'credit') {
- newTransaction['debit'] = '';
- } else if (name === 'debit') {
- newTransaction['credit'] = '';
- }
+ function onUpdateAfterConfirm(name, value) {
+ let newTransaction = { ...transaction, [name]: value };
- // Don't save a temporary value (a new payee) which will be
- // filled in with a real id later
- if (name === 'payee' && value && value.startsWith('new:')) {
- setTransaction(newTransaction);
- } else {
- let deserialized = deserializeTransaction(
- newTransaction,
- originalTransaction,
- );
- // Run the transaction through the formatting so that we know
- // it's always showing the formatted result
- setTransaction(serializeTransaction(deserialized, showZeroInDeposit));
- onSave(deserialized);
- }
+ // Don't change the note to an empty string if it's null (since they are both rendered the same)
+ if (name === 'note' && value === '' && transaction.note == null) {
+ return;
+ }
+
+ if (
+ name === 'account' &&
+ value &&
+ getAccountsById(accounts)[value].offbudget
+ ) {
+ newTransaction.category = null;
+ }
+
+ // If entering an amount in either of the credit/debit fields, we
+ // need to clear out the other one so it's always properly
+ // translated into the desired amount (see
+ // `deserializeTransaction`)
+ if (name === 'credit') {
+ newTransaction['debit'] = '';
+ } else if (name === 'debit') {
+ newTransaction['credit'] = '';
+ }
+
+ // Don't save a temporary value (a new payee) which will be
+ // filled in with a real id later
+ if (name === 'payee' && value && value.startsWith('new:')) {
+ setTransaction(newTransaction);
+ } else {
+ let deserialized = deserializeTransaction(
+ newTransaction,
+ originalTransaction,
+ );
+ // Run the transaction through the formatting so that we know
+ // it's always showing the formatted result
+ setTransaction(serializeTransaction(deserialized, showZeroInDeposit));
+ onSave(deserialized);
}
}
@@ -788,6 +824,7 @@ const Transaction = memo(function Transaction(props) {
account: accountId,
category: categoryId,
cleared,
+ reconciled,
is_parent: isParent,
_unmatched = false,
_inverse = false,
@@ -1284,7 +1321,15 @@ const Transaction = memo(function Transaction(props) {
focused={focusedField === 'cleared'}
selected={selected}
isPreview={isPreview}
- status={isPreview ? notes : cleared ? 'cleared' : null}
+ status={
+ isPreview
+ ? notes
+ : reconciled
+ ? 'reconciled'
+ : cleared
+ ? 'cleared'
+ : null
+ }
isChild={isChild}
onEdit={onEdit}
onUpdate={onUpdate}
@@ -1595,6 +1640,7 @@ function TransactionTableInner({
onToggleSplit={props.onToggleSplit}
onNavigateToTransferAccount={onNavigateToTransferAccount}
onNavigateToSchedule={onNavigateToSchedule}
+ pushModal={props.pushModal}
/>
>
);
diff --git a/packages/desktop-client/src/icons/v2/LockClosed.tsx b/packages/desktop-client/src/icons/v2/LockClosed.tsx
new file mode 100644
index 00000000000..fea05ad94df
--- /dev/null
+++ b/packages/desktop-client/src/icons/v2/LockClosed.tsx
@@ -0,0 +1,19 @@
+import * as React from 'react';
+import type { SVGProps } from 'react';
+const SvgLockClosed = (props: SVGProps) => (
+
+);
+export default SvgLockClosed;
diff --git a/packages/desktop-client/src/icons/v2/index.ts b/packages/desktop-client/src/icons/v2/index.ts
index bbe7f165b81..c1455d4cdcb 100644
--- a/packages/desktop-client/src/icons/v2/index.ts
+++ b/packages/desktop-client/src/icons/v2/index.ts
@@ -22,6 +22,7 @@ export { default as Hyperlink2 } from './Hyperlink2';
export { default as Hyperlink3 } from './Hyperlink3';
export { default as InformationCircle } from './InformationCircle';
export { default as Key } from './Key';
+export { default as LockClosed } from './LockClosed';
export { default as MoonStars } from './MoonStars';
export { default as NavigationMenu } from './NavigationMenu';
export { default as NotesPaperText } from './NotesPaperText';
diff --git a/packages/desktop-client/src/icons/v2/lock-closed.svg b/packages/desktop-client/src/icons/v2/lock-closed.svg
new file mode 100644
index 00000000000..74e6ae37b30
--- /dev/null
+++ b/packages/desktop-client/src/icons/v2/lock-closed.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/loot-core/migrations/1697046240000_add_reconciled.sql b/packages/loot-core/migrations/1697046240000_add_reconciled.sql
new file mode 100644
index 00000000000..65b99f61ea2
--- /dev/null
+++ b/packages/loot-core/migrations/1697046240000_add_reconciled.sql
@@ -0,0 +1,5 @@
+BEGIN TRANSACTION;
+
+ALTER TABLE transactions ADD COLUMN reconciled INTEGER DEFAULT 0;
+
+COMMIT;
diff --git a/packages/loot-core/src/server/__snapshots__/main.test.ts.snap b/packages/loot-core/src/server/__snapshots__/main.test.ts.snap
index bb19731b6e5..1825a6e8480 100644
--- a/packages/loot-core/src/server/__snapshots__/main.test.ts.snap
+++ b/packages/loot-core/src/server/__snapshots__/main.test.ts.snap
@@ -19,6 +19,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -43,6 +44,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -73,7 +75,7 @@ exports[`Accounts Transfers are properly updated 2`] = `
\\"id\\": \\"test-transfer\\",
\\"imported_description\\": null,
\\"isChild\\": 0,
-@@ -22,15 +22,15 @@
+@@ -23,15 +23,15 @@
\\"tombstone\\": 0,
\\"transferred_id\\": \\"id2\\",
\\"type\\": null,
@@ -98,9 +100,9 @@ exports[`Accounts Transfers are properly updated 3`] = `
- First value
+ Second value
-@@ -17,12 +17,12 @@
- \\"parent_id\\": null,
+@@ -18,12 +18,12 @@
\\"pending\\": 0,
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -113,9 +115,9 @@ exports[`Accounts Transfers are properly updated 3`] = `
Object {
\\"acct\\": \\"three\\",
\\"amount\\": -5000,
-@@ -41,10 +41,10 @@
- \\"parent_id\\": null,
+@@ -43,10 +43,10 @@
\\"pending\\": 0,
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
diff --git a/packages/loot-core/src/server/accounts/__snapshots__/parse-file.test.ts.snap b/packages/loot-core/src/server/accounts/__snapshots__/parse-file.test.ts.snap
index 308b06b943a..72b569a0251 100644
--- a/packages/loot-core/src/server/accounts/__snapshots__/parse-file.test.ts.snap
+++ b/packages/loot-core/src/server/accounts/__snapshots__/parse-file.test.ts.snap
@@ -19,6 +19,7 @@ Array [
"notes": "PWW",
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -48,6 +49,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -77,6 +79,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -101,6 +104,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -125,6 +129,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -149,6 +154,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -173,6 +179,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -197,6 +204,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -221,6 +229,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -245,6 +254,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -269,6 +279,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -293,6 +304,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -322,6 +334,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -346,6 +359,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -370,6 +384,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -394,6 +409,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -418,6 +434,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -442,6 +459,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -466,6 +484,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -490,6 +509,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -514,6 +534,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -538,6 +559,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -567,6 +589,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -591,6 +614,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -615,6 +639,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -639,6 +664,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -663,6 +689,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -687,6 +714,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -711,6 +739,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -735,6 +764,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -759,6 +789,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -783,6 +814,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -807,6 +839,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -831,6 +864,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -855,6 +889,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -879,6 +914,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -903,6 +939,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -927,6 +964,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -951,6 +989,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -975,6 +1014,7 @@ Array [
"notes": null,
"parent_id": null,
"pending": 0,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
diff --git a/packages/loot-core/src/server/accounts/__snapshots__/sync.test.ts.snap b/packages/loot-core/src/server/accounts/__snapshots__/sync.test.ts.snap
index 4f3ddb4ca88..53dec388648 100644
--- a/packages/loot-core/src/server/accounts/__snapshots__/sync.test.ts.snap
+++ b/packages/loot-core/src/server/accounts/__snapshots__/sync.test.ts.snap
@@ -18,6 +18,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Transaction 90",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -40,6 +41,7 @@ Array [
"parent_id": null,
"payee": "id9",
"payee_name": "Transaction 54",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -62,6 +64,7 @@ Array [
"parent_id": null,
"payee": "id7",
"payee_name": "Transaction 79",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -84,6 +87,7 @@ Array [
"parent_id": null,
"payee": "id6",
"payee_name": "Transaction 3",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -106,6 +110,7 @@ Array [
"parent_id": null,
"payee": "id8",
"payee_name": "Transaction 51",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -128,6 +133,7 @@ Array [
"parent_id": null,
"payee": "id10",
"payee_name": "Transaction 68",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -150,6 +156,7 @@ Array [
"parent_id": null,
"payee": "id3",
"payee_name": "Starting Balance",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 1,
@@ -172,6 +179,7 @@ Array [
"parent_id": null,
"payee": "id12",
"payee_name": "Transaction 64",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -194,6 +202,7 @@ Array [
"parent_id": null,
"payee": "id11",
"payee_name": "Transaction 11",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -216,6 +225,7 @@ Array [
"parent_id": null,
"payee": "id15",
"payee_name": "Transaction 48",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -238,6 +248,7 @@ Array [
"parent_id": null,
"payee": "id13",
"payee_name": "Transaction 107",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -260,6 +271,7 @@ Array [
"parent_id": null,
"payee": "id17",
"payee_name": "Transaction 56",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -282,6 +294,7 @@ Array [
"parent_id": null,
"payee": "id14",
"payee_name": "Transaction 28",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -304,6 +317,7 @@ Array [
"parent_id": null,
"payee": "id16",
"payee_name": "Transaction 114",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -318,7 +332,7 @@ exports[`Account sync import never matches existing with financial ids 2`] = `
- First value
+ Second value
-@@ -65,10 +65,54 @@
+@@ -68,10 +68,56 @@
\\"tombstone\\": 0,
\\"transfer_id\\": null,
},
@@ -338,6 +352,7 @@ exports[`Account sync import never matches existing with financial ids 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id31\\",
+ \\"payee_name\\": \\"foo\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -360,6 +375,7 @@ exports[`Account sync import never matches existing with financial ids 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id32\\",
+ \\"payee_name\\": \\"bar\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -380,12 +396,35 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- First value
+ Second value
-@@ -1,110 +1,154 @@
+@@ -1,114 +1,160 @@
Array [
Object {
\\"account\\": \\"one\\",
- \\"amount\\": 8105,
+ \\"amount\\": -1865,
++ \\"category\\": null,
++ \\"cleared\\": 1,
++ \\"date\\": 20171017,
++ \\"error\\": null,
++ \\"id\\": \\"id36\\",
++ \\"imported_id\\": \\"622f7b61-a6be-4ce5-bd2f-50eb14c12f42\\",
++ \\"imported_payee\\": \\"Transaction 53\\",
++ \\"is_child\\": 0,
++ \\"is_parent\\": 0,
++ \\"notes\\": null,
++ \\"parent_id\\": null,
++ \\"payee\\": \\"id34\\",
++ \\"payee_name\\": \\"Transaction 53\\",
++ \\"reconciled\\": 0,
++ \\"schedule\\": null,
++ \\"sort_order\\": 123456789,
++ \\"starting_balance_flag\\": 0,
++ \\"tombstone\\": 0,
++ \\"transfer_id\\": null,
++ },
++ Object {
++ \\"account\\": \\"one\\",
++ \\"amount\\": -2947,
\\"category\\": null,
\\"cleared\\": 1,
- \\"date\\": 20171015,
@@ -394,17 +433,18 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- \\"id\\": \\"id18\\",
- \\"imported_id\\": \\"5629ec0c-e559-49f4-9105-91d7b8b8738a\\",
- \\"imported_payee\\": \\"Transaction 90\\",
-+ \\"id\\": \\"id36\\",
-+ \\"imported_id\\": \\"622f7b61-a6be-4ce5-bd2f-50eb14c12f42\\",
-+ \\"imported_payee\\": \\"Transaction 53\\",
++ \\"id\\": \\"one\\",
++ \\"imported_id\\": \\"3591ad03-b705-42e0-945d-402a70371c49\\",
++ \\"imported_payee\\": \\"foo\\",
\\"is_child\\": 0,
\\"is_parent\\": 0,
\\"notes\\": null,
\\"parent_id\\": null,
- \\"payee\\": \\"id5\\",
- \\"payee_name\\": \\"Transaction 90\\",
-+ \\"payee\\": \\"id34\\",
-+ \\"payee_name\\": \\"Transaction 53\\",
++ \\"payee\\": \\"id31\\",
++ \\"payee_name\\": \\"foo\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -423,17 +463,18 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- \\"id\\": \\"id22\\",
- \\"imported_id\\": \\"45a2ad98-acbc-4120-a856-dec0839fa73c\\",
- \\"imported_payee\\": \\"Transaction 54\\",
-+ \\"id\\": \\"one\\",
-+ \\"imported_id\\": \\"3591ad03-b705-42e0-945d-402a70371c49\\",
-+ \\"imported_payee\\": \\"foo\\",
++ \\"id\\": \\"two\\",
++ \\"imported_id\\": \\"01a3a594-a381-49d1-bcf8-331a3c410900\\",
++ \\"imported_payee\\": \\"bar\\",
\\"is_child\\": 0,
\\"is_parent\\": 0,
\\"notes\\": null,
\\"parent_id\\": null,
- \\"payee\\": \\"id9\\",
- \\"payee_name\\": \\"Transaction 54\\",
-+ \\"payee\\": \\"id31\\",
-+ \\"payee_name\\": \\"foo\\",
++ \\"payee\\": \\"id32\\",
++ \\"payee_name\\": \\"bar\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -443,28 +484,6 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
Object {
\\"account\\": \\"one\\",
- \\"amount\\": -1462,
-+ \\"amount\\": -2947,
-+ \\"category\\": null,
-+ \\"cleared\\": 1,
-+ \\"date\\": 20171017,
-+ \\"error\\": null,
-+ \\"id\\": \\"two\\",
-+ \\"imported_id\\": \\"01a3a594-a381-49d1-bcf8-331a3c410900\\",
-+ \\"imported_payee\\": \\"bar\\",
-+ \\"is_child\\": 0,
-+ \\"is_parent\\": 0,
-+ \\"notes\\": null,
-+ \\"parent_id\\": null,
-+ \\"payee\\": \\"id32\\",
-+ \\"payee_name\\": \\"bar\\",
-+ \\"schedule\\": null,
-+ \\"sort_order\\": 123456789,
-+ \\"starting_balance_flag\\": 0,
-+ \\"tombstone\\": 0,
-+ \\"transfer_id\\": null,
-+ },
-+ Object {
-+ \\"account\\": \\"one\\",
+ \\"amount\\": -2407,
+ \\"category\\": null,
+ \\"cleared\\": 1,
@@ -479,6 +498,7 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id33\\",
+ \\"payee_name\\": \\"Transaction 32\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -506,6 +526,7 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- \\"payee_name\\": \\"Transaction 79\\",
+ \\"payee\\": \\"id5\\",
+ \\"payee_name\\": \\"Transaction 90\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -534,6 +555,7 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- \\"payee_name\\": \\"foo\\",
+ \\"payee\\": \\"id9\\",
+ \\"payee_name\\": \\"Transaction 54\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -562,11 +584,11 @@ exports[`Account sync import never matches existing with financial ids 3`] = `
- \\"payee_name\\": \\"bar\\",
+ \\"payee\\": \\"id7\\",
+ \\"payee_name\\": \\"Transaction 79\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
- \\"tombstone\\": 0,
- \\"transfer_id\\": null,"
+ \\"tombstone\\": 0,"
`;
exports[`Account sync import updates transfers when matched 1`] = `
@@ -587,6 +609,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Transaction 90",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -609,6 +632,7 @@ Array [
"parent_id": null,
"payee": "id9",
"payee_name": "Transaction 54",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -631,6 +655,7 @@ Array [
"parent_id": null,
"payee": "id7",
"payee_name": "Transaction 79",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -653,6 +678,7 @@ Array [
"parent_id": null,
"payee": "id6",
"payee_name": "Transaction 3",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -675,6 +701,7 @@ Array [
"parent_id": null,
"payee": "id8",
"payee_name": "Transaction 51",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -697,6 +724,7 @@ Array [
"parent_id": null,
"payee": "id10",
"payee_name": "Transaction 68",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -719,6 +747,7 @@ Array [
"parent_id": null,
"payee": "id3",
"payee_name": "Starting Balance",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 1,
@@ -741,6 +770,7 @@ Array [
"parent_id": null,
"payee": "id12",
"payee_name": "Transaction 64",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -763,6 +793,7 @@ Array [
"parent_id": null,
"payee": "id11",
"payee_name": "Transaction 11",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -785,6 +816,7 @@ Array [
"parent_id": null,
"payee": "id15",
"payee_name": "Transaction 48",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -807,6 +839,7 @@ Array [
"parent_id": null,
"payee": "id13",
"payee_name": "Transaction 107",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -829,6 +862,7 @@ Array [
"parent_id": null,
"payee": "id17",
"payee_name": "Transaction 56",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -851,6 +885,7 @@ Array [
"parent_id": null,
"payee": "id14",
"payee_name": "Transaction 28",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -873,6 +908,7 @@ Array [
"parent_id": null,
"payee": "id16",
"payee_name": "Transaction 114",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -887,7 +923,7 @@ exports[`Account sync import updates transfers when matched 2`] = `
- First value
+ Second value
-@@ -20,10 +20,32 @@
+@@ -21,10 +21,33 @@
\\"starting_balance_flag\\": 0,
\\"tombstone\\": 0,
\\"transfer_id\\": null,
@@ -908,6 +944,7 @@ exports[`Account sync import updates transfers when matched 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"transfer-one\\",
+ \\"payee_name\\": \\"\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -920,7 +957,7 @@ exports[`Account sync import updates transfers when matched 2`] = `
\\"category\\": null,
\\"cleared\\": 1,
\\"date\\": 20171015,
-@@ -62,10 +84,32 @@
+@@ -65,10 +88,33 @@
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -943,6 +980,7 @@ exports[`Account sync import updates transfers when matched 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"transfer-two\\",
+ \\"payee_name\\": \\"\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -973,6 +1011,7 @@ Array [
"parent_id": null,
"payee": "transfer-one",
"payee_name": "",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -995,6 +1034,7 @@ Array [
"parent_id": null,
"payee": "id35",
"payee_name": "Transaction 53",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1017,6 +1057,7 @@ Array [
"parent_id": null,
"payee": "transfer-two",
"payee_name": "",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1039,6 +1080,7 @@ Array [
"parent_id": null,
"payee": "id34",
"payee_name": "Transaction 78",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1061,6 +1103,7 @@ Array [
"parent_id": null,
"payee": "id32",
"payee_name": "Transaction 32",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1083,6 +1126,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Transaction 90",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1105,6 +1149,7 @@ Array [
"parent_id": null,
"payee": "id9",
"payee_name": "Transaction 54",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1127,6 +1172,7 @@ Array [
"parent_id": null,
"payee": "id7",
"payee_name": "Transaction 79",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1149,6 +1195,7 @@ Array [
"parent_id": null,
"payee": "id6",
"payee_name": "Transaction 3",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1171,6 +1218,7 @@ Array [
"parent_id": null,
"payee": "id8",
"payee_name": "Transaction 51",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1193,6 +1241,7 @@ Array [
"parent_id": null,
"payee": "id10",
"payee_name": "Transaction 68",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1215,6 +1264,7 @@ Array [
"parent_id": null,
"payee": "id3",
"payee_name": "Starting Balance",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 1,
@@ -1237,6 +1287,7 @@ Array [
"parent_id": null,
"payee": "id12",
"payee_name": "Transaction 64",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1259,6 +1310,7 @@ Array [
"parent_id": null,
"payee": "id11",
"payee_name": "Transaction 11",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1281,6 +1333,7 @@ Array [
"parent_id": null,
"payee": "id15",
"payee_name": "Transaction 48",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1303,6 +1356,7 @@ Array [
"parent_id": null,
"payee": "id13",
"payee_name": "Transaction 107",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1325,6 +1379,7 @@ Array [
"parent_id": null,
"payee": "id17",
"payee_name": "Transaction 56",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1347,6 +1402,7 @@ Array [
"parent_id": null,
"payee": "id14",
"payee_name": "Transaction 28",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1369,6 +1425,7 @@ Array [
"parent_id": null,
"payee": "id16",
"payee_name": "Transaction 114",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1396,6 +1453,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Transaction 90",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1418,6 +1476,7 @@ Array [
"parent_id": null,
"payee": "id9",
"payee_name": "Transaction 54",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1440,6 +1499,7 @@ Array [
"parent_id": null,
"payee": "id7",
"payee_name": "Transaction 79",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1462,6 +1522,7 @@ Array [
"parent_id": null,
"payee": "id6",
"payee_name": "Transaction 3",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1484,6 +1545,7 @@ Array [
"parent_id": null,
"payee": "id8",
"payee_name": "Transaction 51",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1506,6 +1568,7 @@ Array [
"parent_id": null,
"payee": "id10",
"payee_name": "Transaction 68",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1528,6 +1591,7 @@ Array [
"parent_id": null,
"payee": "id3",
"payee_name": "Starting Balance",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 1,
@@ -1550,6 +1614,7 @@ Array [
"parent_id": null,
"payee": "id12",
"payee_name": "Transaction 64",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1572,6 +1637,7 @@ Array [
"parent_id": null,
"payee": "id11",
"payee_name": "Transaction 11",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1594,6 +1660,7 @@ Array [
"parent_id": null,
"payee": "id15",
"payee_name": "Transaction 48",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1616,6 +1683,7 @@ Array [
"parent_id": null,
"payee": "id13",
"payee_name": "Transaction 107",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1638,6 +1706,7 @@ Array [
"parent_id": null,
"payee": "id17",
"payee_name": "Transaction 56",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1660,6 +1729,7 @@ Array [
"parent_id": null,
"payee": "id14",
"payee_name": "Transaction 28",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1682,6 +1752,7 @@ Array [
"parent_id": null,
"payee": "id16",
"payee_name": "Transaction 114",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1709,6 +1780,7 @@ Array [
"parent_id": null,
"payee": "id40",
"payee_name": "Transaction 118",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1731,6 +1803,7 @@ Array [
"parent_id": null,
"payee": "id33",
"payee_name": "Transaction 53",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1753,6 +1826,7 @@ Array [
"parent_id": null,
"payee": "id31",
"payee_name": "Transaction 13",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1775,6 +1849,7 @@ Array [
"parent_id": null,
"payee": "id36",
"payee_name": "Transaction 96",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1797,6 +1872,7 @@ Array [
"parent_id": null,
"payee": "id37",
"payee_name": "Transaction Bazillion",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1819,6 +1895,7 @@ Array [
"parent_id": null,
"payee": "id41",
"payee_name": "Transaction 89",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1841,6 +1918,7 @@ Array [
"parent_id": null,
"payee": "id39",
"payee_name": "Transaction 65",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1863,6 +1941,7 @@ Array [
"parent_id": null,
"payee": "id32",
"payee_name": "Transaction 78",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1885,6 +1964,7 @@ Array [
"parent_id": null,
"payee": "id38",
"payee_name": "Transaction 49",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1907,6 +1987,7 @@ Array [
"parent_id": null,
"payee": "id35",
"payee_name": "Transaction 100",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1929,6 +2010,7 @@ Array [
"parent_id": null,
"payee": "id34",
"payee_name": "Transaction 115",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1951,6 +2033,7 @@ Array [
"parent_id": null,
"payee": "id45",
"payee_name": "Transaction 67",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1973,6 +2056,7 @@ Array [
"parent_id": null,
"payee": "id42",
"payee_name": "Transaction 32",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -1995,6 +2079,7 @@ Array [
"parent_id": null,
"payee": "id47",
"payee_name": "Transaction 20",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2017,6 +2102,7 @@ Array [
"parent_id": null,
"payee": "id46",
"payee_name": "Transaction 14",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2039,6 +2125,7 @@ Array [
"parent_id": null,
"payee": "id44",
"payee_name": "Transaction 6",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2061,6 +2148,7 @@ Array [
"parent_id": null,
"payee": "id43",
"payee_name": "Transaction 119",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2083,6 +2171,7 @@ Array [
"parent_id": null,
"payee": "id48",
"payee_name": "Transaction 21",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2105,6 +2194,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Transaction 90",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2127,6 +2217,7 @@ Array [
"parent_id": null,
"payee": "id9",
"payee_name": "Transaction 54",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2149,6 +2240,7 @@ Array [
"parent_id": null,
"payee": "id7",
"payee_name": "Transaction 79",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2171,6 +2263,7 @@ Array [
"parent_id": null,
"payee": "id6",
"payee_name": "Transaction 3",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2193,6 +2286,7 @@ Array [
"parent_id": null,
"payee": "id8",
"payee_name": "Transaction 51",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2215,6 +2309,7 @@ Array [
"parent_id": null,
"payee": "id10",
"payee_name": "Transaction 68",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2237,6 +2332,7 @@ Array [
"parent_id": null,
"payee": "id3",
"payee_name": "Starting Balance",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 1,
@@ -2259,6 +2355,7 @@ Array [
"parent_id": null,
"payee": "id12",
"payee_name": "Transaction 64",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2281,6 +2378,7 @@ Array [
"parent_id": null,
"payee": "id11",
"payee_name": "Transaction 11",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2303,6 +2401,7 @@ Array [
"parent_id": null,
"payee": "id15",
"payee_name": "Transaction 48",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2325,6 +2424,7 @@ Array [
"parent_id": null,
"payee": "id13",
"payee_name": "Transaction 107",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2347,6 +2447,7 @@ Array [
"parent_id": null,
"payee": "id17",
"payee_name": "Transaction 56",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2369,6 +2470,7 @@ Array [
"parent_id": null,
"payee": "id14",
"payee_name": "Transaction 28",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2391,6 +2493,7 @@ Array [
"parent_id": null,
"payee": "id16",
"payee_name": "Transaction 114",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2418,6 +2521,7 @@ Array [
"parent_id": null,
"payee": null,
"payee_name": null,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -2440,6 +2544,7 @@ Array [
"parent_id": null,
"payee": null,
"payee_name": null,
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
diff --git a/packages/loot-core/src/server/accounts/__snapshots__/transfer.test.ts.snap b/packages/loot-core/src/server/accounts/__snapshots__/transfer.test.ts.snap
index d84f703ecea..c9b6f89f830 100644
--- a/packages/loot-core/src/server/accounts/__snapshots__/transfer.test.ts.snap
+++ b/packages/loot-core/src/server/accounts/__snapshots__/transfer.test.ts.snap
@@ -18,6 +18,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Non-transfer",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -32,7 +33,7 @@ exports[`Transfer transfers are properly de-categorized 2`] = `
- First value
+ Second value
-@@ -9,16 +9,38 @@
+@@ -9,17 +9,40 @@
\\"id\\": \\"id6\\",
\\"imported_id\\": null,
\\"imported_payee\\": null,
@@ -40,16 +41,14 @@ exports[`Transfer transfers are properly de-categorized 2`] = `
\\"is_parent\\": 0,
- \\"notes\\": null,
+ \\"notes\\": \\"hi\\",
- \\"parent_id\\": null,
-- \\"payee\\": \\"id5\\",
-- \\"payee_name\\": \\"Non-transfer\\",
++ \\"parent_id\\": null,
+ \\"payee\\": \\"id4\\",
+ \\"payee_name\\": \\"\\",
- \\"schedule\\": null,
- \\"sort_order\\": 123456789,
- \\"starting_balance_flag\\": 0,
- \\"tombstone\\": 0,
-- \\"transfer_id\\": null,
++ \\"reconciled\\": 0,
++ \\"schedule\\": null,
++ \\"sort_order\\": 123456789,
++ \\"starting_balance_flag\\": 0,
++ \\"tombstone\\": 0,
+ \\"transfer_id\\": \\"id7\\",
+ },
+ Object {
@@ -65,13 +64,17 @@ exports[`Transfer transfers are properly de-categorized 2`] = `
+ \\"is_child\\": 0,
+ \\"is_parent\\": 0,
+ \\"notes\\": \\"hi\\",
-+ \\"parent_id\\": null,
+ \\"parent_id\\": null,
+- \\"payee\\": \\"id5\\",
+- \\"payee_name\\": \\"Non-transfer\\",
+ \\"payee\\": \\"id2\\",
+ \\"payee_name\\": \\"\\",
-+ \\"schedule\\": null,
-+ \\"sort_order\\": 123456789,
-+ \\"starting_balance_flag\\": 0,
-+ \\"tombstone\\": 0,
+ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
+ \\"tombstone\\": 0,
+- \\"transfer_id\\": null,
+ \\"transfer_id\\": \\"id6\\",
},
]"
@@ -82,7 +85,7 @@ exports[`Transfer transfers are properly de-categorized 3`] = `
- First value
+ Second value
-@@ -1,30 +1,30 @@
+@@ -1,31 +1,31 @@
Array [
Object {
\\"account\\": \\"one\\",
@@ -102,6 +105,7 @@ exports[`Transfer transfers are properly de-categorized 3`] = `
- \\"payee\\": \\"id4\\",
+ \\"payee\\": \\"id3\\",
\\"payee_name\\": \\"\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -136,6 +140,7 @@ Array [
"parent_id": null,
"payee": "id5",
"payee_name": "Non-transfer",
+ "reconciled": 0,
"schedule": null,
"sort_order": 123456789,
"starting_balance_flag": 0,
@@ -150,7 +155,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 2`] = `
- First value
+ Second value
-@@ -19,6 +19,50 @@
+@@ -20,6 +20,52 @@
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
\\"tombstone\\": 0,
@@ -172,6 +177,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id3\\",
+ \\"payee_name\\": \\"\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -194,6 +200,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 2`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id2\\",
+ \\"payee_name\\": \\"\\",
++ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
@@ -208,7 +215,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 3`] = `
- First value
+ Second value
-@@ -2,67 +2,67 @@
+@@ -2,70 +2,70 @@
Object {
\\"account\\": \\"one\\",
\\"amount\\": 5000,
@@ -230,6 +237,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 3`] = `
- \\"payee_name\\": \\"Non-transfer\\",
+ \\"payee\\": \\"id3\\",
+ \\"payee_name\\": \\"\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -260,6 +268,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 3`] = `
- \\"payee\\": \\"id3\\",
+ \\"payee\\": \\"id2\\",
\\"payee_name\\": \\"\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -289,6 +298,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 3`] = `
- \\"payee_name\\": \\"\\",
+ \\"payee\\": \\"id5\\",
+ \\"payee_name\\": \\"Non-transfer\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -304,7 +314,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 4`] = `
- First value
+ Second value
-@@ -11,20 +11,20 @@
+@@ -11,21 +11,21 @@
\\"imported_payee\\": null,
\\"is_child\\": 0,
\\"is_parent\\": 0,
@@ -313,6 +323,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 4`] = `
- \\"payee\\": \\"id3\\",
+ \\"payee\\": \\"id4\\",
\\"payee_name\\": \\"\\",
+ \\"reconciled\\": 0,
\\"schedule\\": null,
\\"sort_order\\": 123456789,
\\"starting_balance_flag\\": 0,
@@ -334,7 +345,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 5`] = `
- First value
+ Second value
-@@ -11,39 +11,17 @@
+@@ -11,41 +11,18 @@
\\"imported_payee\\": null,
\\"is_child\\": 0,
\\"is_parent\\": 0,
@@ -342,12 +353,11 @@ exports[`Transfer transfers are properly inserted/updated/deleted 5`] = `
\\"parent_id\\": null,
- \\"payee\\": \\"id4\\",
- \\"payee_name\\": \\"\\",
-+ \\"payee\\": \\"id9\\",
-+ \\"payee_name\\": \\"Not transferred anymore\\",
- \\"schedule\\": null,
- \\"sort_order\\": 123456789,
- \\"starting_balance_flag\\": 0,
- \\"tombstone\\": 0,
+- \\"reconciled\\": 0,
+- \\"schedule\\": null,
+- \\"sort_order\\": 123456789,
+- \\"starting_balance_flag\\": 0,
+- \\"tombstone\\": 0,
- \\"transfer_id\\": \\"id8\\",
- },
- Object {
@@ -366,10 +376,13 @@ exports[`Transfer transfers are properly inserted/updated/deleted 5`] = `
- \\"parent_id\\": null,
- \\"payee\\": \\"id2\\",
- \\"payee_name\\": \\"\\",
-- \\"schedule\\": null,
-- \\"sort_order\\": 123456789,
-- \\"starting_balance_flag\\": 0,
-- \\"tombstone\\": 0,
++ \\"payee\\": \\"id9\\",
++ \\"payee_name\\": \\"Not transferred anymore\\",
+ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
+ \\"tombstone\\": 0,
- \\"transfer_id\\": \\"id7\\",
+ \\"transfer_id\\": null,
},
@@ -384,7 +397,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 6`] = `
- First value
+ Second value
-@@ -11,17 +11,39 @@
+@@ -11,18 +11,41 @@
\\"imported_payee\\": null,
\\"is_child\\": 0,
\\"is_parent\\": 0,
@@ -394,11 +407,11 @@ exports[`Transfer transfers are properly inserted/updated/deleted 6`] = `
- \\"payee_name\\": \\"Not transferred anymore\\",
+ \\"payee\\": \\"id3\\",
+ \\"payee_name\\": \\"\\",
- \\"schedule\\": null,
- \\"sort_order\\": 123456789,
- \\"starting_balance_flag\\": 0,
- \\"tombstone\\": 0,
-- \\"transfer_id\\": null,
++ \\"reconciled\\": 0,
++ \\"schedule\\": null,
++ \\"sort_order\\": 123456789,
++ \\"starting_balance_flag\\": 0,
++ \\"tombstone\\": 0,
+ \\"transfer_id\\": \\"id10\\",
+ },
+ Object {
@@ -417,10 +430,12 @@ exports[`Transfer transfers are properly inserted/updated/deleted 6`] = `
+ \\"parent_id\\": null,
+ \\"payee\\": \\"id2\\",
+ \\"payee_name\\": \\"\\",
-+ \\"schedule\\": null,
-+ \\"sort_order\\": 123456789,
-+ \\"starting_balance_flag\\": 0,
-+ \\"tombstone\\": 0,
+ \\"reconciled\\": 0,
+ \\"schedule\\": null,
+ \\"sort_order\\": 123456789,
+ \\"starting_balance_flag\\": 0,
+ \\"tombstone\\": 0,
+- \\"transfer_id\\": null,
+ \\"transfer_id\\": \\"id7\\",
},
Object {
@@ -434,7 +449,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 7`] = `
- First value
+ Second value
-@@ -2,54 +2,10 @@
+@@ -2,56 +2,10 @@
Object {
\\"account\\": \\"one\\",
\\"amount\\": 5000,
@@ -451,6 +466,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 7`] = `
- \\"parent_id\\": null,
- \\"payee\\": \\"id3\\",
- \\"payee_name\\": \\"\\",
+- \\"reconciled\\": 0,
- \\"schedule\\": null,
- \\"sort_order\\": 123456789,
- \\"starting_balance_flag\\": 0,
@@ -473,6 +489,7 @@ exports[`Transfer transfers are properly inserted/updated/deleted 7`] = `
- \\"parent_id\\": null,
- \\"payee\\": \\"id2\\",
- \\"payee_name\\": \\"\\",
+- \\"reconciled\\": 0,
- \\"schedule\\": null,
- \\"sort_order\\": 123456789,
- \\"starting_balance_flag\\": 0,
diff --git a/packages/loot-core/src/server/aql/schema/index.ts b/packages/loot-core/src/server/aql/schema/index.ts
index 857cbfa16ac..873e3594f32 100644
--- a/packages/loot-core/src/server/aql/schema/index.ts
+++ b/packages/loot-core/src/server/aql/schema/index.ts
@@ -47,6 +47,7 @@ export const schema = {
transfer_id: f('id'),
sort_order: f('float', { default: () => Date.now() }),
cleared: f('boolean', { default: true }),
+ reconciled: f('boolean', { default: false }),
tombstone: f('boolean'),
schedule: f('id', { ref: 'schedules' }),
// subtransactions is a special field added if the table has the
diff --git a/packages/loot-core/src/types/models/transaction.d.ts b/packages/loot-core/src/types/models/transaction.d.ts
index 73103e40cbf..3687db05082 100644
--- a/packages/loot-core/src/types/models/transaction.d.ts
+++ b/packages/loot-core/src/types/models/transaction.d.ts
@@ -20,6 +20,7 @@ export interface TransactionEntity {
transfer_id?: string;
sort_order?: number;
cleared?: boolean;
+ reconciled?: boolean;
tombstone?: boolean;
schedule?: ScheduleEntity;
subtransactions?: TransactionEntity[];
diff --git a/upcoming-release-notes/1789.md b/upcoming-release-notes/1789.md
new file mode 100644
index 00000000000..83a700e6778
--- /dev/null
+++ b/upcoming-release-notes/1789.md
@@ -0,0 +1,6 @@
+---
+category: Features
+authors: [zachwhelchel]
+---
+
+Lock transactions after reconcilliation.