*/
#include "calcula.h"
+#include <errno.h>
+#include <stdio.h>
#include "declaracao.h"
#include "cmd.h"
#include "rendimento.h"
-#include <errno.h>
-#include <stdio.h>
+#include "totais.h"
static void total_rendimento(struct declaracao *dec)
{
- long long tr = 0;
- struct rendimento *rendimento;
- int i;
- for (i = 0; rendimento = list_get(dec->rendimento, i); i++) {
- tr += rendimento->rendimento;
- }
- dec->totalrendimento = tr;
+ dec->totalrendimento = totais_get(dec, "RENDPJTIT");
}
static long long total_deducao(struct declaracao *dec)