Rendimentos tributáveis e de pessoas físicas são adicionados. Onde
rendimentos tributáveis devem ser utilizados, ao invés de apenas
rendimentos de pessoa jurídica, a mudança foi feita.
struct taxtable *tt;
long long tr, td;
tt = table[ANO(dec->ano)];
struct taxtable *tt;
long long tr, td;
tt = table[ANO(dec->ano)];
- tr = totais_get(dec, "RENDPJ");
+ tr = totais_get(dec, "RENDTRIB");
if (tr / 5 < simples[ANO(dec->ano)])
td = tr / 5;
else
if (tr / 5 < simples[ANO(dec->ano)])
td = tr / 5;
else
struct taxtable *tt;
long long tr, td;
tt = table[ANO(dec->ano)];
struct taxtable *tt;
long long tr, td;
tt = table[ANO(dec->ano)];
- tr = totais_get(dec, "RENDPJ");
+ tr = totais_get(dec, "RENDTRIB");
td = total_deducao(dec);
totais_add(dec, "DEDUCOES", td);
tr -= td;
td = total_deducao(dec);
totais_add(dec, "DEDUCOES", td);
tr -= td;
dec_set_error(dec, "Ano %d não suportado.", dec->ano);
return -EINVAL;
}
dec_set_error(dec, "Ano %d não suportado.", dec->ano);
return -EINVAL;
}
- if (totais_get(dec, "RENDPJ") > obrigatoriedade[ANO(dec->ano)]) {
+ if (totais_get(dec, "RENDTRIB") > obrigatoriedade[ANO(dec->ano)]) {
if (dec->verbose) {
printf("Declaracao obrigatoria pois rendimento e"
"maior que mínimo para declaracao: "
FMT_R" > "FMT_R"\n",
if (dec->verbose) {
printf("Declaracao obrigatoria pois rendimento e"
"maior que mínimo para declaracao: "
FMT_R" > "FMT_R"\n",
- R(totais_get(dec, "RENDPJ")),
+ R(totais_get(dec, "RENDTRIB")),
R(obrigatoriedade[ANO(dec->ano)]));
}
dec->obrigatoria = 1;
R(obrigatoriedade[ANO(dec->ano)]));
}
dec->obrigatoria = 1;
fprintf(f, "%08d", 0); /* Data saída */
fprintf(f, "%-11.11s", ""); /* CPF procurador */
fprintf(f, "%03d", dec->obrigatoria); /* criterio obrigatoriedade */
fprintf(f, "%08d", 0); /* Data saída */
fprintf(f, "%-11.11s", ""); /* CPF procurador */
fprintf(f, "%03d", dec->obrigatoria); /* criterio obrigatoriedade */
- fprintf(f, "%013lld", totais_get(dec, "RENDPJ")); /* Total tributavel */
+ fprintf(f, "%013lld", totais_get(dec, "RENDTRIB")); /* Total tributavel */
/* CNPJ previdencia */
fprintf(f, "%-14.14s", inss_cnpj_ordenado(dec, 0));
/* CNPJ previdencia 2 */
/* CNPJ previdencia */
fprintf(f, "%-14.14s", inss_cnpj_ordenado(dec, 0));
/* CNPJ previdencia 2 */
fprintf(f, "%013lld", totais_get(dec, "EXCLUSIVOSDEP")); /* exclusivos dependentes */
fprintf(f, "%-13.13s", ""); /* FILLER */
fprintf(f, "%-13.13s", ""); /* FILLER */
fprintf(f, "%013lld", totais_get(dec, "EXCLUSIVOSDEP")); /* exclusivos dependentes */
fprintf(f, "%-13.13s", ""); /* FILLER */
fprintf(f, "%-13.13s", ""); /* FILLER */
- fprintf(f, "%013lld", 0); /* TODO: rendimentos PF */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPF")); /* rendimentos PF */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependentes */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF ext. depend. */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependentes */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF ext. depend. */
- fprintf(f, "%013lld", 0); /* TODO: carnê-leão PF? */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPF")); /* TODO: carnê-leão PF? */
fprintf(f, "%013lld", 0); /* TODO: carnê-leão dependentes */
fprintf(f, "%013lld", totais_get(dec, "DEPENDENTES")); /* dedução dependentes */
fprintf(f, "%013lld", 0); /* TODO: previdência RRA */
fprintf(f, "%013lld", 0); /* TODO: carnê-leão dependentes */
fprintf(f, "%013lld", totais_get(dec, "DEPENDENTES")); /* dedução dependentes */
fprintf(f, "%013lld", 0); /* TODO: previdência RRA */
{
fprintf(f, "18");
fprintf(f, "%s", dec->cpf); /* CPF: 11 dígitos */
{
fprintf(f, "18");
fprintf(f, "%s", dec->cpf); /* CPF: 11 dígitos */
- fprintf(f, "%013lld", totais_get(dec, "RENDPJ")); /* TODO: rendimentos tributáveis */
+ fprintf(f, "%013lld", totais_get(dec, "RENDTRIB")); /* rendimentos tributáveis */
/* desconto simplificado */
fprintf(f, "%013lld", totais_get(dec, "DESCONTO"));
/* base de cálculo */
/* desconto simplificado */
fprintf(f, "%013lld", totais_get(dec, "DESCONTO"));
/* base de cálculo */
fprintf(f, "%013lld", dec->devido); /* imposto devido */
fprintf(f, "%013lld", dec->retido); /* imposto retido */
fprintf(f, "%013lld", 0); /* TODO: imposto complementar */
fprintf(f, "%013lld", dec->devido); /* imposto devido */
fprintf(f, "%013lld", dec->retido); /* imposto retido */
fprintf(f, "%013lld", 0); /* TODO: imposto complementar */
- fprintf(f, "%013lld", 0); /* TODO: carnê-leão */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPF")); /* TODO: carnê-leão */
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, "%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, "%013lld", 0); /* TODO: 13o dependente */
fprintf(f, "%05d", totais_get(dec, "DEPSINSTRUCAO")); /* dependentes com instrucao */
fprintf(f, "%05d", 0); /* TODO: alimentandos com instrucao */
fprintf(f, "%013lld", 0); /* TODO: 13o dependente */
fprintf(f, "%05d", totais_get(dec, "DEPSINSTRUCAO")); /* dependentes com instrucao */
fprintf(f, "%05d", 0); /* TODO: alimentandos com instrucao */
- fprintf(f, "%013lld", 0); /* TODO: rendimentos PF titular */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPFTIT")); /* TODO: rendimentos PF titular */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependente */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior titular */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior dependente */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependente */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior titular */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF exterior dependente */
fprintf(f, "%s", dec->cpf); /* CPF: 11 dígitos */
/* FIXME: completar campos */
fprintf(f, "%013lld", totais_get(dec, "RENDPJTIT")); /* rendimentos PJ titular */
fprintf(f, "%s", dec->cpf); /* CPF: 11 dígitos */
/* FIXME: completar campos */
fprintf(f, "%013lld", totais_get(dec, "RENDPJTIT")); /* rendimentos PJ titular */
- fprintf(f, "%013lld", 0); /* TODO: rendimentos PF titular */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPFTIT")); /* TODO: rendimentos PF titular */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependente */
fprintf(f, "%013lld", 0); /* TODO: resultado atividade rural */
fprintf(f, "%013lld", 0); /* TODO: rendimentos PF dependente */
fprintf(f, "%013lld", 0); /* TODO: resultado atividade rural */
- fprintf(f, "%013lld", totais_get(dec, "RENDPJ")); /* TODO: total rendimentos tributáveis */
+ fprintf(f, "%013lld", totais_get(dec, "RENDTRIB")); /* total rendimentos tributáveis */
/* TODO (2016): somar FUNPRESP até o limite */
fprintf(f, "%013lld", totais_get(dec, "INSS")); /* previdencia oficial */
/* TODO (2016): somar FUNPRESP acima do limite */
/* TODO (2016): somar FUNPRESP até o limite */
fprintf(f, "%013lld", totais_get(dec, "INSS")); /* previdencia oficial */
/* TODO (2016): somar FUNPRESP acima do limite */
fprintf(f, "%013lld", dec->devido); /* TODO: imposto devido menos patronal */
fprintf(f, "%013lld", dec->devido); /* TODO: imposto devido mais RRA */
fprintf(f, "%013lld", dec->retido); /* imposto na fonte */
fprintf(f, "%013lld", dec->devido); /* TODO: imposto devido menos patronal */
fprintf(f, "%013lld", dec->devido); /* TODO: imposto devido mais RRA */
fprintf(f, "%013lld", dec->retido); /* imposto na fonte */
- fprintf(f, "%013lld", 0); /* TODO: carne leao */
+ fprintf(f, "%013lld", totais_get(dec, "RENDPF")); /* TODO: carne leao */
fprintf(f, "%013lld", 0); /* TODO: imposto complementar */
fprintf(f, "%013lld", 0); /* TODO: imposto pago exterior */
fprintf(f, "%013lld", 0); /* TODO: imposto complementar */
fprintf(f, "%013lld", 0); /* TODO: imposto pago exterior */
fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
fprintf(f, "%-9.9s", dec->contribuinte.telefone ?: "");
fprintf(f, "%s", dec->retifica ? "S" : "N"); /* Retificadora */
fprintf(f, "%-4.4s", dec->contribuinte.ddd ?: "");
fprintf(f, "%-9.9s", dec->contribuinte.telefone ?: "");
fprintf(f, "%s", dec->retifica ? "S" : "N"); /* Retificadora */
- fprintf(f, "%013lld", totais_get(dec, "RENDPJ")); /* Total tributavel */
+ fprintf(f, "%013lld", totais_get(dec, "RENDTRIB")); /* Total tributavel */
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, "%013lld", dec->devido); /* Imposto devido */
fprintf(f, "%013lld", dec->restituicao); /* Imposto a restituir */
fprintf(f, "%013lld", dec->pagar); /* Imposto a pagar */
rendimento_free(rendimento);
return r;
}
rendimento_free(rendimento);
return r;
}
- r = totais_add(dec, "RENDPJ", rendimento->rendimento);
+ r = totais_add(dec, "RENDTRIB", rendimento->rendimento);
+ r += totais_add(dec, "RENDPJ", rendimento->rendimento);
r += totais_add(dec, "RENDPJTIT", rendimento->rendimento);
r += totais_add(dec, "INSS", rendimento->previdencia);
r += totais_add(dec, "DECIMOTERCEIRO", rendimento->decimoterceiro);
r += totais_add(dec, "RENDPJTIT", rendimento->rendimento);
r += totais_add(dec, "INSS", rendimento->previdencia);
r += totais_add(dec, "DECIMOTERCEIRO", rendimento->decimoterceiro);