fprintf(f, "2800"); /* Código */
else if (dec->ano == 2019)
fprintf(f, "2900"); /* Código */
+ else if (dec->ano == 2020)
+ fprintf(f, "3000");
fprintf(f, "%s", dec->retifica ? "1" : "0"); /* Retificadora */
fprintf(f, "%s", dec->cpf); /* CPF: 11 dígitos */
fprintf(f, " "); /* Filler */
fprintf(f, "160"); /* Versão IRPF */
else if (dec->ano == 2019)
fprintf(f, "150"); /* Versão IRPF */
+ else if (dec->ano == 2020)
+ fprintf(f, "180"); /* Versão IRPF */
fprintf(f, "%-60.60s", dec->nome);
fprintf(f, "%-2.2s", dec->contribuinte.uf ?: "");
fprintf(f, "%s", "0000000000"); /* FIXME: hash */
fprintf(f, " "); /* RRA4 */
fprintf(f, "%-11.11s", ""); /* CPF RRA4 */
fprintf(f, "0000000000000"); /* TODO: Doacao ECA */
+ fprintf(f, "0000000000000"); /* TODO: Doacao Idoso */
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 */
/* Fim das mudanças de 2016 */
+ if (dec->ano >= 2020)
+ fprintf(f, "%-13.13s", dec->contribuinte.titulo_eleitor ?: "");
+
fprintf(f, " "); /* Teste PGD, FILLER2 */
}
if (dec->ano <= 2017) {
fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
fprintf(f, "%-9.9s", dec->contribuinte.telefone ?: "");
+ } else if (dec->ano >= 2020) {
+ fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
+ fprintf(f, "%-9.9s", "");
} else {
fprintf(f, "%-13.13s", ""); /* FILLER */
}
fprintf(f, "%-11.11s", dec->contribuinte.celular ?: ""); /* celular */
fprintf(f, "%s", dec->conjuge.cpf ? "S" : "N");
}
- if (dec->ano >= 2018) {
+ if (dec->ano >= 2020) {
+ fprintf(f, "%-11.11s", dec->contribuinte.telefone ?: "");
+ } else if (dec->ano >= 2018) {
fprintf(f, "%-2.2s%-9.9s", dec->contribuinte.ddd ?: "", dec->contribuinte.telefone ?: "");
}
}
fprintf(f, "%-100.100s", ""); /* FILLER */
fprintf(f, "%-4.4s", ""); /* FILLER */
fprintf(f, "%-8.8s", ""); /* FILLER */
- if (dec->ano >= 2018) {
+ if (dec->ano >= 2020) {
+ fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
+ fprintf(f, "%-9.9s", "");
+ } else if (dec->ano >= 2018) {
fprintf(f, "%-13.13s", "");
} else {
fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
fprintf(f, "%-13.13s", dec->contacorrente ? : ""); /* numero conta */
fprintf(f, "%-2.2s", dec->dvconta ? : ""); /* DV conta */
fprintf(f, "%013lld", 0); /* TODO: imposto alienacao moeda estrangeira em especie */
- if (dec->ano >= 2018) {
+ if (dec->ano >= 2020) {
+ fprintf(f, "%-11.11s", dec->contribuinte.telefone ?: "");
+ } else if (dec->ano >= 2018) {
fprintf(f, "%-2.2s%-9.9s", dec->contribuinte.ddd ?: "", dec->contribuinte.telefone ?: "");
}
}