feat: support credit transfers and precious metal valuations

This commit is contained in:
陈煜 committed 2026-10-03 21:10:26 +08:00
1 parent 425b45c91a
commit 518aea1e59
39 files changed
+1572 -77

No files matched your search

+6 -2
View File
@@ -47,7 +47,11 @@ export function SchedulePanel({
[source, setSource] = useState(''),
[target, setTarget] = useState(''),
[amount, setAmount] = useState('');
const sourceId = accounts.some((p) => p.id === source) ? source : accounts[0]?.id || '';
const sourceAccounts =
operation === 'expense' ? accounts.filter((p) => p.side === 'asset') : accounts;
const sourceId = sourceAccounts.some((p) => p.id === source)
? source
: sourceAccounts[0]?.id || '';
const sourceAccount = accounts.find((p) => p.id === sourceId),
targetAccount = accounts.find((p) => p.id === target);
const same = sourceAccount?.currency === targetAccount?.currency;
@@ -173,7 +177,7 @@ export function SchedulePanel({
{tr('付款账户')}
<AccountPicker
name="sourceId"
accounts={accounts}
accounts={sourceAccounts}
value={sourceId}
onChange={(id) => {
setSource(id);