Salva total de rendimentos para uso futuro.
[cascardo/declara.git] / calcula.c
index 3e3e841..1089b8c 100644 (file)
--- a/calcula.c
+++ b/calcula.c
@@ -90,6 +90,7 @@ static long long imposto_simples(struct declaracao *dec)
        }
        tt = table2015;
        tr = total_rendimento(dec);
+       dec->totalrendimento = tr;
        if (tr / 5 < simples2015)
                td = tr / 5;
        else
@@ -108,6 +109,7 @@ static long long imposto_completa(struct declaracao *dec)
        tt = table2015;
        tr = total_rendimento(dec);
        td = total_deducao(dec);
+       dec->totalrendimento = tr;
        tr -= td;
        return imposto(tt, tr);
 }