Inclui mais informações no sumário.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Fri, 25 Sep 2015 09:58:37 +0000 (06:58 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Sat, 12 Mar 2016 20:41:36 +0000 (17:41 -0300)
Inclui base de cálculo, rendimentos isentos, rendimentos exclusivos e
hash/recibo no sumário.

lib/base.c

index f15c4ea..4f5c5fd 100644 (file)
@@ -24,6 +24,7 @@
 #include "rendimento.h"
 #include "pagamento.h"
 #include "bem.h"
+#include "totais.h"
 #include "util.h"
 
 SET_INT(ano);
@@ -62,6 +63,16 @@ static int run_resumo(struct declaracao *dec, char **args, int argc)
        if (dec->pagar > 0)
                printf("a pagar: %lld.%02d\n", reais(dec->pagar),
                                               centavos(dec->pagar));
+       printf("base de cálculo: %lld.%02d\n",
+               reais(totais_get(dec, "BASE")),
+               centavos(totais_get(dec, "BASE")));
+       printf("isentos: %lld.%02d\n",
+               reais(totais_get(dec, "ISENTOS")),
+               centavos(totais_get(dec, "ISENTOS")));
+       printf("exclusivos: %lld.%02d\n",
+               reais(totais_get(dec, "EXCLUSIVOS")),
+               centavos(totais_get(dec, "EXCLUSIVOS")));
+       printf("hash: %010ld\n", dec->hash);
        return 0;
 }