Gera outros totais de declaração simplificada.
[cascardo/declara.git] / calcula.c
index a78d1c8..7b22639 100644 (file)
--- a/calcula.c
+++ b/calcula.c
@@ -29,7 +29,7 @@
  * limites no futuro. */
 static long long total_deducao(struct declaracao *dec)
 {
-       return totais_get(dec, "INSS");
+       return totais_get(dec, "INSS") + totais_get(dec, "PAGAMENTOS");
 }
 
 static void total_pago(struct declaracao *dec)
@@ -80,7 +80,9 @@ static long long imposto_simples(struct declaracao *dec)
                td = tr / 5;
        else
                td = simples2015;
+       totais_add(dec, "DESCONTO", td);
        tr -= td;
+       totais_add(dec, "BASE", tr);
        return imposto(tt, tr);
 }
 
@@ -125,6 +127,9 @@ int calcula(struct declaracao *dec)
 
 static int run_calcula(struct declaracao *dec, char **args, int argc)
 {
+       totais_add(dec, "EXCLUSIVOS_SEM_13o",
+               totais_get(dec, "EXCLUSIVOS") -
+               totais_get(dec, "DECIMOTERCEIRO"));
        return calcula(dec);
 }