Gera outros totais de declaração simplificada.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sun, 2 Aug 2015 02:54:36 +0000 (23:54 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sun, 2 Aug 2015 02:54:36 +0000 (23:54 -0300)
Para a linha 18, clarifica alguns totais, gera outros utilizando o
dicionário de totais, e computa os rendimentos exclusivos do titular,
considerando o décimo terceiro salário.

gera.c
rendimento.c

diff --git a/gera.c b/gera.c
index ce8c432..bf11b39 100644 (file)
--- a/gera.c
+++ b/gera.c
@@ -255,27 +255,27 @@ static void gera_totais_simples(struct declaracao *dec, FILE *f)
        fprintf(f, "%013lld", dec->pagar); /* imposto pagar */
        fprintf(f, "%d", 0); /* TODO: quotas */
        fprintf(f, "%013lld", 0); /* TODO: valor quota */
-       fprintf(f, "%013lld", 0); /* TODO: rendimentos isentos */
-       fprintf(f, "%013lld", 0); /* TODO: rendimentos tributação exclusiva */
+       fprintf(f, "%013lld", totais_get(dec, "ISENTOS")); /* rendimentos isentos */
+       fprintf(f, "%013lld", totais_get(dec, "EXCLUSIVOS")); /* rendimentos tributação exclusiva */
        fprintf(f, "%013lld", 0); /* TODO: conjuge */
        fprintf(f, "%013lld", 0); /* TODO: rendimento PJ dependente */
        fprintf(f, "%013lld", 0); /* TODO: imposto retido dependente */
        fprintf(f, "%013lld", 0); /* TODO: imposto ganhos de capital */
-       fprintf(f, "%013lld", 0); /* TODO: rendimento tributável PJ titular */
+       fprintf(f, "%013lld", totais_get(dec, "RENDPJTIT")); /* rendimento tributável PJ titular */
        fprintf(f, "%013lld", 0); /* TODO: total rural */
        fprintf(f, "%013lld", dec->retido); /* imposto retido titular */
-       fprintf(f, "%013lld", 0); /* TODO: total bens ano anterior */
-       fprintf(f, "%013lld", 0); /* TODO: total bens ano base */
-       fprintf(f, "%013lld", 0); /* TODO: rendimentos isentos titular */
+       fprintf(f, "%013lld", totais_get(dec, "BENSANTERIOR")); /* total bens ano anterior */
+       fprintf(f, "%013lld", totais_get(dec, "BENS")); /* total bens ano base */
+       fprintf(f, "%013lld", totais_get(dec, "ISENTOSTIT")); /* rendimentos isentos titular */
        fprintf(f, "%013lld", 0); /* TODO: rendimentos isentos dependentes */
-       fprintf(f, "%013lld", 0); /* TODO: tributação exclusiva titular */
+       fprintf(f, "%013lld", totais_get(dec, "EXCLUSIVOSTIT")); /* TODO: tributação exclusiva titular */
        fprintf(f, "%013lld", 0); /* TODO: tributação exclusiva dependentes */
        fprintf(f, "%013lld", 0); /* TODO: total não tributável */
        fprintf(f, "%013lld", 0); /* TODO: total dívidas ano anterior */
        fprintf(f, "%013lld", 0); /* TODO: total dívidas ano base */
        fprintf(f, "%013lld", 0); /* TODO: retido fonte Lei 11.033 */
-       fprintf(f, "%013lld", 0); /* TODO: isentos e não tributáveis */
-       fprintf(f, "%013lld", 0); /* TODO: tributação exclusiva */
+       fprintf(f, "%013lld", 0); /* TODO: isentos e não tributáveis, transportado */
+       fprintf(f, "%013lld", 0); /* TODO: tributação exclusiva, transportado */
        fprintf(f, "%013lld", 0); /* TODO: ganhos líquidos renda variável */
        fprintf(f, "%013lld", 0); /* TODO: parcela isenta ganhos capital */
        fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior titular */
index 9baf24f..508a6fb 100644 (file)
@@ -96,6 +96,7 @@ static int run_rendimento(struct declaracao *dec, char **args, int argc)
        r += totais_add(dec, "INSS", rendimento->previdencia);
        r += totais_add(dec, "DECIMOTERCEIRO", rendimento->decimoterceiro);
        r += totais_add(dec, "EXCLUSIVOS", rendimento->decimoterceiro);
+       r += totais_add(dec, "EXCLUSIVOSTIT", rendimento->decimoterceiro);
        if (r) {
                rendimento_free(rendimento);
                return r;