eaff855e0b610d31b0473fed1e29629172c8bd92
[cascardo/declara.git] / lib / declaracao.h
1 /*
2  *  Copyright (C) 2015  Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 3 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License along
15  *  with this program; if not, write to the Free Software Foundation, Inc.,
16  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #ifndef _DECLARACAO_H
20 #define _DECLARACAO_H
21
22 #include "list.h"
23 #include "contribuinte.h"
24 #include "conjuge.h"
25 #include "sistema.h"
26
27 enum {
28         SIMPLES,
29         COMPLETA,
30 };
31
32 struct declaracao {
33         int ano;
34         char *cpf;
35         char *nome;
36         struct list *rendimento;
37         struct list *isentos;
38         struct list *pagamentos;
39         struct list *bens;
40         struct list *dependentes;
41         struct contribuinte contribuinte;
42         struct conjuge conjuge;
43         struct sistema sistema;
44         long long pago;
45         long long retido;
46         long long devido;
47         long long pagar;
48         long long restituicao;
49         int obrigatoria;
50         int tipo;
51         char *recibo;
52         char *retifica;
53         char *banco;
54         char *agencia;
55         char *contacorrente;
56         char *dvconta;
57         int linhas[100]; /* NĂºmero de linhas escritas de cada tipo. */
58         struct pmhash *totais;
59         unsigned long hash;
60         unsigned long rhash;
61 };
62
63 struct declaracao * declaracao_new(int ano);
64 void declaracao_free(struct declaracao *dec);
65
66 #endif