1 /*******************************************************
2  Copyright (C) 2006 Madhan Kanagavel
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 2 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
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  ********************************************************/
18 
19 #ifndef MM_EX_REPORTCATEGEXP_H_
20 #define MM_EX_REPORTCATEGEXP_H_
21 
22 #include "reportbase.h"
23 #include "mmDateRange.h"
24 #include "util.h"
25 #include <vector>
26 
27 class mmReportCategoryExpenses : public mmPrintableBase
28 {
29 public:
30     mmReportCategoryExpenses(mmDateRange* date_range, const wxString& title, int type);
31     virtual ~mmReportCategoryExpenses();
32 
33     virtual void RefreshData();
34     virtual wxString getHTMLText();
35 
36 public:
37     enum TYPE { NONE = 0, GOES, COME, CATEGORY};
38 
39 protected:
40     mmDateRange* date_range_;
41     bool ignoreFutureDate_;
42     wxString title_;
43     int type_;
44 
45 private:
46     // structure for sorting of data
47     struct data_holder { wxString color;  wxString name; double amount; int categs; };
48     std::vector<data_holder> data_;
49     std::vector<ValueTrio> valueList_;
50     bool with_date_;
51 };
52 
53 class mmReportCategoryExpensesGoes: public mmReportCategoryExpenses
54 {
55 public:
56     explicit mmReportCategoryExpensesGoes(mmDateRange* date_range = new mmAllTime()
57     , const wxString& title = _("Where the Money Goes"));
58 };
59 
60 class mmReportCategoryExpensesGoesCurrentMonth: public mmReportCategoryExpensesGoes
61 {
62 public:
63     mmReportCategoryExpensesGoesCurrentMonth();
64 };
65 
66 class mmReportCategoryExpensesGoesCurrentMonthToDate: public mmReportCategoryExpensesGoes
67 {
68 public:
69     mmReportCategoryExpensesGoesCurrentMonthToDate();
70 };
71 
72 class mmReportCategoryExpensesGoesLastMonth: public mmReportCategoryExpensesGoes
73 {
74 public:
75     mmReportCategoryExpensesGoesLastMonth();
76 };
77 
78 class mmReportCategoryExpensesGoesLast30Days: public mmReportCategoryExpensesGoes
79 {
80 public:
81     mmReportCategoryExpensesGoesLast30Days();
82 };
83 
84 class mmReportCategoryExpensesGoesLastYear: public mmReportCategoryExpensesGoes
85 {
86 public:
87     mmReportCategoryExpensesGoesLastYear();
88 };
89 
90 class mmReportCategoryExpensesGoesCurrentYear: public mmReportCategoryExpensesGoes
91 {
92 public:
93     mmReportCategoryExpensesGoesCurrentYear();
94 };
95 
96 class mmReportCategoryExpensesGoesCurrentYearToDate: public mmReportCategoryExpensesGoes
97 {
98 public:
99     mmReportCategoryExpensesGoesCurrentYearToDate();
100 };
101 
102 class mmReportCategoryExpensesGoesLastFinancialYear: public mmReportCategoryExpensesGoes
103 {
104 public:
105     mmReportCategoryExpensesGoesLastFinancialYear(const int day, const int month);
106 };
107 
108 class mmReportCategoryExpensesGoesCurrentFinancialYear: public mmReportCategoryExpensesGoes
109 {
110 public:
111     mmReportCategoryExpensesGoesCurrentFinancialYear(const int day, const int month);
112 };
113 
114 class mmReportCategoryExpensesGoesCurrentFinancialYearToDate : public mmReportCategoryExpensesGoes
115 {
116 public:
117     mmReportCategoryExpensesGoesCurrentFinancialYearToDate(const int day, const int month);
118 };
119 
120 class mmReportCategoryExpensesComes : public mmReportCategoryExpenses
121 {
122 public:
123     explicit mmReportCategoryExpensesComes(mmDateRange* date_range = new mmAllTime()
124     , const wxString& title = _("Where the Money Comes From"));
125 };
126 
127 class mmReportCategoryExpensesComesCurrentMonth: public mmReportCategoryExpensesComes
128 {
129 public:
130     mmReportCategoryExpensesComesCurrentMonth();
131 };
132 
133 class mmReportCategoryExpensesComesCurrentMonthToDate: public mmReportCategoryExpensesComes
134 {
135 public:
136     mmReportCategoryExpensesComesCurrentMonthToDate();
137 };
138 
139 class mmReportCategoryExpensesComesLastMonth: public mmReportCategoryExpensesComes
140 {
141 public:
142     mmReportCategoryExpensesComesLastMonth();
143 };
144 
145 class mmReportCategoryExpensesComesLast30Days: public mmReportCategoryExpensesComes
146 {
147 public:
148     mmReportCategoryExpensesComesLast30Days();
149 };
150 
151 class mmReportCategoryExpensesComesLastYear: public mmReportCategoryExpensesComes
152 {
153 public:
154     mmReportCategoryExpensesComesLastYear();
155 };
156 
157 class mmReportCategoryExpensesComesCurrentYear: public mmReportCategoryExpensesComes
158 {
159 public:
160     mmReportCategoryExpensesComesCurrentYear();
161 };
162 
163 class mmReportCategoryExpensesComesCurrentYearToDate: public mmReportCategoryExpensesComes
164 {
165 public:
166     mmReportCategoryExpensesComesCurrentYearToDate();
167 };
168 
169 class mmReportCategoryExpensesComesLastFinancialYear: public mmReportCategoryExpensesComes
170 {
171 public:
172     mmReportCategoryExpensesComesLastFinancialYear(int day, int month);
173 };
174 
175 class mmReportCategoryExpensesComesCurrentFinancialYear: public mmReportCategoryExpensesComes
176 {
177 public:
178     mmReportCategoryExpensesComesCurrentFinancialYear(int day, int month);
179 };
180 
181 class mmReportCategoryExpensesComesCurrentFinancialYearToDate : public mmReportCategoryExpensesComes
182 {
183 public:
184     mmReportCategoryExpensesComesCurrentFinancialYearToDate(int day, int month);
185 };
186 
187 class mmReportCategoryExpensesCategories : public mmReportCategoryExpenses
188 {
189 public:
190     explicit mmReportCategoryExpensesCategories(mmDateRange* date_range = new mmAllTime()
191     , const wxString& title = _("Categories"));
192 };
193 
194 class mmReportCategoryExpensesCategoriesCurrentMonth: public mmReportCategoryExpensesCategories
195 {
196 public:
197     mmReportCategoryExpensesCategoriesCurrentMonth();
198 };
199 
200 class mmReportCategoryExpensesCategoriesCurrentMonthToDate: public mmReportCategoryExpensesCategories
201 {
202 public:
203     mmReportCategoryExpensesCategoriesCurrentMonthToDate();
204 };
205 
206 class mmReportCategoryExpensesCategoriesLastMonth: public mmReportCategoryExpensesCategories
207 {
208 public:
209     mmReportCategoryExpensesCategoriesLastMonth();
210 };
211 
212 class mmReportCategoryExpensesCategoriesLast30Days: public mmReportCategoryExpensesCategories
213 {
214 public:
215     mmReportCategoryExpensesCategoriesLast30Days();
216 };
217 
218 class mmReportCategoryExpensesCategoriesLastYear: public mmReportCategoryExpensesCategories
219 {
220 public:
221     mmReportCategoryExpensesCategoriesLastYear();
222 };
223 
224 class mmReportCategoryExpensesCategoriesCurrentYear: public mmReportCategoryExpensesCategories
225 {
226 public:
227     mmReportCategoryExpensesCategoriesCurrentYear();
228 };
229 
230 class mmReportCategoryExpensesCategoriesCurrentYearToDate: public mmReportCategoryExpensesCategories
231 {
232 public:
233     mmReportCategoryExpensesCategoriesCurrentYearToDate();
234 };
235 
236 class mmReportCategoryExpensesCategoriesLastFinancialYear: public mmReportCategoryExpensesCategories
237 {
238 public:
239     mmReportCategoryExpensesCategoriesLastFinancialYear(int day, int month);
240 };
241 
242 class mmReportCategoryExpensesCategoriesCurrentFinancialYear: public mmReportCategoryExpensesCategories
243 {
244 public:
245     mmReportCategoryExpensesCategoriesCurrentFinancialYear(int day, int month);
246 };
247 
248 class mmReportCategoryExpensesCategoriesCurrentFinancialYearToDate : public mmReportCategoryExpensesCategories
249 {
250 public:
251     mmReportCategoryExpensesCategoriesCurrentFinancialYearToDate(int day, int month);
252 };
253 
254 #endif // MM_EX_REPORTCATEGEXP_H_
255