Private
Public Access
1
0

Show current month's payment in amortization schedule

Filter from start of current month instead of today so the current
month's entry is always visible even mid-month.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-14 22:35:53 -05:00
parent 0392fc4690
commit e2b69b41f4
+3 -2
View File
@@ -287,8 +287,9 @@ const loanAccounts = computed(() =>
const filteredSchedule = computed(() => { const filteredSchedule = computed(() => {
if (!loanDetail.value) return [] if (!loanDetail.value) return []
if (showPastPayments.value) return loanDetail.value.amortizationSchedule if (showPastPayments.value) return loanDetail.value.amortizationSchedule
const today = new Date().toISOString().split('T')[0] const now = new Date()
return loanDetail.value.amortizationSchedule.filter(e => e.paymentDate.split('T')[0] >= today) const monthStart = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-01`
return loanDetail.value.amortizationSchedule.filter(e => e.paymentDate.split('T')[0] >= monthStart)
}) })
const payoffAmount = computed(() => { const payoffAmount = computed(() => {