Skip to content

Commit 2bacec4

Browse files
committed
fix(irpf): support 2026 monthly deduction rules
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c85f455 commit 2bacec4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Service/IRPF.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getFaixa(float $base): array
103103
public function calculaBase(float $bruto, float $inss, int $dependentes): float
104104
{
105105
$this->rendimentoTributavel = $bruto;
106-
if ($this->anoBase >= 2023 && $this->mes >= 5) {
106+
if ($this->usaDeducaoFavoravel()) {
107107
$deducao = $this->calculaDeducaoFavoravel($inss, $dependentes);
108108
} else {
109109
$this->tipoDeducao = 'tradicional';
@@ -113,7 +113,16 @@ public function calculaBase(float $bruto, float $inss, int $dependentes): float
113113
if ($base < 0) {
114114
$base = 0;
115115
}
116-
return $base;
116+
return round($base, 3);
117+
}
118+
119+
private function usaDeducaoFavoravel(): bool
120+
{
121+
if ($this->anoBase > 2023) {
122+
return true;
123+
}
124+
125+
return $this->anoBase === 2023 && $this->mes >= 5;
117126
}
118127

119128
private function calculaDeducaoFavoravel(float $inss, int $dependentes): float

0 commit comments

Comments
 (0)