Remove TODO em alguns casos.
[cascardo/declara.git] / lib / gera.c
index eac97ea..f476627 100644 (file)
@@ -88,10 +88,10 @@ static void gera_header(struct declaracao *dec, FILE *f)
        fprintf(f, " "); /* RRA4 */
        fprintf(f, "%-11.11s", ""); /* CPF RRA4 */
        fprintf(f, "0000000000000"); /* TODO: Doacao ECA */
-       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 0)); /* TODO: CNPJ maior */
-       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 1)); /* TODO: CNPJ maior 2 */
-       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 2)); /* TODO: CNPJ maior 3 */
-       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 3)); /* TODO: CNPJ maior 4 */
+       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 0)); /* CNPJ maior */
+       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 1)); /* CNPJ maior 2 */
+       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 2)); /* CNPJ maior 3 */
+       fprintf(f, "%-14.14s", rendimento_cnpj_ordenado(dec, 3)); /* CNPJ maior 4 */
        fprintf(f, "%-11.11s", ""); /* CPF Dependente 1 */
        fprintf(f, "%-8.8s", ""); /* DN Dependente 1 */
        fprintf(f, "%-11.11s", ""); /* CPF Dependente 2 */
@@ -182,7 +182,7 @@ static void gera_contribuinte(struct declaracao *dec, FILE *f)
        fprintf(f, "%-13.13s", dec->contribuinte.titulo_eleitor);
        fprintf(f, "%03d", dec->contribuinte.ocupacao_principal);
        fprintf(f, "%02d", dec->contribuinte.natureza_ocupacao);
-       fprintf(f, "0"); /* TODO: qnt quotas */
+       fprintf(f, "%d", dec->pagar ? 1 : 0); /* TODO/FIXME: qnt quotas */
        fprintf(f, "%s", dec->tipo == COMPLETA ? "S" : "N");
        fprintf(f, "%s", dec->retifica ? "S" : "N");
        fprintf(f, "S"); /* GERADO */
@@ -254,11 +254,11 @@ static void gera_totais_simples(struct declaracao *dec, FILE *f)
        fprintf(f, "%013lld", 0); /* TODO: imposto retido Lei 11.033 */
        fprintf(f, "%013lld", dec->restituicao); /* imposto a restituir */
        fprintf(f, "%013lld", dec->pagar); /* imposto pagar */
-       fprintf(f, "%d", 0); /* TODO: quotas */
-       fprintf(f, "%013lld", 0); /* TODO: valor quota */
+       fprintf(f, "%d", dec->pagar ? 1 : 0); /* TODO/FIXME: quotas */
+       fprintf(f, "%013lld", dec->pagar); /* TODO: valor quota */
        fprintf(f, "%013lld", totais_get(dec, "ISENTOS")); /* rendimentos isentos */
        fprintf(f, "%013lld", totais_get(dec, "EXCLUSIVOS")); /* rendimentos tributação exclusiva */
-       fprintf(f, "%013lld", dec->conjuge.total); /* TODO: conjuge */
+       fprintf(f, "%013lld", dec->conjuge.total); /* 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 */
@@ -440,8 +440,8 @@ static void gera_recibodetalhe(struct declaracao *dec, FILE *f)
        fprintf(f, "%013lld", dec->devido); /* Imposto devido */
        fprintf(f, "%013lld", dec->restituicao); /* Imposto a restituir */
        fprintf(f, "%013lld", dec->pagar); /* Imposto a pagar */
-       fprintf(f, "%d", 0); /* TODO: quotas */
-       fprintf(f, "%013lld", 0); /* TODO: valor quota */
+       fprintf(f, "%d", dec->pagar ? 1 : 0); /* TODO/FIXME: quotas */
+       fprintf(f, "%013lld", dec->pagar); /* TODO: valor quota */
        fprintf(f, "%-3.3s", dec->banco ? : "000"); /* numero banco */
        fprintf(f, "%-4.4s", dec->agencia ? : "0000"); /* numero agencia */
        fprintf(f, " "); /* FILLER */