From: Thadeu Lima de Souza Cascardo Date: Sun, 10 Apr 2016 12:23:24 +0000 (-0300) Subject: Suporta doações. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fdeclara.git;a=commitdiff_plain;h=0b22977d12118a82204491be403fed3c49c4bfd7 Suporta doações. Computa doações e gera linha de doações. No entanto, ainda não imprime nas linhas de totais. --- diff --git a/lib/gera.c b/lib/gera.c index dc5ca7e..56950ed 100644 --- a/lib/gera.c +++ b/lib/gera.c @@ -684,6 +684,11 @@ static void gera_isento(struct declaracao *dec, FILE *f, int codigo) fprintf(f, "%-11.11s", dec->cpf); } +static void gera_doacao(struct declaracao *dec, FILE *f) +{ + gera_isento(dec, f, 82); +} + static void gera_plr(struct declaracao *dec, FILE *f) { gera_isento(dec, f, 96); @@ -888,6 +893,7 @@ static int gera(struct declaracao *dec, char *filename) break; \ W(fn); \ } + IW(gera_doacao, 82); IW(gera_plr, 96); IW(gera_poupanca, 98); IW(gera_aplicacoes, 99); diff --git a/lib/isento.c b/lib/isento.c index 75de486..f078804 100644 --- a/lib/isento.c +++ b/lib/isento.c @@ -31,6 +31,11 @@ static int isento_totais_update(struct declaracao *dec, struct isento *isento) { int r = 0; switch (isento->codigo) { + case 82: + r = totais_add(dec, "DOACOES", isento->valor); + r += totais_add(dec, "ISENTOS", isento->valor); + r += totais_add(dec, "ISENTOSTIT", isento->valor); + break; case 96: r = totais_add(dec, "PLR", isento->valor); r += totais_add(dec, "EXCLUSIVOS", isento->valor);