}
}
if (instrucao_dependente) {
+ /* Conta número de dependentes com instrução. */
totais_add(dec, "DEPSINSTRUCAO", 1);
if (dec->verbose) {
printf("Dependente %s (%d) tem instrução\n", d->nome, i);
printf("\tDependentes: "FMT_R"\n", R(totais_get(dec, "DEPENDENTES")));
printf("\tINSS: "FMT_R"\n", R(totais_get(dec, "INSS")));
printf("\tInstrução: "FMT_R"\n", R(totais_get(dec, "INSTRUCAO")));
+ printf("\tMédicas: "FMT_R"\n", R(totais_get(dec, "MEDICAS")));
+ printf("\tPrevidência: "FMT_R"\n", R(totais_get(dec, "PREVIDENCIA")));
printf("\tPagamentos: "FMT_R"\n", R(totais_get(dec, "PAGAMENTOS")));
printf("\tReembolsos: -"FMT_R"\n", R(totais_get(dec, "REEMBOLSOS")));
}
{
struct rendimento *rendimento;
int i;
- dec->pago = dec->retido = 0;
+ dec->pago = dec->retido = totais_get(dec, "PAGO");
+ dec->retido -= totais_get(dec, "CARNE");
for (i = 0; rendimento = list_get(dec->rendimento, i); i++) {
dec->pago += rendimento->imposto;
dec->retido += rendimento->imposto;
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
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;
{
long long i_simples, i_completa;
if (!ANO_VALIDO(dec->ano)) {
- dec_set_error(dec, "Ano %d não suportado.\n", dec->ano);
+ 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",
- R(totais_get(dec, "RENDPJ")),
+ R(totais_get(dec, "RENDTRIB")),
R(obrigatoriedade[ANO(dec->ano)]));
}
dec->obrigatoria = 1;
dec->restituicao = dec->pago - dec->devido;
else
dec->pagar = dec->devido - dec->pago;
+ dec->aliquota_efetiva = dec->devido * 10000 / totais_get(dec, "RENDTRIB");
return 0;
}