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:
@@ -287,8 +287,9 @@ const loanAccounts = computed(() =>
|
||||
const filteredSchedule = computed(() => {
|
||||
if (!loanDetail.value) return []
|
||||
if (showPastPayments.value) return loanDetail.value.amortizationSchedule
|
||||
const today = new Date().toISOString().split('T')[0]
|
||||
return loanDetail.value.amortizationSchedule.filter(e => e.paymentDate.split('T')[0] >= today)
|
||||
const now = new Date()
|
||||
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(() => {
|
||||
|
||||
Reference in New Issue
Block a user