]> Dogcows Code - chaz/homebank/blob - src/hb-report.h
import homebank-5.2.4
[chaz/homebank] / src / hb-report.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
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.
10 *
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.
15 *
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/>.
18 */
19
20 #ifndef __HB_REPORT_H__
21 #define __HB_REPORT_H__
22
23
24 typedef enum
25 {
26 REPORT_SRC_CATEGORY,
27 REPORT_SRC_SUBCATEGORY,
28 REPORT_SRC_PAYEE,
29 REPORT_SRC_ACCOUNT,
30 REPORT_SRC_TAG,
31 REPORT_SRC_MONTH,
32 REPORT_SRC_YEAR,
33 } HbReportSrc;
34
35
36 typedef enum {
37 REPORT_TYPE_ALL,
38 REPORT_TYPE_EXPENSE,
39 REPORT_TYPE_INCOME,
40 REPORT_TYPE_BALANCE
41 } HbReportType;
42
43
44 typedef enum
45 {
46 REPORT_INTVL_DAY,
47 REPORT_INTVL_WEEK,
48 REPORT_INTVL_MONTH,
49 REPORT_INTVL_QUARTER,
50 REPORT_INTVL_HALFYEAR,
51 REPORT_INTVL_YEAR,
52 } HbReportIntvl;
53
54 typedef struct _carcost CarCost;
55
56 struct _carcost
57 {
58 guint32 date;
59 gchar *memo;
60 gdouble amount;
61 gboolean partial;
62 guint meter;
63 gdouble fuel;
64 guint dist;
65 };
66
67
68 CarCost *da_vehiclecost_malloc(void);
69 void da_vehiclecost_free(CarCost *item);
70 void da_vehiclecost_destroy(GList *list);
71
72
73 gint report_items_count(gint src, guint32 jfrom, guint32 jto);
74 gint report_items_get_pos(gint tmpsrc, guint jfrom, Transaction *ope);
75
76 gint report_interval_get_pos(gint intvl, guint jfrom, Transaction *ope);
77 gint report_interval_count(gint intvl, guint32 jfrom, guint32 jto);
78 void report_interval_snprint_name(gchar *s, gint slen, gint intvl, guint32 jfrom, gint idx);
79
80 gdouble report_txn_amount_get(Filter *flt, Transaction *txn);
81
82 #endif
83
This page took 0.032041 seconds and 4 git commands to generate.