Skip to content

Instantly share code, notes, and snippets.

@ClimenteA
Last active September 6, 2024 10:19
Show Gist options
  • Save ClimenteA/a11ce736af219c594adf0926b978e26f to your computer and use it in GitHub Desktop.
Save ClimenteA/a11ce736af219c594adf0926b978e26f to your computer and use it in GitHub Desktop.
PFASimplu calcul taxe impozite
def calcul_taxe_impozite_local(venit_net: float, anul: int):
"""
versiune = "2.0.0"
"""
minim_brute_an_val = {
2020: 2230,
2021: 2300,
2022: 2550,
2023: 3000,
2024: 3300,
2025: 3700,
}
if anul in minim_brute_an_val:
salariuMinimBrut = minim_brute_an_val[anul]
else:
salariuMinimBrut = minim_brute_an_val[max(list(minim_brute_an_val.keys()))]
CAS = 0.0
CASS = 0.0
impozitPeVenit = 0.0
total = 0.0
ProcentCAS = 25 # Pensie
ProcentCASS = 10 # Sanatate
ProcentImpozitVenit = 10 # Impozit pe venit
plafon6 = salariuMinimBrut * 6
plafon12 = salariuMinimBrut * 12
plafon24 = salariuMinimBrut * 24
plafon60 = salariuMinimBrut * 60
if anul <= 2022:
if venit_net > plafon12:
CAS = ProcentCAS * plafon12 / 100
CASS = ProcentCASS * plafon12 / 100
impozitPeVenit = ProcentImpozitVenit * (venit_net - CAS) / 100
if anul == 2023:
if venit_net > plafon6:
CASS = ProcentCASS * plafon6 / 100
if venit_net > plafon12 and venit_net <= plafon24:
CAS = ProcentCAS * plafon12 / 100
CASS = ProcentCASS * plafon12 / 100
if venit_net > plafon24:
CAS = ProcentCAS * plafon24 / 100
CASS = ProcentCASS * plafon24 / 100
impozitPeVenit = ProcentImpozitVenit * (venit_net - CAS) / 100
if anul >= 2024:
if venit_net <= plafon6:
CASS = ProcentCASS * plafon6 / 100
if venit_net > plafon12 and venit_net <= plafon24:
CAS = ProcentCAS * plafon12 / 100
CASS = ProcentCASS * plafon12 / 100
if venit_net > plafon24:
CAS = ProcentCAS * plafon24 / 100
CASS = ProcentCASS * plafon24 / 100
if venit_net > plafon60:
CASS = ProcentCASS * plafon60 / 100
impozitPeVenit = ProcentImpozitVenit * (venit_net - CAS - CASS) / 100
if venit_net <= 0:
impozitPeVenit = 0
total = CAS + CASS + impozitPeVenit
return {
"cas_pensie": round(CAS, 2),
"cass_sanatate": round(CASS, 2),
"impozit_pe_venit": round(impozitPeVenit, 2),
"total_taxe_impozite": round(total, 2),
}
@ClimenteA
Copy link
Author

ClimenteA commented Aug 21, 2024

Text raw: https://gist.github.com/ClimenteA/a11ce736af219c594adf0926b978e26f/raw

Permanent gist link: La fel ca linkul din address bar cu prefix /raw:
https://gist.github.com/username/gistid/raw

Dureaza un pic pana cache din github se invalideaza (5-10 minute).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment