Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added solidarity fee for high income (80k+) #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pedrosimao
Copy link
Contributor

@pedrosimao
Copy link
Contributor Author

pedrosimao commented Jun 17, 2024

solves issue #12

Copy link
Owner

@franciscobmacedo franciscobmacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but the math is not right I think. And some minor requests!

this.taxIncomeNormal * this.taxRank.normalTax;
(this.taxIncomeAvg * this.taxRankAvg.averageTax) +
(this.taxIncomeNormal * this.taxRank.normalTax) +
+ this.solidarityFeeTotal;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just add the solidarity fee after the if else? just to be more DRY

solidarityFeeTotal() {
if (this.taxableIncome < 80000) {
return 0
} else if (this.taxableIncome >= 80000 && this.taxableIncome < 250000){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not taking into account the number 2) of this page:

  • O quantitativo da parte do rendimento coletável que exceda (euro) 80 000, quando superior a (euro) 250 000, é dividido em duas partes: uma, igual a (euro) 170 000, à qual se aplica a taxa de 2,5%; outra, igual ao rendimento coletável que exceda (euro) 250 000, à qual se aplica a taxa de 5%. (Redacção da Lei n.º 66-B/2012 - 31/12)

For example, for a 300k taxable income (I wish!) :

  • part of the salary bellow 80k -> don't apply anything
  • part of the salary between 80k and 250k (=170k) -> apply 2.5%
  • part of the salart above 250k (=50k) -> apply 5%

so in this case the solidarityFeeTotal would be 170k0.025 + 50k0.05.

The same logic applies for a taxable income of 100k I think:

  • part of the salary bellow 80k -> don't apply anything
  • part of the salary between 80k and 100k (=20k) -> apply 2.5%

the solidarityFeeTotal would just be 20k*0.05. However, I'm not sure about this last one, but I think it's what makes sense, since the taxes are always progressive, i.e., they are applied by bracket, and not to the entire income. For example, if your taxable income is 81k a year, it doesn't make sense to pay 2.5% over the entire value - you would probably save money by asking for a decrease in your salary, just to avoid this fee :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, I completely missed this.
I am glad you read the entire text (which I have to admit I didn't). I just assumed it was 2.5% and 5% over everything.
I will do the changes this weekend when I have some free time!

@@ -27,6 +27,8 @@ interface TaxesState {
colors: Colors;
rnh: boolean;
rnhTax: number;
solidarityFee1: number;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you be a bit more explicit and name it solidarityFeeAbove80k and solidarityFeeAbove250k - or something like that?

@@ -230,17 +234,29 @@ const useTaxesStore = defineStore({
return this.taxableIncome - this.taxIncomeAvg;
},

solidarityFeeTotal() {
if (this.taxableIncome < 80000) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just add a comment here with the link you provided? Helpful for future reference!

@franciscobmacedo
Copy link
Owner

Feel free to ignore some requests, I'm happy to tweak it myself after if you don't have the time. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants