Novos campos em bens para 2020.
[cascardo/declara.git] / lib / gera.c
index 214037c..c8f0d0a 100644 (file)
@@ -993,6 +993,17 @@ static void gera_bem(struct declaracao *dec, FILE *f)
        if (dec->ano >= 2019) {
                attr_out(f, b->attr, "iptu", 30);
        }
+       if (dec->ano >= 2020) {
+               fprintf(f, "%-3.3s", ""); /* TODO: Banco */
+               fprintf(f, "%c", b->dependente ? 'D' : 'T');
+               if (b->dependente) {
+                       struct dependente *d;
+                       d = list_get(dec->dependentes, b->dependente - 1);
+                       fprintf(f, "%-11.11s", d ? d->cpf : "");
+               } else {
+                       fprintf(f, "%-11.11s", dec->cpf);
+               }
+       }
 }
 
 static void gera_carne(struct declaracao *dec, FILE *f)