feat: show liability account credit balances as deposits

This commit is contained in:
陈煜 committed 2026-10-03 12:06:36 +08:00
1 parent e77650f0c0
commit 20643b366f
19 files changed
+385 -68

No files matched your search

+2 -5
View File
@@ -161,11 +161,8 @@ export function validateBackup(raw: unknown) {
if (!b.currencies.includes(p.currency)) throw new BadRequestException('币种清单不完整');
}
for (const p of b.positions)
if (
(p.kind !== 'account' || p.side !== 'asset') &&
p.revisions.some((r) => r.amount.startsWith('-'))
)
throw new BadRequestException('仅资产账户支持负余额');
if (p.kind !== 'account' && p.revisions.some((r) => r.amount.startsWith('-')))
throw new BadRequestException('仅账户支持负余额');
const planIds = new Set<string>();
for (const plan of b.schedules || []) {
const source = ids.get(plan.sourceId),