]>
Dogcows Code - chaz/homebank/blob - src/hb-account.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 Maxime DOYEN
4 * This file is part of HomeBank.
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * HomeBank is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __HB_ACCOUNT_H__
21 #define __HB_ACCOUNT_H__
24 typedef struct _account Account
;
32 guint32 pos
; //display position
48 GtkWindow
*window
; //dsp_account window opened
50 gdouble bal_bank
; //bank balance (reconciled transaction)
51 gdouble bal_today
; //today balance (every transaction until today)
52 gdouble bal_future
; //future balance (every transaction)
54 gboolean flt_select
; //true if selected into filter
58 #define AF_CLOSED (1<<1)
59 #define AF_ADDED (1<<2)
60 #define AF_CHANGED (1<<3)
61 #define AF_NOSUMMARY (1<<4)
62 #define AF_NOBUDGET (1<<5)
63 #define AF_NOREPORT (1<<6)
65 #define AF_OLDBUDGET (1<<0)
69 // + https://www.kashoo.com/blog/what-are-the-different-account-types-in-accounting/
72 ACC_TYPE_BANK
= 1, //Banque
73 ACC_TYPE_CASH
= 2, //Espèce
74 ACC_TYPE_ASSET
= 3, //Actif (avoir)
75 ACC_TYPE_CREDITCARD
= 4, //Carte crédit
76 ACC_TYPE_LIABILITY
= 5, //Passif (dettes)
77 // ACC_TYPE_STOCK = 6, //Actions
78 // ACC_TYPE_MUTUALFUND = 7, //Fond de placement
79 // ACC_TYPE_INCOME = 8, //Revenus
80 // ACC_TYPE_EXPENSE = 9, //Dépenses
81 // ACC_TYPE_EQUITY = 10, //Capitaux propres
88 Account
*da_acc_malloc(void);
89 void da_acc_free(Account
*item
);
90 Account
*da_acc_malloc(void);
92 void da_acc_destroy(void);
93 void da_acc_new(void);
95 guint
da_acc_length(void);
96 gboolean
da_acc_create_none(void);
97 gboolean
da_acc_remove(guint32 key
);
98 gboolean
da_acc_insert(Account
*item
);
99 gboolean
da_acc_append(Account
*item
);
100 guint32
da_acc_get_max_key(void);
101 Account
*da_acc_get_by_name(gchar
*name
);
102 Account
*da_acc_get_by_imp_name(gchar
*name
);
103 Account
*da_acc_get(guint32 key
);
104 void da_acc_consistency(Account
*item
);
107 gboolean
account_is_used(guint32 key
);
108 gboolean
account_exists(gchar
*name
);
109 gboolean
account_rename(Account
*item
, gchar
*newname
);
110 void account_set_currency(Account
*item
, guint32 kcur
);
111 void account_compute_balances(void);
112 gboolean
account_balances_add(Transaction
*trn
);
113 gboolean
account_balances_sub(Transaction
*trn
);
115 GList
*account_glist_sorted(gint column
);
117 void account_convert_euro(Account
*acc
);
This page took 0.038153 seconds and 5 git commands to generate.