QAZIMAAZARSHAD / Income-Tax-Calculator

Income Tax Calculation System For A Salaried Person
https://github.com/QAZIMAAZARSHAD/Income-Tax-Calcultor/blob/main/README.md
MIT License
36 stars 57 forks source link

Wrong result when taxable income becomes too large #14

Closed ShreyaKanodia closed 3 years ago

ShreyaKanodia commented 3 years ago

ISSUE #10

fixes # 2

Describe the changes you've made

In old tax function , after n==4 , now there is no need to break salary into divisions of 2,50,000 so applied a tax of 30% on total salary left at n==4 and then applied break in case of new tax function, after n==6,now there is no need to break salary into divisions of 2,50,000 so applied a tax of 30% on total salary left at n==6 and then applied break.

in previous code the bug was that if income became extra large, then n becomes greater than 6 and hence 'else' statement was executed and thus total was showing zero

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Additional context (OPTIONAL)

Add any other context or screenshots about the feature request here.

Test plan (OPTIONAL)

A good test plan should give instructions that someone else can easily follow. How someone can test your code?

Checklist

QAZIMAAZARSHAD commented 3 years ago

@ShreyaKanodia why you closed this PR?

QAZIMAAZARSHAD commented 3 years ago

@ShreyaKanodia while making PR you have to always mention the issue number in the PR description.

Edit your PR description with related issue number.

ShreyaKanodia commented 3 years ago

@QAZIMAAZARSHAD should I close the pull request and then reopen it after 12'o clock today midnight for LGMSoC or it will be considered now only

QAZIMAAZARSHAD commented 3 years ago

@QAZIMAAZARSHAD should I close the pull request and then reopen it after 12'o clock today midnight for LGMSoC or it will be considered now only

Leave it, I will merge your PR tomorrow. Points depend on the day the PR is merged not on the day it is made.

ShreyaKanodia commented 3 years ago

@QAZIMAAZARSHAD Ok thanks a lot, Are there any other changes required ?

QAZIMAAZARSHAD commented 3 years ago

@QAZIMAAZARSHAD Ok thanks a lot, Are there any other changes required?

If you believe there is any scope of improvement then sure, go ahead.