X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank;a=blobdiff_plain;f=src%2Fhb-report.h;h=5c5bea06ff3f6e03179abb6067fcec5034e406a4;hp=1e206aa7d85b9ae622e0b49198d5fffc5a271c63;hb=a6c6b0df5492c2160ed97e3a376bdb2fe7c5ebc4;hpb=cd13d9691c46c2b2d6d459e9e6a76bed1c21b7a6 diff --git a/src/hb-report.h b/src/hb-report.h index 1e206aa..5c5bea0 100644 --- a/src/hb-report.h +++ b/src/hb-report.h @@ -1,5 +1,5 @@ /* HomeBank -- Free, easy, personal accounting for everyone. - * Copyright (C) 1995-2018 Maxime DOYEN + * Copyright (C) 1995-2019 Maxime DOYEN * * This file is part of HomeBank. * @@ -21,7 +21,37 @@ #define __HB_REPORT_H__ -typedef struct _carcost CarCost; +typedef enum +{ + REPORT_SRC_CATEGORY, + REPORT_SRC_SUBCATEGORY, + REPORT_SRC_PAYEE, + REPORT_SRC_ACCOUNT, + REPORT_SRC_TAG, + REPORT_SRC_MONTH, + REPORT_SRC_YEAR, +} HbReportSrc; + + +typedef enum { + REPORT_TYPE_ALL, + REPORT_TYPE_EXPENSE, + REPORT_TYPE_INCOME, + REPORT_TYPE_BALANCE +} HbReportType; + + +typedef enum +{ + REPORT_INTVL_DAY, + REPORT_INTVL_WEEK, + REPORT_INTVL_MONTH, + REPORT_INTVL_QUARTER, + REPORT_INTVL_HALFYEAR, + REPORT_INTVL_YEAR, +} HbReportIntvl; + +typedef struct _carcost CarCost; struct _carcost { @@ -40,6 +70,14 @@ void da_vehiclecost_free(CarCost *item); void da_vehiclecost_destroy(GList *list); +gint report_items_count(gint src, guint32 jfrom, guint32 jto); +gint report_items_get_pos(gint tmpsrc, guint jfrom, Transaction *ope); + +gint report_interval_get_pos(gint intvl, guint jfrom, Transaction *ope); +gint report_interval_count(gint intvl, guint32 jfrom, guint32 jto); +void report_interval_snprint_name(gchar *s, gint slen, gint intvl, guint32 jfrom, gint idx); + +gdouble report_txn_amount_get(Filter *flt, Transaction *txn); #endif