feat(kakeibo): dört harcama grubu, banka maliyeti ve geri alınabilir migration

- shared/kakeibo: grup devralma, banka maliyeti, kayıt bazında grup, grup özeti (saf, testli)
- kategori ve işlem/kalem modellerine kakeiboGroup ve bankCost; form şemaları
- migration 016 varsayılanları doldurur; npm run migrate -- --down <ad> ile geri alma
- Kakeibo rapor servisi: tutarlar bütçeyle aynı kaynaktan, grup değiştirmeler taşınır

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 04:51:35 +03:00
parent 18c892bdcd
commit afc6da1606
17 changed files with 831 additions and 13 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ import { categoryBreakdown, savingsRate, sharePct, type CategoryBreakdown } from
*/
const DAY_MS = 86_400_000;
const ORPHAN = "__none__";
export const ORPHAN = "__none__";
export type Base = { ctx: Ctx; s: Settings; today: string; currentMonth: string };
@@ -39,7 +39,7 @@ export async function base(userId: string, householdId: string): Promise<Base |
}
/** Kategori bazında gerçekleşen gider (kendi tutarı); kategorisiz/bilinmeyen tek satırda. */
async function actualByCategory(b: Base, month: string) {
export async function actualByCategory(b: Base, month: string) {
const { from, to } = budgetPeriod(month, b.s.startDay);
const amounts = await expenseAmounts(b.ctx, b.s, from, to);
const out = new Map<string, number>();