Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuiantw1212 committed May 9, 2024
1 parent cf67dc5 commit 68d1e07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/calculator/retirement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,8 @@ const unableToDraw = computed(() => {
lifeExpectancy,
annualExpense,
} = retirement.value
const monthlyAnnuity = retirement.value.insurance.monthlyAnnuity || retirement.value.pension.monthlyAnnuity
const noBefore = !monthlyContribution || !irrOverDecade || !yearToRetirement
const noAfter = !lifeExpectancy || !annualExpense || !monthlyAnnuity
const noAfter = !lifeExpectancy || !annualExpense
return noBefore || noAfter
})
// methods
Expand Down Expand Up @@ -392,7 +391,9 @@ function calculateCivilServantRetirement() {
const inflationRate = 1 + props.config.inflationRate / 100
const pvModifier = Math.pow(inflationRate, age - 60)
retirement.value.annuitySum = Math.floor(monthlyAnnuity * 12 * Number(lifeExpectancy) / pvModifier)
retirement.value.insurance.annuity = 0 // 避免勞保資料干擾
// 避免勞保資料干擾
retirement.value.insurance.annuity = 0
retirement.value.pension.tax = 0
}
function calculateExpenseQuartileMarks() {
props.config.retirementQuartile.forEach((item, index) => {
Expand Down

0 comments on commit 68d1e07

Please sign in to comment.