Adiciona valores para cálculo referente a exercício 2017.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sat, 14 Jan 2017 12:24:26 +0000 (10:24 -0200)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sat, 14 Jan 2017 17:13:16 +0000 (15:13 -0200)
Os valores foram obtidos a partir de [1], com exceção do valor de
obrigatoriedade, que foi obtido a partir da Instrução Normativa 1671 de
2016.

O comando "gera" ainda não suporta o ano de 2017.

[1] http://idg.receita.fazenda.gov.br/acesso-rapido/tributos/irpf-imposto-de-renda-pessoa-fisica

help/ano.txt
lib/ano.h
lib/calcula.c

index 618c93d..be4f4cb 100644 (file)
@@ -9,5 +9,5 @@ em 2016, deve executar o seguinte comando.
 
 ano 2016
 
-Os anos suportados no momento são 2015 e 2016. Se outro ano for
+Os anos suportados no momento são 2015, 2016 e 2017. Se outro ano for
 utilizado, o comando calcula retornará um erro.
index 65ac852..a46fd9c 100644 (file)
--- a/lib/ano.h
+++ b/lib/ano.h
@@ -20,7 +20,7 @@
 #define _ANO_H
 
 #define PRIMEIRO_ANO 2015
-#define ULTIMO_ANO 2016
+#define ULTIMO_ANO 2017
 #define MAX_ANOS (ULTIMO_ANO + 1)
 #define ANO(ano) (ano - PRIMEIRO_ANO)
 #define ANO_VALIDO(ano) (ANO(ano) >= 0 && ANO(ano) < ANO(MAX_ANOS))
index 79a395c..47548b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2015-2016  Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
+ *  Copyright (C) 2015-2017  Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
 static const long long dependente[ANO(MAX_ANOS)] = {
        [ANO(2015)] = 215652,
        [ANO(2016)] = 227508,
+       [ANO(2017)] = 227508,
 };
 
 static const long long instrucao[ANO(MAX_ANOS)] = {
        [ANO(2015)] = 337583,
        [ANO(2016)] = 356150,
+       [ANO(2017)] = 356150,
 };
 
 long long deducao_dependente(struct declaracao *dec)
@@ -147,19 +149,31 @@ static struct taxtable table2016[] = {
        { 9999999999999LL, 0, 0, },
 };
 
+static struct taxtable table2017[] = {
+       {       0,    0,       0, },
+       { 2284777,  750,  171358, },
+       { 3391981, 1500,  425757, },
+       { 4501261, 2250,  763351, },
+       { 5597616, 2750, 1043232, },
+       { 9999999999999LL, 0, 0, },
+};
+
 static struct taxtable *table[ANO(MAX_ANOS)] = {
        [ANO(2015)] = table2015,
        [ANO(2016)] = table2016,
+       [ANO(2017)] = table2017,
 };
 
 static const long long simples[ANO(MAX_ANOS)] = {
        [ANO(2015)] = 1588089,
        [ANO(2016)] = 1675434,
+       [ANO(2017)] = 1675434,
 };
 
 static const long long obrigatoriedade[ANO(MAX_ANOS)] = {
        [ANO(2015)] = 2681655,
        [ANO(2016)] = 2812391,
+       [ANO(2017)] = 2855970, /* De acordo com IN 1671/2016 */
 };
 
 static long long imposto(struct taxtable *tt, long long tr, int verbose)