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(() => {
|
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(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user