From cdf0b367d0d48286bccd4c873a3c2de4554b77d3 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Sun, 10 Apr 2016 12:33:54 -0300 Subject: [PATCH] =?utf8?q?N=C3=A3o=20totaliza=20rendimentos=20de=20depende?= =?utf8?q?ntes=20como=20de=20titular.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Os rendimentos de dependentes são adicionados a novos totais de rendimentos de dependentes. Os rendimentos de titular excluem tais rendimentos. --- lib/isento.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/isento.c b/lib/isento.c index 4e7540e..af3700e 100644 --- a/lib/isento.c +++ b/lib/isento.c @@ -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; -- 2.20.1