From 7cda36afa44aeb6fc90a46466bf19b2efabd9dc8 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Fri, 19 Apr 2019 10:13:39 -0300 Subject: [PATCH] =?utf8?q?N=C3=A3o=20gera=20linhas=20de=20rendimentos=20ex?= =?utf8?q?clusivos=20de=20total=20zero.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Quando não há um determinado rendimento exclusivo, seu total é zero, e não deve ser gerada uma linha para determinado tipo de rendimento exclusivo. --- lib/gera.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/gera.c b/lib/gera.c index a6aaa01..5b08064 100644 --- a/lib/gera.c +++ b/lib/gera.c @@ -593,10 +593,13 @@ static void gera_exclusivos(struct declaracao *dec, FILE *f) static void gera_exclusivos2(struct declaracao *dec, FILE *f, int codigo, char *nome) { + long long total = totais_get(dec, nome); + if (total == 0) + return; fprintf(f, "24"); fprintf(f, "%-11.11s", dec->cpf); fprintf(f, "%04d", codigo); - fprintf(f, "%013lld", totais_get(dec, nome)); /* TODO: retistuição imposto anos anteriores */ + fprintf(f, "%013lld", total); /* TODO: retistuição imposto anos anteriores */ } static void gera_24_decimoterceiro(struct declaracao *dec, FILE *f) -- 2.20.1