+
+ /* Mudanças 2018 */
+ if (dec->ano >= 2018) {
+ fprintf(f, "%-8.8s", "00000000"); /* TODO: Data de aquisição */
+ fprintf(f, "%-20.20s", ""); /* TODO: IPTU, 2019, filler */
+ fprintf(f, "%-8.8s", "00000000"); /* TODO: NIRF */
+ fprintf(f, "%-30.30s", ""); /* TODO: RENAVAN */
+ fprintf(f, "%-30.30s", ""); /* TODO: Registro aviação civil */
+ fprintf(f, "%-30.30s", ""); /* TODO: Registro Capitania dos Portos */
+ fprintf(f, "%04d", 0); /* TODO: Agência bancária */
+ fprintf(f, "%-15.15s", ""); /* TODO: Conta bancária e dígito verificador */
+ attr_out(f, b->attr, "cnpj", 14);
+ }
+
+ if (dec->ano >= 2019) {
+ attr_out(f, b->attr, "iptu", 30);
+ }
+ if (dec->ano >= 2020) {
+ attr_out(f, b->attr, "banco", 3);
+ 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)
+{
+ struct carne *carne;
+ carne = list_get(dec->carne, dec->linhas[22]);
+ fprintf(f, "22");
+ fprintf(f, "%-11.11s", dec->cpf); /* Titular */
+ if (carne->dependente) {
+ struct dependente *d;
+ d = list_get(dec->dependentes, carne->dependente - 1);
+ fprintf(f, "S%-11.11s", d ? d->cpf : ""); /* CPF dependente. */
+ } else {
+ fprintf(f, "N%-11.11s", ""); /* Não é dependente. */
+ }
+ fprintf(f, "%02d", carne->mes);
+ fprintf(f, "%013lld", carne->rendimento);
+ fprintf(f, "%013lld", carne->alugueis); /* Aluguéis. */
+ fprintf(f, "%013lld", carne->outros); /* Outros. */
+ fprintf(f, "%013lld", carne->exterior); /* Exterior. */
+ fprintf(f, "%013lld", carne->caixa); /* Livro-caixa. */
+ fprintf(f, "%013lld", carne->alimentos); /* Pensão alimentícia. */
+ fprintf(f, "%013lld", carne->dependentes); /* Dedução com dependentes. */
+ fprintf(f, "%013lld", carne->previdencia); /* Previdência. */
+ fprintf(f, "%013lld", carne->base); /* Base cálculo. */
+ fprintf(f, "%013lld", carne->imposto); /* Imposto pago. */