Não totaliza rendimentos de dependentes como de titular.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sun, 10 Apr 2016 15:33:54 +0000 (12:33 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sun, 10 Apr 2016 15:33:54 +0000 (12:33 -0300)
Os rendimentos de dependentes são adicionados a novos totais de
rendimentos de dependentes. Os rendimentos de titular excluem tais
rendimentos.

lib/isento.c

index 4e7540e..af3700e 100644 (file)
@@ -34,22 +34,38 @@ static int isento_totais_update(struct declaracao *dec, struct isento *isento)
        case 82:
                r = totais_add(dec, "DOACOES", isento->valor);
                r += totais_add(dec, "ISENTOS", isento->valor);
-               r += totais_add(dec, "ISENTOSTIT", isento->valor);
+               if (isento->dependente) {
+                       r += totais_add(dec, "ISENTOSDEP", isento->valor);
+               } else {
+                       r += totais_add(dec, "ISENTOSTIT", isento->valor);
+               }
                break;
        case 96:
                r = totais_add(dec, "PLR", isento->valor);
                r += totais_add(dec, "EXCLUSIVOS", isento->valor);
-               r += totais_add(dec, "EXCLUSIVOSTIT", isento->valor);
+               if (isento->dependente) {
+                       r += totais_add(dec, "EXCLUSIVOSDEP", isento->valor);
+               } else {
+                       r += totais_add(dec, "EXCLUSIVOSTIT", isento->valor);
+               }
                break;
        case 98:
                r = totais_add(dec, "POUPANCA", isento->valor);
                r += totais_add(dec, "ISENTOS", isento->valor);
-               r += totais_add(dec, "ISENTOSTIT", isento->valor);
+               if (isento->dependente) {
+                       r += totais_add(dec, "ISENTOSDEP", isento->valor);
+               } else {
+                       r += totais_add(dec, "ISENTOSTIT", isento->valor);
+               }
                break;
        case 99:
                r = totais_add(dec, "APLICACOES", isento->valor);
                r += totais_add(dec, "EXCLUSIVOS", isento->valor);
-               r += totais_add(dec, "EXCLUSIVOSTIT", isento->valor);
+               if (isento->dependente) {
+                       r += totais_add(dec, "EXCLUSIVOSDEP", isento->valor);
+               } else {
+                       r += totais_add(dec, "EXCLUSIVOSTIT", isento->valor);
+               }
                break;
        }
        return r;