From 0b22977d12118a82204491be403fed3c49c4bfd7 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Sun, 10 Apr 2016 09:23:24 -0300 Subject: [PATCH] =?utf8?q?Suporta=20doa=C3=A7=C3=B5es.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Computa doações e gera linha de doações. No entanto, ainda não imprime nas linhas de totais. --- lib/gera.c | 6 ++++++ lib/isento.c | 5 +++++ 2 files changed, 11 insertions(+) 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); -- 2.20.1