rendimento = malloc(sizeof(*rendimento));
rendimento->cnpj = strdup(args[1]);
rendimento->nome = strdup(args[2]);
- rendimento->saida = strdup(args[7]);
+ rendimento->saida = strdup(args[8]);
r += set_llong(args[3], &rendimento->rendimento);
r += set_llong(args[4], &rendimento->previdencia);
r += set_llong(args[5], &rendimento->decimoterceiro);
r += set_llong(args[6], &rendimento->imposto);
+ r += set_llong(args[7], &rendimento->imposto_13o);
if (!rendimento->cnpj || !rendimento->nome || !rendimento->saida) {
rendimento_free(rendimento);
return NULL;
}
if (r < 0 || rendimento->rendimento < 0 || rendimento->previdencia < 0 ||
- rendimento->decimoterceiro < 0 || rendimento->imposto < 0) {
+ rendimento->decimoterceiro < 0 || rendimento->imposto < 0 ||
+ rendimento->imposto_13o < 0) {
rendimento_free(rendimento);
return NULL;
}
{
struct rendimento *rendimento;
int r;
- if (argc != 8)
+ if (argc != 9)
return -EINVAL;
rendimento = rendimento_new(args);
if (!rendimento)
int i;
struct rendimento *j;
for (i = 0; j = list_get(dec->rendimento, i); i++)
- fprintf(f, "rendimento \"%s\" \"%s\" %lld %lld %lld %lld \"%s\"\n",
+ fprintf(f, "rendimento \"%s\" \"%s\" %lld %lld %lld %lld %lld \"%s\"\n",
j->cnpj, j->nome, j->rendimento, j->previdencia,
- j->decimoterceiro, j->imposto, j->saida);
+ j->decimoterceiro, j->imposto, j->imposto_13o, j->saida);
}
static struct cmd cmd_rendimento = {