Compare commits

...

3219 Commits
3.2.3 ... 3.10

Author SHA1 Message Date
James Cole
9cac7d46c0 Merge branch 'release/3.10' 2016-08-12 16:03:30 +02:00
James Cole
99b3e24836 Code optimalization 2016-08-12 15:50:52 +02:00
James Cole
ffb699cb06 Clean up code. 2016-08-12 15:34:15 +02:00
James Cole
2947ec0002 Small optimisations. 2016-08-12 15:27:44 +02:00
James Cole
5c4d010bde Code cleanup. 2016-08-12 15:10:03 +02:00
James Cole
955306d877 Remove travis file and fix NULL error in sqlite. 2016-08-12 14:50:25 +02:00
James Cole
015935ed55 Implemented ABN Amro specific import code. 2016-08-12 12:55:52 +02:00
James Cole
48f4cceb19 Mention new version. 2016-08-12 10:47:09 +02:00
James Cole
9850220aac Add new languages. 2016-08-12 10:46:22 +02:00
James Cole
c4ac1460f0 Expanded translations 2016-08-12 10:44:27 +02:00
James Cole
b9e1e01337 New translations. 2016-08-12 10:34:45 +02:00
James Cole
76649cb7de Extended views and language. 2016-08-12 10:07:53 +02:00
James Cole
5e310776b4 New change log 2016-08-12 09:50:54 +02:00
James Cole
4d7fa11172 Upgrade instructions for 3.10 2016-08-12 09:35:09 +02:00
James Cole
28962007c1 More code for new importer 2016-08-12 09:27:09 +02:00
James Cole
2111873bcf Fixed a bug in tag creation. 2016-08-11 19:01:23 +02:00
James Cole
0aaf9a6fda Extend rule set for import. 2016-08-11 18:44:11 +02:00
James Cole
186b704509 Lots of new code to test the import routine.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-11 10:21:32 +02:00
James Cole
efe9933721 Import storage routine is creating the first transaction journals.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-11 08:00:02 +02:00
James Cole
200366f5be Extended the validator and created more code to handle exceptions.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-10 18:49:16 +02:00
James Cole
c9bd72337d Some notes on the import process. 2016-08-06 09:31:32 +02:00
James Cole
d4510440b8 Split the importer and the setup routine. 2016-08-06 06:28:21 +02:00
James Cole
5a9cf698f7 Configuration for import routine. 2016-08-06 06:21:46 +02:00
James Cole
5826fec519 Some new import stuff. 2016-08-06 06:21:25 +02:00
James Cole
7035600984 Add some logging for #283 2016-08-05 21:50:49 +02:00
James Cole
b1dfb5811f Merge pull request #286 from niekvanderkooy/develop
Generalise Steam::phpBytes
2016-08-05 21:42:40 +02:00
Niek van der Kooy
51570a5d08 Allow phpBytes to work with configs where gigabyte file sizes are allowed 2016-08-05 20:54:59 +02:00
Niek van der Kooy
f065f3a0b8 Make phpBytes case insensitive, since php.ini can contain both capitals and small letters 2016-08-05 20:53:09 +02:00
James Cole
47376f1f35 Fix a problem mentioned in issue #283
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-05 19:29:44 +02:00
James Cole
bcfe2c6410 Fixes #284
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-05 18:52:16 +02:00
James Cole
09d63b584d Save old data; bread crumbs 2016-08-04 06:14:08 +02:00
James Cole
5f5469a7d4 Moved some files around. 2016-08-04 06:10:30 +02:00
James Cole
38800d61b0 New user related code. 2016-08-04 06:07:53 +02:00
James Cole
1186e95c51 Admin view will show some IP addresses.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-03 20:57:01 +02:00
James Cole
d870e0f42e Fix split query. 2016-08-02 19:42:41 +02:00
James Cole
0db9852769 This should fix a bug in split expenses. 2016-08-02 19:12:18 +02:00
James Cole
7e3f9048fe Fixed some fields in split thing. 2016-08-01 20:14:23 +02:00
James Cole
1ba88f182b Various CSV bugs and a config bug fixed. 2016-07-31 17:17:45 +02:00
James Cole
c8f5a6b7ad Ignore deleted columns. 2016-07-30 20:04:24 +02:00
James Cole
d26bbf3cdc Handling import values. This is a dead end but it seemed a good idea. 2016-07-30 19:09:58 +02:00
James Cole
0de72b6914 Ignore result.html 2016-07-30 16:29:49 +02:00
James Cole
e41c89bd59 Does not belong. 2016-07-30 16:29:17 +02:00
James Cole
541d9ebdd9 Optimised some code. 2016-07-30 16:29:04 +02:00
James Cole
1e724712e0 Bug fix in converter 2016-07-29 21:42:12 +02:00
James Cole
3682467ae3 Each CSV converter can set the certainty of their conversion. 2016-07-29 21:40:58 +02:00
James Cole
7707c81b2d Each CSV converter can set the certainty of their conversion. 2016-07-29 21:29:46 +02:00
James Cole
e434de72a3 Expand fields. 2016-07-26 20:40:46 +02:00
James Cole
ce191fa6d3 Fix split deposit. 2016-07-26 20:26:46 +02:00
James Cole
90865a5284 Fix recursive. 2016-07-24 19:24:02 +02:00
James Cole
684f6e0b5c Don't need these. 2016-07-24 19:07:47 +02:00
James Cole
c287bc139c Check new list. 2016-07-24 18:51:39 +02:00
James Cole
1392275b81 Lots of new code for importer and some preferences. 2016-07-24 18:47:55 +02:00
James Cole
87c0f1d86e More CSV related updates. 2016-07-23 21:37:06 +02:00
James Cole
a4a723cfc6 Fixed import error. 2016-07-20 15:57:42 +02:00
James Cole
921e2c06f4 Beta warning for import thing. 2016-07-20 15:47:30 +02:00
James Cole
cb9433f4b9 This should fix #280 2016-07-17 08:50:22 +02:00
James Cole
1be6af820e No map for tags. 2016-07-17 08:35:04 +02:00
James Cole
3b686b6d1c New but empty converters. 2016-07-16 08:25:39 +02:00
James Cole
697566fe42 New importers. 2016-07-16 07:58:25 +02:00
James Cole
5130ba7ea4 Working IBAN account import thing. 2016-07-15 22:37:47 +02:00
James Cole
c9e46a4dd1 Lots of import related code. 2016-07-15 22:26:08 +02:00
James Cole
f5b3dc36e3 Fix view. 2016-07-05 09:02:01 +02:00
James Cole
f1e8d1cf1e Show bill average. 2016-07-05 08:57:45 +02:00
James Cole
e8e7ab01d2 Merge branch 'develop' of github.com:JC5/firefly-iii into develop 2016-07-04 12:38:22 +02:00
James Cole
9244994233 Fix bug that would report wrong file size to browser. 2016-07-04 12:37:33 +02:00
James Cole
ae768a8525 Works up until actual import. 2016-07-02 23:08:47 +02:00
James Cole
162c762973 First set of data mappers. 2016-07-02 20:40:23 +02:00
James Cole
57b5981904 Fix #266 for period-chart. 2016-07-02 17:42:27 +02:00
James Cole
275d19e71d Fix #266 for all-chart. 2016-07-02 17:39:58 +02:00
James Cole
189b11befa Extra page number check for issue #276 2016-07-02 17:36:46 +02:00
James Cole
a56a5fc228 New code for import routine. 2016-07-02 17:33:57 +02:00
James Cole
cbe3fb73a8 Catch decrypt exceptions. 2016-06-27 16:36:28 +02:00
James Cole
3d58fbebec Should not have committed this. 2016-06-27 16:25:17 +02:00
James Cole
b947ff50ed Fix chart thing. 2016-06-27 16:11:49 +02:00
James Cole
18d2741814 More code for the new CSV import 2016-06-27 15:15:46 +02:00
James Cole
93a54780ab Fixes a bug in the 2FA activation thing. 2016-06-24 21:58:57 +02:00
James Cole
3d201db6fc More code for import. 2016-06-24 14:24:34 +02:00
James Cole
9ffc0936ee Merge branch 'feature/new-csv-import' into develop
# Conflicts:
#	app/Helpers/Csv/Importer.php
2016-06-23 12:15:19 +02:00
James Cole
fbf9e00208 Change preferences info. 2016-06-23 12:08:14 +02:00
James Cole
2c826451d1 Fix delete routine and some NULLs 2016-06-23 12:07:31 +02:00
James Cole
617a5c0606 Fix date range. 2016-06-23 08:01:15 +02:00
James Cole
8331a7e34a Rename stuff. 2016-06-18 07:37:12 +02:00
James Cole
8ee1676f0a New migrations. 2016-06-18 07:36:15 +02:00
James Cole
5dc8620c43 More new migrations. 2016-06-17 14:06:38 +02:00
James Cole
d2733a4df0 First attempt at rewriting all migrations. 2016-06-17 06:03:42 +02:00
James Cole
ae649223d8 Mobile add money to piggy routine 2016-06-16 20:52:59 +02:00
James Cole
6267930938 Work on new chart for year report. 2016-06-16 20:52:30 +02:00
James Cole
bdee8cde77 This fixes #273 2016-06-16 08:04:22 +02:00
James Cole
e63f216905 Fix small bug in reorder routine. 2016-06-15 09:58:33 +02:00
James Cole
ec18165698 Fixed #267 2016-06-11 07:38:30 +02:00
James Cole
307e6a2337 Renamed fields #267 2016-06-11 06:36:46 +02:00
James Cole
b80d8cf774 Move date picker stuff to new method. 2016-06-11 06:33:51 +02:00
James Cole
7a5ef6013a Fix #271 2016-06-11 06:31:56 +02:00
James Cole
13b92c47d9 Translations and fixes. 2016-06-11 06:31:40 +02:00
James Cole
5a79bc0a99 Initial code base for new CSV import. 2016-06-10 21:00:00 +02:00
James Cole
beda6ec3a9 Removed old CSV stuff. 2016-06-10 15:25:24 +02:00
James Cole
c619b8730b Implemented #264 2016-06-07 12:22:46 +02:00
James Cole
c14ec8b006 New change log. 2016-06-07 12:22:30 +02:00
James Cole
10c7786248 Merge branch 'release/3.9.1' 2016-06-06 20:25:55 +02:00
James Cole
08ff08685c Small updates for 3.9.1 2016-06-06 20:25:01 +02:00
James Cole
8091dbfdfa Restore views (#262) 2016-06-06 09:28:35 +02:00
James Cole
8dc106b79a Restore config (#262) 2016-06-06 09:28:25 +02:00
James Cole
7527433738 Restore provider (#262) 2016-06-06 09:25:29 +02:00
James Cole
1502e08a7a Restore routes (#262) 2016-06-06 09:24:51 +02:00
James Cole
c9679f1d4f Restore bread crumbs (#262) 2016-06-06 09:23:55 +02:00
James Cole
6b976dd6b9 Restore controller (#262) 2016-06-06 09:22:28 +02:00
James Cole
8da4abf655 Restore helpers (#262) 2016-06-06 09:22:20 +02:00
James Cole
2e26193333 This should fix #266 2016-05-24 16:08:43 +02:00
James Cole
ada43bc0dd Fix #265 2016-05-24 11:28:24 +02:00
James Cole
a447c886c4 Basic for for #262
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-22 21:11:30 +02:00
James Cole
288e713f94 Remove all code related to the CSV importer in preparation of #262
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-22 20:18:16 +02:00
James Cole
f8eb1fa44a Merge branch 'release/3.9.0'
Signed-off-by: James Cole <thegrumpydictator@gmail.com>

# Conflicts:
#	app/Helpers/Csv/Converter/BillName.php
2016-05-22 16:46:11 +02:00
James Cole
afc794513f last minute composer update [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-22 16:43:47 +02:00
James Cole
7e6d3c9d6b Various last minute bug fixes.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-22 16:38:32 +02:00
James Cole
44960e8e42 Various last minute bug fixes. 2016-05-22 15:48:34 +02:00
James Cole
41430c3bb2 Same bug, another line. 2016-05-22 09:08:37 +02:00
James Cole
2f435019e0 Fix bug. 2016-05-22 09:04:16 +02:00
James Cole
480e70dfac Sharper spent in period. [skip ci] 2016-05-20 18:30:48 +02:00
James Cole
c4818334e7 Sharper spent in period. [skip ci] 2016-05-20 18:29:51 +02:00
James Cole
a5d5f86aed Some code cleanup and a better chart [skip ci] 2016-05-20 18:26:43 +02:00
James Cole
78afb771b1 Code cleanup [skip ci] 2016-05-20 17:58:10 +02:00
James Cole
a74a646777 Code cleanup. Moving closer to new release. 2016-05-20 17:53:03 +02:00
James Cole
87f9ca3bb2 Removed some old configuration values. 2016-05-20 17:28:07 +02:00
James Cole
d54e264a91 Cannot create empty tags.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 15:09:25 +02:00
James Cole
99aea5ce7a Fix bug in verification.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 15:08:24 +02:00
James Cole
e10d5e89e5 Last minute bug fixes.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 15:02:52 +02:00
James Cole
0105456828 Copyright notices. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 12:42:21 +02:00
James Cole
5c7df5c04d Copyright notices. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 12:41:23 +02:00
James Cole
563ede822f Copyright notices. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 12:27:31 +02:00
James Cole
786cfc21c7 Make strval for bcadd [skip ci] 2016-05-20 12:08:48 +02:00
James Cole
8f0856e31a Make strval for bcadd [skip ci] 2016-05-20 12:07:55 +02:00
James Cole
bea075c74d Make strval for bcadd [skip ci] 2016-05-20 12:06:54 +02:00
James Cole
5f82accb61 Point to other library. [skip ci] 2016-05-20 12:03:28 +02:00
James Cole
95f50ca2fd Point to other library. [skip ci] 2016-05-20 12:02:19 +02:00
James Cole
d8b76bdfd2 Code cleanup [skip ci] 2016-05-20 11:59:54 +02:00
James Cole
74a9edaaf7 Bug fixes in strict types. 2016-05-20 11:53:34 +02:00
James Cole
7dd858be39 Fix bugs. 2016-05-20 11:27:41 +02:00
James Cole
7d7ff71384 New routes. 2016-05-20 11:09:09 +02:00
James Cole
003177fa49 Move stuff around. 2016-05-20 11:09:02 +02:00
James Cole
3c3a83330d More moving stuff around. 2016-05-20 11:02:07 +02:00
James Cole
724f423692 Move some stuff around. 2016-05-20 09:45:24 +02:00
James Cole
65b8882ed4 Clean up repository. 2016-05-20 09:25:17 +02:00
James Cole
66d7fd7d4c Declare strict types. 2016-05-20 08:57:45 +02:00
James Cole
782a6f289c Remove deprecated methods. 2016-05-20 08:11:54 +02:00
James Cole
70d936bb8f Fix filters and other methods that used deprecated methods. 2016-05-20 08:09:53 +02:00
James Cole
dda3082c7e Some code cleanup. 2016-05-20 08:00:35 +02:00
James Cole
ed948cc965 Allow user to split unsplit journal 2016-05-20 07:51:26 +02:00
James Cole
0347649f42 Fix some views. 2016-05-20 06:58:13 +02:00
James Cole
c66fe2b541 Fix some views [skip ci] 2016-05-20 06:27:48 +02:00
James Cole
8c1ae76c7a More tight report thing [skip ci] 2016-05-19 13:39:36 +02:00
James Cole
04dee404c0 More narrow result for popup. [skip ci] 2016-05-19 13:38:12 +02:00
James Cole
b22dd29835 Fix charts. [skip ci] 2016-05-19 08:57:25 +02:00
James Cole
536a5cd1c8 New translations. [skip ci] 2016-05-18 18:13:38 +02:00
James Cole
b7f1bcf7c9 Slightly larger screenshots. [skip ci] 2016-05-18 14:24:59 +02:00
James Cole
5e590072dd Slightly larger screenshots. [skip ci] 2016-05-18 14:24:31 +02:00
James Cole
d204b9b752 Slightly larger screenshots. [skip ci] 2016-05-18 14:23:54 +02:00
James Cole
22d1121193 New read me. [skip ci] 2016-05-18 14:22:48 +02:00
James Cole
e23c6521b9 Add expenses. [skip ci] 2016-05-18 14:19:33 +02:00
James Cole
b0cb9663a6 Updated read me [skip ci] 2016-05-18 07:23:11 +02:00
James Cole
95b7da89f0 Some code cleanup. 2016-05-18 07:01:27 +02:00
James Cole
b0a5b53abb Better number formatting. 2016-05-17 19:23:23 +02:00
James Cole
ce78c8993f Optimise query. [skip ci] 2016-05-17 16:47:43 +02:00
James Cole
2538b4a885 Small changes to audit report. 2016-05-17 16:11:19 +02:00
James Cole
109d96ad16 Small but expensive changes to audit report. 2016-05-17 16:10:32 +02:00
James Cole
4cbb0d9716 Fixed split journals views. 2016-05-17 16:00:27 +02:00
James Cole
65ecea3b1c Small fix to split data. 2016-05-17 15:25:03 +02:00
James Cole
495b80f5ef More code for the split journal support. 2016-05-17 15:19:07 +02:00
James Cole
e113736887 Should fix issue #263 2016-05-17 12:45:31 +02:00
James Cole
042b7a4966 Fix multi-year chart. [skip ci] 2016-05-16 12:51:52 +02:00
James Cole
5ab8cb38d3 Small change in report [skip ci] 2016-05-16 12:47:43 +02:00
James Cole
fc4ab29244 Fixed chart. [skip ci] 2016-05-16 09:05:06 +02:00
James Cole
5a43e6cb9f Better query for no budget. [skip ci] 2016-05-16 07:13:54 +02:00
James Cole
4effc95c5f Fixed some report bugs. 2016-05-15 19:23:19 +02:00
James Cole
962965b5b7 Code cleanup. 2016-05-15 18:36:40 +02:00
James Cole
260b611293 Various fixes in report pages. 2016-05-15 18:16:31 +02:00
James Cole
d2131c371b Fixed more report details. 2016-05-15 17:53:00 +02:00
James Cole
eedf6a07f0 Fixed the income report. 2016-05-15 17:46:53 +02:00
James Cole
5cd1e7c100 Fix charts. [skip ci] 2016-05-15 16:15:17 +02:00
James Cole
6a750a998f Remove category chart from report controller. 2016-05-15 16:13:05 +02:00
James Cole
bd818b2dea Code clean up. 2016-05-15 15:39:22 +02:00
James Cole
4164ebcc69 Added a lot of todo things. 2016-05-15 15:24:23 +02:00
James Cole
60d732067b Made some things less complex. 2016-05-15 15:08:59 +02:00
James Cole
b7b52707fb Fix Travis. 2016-05-15 15:02:07 +02:00
James Cole
f373c72679 Remove tests. 2016-05-15 15:01:29 +02:00
James Cole
ec2027b8db Update git ignore. [skip ci] 2016-05-15 14:48:52 +02:00
James Cole
a84de5db77 Enable caching. Remove stuff for development. 2016-05-15 14:48:21 +02:00
James Cole
5065b1ee03 Enable cache [skip ci] 2016-05-15 12:39:39 +02:00
James Cole
a0aa114ee6 Update balance view. [skip ci] 2016-05-15 12:32:18 +02:00
James Cole
823839fbf6 Better routes and titles. 2016-05-15 12:26:40 +02:00
James Cole
1c93d8bf79 More test data and better views. 2016-05-15 12:08:41 +02:00
James Cole
626404407e More support for #142 2016-05-15 09:00:49 +02:00
James Cole
446ab62d38 View updates. [skip ci] 2016-05-14 23:14:49 +02:00
James Cole
0d39161ec3 Fix iban in test data. 2016-05-14 22:23:55 +02:00
James Cole
29be16dcba Fix complex query. [skip ci] 2016-05-14 22:21:08 +02:00
James Cole
b0bb790386 Experimental query. [skip ci] 2016-05-14 22:12:16 +02:00
James Cole
e64b40d58b Experimental query. [skip ci] 2016-05-14 22:11:49 +02:00
James Cole
4870945af2 Remove references to unused library. 2016-05-14 21:55:43 +02:00
James Cole
a547a5f3f9 New Chart library. [skip ci] 2016-05-14 21:50:02 +02:00
James Cole
e5eabdf7e7 Clean up test data. 2016-05-14 21:49:16 +02:00
James Cole
f78d56b149 Will implement changes to test database. 2016-05-14 17:08:28 +02:00
James Cole
771926c779 No longer needed. 2016-05-14 14:02:37 +02:00
James Cole
6090efe2df Refactoring. 2016-05-14 14:02:12 +02:00
James Cole
863227c55c Some refactoring. 2016-05-14 13:51:33 +02:00
James Cole
5a6967cefd Better formatting for split transactions. 2016-05-13 19:40:13 +02:00
James Cole
5166171e5d More refactoring 2016-05-13 17:22:24 +02:00
James Cole
3e36a29c23 More refactoring. 2016-05-13 15:58:30 +02:00
James Cole
20e1e50032 Refactoring. 2016-05-13 15:53:39 +02:00
James Cole
36bc483edb Reorder some fields. 2016-05-13 10:50:19 +02:00
James Cole
aa59227786 Fixed transactions and attachments. 2016-05-13 09:55:06 +02:00
James Cole
2d8449ed68 This should just about finished split transaction editing. 2016-05-13 07:33:04 +02:00
James Cole
d7ab482ae1 Various updates for split transactions. 2016-05-12 22:44:31 +02:00
James Cole
cfcc4ce88a Let's leave this on false. 2016-05-12 16:34:44 +02:00
James Cole
eda44bbed0 Merge branch 'develop' of github.com:JC5/firefly-iii into develop 2016-05-12 12:13:42 +02:00
James Cole
988049061d Start with edit split journals routine. 2016-05-12 12:13:10 +02:00
James Cole
ebb1c5ae25 Merge pull request #260 from zjean/ssl
Force https schema if APP_FORCE_SSL=true in .env
2016-05-12 11:00:41 +02:00
James Cole
ce7eebac5c Build edit split transactions. 2016-05-12 10:38:44 +02:00
James Cole
b7c446f7db Start with edit and view screens. 2016-05-11 23:03:13 +02:00
James Cole
7c39a04c4b Cleanup. 2016-05-11 17:33:22 +02:00
James Cole
037d84b810 Fixes for transactions. 2016-05-11 17:17:43 +02:00
James Cole
529bf50c85 Removed some dead code. 2016-05-11 10:37:56 +02:00
James Cole
d2b4bd78a9 Removed some dead code. 2016-05-11 10:02:27 +02:00
James Cole
e1c146a5c1 Reinstate chart. 2016-05-11 09:17:47 +02:00
James Cole
ed9acbdfde Reinstate report. 2016-05-11 09:08:18 +02:00
James Cole
dc825d5a9c Fix queries. 2016-05-11 08:40:22 +02:00
James Cole
9f8faf15f1 Reinstate sorting. 2016-05-11 08:10:05 +02:00
James Cole
934656c954 Some small changes. 2016-05-11 07:57:16 +02:00
James Cole
d233a2df3c Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Should fix frontpage.

# Conflicts:
#	app/Models/TransactionJournal.php
#	app/Repositories/Account/AccountRepository.php
2016-05-11 06:08:05 +02:00
James Cole
7c7740d3ba Should fix frontpage. 2016-05-10 09:33:23 +02:00
James Cole
cda6cfb4cd Fix more charts. 2016-05-09 20:15:26 +02:00
James Cole
a90d095609 More stuff for categories. 2016-05-09 18:06:53 +02:00
James Cole
98e683329e New stuff for categories and transactions. 2016-05-08 13:45:23 +02:00
James Cole
3588bd881c More chart cleanup. 2016-05-06 22:54:36 +02:00
James Cole
0460811e6c Fixed some more charts. 2016-05-06 22:53:08 +02:00
James Cole
27f5fe18df Moving stuff around, optimising charts. 2016-05-06 10:32:26 +02:00
James Cole
6d944ec98f More cleanup for budgets. 2016-05-06 06:15:46 +02:00
James Cole
adf6691470 This breaks everything budget-related. 2016-05-05 22:03:35 +02:00
James Cole
dd8b500efd These budget charts are the worst, I'm telling you. 2016-05-05 21:25:20 +02:00
James Cole
4e1ff8c4a3 Removed phpunit.xml 2016-05-05 19:07:46 +02:00
James Cole
e73d590ead Update composer.lock 2016-05-05 19:05:29 +02:00
James Cole
5cc22f49cf Fix tests. 2016-05-05 19:04:21 +02:00
James Cole
eb3d2b1749 Building split transactions and fixing tests. 2016-05-05 18:59:46 +02:00
James Cole
21a197ba46 More translations. 2016-05-05 07:46:19 +02:00
James Cole
0b74707638 Display and handle errors. 2016-05-05 07:46:11 +02:00
James Cole
16dc8b7d68 Translation for error. 2016-05-05 07:45:52 +02:00
James Cole
5a8abe004e Field rename 2016-05-05 07:45:40 +02:00
James Cole
b211d72c8b Static data must remain static data. 2016-05-05 07:45:29 +02:00
James Cole
36f3eb8b2f Small fix in journal handler. 2016-05-05 07:09:12 +02:00
zjean
cb1cb9f328 Force https schema if APP_FORCE_SSL=true in .env 2016-05-04 22:09:42 +02:00
James Cole
3344bb7263 Code cleanup. 2016-05-02 20:49:19 +02:00
James Cole
5e1167b8ae Code cleanup. 2016-05-01 15:05:29 +02:00
James Cole
b80db054e2 Remove journal collector. 2016-05-01 09:52:58 +02:00
James Cole
c66df3cb2c Code cleanup. 2016-05-01 09:42:08 +02:00
James Cole
ac8ff4e565 Clean up repository. 2016-05-01 07:09:58 +02:00
James Cole
bfa7ee90f4 Reverse stuff 2016-05-01 06:59:08 +02:00
James Cole
77c9e37584 Move some stuff around. 2016-05-01 06:37:47 +02:00
James Cole
80350f8423 Fix for transactions. 2016-04-30 22:30:11 +02:00
James Cole
3c1ff4d21f Fix query. 2016-04-30 22:05:58 +02:00
James Cole
55b8f03590 Some new data thing. 2016-04-30 21:20:39 +02:00
James Cole
1fd7852309 Fix query thing. 2016-04-30 20:24:47 +02:00
James Cole
9c5292962f More stuff for splits. 2016-04-30 19:50:42 +02:00
James Cole
c05c6e72c0 Display budget and category if relevant. 2016-04-30 16:36:58 +02:00
James Cole
bdcd033952 Fix edit routine 2016-04-30 12:46:21 +02:00
James Cole
4ec6bcc8c7 More code for split and small bug fix in attachment helper. 2016-04-30 09:48:39 +02:00
James Cole
11ea4b6d47 Fix migrations. 2016-04-30 07:15:28 +02:00
James Cole
e4f45b5370 List of categories will check transactions as well. #142 2016-04-29 22:00:24 +02:00
James Cole
9baadd3793 Use other method of collecting query fields. #142 2016-04-29 21:52:15 +02:00
James Cole
94a79876ce View for split transactions. #142 2016-04-29 21:49:18 +02:00
James Cole
42c3d1fa68 Expanding support for split transactions #142 2016-04-29 21:36:59 +02:00
James Cole
0e3ccebd0b First attempt at #142. Needs a lot of work still. 2016-04-29 20:59:28 +02:00
James Cole
4af8272faa Updates to transactions. 2016-04-29 17:29:13 +02:00
James Cole
0ef3d0cf03 Better message for issue #247 2016-04-29 17:26:59 +02:00
James Cole
f266b92ef1 This catches issue #247 2016-04-29 17:26:38 +02:00
James Cole
462c9fb3aa Merge pull request #259 from tonicospinelli/pt_BR
add brazilian currency and translation
2016-04-29 15:11:23 +02:00
Antonio Spinelli
568186828c add brazilian currency and translation
fix #257
2016-04-29 07:30:22 -03:00
James Cole
8bcc319b7d Better demo warning and budget indication. 2016-04-29 11:34:48 +02:00
James Cole
baff9780de Smaller report. [skip ci] 2016-04-29 11:05:52 +02:00
James Cole
d8b8f98738 Translations. [skip ci] 2016-04-29 09:56:50 +02:00
James Cole
b714eaac06 Boxes will try to remember their state and auto-collapse. 2016-04-29 09:47:47 +02:00
James Cole
14b94a5bd2 Simplified some code. 2016-04-29 08:56:56 +02:00
James Cole
ea014a6504 Some code simplifications. 2016-04-28 16:30:21 +02:00
James Cole
e28e66e8f1 Fix ABN AMRO importer 2016-04-28 16:23:21 +02:00
James Cole
b47a140c2f Updates to budgets. 2016-04-28 10:59:36 +02:00
James Cole
19d7e27fa9 Code cleanup. 2016-04-28 05:50:29 +02:00
James Cole
2d368f226e Remove parameters. [skip ci] 2016-04-27 19:23:24 +02:00
James Cole
75d81f8f18 Parameter change [skip ci] 2016-04-27 19:22:15 +02:00
James Cole
e3437ba697 Various code cleanup. 2016-04-27 19:21:47 +02:00
James Cole
84f299c33b Forgot a return statement. 2016-04-27 10:39:27 +02:00
James Cole
3d4489efe6 Code cleanup. 2016-04-27 10:38:51 +02:00
James Cole
6aa50e3c00 @roberthorlings I have no idea if this is a correct fix. 2016-04-27 09:20:51 +02:00
James Cole
b70498c337 Some cleaning up. 2016-04-27 06:46:02 +02:00
James Cole
f34aa77d1d Cleaned up some code. 2016-04-27 06:43:17 +02:00
James Cole
3833a41acb Fix sorting. 2016-04-27 06:19:13 +02:00
James Cole
b5a5a216cd Fine tune chart. [skip ci] 2016-04-26 22:32:55 +02:00
James Cole
d9da2a57b6 Fix query error [skip ci] 2016-04-26 22:31:49 +02:00
James Cole
1591b61b77 Expand new charts. 2016-04-26 22:30:53 +02:00
James Cole
66f2df9677 Some code cleanup and I sneaked in a chart optimisation. 2016-04-26 22:21:34 +02:00
James Cole
5199377113 Fixes tests.. for now. 2016-04-26 21:47:16 +02:00
James Cole
da202317c0 Code cleanup. 2016-04-26 21:40:15 +02:00
James Cole
1d2a4e707e Code cleanup in export routine 2016-04-26 20:49:22 +02:00
James Cole
edf9dbc6e8 Some cleaning up [skip ci] 2016-04-26 14:56:42 +02:00
James Cole
dfbe6e5b6e Code clean up. [skip ci] 2016-04-26 12:39:29 +02:00
James Cole
d551333fa2 Some cleaning up and more charts. 2016-04-26 09:21:57 +02:00
James Cole
01cab599bb And now to make sure it works. 2016-04-26 08:11:26 +02:00
James Cole
1c8834fffb Some code cleaning up and refactoring. 2016-04-26 08:09:10 +02:00
James Cole
22e6ea700f Some extensions to budgets. 2016-04-25 21:37:08 +02:00
James Cole
7f7d6cf893 Expand query [skip ci] 2016-04-25 21:07:17 +02:00
James Cole
a94d476b75 Small additions to budget handling [skip ci] 2016-04-25 20:05:09 +02:00
James Cole
eb5e55a272 Some code cleanup. Fixes the tests. 2016-04-25 18:43:09 +02:00
James Cole
53c80aaef8 Small optimizations to reports. 2016-04-25 14:53:41 +02:00
James Cole
607d0115f0 Code improvements for budgets. 2016-04-25 13:20:42 +02:00
James Cole
b4f18dbe77 Database stuff. 2016-04-25 11:44:41 +02:00
James Cole
51d97cdca5 Reinstated a chart. 2016-04-25 09:57:39 +02:00
James Cole
2cd593157f Comment some stuff. 2016-04-25 09:50:46 +02:00
James Cole
ec70fde557 Start of some changes in budget overview related to #256 and #246 2016-04-25 09:49:34 +02:00
James Cole
950576d38b Better date format [skip ci] 2016-04-25 09:12:52 +02:00
James Cole
ce5304277d Translation for popup [skip ci] 2016-04-25 09:11:09 +02:00
James Cole
53760766a0 Fixed budget charts. 2016-04-24 20:41:12 +02:00
James Cole
ed863986a7 Fine tuning. [skip ci] 2016-04-24 20:28:08 +02:00
James Cole
89ff5a83b5 Expand cache. [skip ci] 2016-04-24 20:25:35 +02:00
James Cole
fe0b62b9b4 Cache charts. [skip ci] 2016-04-24 20:23:42 +02:00
James Cole
32c8ddbe1b First render of new budget charts. 2016-04-24 20:23:17 +02:00
James Cole
2cfbfd8649 Start of better budget charts. 2016-04-24 20:00:20 +02:00
James Cole
3f6c19dec4 Merge branch 'release/3.8.4'
# Conflicts:
#	app/Helpers/Csv/PostProcessing/Bill.php
2016-04-24 18:48:16 +02:00
James Cole
93421b50f9 New translations. 2016-04-24 18:47:03 +02:00
James Cole
54e829173a Prep for next release. 2016-04-24 18:44:29 +02:00
James Cole
4fe38bd31b New release 2016-04-24 18:38:58 +02:00
James Cole
fb0638e824 Say what each thing is. 2016-04-24 18:36:44 +02:00
James Cole
108794a6b6 Improved verify command. 2016-04-24 18:35:45 +02:00
James Cole
9c16fc1380 Some small updates. 2016-04-24 18:25:52 +02:00
James Cole
99c219ed97 Three fixes courtesy of user @Bonno 2016-04-24 12:24:59 +02:00
James Cole
ec12238ea1 Some code cleanup. 2016-04-24 09:14:40 +02:00
James Cole
bdbd22f98b Some language and code updates. 2016-04-24 09:02:21 +02:00
James Cole
b8e1944d20 Mass edit #241 2016-04-24 07:18:39 +02:00
James Cole
8883d185fe Fix tests. 2016-04-23 20:00:48 +02:00
James Cole
19e40e9976 Expand transaction lists for mass delete / edit functionality. 2016-04-23 18:55:57 +02:00
James Cole
fa85b2b5b2 Some layout fixes. [skip ci] 2016-04-23 18:53:16 +02:00
James Cole
5cf0131d75 New translations. 2016-04-23 12:14:24 +02:00
James Cole
3948cb8e6c New mass delete form and options. #241 2016-04-23 09:33:54 +02:00
James Cole
f43938726a Simple mass edit JS complete. Fallback for when the list.js is not included. #241 2016-04-23 06:11:31 +02:00
James Cole
8c8bb7a930 Start of mass delete code. #241 2016-04-21 14:57:58 +02:00
James Cole
3972882a33 Fix #251 2016-04-21 11:03:04 +02:00
James Cole
0ef5eeeb55 Take page size into account. [skip ci] 2016-04-21 10:34:16 +02:00
James Cole
ef48a79d0c Take page size into account. [skip ci] 2016-04-21 10:23:19 +02:00
James Cole
2bb883219c Take page size into account. 2016-04-21 09:10:37 +02:00
James Cole
23c0bb49c4 Take page size into account. [skip ci] 2016-04-21 09:04:19 +02:00
James Cole
13e59105ec Set correct path. [skip ci] 2016-04-21 09:01:34 +02:00
James Cole
98c057c516 Take page size into account. 2016-04-21 09:00:32 +02:00
James Cole
e293d69798 Take page size into account. 2016-04-21 08:59:31 +02:00
James Cole
b097e29104 New preference for page size. 2016-04-21 08:59:15 +02:00
James Cole
29fbd46e33 Fixes for translations. [skip ci] 2016-04-20 17:13:25 +02:00
James Cole
6a15afc723 New translations [skip ci] 2016-04-20 17:10:35 +02:00
James Cole
c56a39a726 Update chart js. [skip ci] 2016-04-20 13:54:13 +02:00
James Cole
4b80e46d26 Fix old bug. 2016-04-18 19:55:48 +02:00
James Cole
a6f3e61520 Fix #248 2016-04-18 19:41:16 +02:00
James Cole
cce4ef19e5 Fix #244 2016-04-18 19:34:15 +02:00
James Cole
1951491c04 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix #243
2016-04-18 19:33:27 +02:00
James Cole
87b72e4bcd Fix #245 2016-04-18 19:33:02 +02:00
James Cole
2c6643d691 Fix #243 2016-04-18 14:15:10 +02:00
James Cole
d02df46517 Fix bug in bill name import routine 2016-04-17 20:40:26 +02:00
James Cole
0c0cc417ee Order chart thing again [skip ci] 2016-04-17 19:59:15 +02:00
James Cole
f0c03e8a3b Update chart order. 2016-04-17 19:58:09 +02:00
James Cole
345766f387 Merge branch 'release/3.8.3' 2016-04-17 12:13:00 +02:00
James Cole
3fa659632c Updated composer.lock [skip ci] 2016-04-17 12:12:35 +02:00
James Cole
95b92b7d1e Should fix test. 2016-04-17 11:43:07 +02:00
James Cole
466e988627 Correct date [skip ci] 2016-04-17 11:32:36 +02:00
James Cole
dc3c967c9f Update stuff in anticipation of new release. 2016-04-17 11:32:18 +02:00
James Cole
1fc31b4d8f Fixed a bug courtesy of Johan. 2016-04-17 11:28:44 +02:00
James Cole
e4a4b0a4eb Config update [skip ci] 2016-04-16 08:41:55 +02:00
James Cole
a9c026884d Fix null pointer. 2016-04-10 21:31:00 +02:00
James Cole
e893000ce9 Fix pie chart. 2016-04-10 20:28:32 +02:00
James Cole
32eeb3424d Code cleanup. 2016-04-10 17:51:51 +02:00
James Cole
ab523b6102 Make chart pretty 2016-04-10 17:03:36 +02:00
James Cole
b062222c45 Update chart options. 2016-04-10 11:28:55 +02:00
James Cole
2dddc843ce Fix chart heights. 2016-04-10 10:20:15 +02:00
James Cole
b74c1c8cf9 Upgrade chart library. 2016-04-10 10:05:50 +02:00
James Cole
d5d4bb2c4b Some javascript upgrades. 2016-04-10 08:23:31 +02:00
James Cole
89ac27ad10 Some code cleanup [skip ci] 2016-04-10 08:18:14 +02:00
James Cole
48b169c026 Fix comma thing [skip ci] 2016-04-09 21:07:43 +02:00
James Cole
0715b7406e Add language in cache as well. 2016-04-09 09:27:04 +02:00
James Cole
6e4991a34b Make help more reliable. 2016-04-09 09:24:17 +02:00
James Cole
8730af59bc Fix help text and debug. 2016-04-09 09:20:16 +02:00
James Cole
bdcc2c6c9f Prep for new report. 2016-04-09 09:16:51 +02:00
James Cole
6f0f6e86a1 Small bug fixes. 2016-04-09 09:10:11 +02:00
James Cole
3962d9da92 Text for error. 2016-04-09 06:02:30 +02:00
James Cole
5ed53d5f04 Some new code for CSV. 2016-04-08 20:36:11 +02:00
James Cole
ddb28b78c3 Some new translations and stuff. 2016-04-08 17:54:25 +02:00
James Cole
7699b6b4ea Update composer lock file. [skip ci] 2016-04-08 15:16:13 +02:00
James Cole
d783d05462 Some query optimisations for the audit report 2016-04-08 15:10:07 +02:00
James Cole
33bf373151 First attempt at audit report (uses lots of queries). 2016-04-08 14:50:18 +02:00
James Cole
8116644526 Some log fine tuning. 2016-04-08 14:44:53 +02:00
James Cole
dc4665e82a Add debug messages. 2016-04-08 11:59:44 +02:00
James Cole
732a85e51d Fix null call 2016-04-06 21:07:03 +02:00
James Cole
32190db8bb Fixed tests. 2016-04-06 21:05:43 +02:00
James Cole
25d3a115e0 Amounts better divided. 2016-04-06 20:59:09 +02:00
James Cole
30e3ed6410 Fix more tests. 2016-04-06 20:52:22 +02:00
James Cole
8b5a775dc5 Nonsense commit to test signing.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-04-06 20:16:28 +02:00
James Cole
2942c3a4be Nonsense commit to test signing.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-04-06 19:45:58 +02:00
James Cole
768d3bb3e8 Fix some tests. Won't fix all. 2016-04-06 19:44:42 +02:00
James Cole
250b2c2f53 PHP7 compatible function definitions. 2016-04-06 16:37:28 +02:00
James Cole
c8440af9a5 PHP7 compatible function definitions. 2016-04-06 09:27:45 +02:00
James Cole
37fe2d22b0 PHP7 compatible function definitions. 2016-04-05 22:00:03 +02:00
James Cole
b0b5d90976 Fixes the travis run. 2016-04-05 21:12:50 +02:00
James Cole
27b0c7f425 Moved a lot of files outside of the root. 2016-04-05 21:08:36 +02:00
James Cole
7c23571806 Missing translation. 2016-04-04 19:54:15 +02:00
James Cole
ea378c8d82 Fix search. [skip-ci] 2016-04-04 19:49:11 +02:00
James Cole
0fb45974ef Fix title. 2016-04-04 19:48:07 +02:00
James Cole
6490f9c128 Fix search. 2016-04-04 19:48:00 +02:00
James Cole
2d7f1af52c Add clear cache, for issue #237 2016-04-04 19:47:55 +02:00
James Cole
ac27659a59 Merge pull request #238 from nhaarman/fix_active-bill-expected-amount
Fixed incorrect average of expectedAmount in active bills.
2016-04-04 18:58:42 +02:00
Niek Haarman
11d59c8bd1 Fixed incorrect average of expectedAmount in active bills. 2016-04-04 18:15:38 +02:00
James Cole
a6936cbd02 Merge branch 'release/3.8.2' 2016-04-03 16:47:54 +02:00
James Cole
3be84d76ef Updated composer.lock and other files. [skip ci] 2016-04-03 16:47:27 +02:00
James Cole
9aed1f344f Code cleanup. 2016-04-03 15:47:00 +02:00
James Cole
4fff264630 New translations. 2016-04-03 15:45:41 +02:00
James Cole
2e444da2a3 Better titles. 2016-04-03 14:55:56 +02:00
James Cole
7a216f95ca Add sum. 2016-04-03 14:38:12 +02:00
James Cole
f22a9799a1 Hide some fields. 2016-04-03 14:01:27 +02:00
James Cole
90bdc40393 Fixed balance list. 2016-04-03 13:56:06 +02:00
James Cole
622a97c8d8 Category information. #159 2016-04-03 11:20:55 +02:00
James Cole
03691c81c2 More code for #159 [skip ci] 2016-04-03 11:14:36 +02:00
James Cole
885b56c465 More code for #159 2016-04-03 11:07:51 +02:00
James Cole
23cc7be231 More things [skip ci] 2016-04-03 10:51:37 +02:00
James Cole
bb82b0eb79 Better view for admin [skip ci] 2016-04-03 10:42:46 +02:00
James Cole
2e05f640b8 Title in guest view [skip ci] 2016-04-03 10:35:54 +02:00
James Cole
697a02ffee Page titles. 2016-04-03 10:34:42 +02:00
James Cole
ad402021ed Basic user admin. 2016-04-03 07:07:17 +02:00
James Cole
67caf6ef1f Code cleanup [skip ci] 2016-04-01 16:46:11 +02:00
James Cole
3277858c5a Code cleanup. [skip ci] 2016-04-01 16:44:46 +02:00
James Cole
3fbedf323f Fix list for no budget #159 2016-04-01 16:23:12 +02:00
James Cole
144a6130f2 First code for #159 popups 2016-04-01 16:06:55 +02:00
James Cole
fa38c975b6 New converters for #180 (Tag and accounts) 2016-04-01 14:17:12 +02:00
James Cole
c14fa1021c New converters for #180 (Currency) 2016-04-01 14:10:08 +02:00
James Cole
5e78cc02bd New converters for #180 (Category and some other stuff) 2016-04-01 13:23:12 +02:00
James Cole
429ef80fb9 New converters for #180 (Budget) 2016-04-01 13:17:07 +02:00
James Cole
e4d93cad27 New converters for #180 (Bill) 2016-04-01 13:07:19 +02:00
James Cole
d9a4840e37 New converters for #180 2016-04-01 13:03:38 +02:00
James Cole
a93070b98d Fixes #234. 2016-04-01 09:13:50 +02:00
James Cole
c05a942862 This fixes a null pointer exception. [skip ci] 2016-04-01 05:36:29 +02:00
James Cole
f9a7879c1e Damn git. 2016-03-30 17:51:40 +02:00
James Cole
bdfbc6d6a7 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  New activation message
2016-03-30 17:48:59 +02:00
James Cole
21181d8d8e Fixes for #233 2016-03-30 17:47:13 +02:00
James Cole
1c7a27b816 New activation message 2016-03-30 12:46:51 +02:00
James Cole
e953f58c74 Merge branch 'release/3.8.1' into develop 2016-03-29 17:42:45 +02:00
James Cole
9250cee9e7 Merge branch 'release/3.8.1' 2016-03-29 17:42:44 +02:00
James Cole
bb075d15ff Add warning about PHP 7.0 2016-03-29 17:42:32 +02:00
James Cole
a31f16bba7 Change log for 3.8.1 [skip ci] 2016-03-29 17:41:43 +02:00
James Cole
88a41c37f3 Bug fix, thank you scrutiniser. 2016-03-29 17:18:42 +02:00
James Cole
d21885ca98 New translations. 2016-03-29 16:38:42 +02:00
James Cole
d774f8e870 Code cleanup. 2016-03-29 16:17:06 +02:00
James Cole
08b5e66628 Some code cleanup. 2016-03-29 16:16:14 +02:00
James Cole
6fdfec3967 Clean up some code. 2016-03-29 16:13:36 +02:00
James Cole
ab4616a3ad Make some vars longer. 2016-03-29 16:10:51 +02:00
James Cole
cb34ff4c83 Clean up some code. 2016-03-29 16:02:54 +02:00
James Cole
bdbead256c Make field a number. 2016-03-29 16:02:09 +02:00
James Cole
f200086d01 Code for #207 2016-03-29 15:55:14 +02:00
James Cole
ef97c3b42d Some new help text for bills. #207 2016-03-29 15:33:09 +02:00
James Cole
ed8b41e8ec Add source account to scan, see issue #226 2016-03-29 15:24:40 +02:00
James Cole
aada3371b7 Better translations for dates and so on. 2016-03-29 15:09:37 +02:00
James Cole
38a9782bdf Debug. 2016-03-29 13:55:57 +02:00
James Cole
c6ac81dcf6 Some more confirmation things. 2016-03-29 13:52:51 +02:00
James Cole
2d3f3f0fde Updated the routes. 2016-03-29 13:45:18 +02:00
James Cole
993a2c7823 New middleware. 2016-03-29 12:23:10 +02:00
James Cole
87b36cf7e3 Update 2FA and account activation 2016-03-29 12:14:01 +02:00
James Cole
742f2c8d9f New middle ware for user activation. 2016-03-29 11:55:49 +02:00
James Cole
0d7ac5f1d8 Move some routes around. 2016-03-29 11:55:38 +02:00
James Cole
3adccff611 New events and their handlers for user activation and other things. 2016-03-29 11:55:25 +02:00
James Cole
08b8bd27f9 Expand Preferences to handle not logged in users. 2016-03-29 11:55:02 +02:00
James Cole
1059c7e2be Updated config for user activation. 2016-03-29 11:54:50 +02:00
James Cole
3ebcd5f738 New translations for user activation. 2016-03-29 11:54:36 +02:00
James Cole
4627ea1dec Updated views for user activation. 2016-03-29 11:54:26 +02:00
James Cole
7ed24e78d5 New emails for the activation. 2016-03-29 11:48:29 +02:00
James Cole
ae02e3fd8d New example configuration that includes user account activation (disabled by default). 2016-03-29 11:46:21 +02:00
James Cole
cc88d5962e Move code to event handlers instead of registration routine. 2016-03-28 19:50:24 +02:00
James Cole
70c8a524cd Should fix the tests 2016-03-22 17:22:48 +01:00
James Cole
9a8efc8a58 Info in tags for #159 2016-03-22 16:59:29 +01:00
James Cole
f0f67b87c4 Code for #159 2016-03-22 16:57:26 +01:00
James Cole
1a3ec98896 Give all icons some context, no value yet. 2016-03-22 16:55:04 +01:00
James Cole
efff44cba9 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix link to non-existing budget
2016-03-22 16:54:31 +01:00
James Cole
7227418c4c More fine-grained cookie control. 2016-03-22 15:04:51 +01:00
James Cole
29f93a9b73 Fix link to non-existing budget 2016-03-22 09:04:32 +01:00
James Cole
532aa2acd0 Fix amount [skip ci] 2016-03-21 19:29:24 +01:00
James Cole
6aca410f37 Fix amount [skip ci] 2016-03-21 19:28:22 +01:00
James Cole
f20656b516 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix for #227
2016-03-21 19:27:13 +01:00
James Cole
bcd7866e10 For debug, add float. [skip ci] 2016-03-21 19:24:15 +01:00
James Cole
c1b8d44209 Small various fixes. 2016-03-21 19:22:37 +01:00
James Cole
50e947fbbe Fix for #227 2016-03-21 08:48:36 +01:00
James Cole
189d969ee6 Include "no budget" thing for issue #152 2016-03-20 20:06:05 +01:00
James Cole
201790ff8d Cleanup transaction journal edit. #215 2016-03-20 17:12:34 +01:00
James Cole
cc26ce4143 Some scrutiniser related code cleanup. 2016-03-20 16:49:49 +01:00
James Cole
745e0aa525 Move to object held user object. 2016-03-20 16:47:53 +01:00
James Cole
6602b1587a Some scrutiniser related code cleanup. 2016-03-20 16:46:26 +01:00
James Cole
6698b57f52 Fixed a bug that would leave all amounts at zero. #224 2016-03-20 16:41:48 +01:00
James Cole
628268d47c Code to fix #223 2016-03-20 11:47:10 +01:00
James Cole
56a635212a Code for #155 2016-03-20 11:46:27 +01:00
James Cole
7e67eb17e0 All new translations for #218 2016-03-20 11:38:01 +01:00
James Cole
935d72d672 New English text for issue #218 2016-03-20 11:36:50 +01:00
James Cole
fccb510186 Merge pull request #222 from eddyh/patch-1
Fixed small typo.
2016-03-20 11:34:58 +01:00
Edwin
e7ea0dc842 Fixed small typo. 2016-03-19 18:45:12 +01:00
James Cole
a40d6b0649 Merge branch 'master' into develop
* master:
  Code cleanup [skip ci]
  Quick bug fix.
2016-03-19 17:40:24 +01:00
James Cole
b7429a358f Code cleanup [skip ci] 2016-03-19 17:34:37 +01:00
James Cole
cf8b4e2f76 Quick bug fix. 2016-03-19 17:34:02 +01:00
James Cole
48c865e57a Merge branch 'hotfix/account-repos' into develop 2016-03-19 17:28:16 +01:00
James Cole
059764cd23 Merge branch 'hotfix/account-repos' 2016-03-19 17:28:15 +01:00
James Cole
c205eee6fd Something went wrong. 2016-03-19 17:28:04 +01:00
James Cole
7b22099608 Merge branch 'release/3.8.0'
Conflicts:
	app/Repositories/Account/AccountRepository.php
2016-03-19 17:17:06 +01:00
James Cole
b56b42d6fb Final change log. 2016-03-19 17:15:19 +01:00
James Cole
ef6ef57e67 Various code cleanup things. 2016-03-19 16:51:52 +01:00
James Cole
47d3cf1d45 Updated composer. 2016-03-19 16:50:01 +01:00
James Cole
9cfac9a884 New translations. #219 2016-03-19 16:47:29 +01:00
James Cole
dc172476e1 Make sure the two factor auth pages are not accessible when already authenticated using two factor. 2016-03-19 16:29:01 +01:00
James Cole
6fc7763380 New routes for #219 2016-03-19 16:25:24 +01:00
James Cole
ce45f21dba Translated stuff. #219 2016-03-19 16:25:16 +01:00
James Cole
2de713c946 New language stuff. #219 2016-03-19 16:25:05 +01:00
James Cole
3d1dfe20b3 Listen to the logout event. #219 2016-03-19 16:24:47 +01:00
James Cole
0404735ccb This is the cleaned up version of the controller #219 2016-03-19 16:24:35 +01:00
James Cole
83f200f5a2 This is the two factor middleware. #219 2016-03-19 16:23:09 +01:00
James Cole
a29eb9b993 This is the controller for two factor authentication. #219 2016-03-19 16:22:57 +01:00
James Cole
c939be97fb These are some new middleware groups required to call the two factor auth routines at the right moments. 2016-03-19 16:22:20 +01:00
James Cole
f31e62a532 This is a routine that will remove all two-factor related information from the session, when the user logs out. See issue #219 2016-03-19 16:21:50 +01:00
James Cole
34c195159e Clean mail message for blocked users. 2016-03-19 11:32:23 +01:00
James Cole
322fef2db1 Removed most logging. 2016-03-19 11:25:11 +01:00
James Cole
7aa2565e89 Fixed a bug where profiled account names would not get strtolower() and thus match nothing. Thanks to Tweakers.net user "doeners" 2016-03-19 11:23:23 +01:00
James Cole
8f3572f2d3 Correctly save 2fa secret. 2016-03-19 07:59:55 +01:00
James Cole
fb165ef28b Do not give the user the secret. 2016-03-19 07:56:57 +01:00
James Cole
a26acf4a25 Clean up mail thing. 2016-03-18 20:30:07 +01:00
James Cole
645400e17f Clean up mail thing. 2016-03-18 20:29:51 +01:00
James Cole
ccad52b80f Fix opening balance bug #214 2016-03-18 16:29:08 +01:00
James Cole
f6303deaa4 Error when blocked user logs in 2016-03-18 11:22:58 +01:00
James Cole
d3a3083b85 Error when blocked user logs in 2016-03-18 11:20:54 +01:00
James Cole
99452056ec Error when blocked user logs in 2016-03-18 11:19:22 +01:00
James Cole
fca21bab4d Error when blocked user logs in 2016-03-18 11:16:05 +01:00
James Cole
9c58b77f01 Error when blocked user logs in 2016-03-18 11:10:51 +01:00
James Cole
b5c5f67fcc Catch possible NULL 2016-03-18 10:53:59 +01:00
James Cole
0f17423465 Fix chart money format 2016-03-18 09:57:18 +01:00
James Cole
f093e29bd1 Removed the last floatvals. 2016-03-16 17:48:07 +01:00
James Cole
fe9b8e834d Change the precision. Should not influence anything. 2016-03-16 17:47:07 +01:00
James Cole
64f273120e Make sure that charts work when Firefly III is in a subdirectory. Thx to @xnyhps. 2016-03-16 17:28:04 +01:00
James Cole
31c1dd466b Merge pull request #217 from JC5/revert-216-fix-absolute-urls-report
Revert "Fix use of absolute URLs for linecharts for the report pages."
2016-03-16 17:26:06 +01:00
James Cole
99b369bf45 Revert "Fix use of absolute URLs for linecharts for the report pages." 2016-03-16 17:25:57 +01:00
James Cole
e2a1535c44 Merge pull request #216 from xnyhps/fix-absolute-urls-report
Fix use of absolute URLs for linecharts for the report pages.
2016-03-16 17:25:53 +01:00
Thijs Alkemade
3dfa88020e Fix use of absolute URLs for linecharts for the report pages. 2016-03-16 11:46:12 +01:00
James Cole
a220094941 Remove param doc. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-14 21:03:35 +01:00
James Cole
ababdacf89 Some code cleanup
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-14 20:53:56 +01:00
James Cole
114dd5fc2a Rename method.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-14 20:52:08 +01:00
James Cole
c058629172 Small bug fixes.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-14 20:51:34 +01:00
James Cole
79d7f577e4 Small bug fixes.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-14 20:50:19 +01:00
James Cole
631bafc6ab Small bug fixes. 2016-03-14 20:47:13 +01:00
James Cole
be58da539e Fix various small issues. 2016-03-14 20:38:23 +01:00
James Cole
a508ac9dda Update composer.lock 2016-03-14 20:20:12 +01:00
James Cole
538fd2cef0 Add upgrade warning. 2016-03-14 20:15:29 +01:00
James Cole
42557446a1 New change log file 2016-03-14 20:13:27 +01:00
James Cole
b9586481fc Translate some help text. 2016-03-14 19:46:42 +01:00
James Cole
a0434e3271 Disable audit reports for now. [skip ci] 2016-03-14 19:42:05 +01:00
James Cole
15a5bcc21a Clean up some views 2016-03-14 17:18:28 +01:00
James Cole
edb838045b Update composer [skip ci] 2016-03-13 19:36:49 +01:00
James Cole
41a2e657b1 Cleaned up translation files. 2016-03-13 17:19:09 +01:00
James Cole
18b80a69c2 PHP 7 badge [skip ci] 2016-03-12 14:30:21 +01:00
James Cole
ce80fb39e8 Fix for #185 2016-03-12 14:20:45 +01:00
James Cole
2f19ff314b Fix for #185 2016-03-12 14:18:28 +01:00
James Cole
a0fd4b505a Fix for #185 2016-03-12 11:07:54 +01:00
James Cole
919aa70251 Account controller #185 2016-03-12 11:05:26 +01:00
James Cole
1aea4045a3 Fixes #151 2016-03-12 07:44:20 +01:00
James Cole
4cded0bf57 New translations for #122 2016-03-12 07:39:11 +01:00
James Cole
cd0585c7c4 Views will show new dates #122 2016-03-12 07:37:36 +01:00
James Cole
8281279452 Repository will store edits/ new journals #122 2016-03-12 07:37:26 +01:00
James Cole
8f1bf846fe Journal allows date edits and sets fields as dates #122 2016-03-12 07:37:13 +01:00
James Cole
c26bf557d0 Controller can let you edit new dates #122 2016-03-12 07:37:00 +01:00
James Cole
499b92cdd1 Journal request can handle new dates #122 2016-03-12 07:36:49 +01:00
James Cole
3dce5e162f New field for #122 2016-03-12 07:36:35 +01:00
James Cole
f9de65c035 Expand phpdoc. 2016-03-12 07:36:23 +01:00
James Cole
6f95e9a3cb Fix some decrypt bugs. 2016-03-12 07:17:00 +01:00
James Cole
ce09da084c Add account number to export #107 2016-03-12 07:16:42 +01:00
James Cole
5d50f92dd3 Issue #208 2016-03-12 07:04:47 +01:00
James Cole
d054e085d6 This will make triggers check existing fields first. 2016-03-12 07:02:39 +01:00
James Cole
59cdfa6fe6 Fix #211 2016-03-12 06:58:39 +01:00
James Cole
ee0e9011b2 Fixes bug #213 2016-03-11 19:20:31 +01:00
James Cole
654ebe0c48 Whoops, forgot the brackets. 2016-03-07 21:39:50 +01:00
James Cole
a40859c0bb Make opening balance not click-able. 2016-03-07 21:39:08 +01:00
James Cole
74e3f6dee5 Updated composer.lock
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-07 21:06:18 +01:00
James Cole
e553bfb204 Add new lines.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-07 20:46:05 +01:00
James Cole
96caace068 Update language fields.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-07 20:45:59 +01:00
James Cole
5310ccebbe New ability to disable 2fa.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-07 20:28:26 +01:00
James Cole
ccd55257cd Add php doc.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-03-07 20:19:05 +01:00
James Cole
583687f3a7 Better FF name for multiple accounts. 2016-03-07 20:17:43 +01:00
James Cole
e06dc86bf7 Fix some logic in the preferences controller. 2016-03-07 20:14:24 +01:00
James Cole
8828aa0621 Merge pull request #204 from zjean/2fa
Validate the 2fa secret
2016-03-07 20:01:19 +01:00
James Cole
e472e105f2 ING specific amount modifier. See issue #210 2016-03-07 20:00:16 +01:00
James Cole
6ad10f1772 Fix bug that occurs when the transaction journal does not have the field "transaction_currency_code" 2016-03-07 19:52:59 +01:00
zjean
fcf7d98834 Update translations. 2016-03-04 19:36:42 +01:00
zjean
90ad06c65c Fixed composer.json 2016-03-04 19:35:11 +01:00
zjean
888e9beb4c Add breadcrumbs 2016-03-03 22:02:08 +01:00
zjean
69b338ca85 Added translations for 2fa. 2016-03-03 22:00:56 +01:00
zjean
0c009445d4 Added 2fa code validation 2016-03-03 21:14:53 +01:00
James Cole
c5fb734e42 Fix query. [skip ci] 2016-03-03 13:24:02 +01:00
James Cole
d2c8475504 #202 [skip ci] 2016-03-03 13:20:06 +01:00
James Cole
f38d99653f #202 make positive. 2016-03-03 13:19:47 +01:00
James Cole
cdce43d226 Closed #202 2016-03-03 13:19:06 +01:00
James Cole
89ab0a7e97 Clean up files. 2016-03-03 12:15:18 +01:00
James Cole
c7250bfcba Fix null error [skip ci] 2016-03-03 10:46:23 +01:00
James Cole
4a9b693da8 Fix sum [skip ci] 2016-03-03 10:39:11 +01:00
James Cole
fff35aa820 Reinstated sum of tag. 2016-03-03 10:37:06 +01:00
James Cole
a9a542d68f Update language stuff. 2016-03-03 10:27:53 +01:00
James Cole
35ff3f0cbf Some code cleanup. 2016-03-03 10:24:59 +01:00
James Cole
abf92b6df3 Add some new lines. 2016-03-03 09:38:16 +01:00
James Cole
8517fc9f24 Exclude test data. 2016-03-03 09:37:40 +01:00
James Cole
21b473108f Updated test script [skip ci] 2016-03-03 09:35:45 +01:00
James Cole
d4367f73a2 Updated composer.lock file. 2016-03-03 09:15:11 +01:00
James Cole
7ff46c3cd6 New providers in config. 2016-03-03 09:09:14 +01:00
James Cole
4a88e241b5 Code cleanup. 2016-03-03 09:05:09 +01:00
James Cole
8da0317b19 Fixed tag repository and provider. 2016-03-03 09:03:55 +01:00
James Cole
297c2e244d Created / updated rule repository and provider. 2016-03-03 09:02:04 +01:00
James Cole
a51d752a35 Update rule group repository and provider. 2016-03-03 09:00:15 +01:00
James Cole
7800b0a7f5 Update piggy bank repository / provider. 2016-03-03 08:58:15 +01:00
James Cole
5ce4104644 Update transaction journal repository / provider 2016-03-03 08:55:43 +01:00
James Cole
b4f1bbf793 Updated export job repository 2016-03-03 08:53:05 +01:00
James Cole
ca33bea6b7 Update category repository. 2016-03-03 08:50:17 +01:00
James Cole
42d20ff693 Updated budget provider and budget repository. 2016-03-03 08:44:20 +01:00
James Cole
22a14416ad Forgot to include classes for bill service provider. 2016-03-03 08:41:29 +01:00
James Cole
98bd9bdaa0 New bill repository provider. 2016-03-03 08:40:25 +01:00
James Cole
13bac92a24 Adapted attachment repository. 2016-03-03 08:38:24 +01:00
James Cole
d9eb14d6e5 New attachment service provider. 2016-03-03 08:36:36 +01:00
James Cole
6ec0471e8b Code cleanup. 2016-03-03 08:31:31 +01:00
James Cole
8008311d9c Added a new argument to the constructor of the account repository which should correctly inject the user. 2016-03-03 08:31:18 +01:00
James Cole
fcf16051a2 Some general code cleanup. 2016-03-03 08:29:56 +01:00
James Cole
3a236456cd Fix tag report thing. [skip ci] 2016-03-02 20:44:55 +01:00
James Cole
2606d77c62 Fix show tag [skip ci] 2016-03-02 20:40:43 +01:00
James Cole
3d2f33c120 Clean up some views. 2016-03-02 20:38:17 +01:00
James Cole
4f14969464 Add cache to journal support. 2016-03-02 20:19:39 +01:00
James Cole
7234f011ec Clean up method relying on old transaction journal code. 2016-03-02 20:11:28 +01:00
James Cole
5b949d6e00 Move some stuff around. 2016-03-02 19:41:22 +01:00
James Cole
2fd476ada8 Fixed search as well. 2016-03-02 13:56:56 +01:00
James Cole
2e7703bc97 Fixed two crashes. 2016-03-02 13:55:48 +01:00
James Cole
9b69a6addd Lots of todo's [skip ci] 2016-03-02 13:51:56 +01:00
James Cole
500243b0b3 This fixes most of the tests. 2016-03-02 13:37:28 +01:00
James Cole
3ef84dc1fc Cleanup and fix tests. 2016-03-02 13:13:33 +01:00
James Cole
b04d68d087 Stop on failure for easy log debug thing. 2016-03-02 12:57:35 +01:00
James Cole
715c381eb2 No longer need this left join. 2016-03-02 12:53:20 +01:00
James Cole
ca32ae4561 Fix is / is not already joined. 2016-03-02 12:52:36 +01:00
James Cole
6b277c5e67 Fix bill overview. 2016-03-02 12:47:15 +01:00
James Cole
1ac64fd0b3 Last updates, fixes the main list. 2016-03-02 12:33:07 +01:00
James Cole
f2c1dd41d0 Expanded Amount and expanded TransactionJournal to include source and destination information. 2016-03-02 12:25:00 +01:00
James Cole
869360f26c Some unrelated phpdoc. 2016-03-02 12:24:38 +01:00
James Cole
dbdc334931 Clean up frontpage query call (first of many...) 2016-03-02 12:09:45 +01:00
James Cole
b317d1a171 First attempt at scopeExpanded(), included some new fields in QUERYFIELDS. 2016-03-02 12:09:34 +01:00
James Cole
b00c7b0ce3 New constant that defines which fields a journal query is expected to load. 2016-03-02 12:03:53 +01:00
James Cole
a61eafeac2 Will now look for new field "transaction_type_type" 2016-03-02 12:03:04 +01:00
James Cole
5978b1c421 Removed cache from typeIcon 2016-03-02 12:02:01 +01:00
James Cole
9f16799453 Re-added phpdoc. 2016-03-02 11:59:39 +01:00
James Cole
74fe0ee4e4 Add some todo things, removed "withrelevantdata". This breaks FF 2016-03-02 11:58:31 +01:00
James Cole
e8880232b3 Removed "transaction_type" 2016-03-02 11:57:02 +01:00
James Cole
556e9f1df7 Removed "source_account" attribute. 2016-03-02 11:56:47 +01:00
James Cole
beb301e781 Removed "destination_account" 2016-03-02 11:54:03 +01:00
James Cole
056c809754 Removed amount_positive. This breaks the other half. 2016-03-02 11:53:23 +01:00
James Cole
fa47eac9ff Removed "amount" attribute. This breaks half of Firefly III. 2016-03-02 11:52:52 +01:00
James Cole
bf4a7846dd Removed boolean for left join that was never called more than twice anyway. 2016-03-02 11:52:17 +01:00
James Cole
b0cc6dd714 - Removed php doc.
- Added book_date and rent_date as fillable fields.
2016-03-02 11:50:37 +01:00
James Cole
d6e2d8e4a2 Add some extra filters [skip ci] 2016-03-02 11:48:53 +01:00
James Cole
bbfc962727 Include tags in multi year report [skip ci] 2016-03-02 07:08:08 +01:00
James Cole
8ddb357e5a Refer to correct var [skip ci] 2016-03-02 07:06:19 +01:00
James Cole
560c10898f Extra spaces for clarity [skip ci] 2016-03-02 07:05:43 +01:00
James Cole
04f5214bb7 Fix multiplier for single tag. 2016-03-02 07:04:48 +01:00
James Cole
4c35d52234 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
# By Robert Horlings
# Via James Cole (2) and Robert Horlings (1)
* 'develop' of https://github.com/JC5/firefly-iii:
  Small bugfix
  Small bugfix in AbnAmroImport specific
2016-03-01 21:31:42 +01:00
James Cole
01be5e3e23 Tag report. 2016-03-01 21:31:25 +01:00
James Cole
46dc4102e0 Merge pull request #200 from roberthorlings/develop
Small improvement in AbnAmroImport specific
2016-02-25 16:24:57 +01:00
James Cole
cf31049c51 Merge pull request #199 from roberthorlings/bugfix/import-amount-comma
Small bugfix
2016-02-25 16:20:28 +01:00
Robert Horlings
c624c4342f Small bugfix 2016-02-25 16:19:27 +01:00
James Cole
701d7baca8 #193 2016-02-25 15:17:24 +01:00
James Cole
8e45959483 #193 forgot to change file size thing. 2016-02-25 15:06:01 +01:00
James Cole
6858d67897 #193 2016-02-25 15:04:17 +01:00
James Cole
9b23cbd2c2 #193 2016-02-25 15:02:05 +01:00
Robert Horlings
ec1bb300e2 Small bugfix in AbnAmroImport specific 2016-02-25 14:54:06 +01:00
James Cole
69a8cad47b Attachment download (issue #193) 2016-02-25 14:53:26 +01:00
James Cole
bcaca0eca3 Queue name, default queue name. 2016-02-24 20:51:50 +01:00
James Cole
a1f79e58db Include time in job. 2016-02-24 20:44:39 +01:00
James Cole
2cc5fdcf62 Include time and date for errors. 2016-02-24 20:42:05 +01:00
James Cole
dd1b4e21f5 New table for #196 2016-02-24 20:14:09 +01:00
James Cole
91eb052c22 Use a job to send the error email instead of inline. #196 2016-02-24 20:13:55 +01:00
James Cole
ecefcfabc0 This is a partial fix for issue #151. It does not filter on account selection. 2016-02-24 17:37:08 +01:00
James Cole
8e42e71528 End of month... 2016-02-24 16:01:08 +01:00
James Cole
a2275ae111 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
# By Robert Horlings
# Via James Cole (2) and Robert Horlings (1)
* 'develop' of https://github.com/JC5/firefly-iii:
  Bugfix for a bug when adding a tag in a rule
  Bugfix in redirect after creating a new rule
2016-02-24 14:49:42 +01:00
James Cole
3976803d8f Same method of determining the applicable range as the "no category" view. Thanks to @roberthorlings in issue #151 2016-02-24 14:49:36 +01:00
James Cole
7921fc74fd Merge pull request #198 from roberthorlings/bugfix/rule-action-addtag
Bugfix for a bug when adding a tag in a rule
2016-02-24 14:09:00 +01:00
Robert Horlings
1732acfee2 Bugfix for a bug when adding a tag in a rule 2016-02-24 14:06:11 +01:00
James Cole
3a4fc65712 Merge pull request #197 from roberthorlings/bugfix/redirect-after-creating-rule
Bugfix in redirect after creating a new rule
2016-02-24 13:16:21 +01:00
Robert Horlings
9ce9caba02 Bugfix in redirect after creating a new rule 2016-02-24 10:21:04 +01:00
James Cole
07f4995c8f First start of new report. 2016-02-23 20:23:10 +01:00
James Cole
8200c7248a Helper for help text. 2016-02-23 20:22:53 +01:00
James Cole
bd9f1d5398 Rename export date range in other forms. Makes the rule group runner by @roberthorlings more consistent. 2016-02-23 19:59:41 +01:00
James Cole
ce0ca23d79 Rename field export start and end date. 2016-02-23 19:57:35 +01:00
James Cole
35863c8d3a This should fix the tests. 2016-02-23 17:55:56 +01:00
James Cole
dad73ce9df Added a translation. 2016-02-23 16:16:03 +01:00
James Cole
f716692591 New route and method. Work in progress. 2016-02-23 16:15:53 +01:00
James Cole
6387114a18 New method to access files. 2016-02-23 16:15:37 +01:00
James Cole
55ab39ca55 Old cover script. 2016-02-23 16:15:26 +01:00
James Cole
28a4f724d5 Use Requests library to get help from Github. 2016-02-23 16:12:59 +01:00
James Cole
f2d06bcea1 Fix bread crumb 2016-02-23 16:03:05 +01:00
James Cole
4d1771614a Code reformat 2016-02-23 16:02:44 +01:00
James Cole
61efabb3b5 Added sub title 2016-02-23 16:02:37 +01:00
James Cole
b00458c2b9 Small code format thing. 2016-02-23 15:55:09 +01:00
James Cole
594f9822c7 Fix parameters, re-order. 2016-02-23 15:54:13 +01:00
James Cole
9b3131b95e Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
# By Robert Horlings
# Via Robert Horlings (2) and James Cole (1)
* 'develop' of https://github.com/JC5/firefly-iii:
  Added button to specify parameters and execute the job
  Added missing imports for job
  Implemented job to execute rulegroup on existing transactions
  Moved JournalCollector to other package to encourage reuse
2016-02-23 15:47:39 +01:00
James Cole
d7ad32a8cc Merge pull request #194 from roberthorlings/feature/rules-on-existing-transactions
Implemented support to execute rulegroup on existing set of transactions
2016-02-23 15:10:39 +01:00
Robert Horlings
59127e4029 Added button to specify parameters and execute the job 2016-02-23 14:18:09 +01:00
Robert Horlings
7edf70a77b Added missing imports for job 2016-02-23 14:17:41 +01:00
Robert Horlings
3fd90a37fb Merge branch 'develop' into feature/rules-on-existing-transactions 2016-02-23 13:17:07 +01:00
James Cole
356ec276bc Updated composer stuff. 2016-02-23 12:04:00 +01:00
James Cole
ad8d945c1d Make sure all the users accounts are included so internal transfers are ignored. [skip ci] 2016-02-23 09:22:18 +01:00
James Cole
a3bf30a77b Remove file_get / file_put combi for #193 2016-02-23 09:12:21 +01:00
James Cole
3f829a3114 Restore original functionality. 2016-02-23 07:31:01 +01:00
James Cole
537b4ae003 Fix translation. 2016-02-23 07:27:52 +01:00
James Cole
08b4c9ea5c Use export disk for zip file. 2016-02-23 07:27:29 +01:00
James Cole
6b00f5a97d Updated config file maker. 2016-02-23 07:07:14 +01:00
James Cole
d259df9a47 Fixed a small documentation bug. 2016-02-23 07:05:18 +01:00
James Cole
aeaebd082f Cleaned up upload collector. 2016-02-23 07:05:08 +01:00
James Cole
0c9c0f2032 Simplified the attachment collector. 2016-02-23 06:54:51 +01:00
James Cole
155801ab2b Some extra logging. 2016-02-23 06:54:16 +01:00
James Cole
deeeb06488 Added debug info to the export routine. 2016-02-23 06:39:01 +01:00
James Cole
28fd719ce3 New file systems. 2016-02-23 06:17:04 +01:00
James Cole
317075aa6d Oops. 2016-02-20 18:48:06 +01:00
James Cole
eaf2efc510 Updated favicons. 2016-02-20 18:47:06 +01:00
James Cole
88555bbea2 Some translations. 2016-02-20 14:18:55 +01:00
Robert Horlings
a4d7bf4ebe Implemented job to execute rulegroup on existing transactions 2016-02-18 20:15:50 +01:00
Robert Horlings
50e5c21735 Moved JournalCollector to other package to encourage reuse 2016-02-18 20:01:53 +01:00
James Cole
2ddacf48d4 Removed unused parameter and added caching. [skip ci] 2016-02-18 10:12:07 +01:00
James Cole
cd66d2c7b0 Return 0 amount. [skip ci] 2016-02-18 10:06:34 +01:00
James Cole
2e7c26c539 New chart called "net worth". 2016-02-18 10:04:53 +01:00
James Cole
f0f47530bf PHP7 type declarations. 2016-02-18 10:04:26 +01:00
James Cole
e7be4e3e49 PHP7 compatible type hinting [skip ci] 2016-02-18 07:21:48 +01:00
James Cole
7a7ce7fcea Some new translations [skip ci] 2016-02-18 06:57:25 +01:00
James Cole
bd104a7ea8 Massively reduced number of checked transactions. Even if the user six transactions a day, every day, the test will go back a month to find matches. 2016-02-18 06:56:24 +01:00
James Cole
31d6789ff0 Type hinting. 2016-02-18 06:54:50 +01:00
James Cole
bdcb7372a5 More phpdoc. 2016-02-18 06:45:10 +01:00
James Cole
b8df2226ae New phpdoc. 2016-02-18 06:38:37 +01:00
James Cole
106bae5c97 Move factories to separate folder. 2016-02-18 06:34:16 +01:00
James Cole
651297fa0b Method can be private. 2016-02-18 06:29:04 +01:00
James Cole
1b2873fc5f Some phpdoc. 2016-02-18 06:28:46 +01:00
James Cole
f82a2b3bc5 Some phpdoc. 2016-02-18 06:24:47 +01:00
James Cole
4cb616ebeb Some PHP7 compatible type definitions 2016-02-18 06:24:39 +01:00
James Cole
1bcc975d7b Some new phpDoc and refactoring. 2016-02-18 06:15:01 +01:00
James Cole
98fd5b8858 Invert stuff so chart works again. 2016-02-17 22:35:57 +01:00
James Cole
6f08482aaf Some simplification. 2016-02-17 22:02:32 +01:00
James Cole
f7d06b9759 Some more code cleanup. 2016-02-17 21:59:47 +01:00
James Cole
a178fed0c6 Code cleanup courtesy of Scrutiniser CI. 2016-02-17 21:55:00 +01:00
James Cole
ff342f6789 New translations. 2016-02-17 21:22:49 +01:00
James Cole
b1c2f8faa1 Various code cleaning things. 2016-02-17 21:14:32 +01:00
James Cole
6f59e79b28 Massively reduce number of searched transactions. 2016-02-17 21:05:32 +01:00
James Cole
6c22bad77a Revamped a part of the rule test code.
- clean way of constructing triggers
- processor can be constructed in a number of ways.
- cleaner transaction matcher using collections instead of arrays
2016-02-17 21:03:59 +01:00
James Cole
1cf0125d1b New method for transaction matcher. 2016-02-17 20:31:18 +01:00
James Cole
49211482b0 New getters and setters. 2016-02-17 20:25:54 +01:00
James Cole
b3aecec11d Remove parameter and make fields private. 2016-02-17 20:25:20 +01:00
James Cole
7cb86d0254 Add field. Also limit range. 2016-02-17 20:24:59 +01:00
James Cole
0ba9389ca2 Rename field. 2016-02-17 20:24:27 +01:00
James Cole
1902787104 Removed constructor. 2016-02-17 20:23:53 +01:00
James Cole
b3e32db073 Rename variables. 2016-02-17 20:23:14 +01:00
James Cole
01d53bdb85 Use request instead of complex method. 2016-02-17 20:22:25 +01:00
James Cole
51acc34a80 Fix factory and triggers. 2016-02-17 20:19:44 +01:00
James Cole
694447e66c Removed all constructors from all triggers. 2016-02-17 20:09:03 +01:00
James Cole
05b7a610ef Prep for private constructor. 2016-02-17 19:58:49 +01:00
James Cole
1e799402ee Rule actions no longer need to know the journal at construction time. This is easier. 2016-02-17 19:56:05 +01:00
James Cole
5f9c61c4b4 Update Processor with new situation. 2016-02-17 19:08:27 +01:00
James Cole
12b6791e8b Changed trigger constructor. No longer needs model AND journal, now only model. Wait for it... 2016-02-17 19:07:20 +01:00
James Cole
8024ad123e Cleaned up the Processor. This completely breaks everything @ roberthorlings has built but stay with me. 2016-02-17 18:47:05 +01:00
James Cole
2bd2f5a5aa Renamed config thing. [skip ci] 2016-02-17 18:36:08 +01:00
James Cole
37d79b2a1c Remove unused import. 2016-02-17 18:35:29 +01:00
James Cole
cd057045e6 Code clean up. 2016-02-17 18:23:20 +01:00
James Cole
ddfbd69e8b Minimum of one trigger. 2016-02-17 18:23:12 +01:00
James Cole
28fa1264b7 Remove matchesAnything 2016-02-17 18:06:49 +01:00
James Cole
a6c3189833 Add willMatchEveryThing as a static replacement for matchesAnything 2016-02-17 18:00:13 +01:00
James Cole
0d2fe08dc9 New request object for when the user wants to test triggers. 2016-02-17 17:47:29 +01:00
James Cole
8cfe25bfac Small code clean up [skip ci] 2016-02-17 17:32:02 +01:00
James Cole
f9e2a677d9 Offload stuff to repositories for rules and rule groups, see issue #185 2016-02-17 17:27:41 +01:00
James Cole
2ef1c54417 Code cleanup. [skip ci] 2016-02-17 17:19:57 +01:00
James Cole
f9c3c0c8ae Merge pull request #191 from roberthorlings/feature/test-triggers
New feature for testing triggers
2016-02-17 17:19:21 +01:00
James Cole
44a15551ba Merge pull request #192 from roberthorlings/bugfix/abnamro-description-specifix
Bugfix in parsing specific descriptions
2016-02-17 17:15:53 +01:00
Robert Horlings
732e181312 Bugfix in parsing specific descriptions 2016-02-17 16:59:56 +01:00
Robert Horlings
919187f7fd Made performance settings for testing triggers configurable 2016-02-17 16:39:26 +01:00
Robert Horlings
7840a5ea49 Added missing import 2016-02-17 16:30:54 +01:00
Robert Horlings
3a33ac1455 Removed code left over from merge 2016-02-17 16:29:32 +01:00
Robert Horlings
2eb7d8ba91 Merge branch 'feature/test-triggers' of github.com:roberthorlings/firefly-iii into feature/test-triggers 2016-02-17 16:26:29 +01:00
Robert Horlings
7ec5cce2c8 Implemented filter not to return all transactions when testing filters 2016-02-17 16:23:43 +01:00
Robert Horlings
8fdc6c11e1 Merge branch 'develop' into feature/test-triggers 2016-02-17 16:14:07 +01:00
James Cole
1a110de597 Throw errors instead of abort() 2016-02-17 15:52:46 +01:00
James Cole
317aa591c3 Need to "use" the TriggerFactory! 2016-02-17 15:46:58 +01:00
James Cole
0d44f82c86 Code cleanup. [skip ci] 2016-02-17 15:38:21 +01:00
James Cole
9cac61dc33 Better description for matchesAnything 2016-02-17 15:37:05 +01:00
James Cole
52481a6e8b Code formatting. 2016-02-17 15:29:26 +01:00
James Cole
b3e18f4e56 Merge pull request #189 from roberthorlings/feature/trigger-matches-anything
Check for triggers that match anything
2016-02-17 15:28:39 +01:00
James Cole
aa25ac774e Merge pull request #190 from roberthorlings/feature/trigger-action-factories
Introduction of factories to create rule actions and rule triggers
2016-02-17 15:27:38 +01:00
Robert Horlings
af7da586aa Cleanup of processor after introduction of factories 2016-02-17 13:26:38 +01:00
Robert Horlings
b671da900a Implemented action factory analogue to trigger factory 2016-02-17 13:24:56 +01:00
Robert Horlings
d8bb83e8c4 Moved creation of Trigger objects to factory for reuse 2016-02-17 13:20:51 +01:00
Robert Horlings
bc3d64a2ff Moved creation of Trigger objects to factory for reuse 2016-02-17 13:16:46 +01:00
Robert Horlings
70e72c246d Added method to RuleTrigger object as well 2016-02-17 13:03:02 +01:00
Robert Horlings
7c8c82edd7 Added method for triggers to check whether they match all transactions 2016-02-17 13:02:27 +01:00
Robert Horlings
5dc556f0af Updated frontend to access the 'test-rules' functionality 2016-02-17 12:11:00 +01:00
Robert Horlings
c8c69f1a66 Implemented controller method and helper object to find matching transactions 2016-02-17 12:10:38 +01:00
James Cole
985019e117 Merge pull request #188 from roberthorlings/bugfix/fixed-missing-tags
Added closing li tags
2016-02-17 10:31:51 +01:00
Robert Horlings
b9620b3a21 Refactored method to check whether a transaction is triggered by a list of triggers 2016-02-17 10:24:40 +01:00
Robert Horlings
e7bb4a8ec6 Implemented option to specify pagesize when retrieving journals 2016-02-17 10:17:16 +01:00
Robert Horlings
bb5f935d7a Added closing li tags 2016-02-17 10:13:21 +01:00
James Cole
17dad27610 Catch type error. 2016-02-16 18:39:03 +01:00
James Cole
ee960d76c7 Possible fix for attachment helper 2016-02-16 13:30:50 +01:00
James Cole
dfb595193a Possible fix for attachment helper 2016-02-16 13:28:55 +01:00
James Cole
0a91a40c1b Merge branch 'develop' of github.com:JC5/firefly-iii into develop 2016-02-16 13:25:48 +01:00
James Cole
12f4305691 Possible fix for attachment helper 2016-02-16 13:25:03 +01:00
James Cole
dd865b0dfb Remove IDE specific files from .gitignore. [skip ci] 2016-02-15 19:49:33 +01:00
James Cole
7cbfa9fcd4 Merge pull request #182 from roberthorlings/develop
Small fix for importing amounts with comma as decimal separator
2016-02-15 19:48:27 +01:00
Robert Horlings
28d880a7c4 Ignoring eclipse specific files 2016-02-15 14:50:10 +01:00
James Cole
e83d45fce5 Expand manifest.json [skip ci] 2016-02-14 16:17:01 +01:00
James Cole
693ff3cc66 Various fixes. 2016-02-13 13:13:22 +01:00
James Cole
706b095f95 Forgot to actually return the created array. 2016-02-12 17:50:12 +01:00
James Cole
8e2e96d513 Config for code climate. 2016-02-12 17:45:33 +01:00
James Cole
28bce44f69 More code cleanup. 2016-02-12 17:41:12 +01:00
James Cole
53d88dfd50 Clean up code. 2016-02-12 17:37:11 +01:00
James Cole
42daf7ed32 Clean up some code. 2016-02-12 17:34:42 +01:00
James Cole
e5402ea7c1 Fixed a sum. 2016-02-12 15:01:32 +01:00
James Cole
05e8d6b578 Removed superfluous sentence in registration mail. 2016-02-12 14:16:51 +01:00
James Cole
505f340917 Some clean up in the error handler. 2016-02-12 14:15:49 +01:00
James Cole
46856c9394 Remove entrust package. 2016-02-12 05:49:53 +01:00
James Cole
c63a2ad39d Updated test data. 2016-02-12 05:32:16 +01:00
James Cole
68a7078614 Clean up TestData 2016-02-12 05:29:41 +01:00
James Cole
2e15f1e2a3 Removed todo comments. 2016-02-12 04:59:14 +01:00
James Cole
a790838222 Remove total downloads. [skip ci] 2016-02-12 04:51:40 +01:00
James Cole
cd14360d62 Merge pull request #178 from zjean/develop
Respect the base href in ajax calls.
2016-02-11 21:24:53 +01:00
zjean
74c94a60a6 Respect the base href in ajax calls. 2016-02-11 19:57:26 +01:00
James Cole
56cbc7683e Try changes to the handler 2016-02-11 14:20:18 +01:00
James Cole
bf778d2fca Try changes to the handler 2016-02-11 14:17:58 +01:00
James Cole
6e5bca8306 Try changes to the handler 2016-02-11 14:17:11 +01:00
James Cole
7e8fea6ed3 Forgot a bracket 2016-02-11 14:14:47 +01:00
James Cole
43ff3e11ed Some changes to the error handler 2016-02-11 14:13:23 +01:00
James Cole
f1750e3c35 Will inform about the logged in user 2016-02-11 12:54:16 +01:00
James Cole
8b1fe26c84 A route that displays an error. Seems quite useless, I know 2016-02-11 12:49:04 +01:00
James Cole
6ab09a3603 Undo PHP7 thing in master. 2016-02-11 11:22:27 +01:00
James Cole
df45298c1f Fixed bug in sumOfEverything() function 2016-02-11 11:21:50 +01:00
James Cole
4a64dce737 Fixed bug in sumOfEverything() function 2016-02-11 11:21:05 +01:00
James Cole
27ad428b5e Weird letter. 2016-02-11 08:13:57 +01:00
James Cole
2da33bae43 Some code used for #164 2016-02-11 08:13:04 +01:00
James Cole
3dab683a45 New asset account number handler. For issue #107 2016-02-11 08:12:10 +01:00
James Cole
d08fa37ccf Expanded error handling. 2016-02-11 08:11:26 +01:00
James Cole
4cd7976f63 Changes to the CSV importer because I ran into small bugs. 2016-02-11 08:11:12 +01:00
James Cole
569e8b6180 Better sort for CSV import column roles. 2016-02-11 07:03:12 +01:00
James Cole
9a443bd08e New translations. 2016-02-11 07:02:57 +01:00
James Cole
efb37ae709 Field 'name' is not used. Also added some other new stuff. 2016-02-11 07:02:48 +01:00
James Cole
4658ef9918 Fix PHP7 related strict type check. 2016-02-11 07:02:27 +01:00
James Cole
2b6a1c9cb1 Fixes a bug in the CSV importer. 2016-02-11 06:49:39 +01:00
James Cole
c4606b1854 New error message translations (also for #107) 2016-02-11 06:41:31 +01:00
James Cole
d47b946d00 New validator for account number #107 2016-02-11 06:40:16 +01:00
James Cole
a886e8087d New rule for account number. #107 2016-02-11 06:40:06 +01:00
James Cole
d473455680 Valid misspelled #107 2016-02-11 06:30:37 +01:00
James Cole
40245ef43b Some cosmetic changes for #107. 2016-02-11 06:30:09 +01:00
James Cole
aa057d6a57 Merge pull request #177 from zjean/develop
Tried to start with #107
2016-02-11 06:27:01 +01:00
zjean
5c03e64f46 Tried to start with #107
- Always show the IBAN in the create account view, because it is always editable the edit view.
- Added 'accountNumber' account_meta field, and showing it in create/edit account view.
2016-02-10 22:09:24 +01:00
James Cole
1d4d156749 Merge pull request #176 from zjean/2fa
Some small fixes to respect the base url
2016-02-10 20:12:28 +01:00
zjean
4fc6da1fa1 Add favicons to default.twig 2016-02-10 19:47:40 +01:00
zjean
9fac48fcea Fix base url in empty.twig 2016-02-10 19:45:23 +01:00
zjean
ff4fdd3740 Respect the base url in the guest area. 2016-02-10 19:42:04 +01:00
zjean
da1cce035a Focus the first visible form field in the guest area. 2016-02-10 19:39:10 +01:00
James Cole
49292bbb2d New model for future implementation of #164 2016-02-10 16:26:42 +01:00
James Cole
3e502db772 Various code fixes. 2016-02-10 16:23:37 +01:00
James Cole
426351bb54 Added new lines. 2016-02-10 16:01:18 +01:00
James Cole
4d6e244100 Better error handling for issue #168 2016-02-10 15:18:13 +01:00
James Cole
71253b23d5 Allow tests to run very long. 2016-02-10 15:04:18 +01:00
James Cole
076ff7c7ba Fixes #173 2016-02-10 15:04:06 +01:00
James Cole
94b6c7975a Fixes #174. 2016-02-10 14:36:21 +01:00
James Cole
0b08010221 Slightly updated travis file. 2016-02-10 12:04:24 +01:00
James Cole
bc67113d77 This fixes the broken tests. 2016-02-10 12:01:45 +01:00
James Cole
5974bdcc2a This fixes what turns out to be an incredibly inaccurate chart. 2016-02-10 07:34:04 +01:00
James Cole
f9696287a4 Removed opening balance as possible expense for the balance thing. [skip ci] 2016-02-10 06:58:41 +01:00
James Cole
807dede90a Because nextExpectedMatch() must return a date (and cannot return null) the list of bills will show "unknown" when the bill is next expected in 1900. 2016-02-10 06:55:08 +01:00
James Cole
1f2b37b70e Updated translations via CrowdIn: new lines added to Dutch (still untranslated in other languages). Changed @zjean's 2-step verification lines a bit. 2016-02-10 06:39:09 +01:00
James Cole
7288ba0fd7 Bit of code cleanup + the true/false in SHOW_INCOMPLETE_TRANSLATIONS is not a text but a boolean. Changed as such. 2016-02-10 06:25:21 +01:00
James Cole
f48c17cf88 Update packages. [skip ci] 2016-02-10 06:24:10 +01:00
James Cole
fba9cc3739 Merge pull request #175 from zjean/2fa
Started over with 2fa
2016-02-10 06:13:44 +01:00
zjean
e04388a230 Added two factor auth setting to Preferences page. 2016-02-08 22:28:24 +01:00
James Cole
fbe3be169d Add some fancy Schema markers. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-02-08 21:25:12 +01:00
James Cole
4e4ae0fca0 New URL for "full description" [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-02-08 21:13:44 +01:00
James Cole
2f278c8618 Just a test commit [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-02-08 21:10:33 +01:00
James Cole
905ae3437b float > string. 2016-02-08 21:09:00 +01:00
James Cole
7679721007 float > string. 2016-02-08 21:07:11 +01:00
James Cole
9f29a2e04f Fixed something in the reports. 2016-02-08 20:59:09 +01:00
James Cole
ff5bf0c6e5 Opening balance does not count as an income or as an expense. It's just there. 2016-02-08 20:42:31 +01:00
James Cole
0eb8c2b7ba Make sure account has a start and end balance. 2016-02-08 20:40:47 +01:00
James Cole
deb140e3bc Fixes to export [skip ci] 2016-02-07 09:19:51 +01:00
James Cole
9a1710eb27 Some enhancements to export. 2016-02-07 09:11:46 +01:00
James Cole
e478238d77 New translations [skip ci] 2016-02-07 08:49:02 +01:00
James Cole
c9c9410908 Use translations instead of hard config. [skip ci] 2016-02-07 08:40:59 +01:00
James Cole
42372cabd5 Wasn't used. [skip ci] 2016-02-07 08:35:37 +01:00
James Cole
ab9c991530 Better flashes (also translated) [skip ci] 2016-02-07 08:31:21 +01:00
James Cole
9429d84cf8 Some code cleanup [skip ci] 2016-02-07 07:56:58 +01:00
James Cole
b22774a599 Logout blocked accounts. 2016-02-07 07:36:31 +01:00
James Cole
ca3b0a2ab1 It's called a route [skip ci] 2016-02-06 22:16:59 +01:00
James Cole
62f76d08ad It's called a route [skip ci] 2016-02-06 22:16:30 +01:00
James Cole
92bff24d43 It's called a route [skip ci] 2016-02-06 22:15:16 +01:00
James Cole
eddd3e508f Force blocked users to logout. 2016-02-06 22:14:51 +01:00
James Cole
649eb65bb1 Fixed scrutiniser issue. [skip ci] [skip Scrutinizer] 2016-02-06 20:19:28 +01:00
James Cole
8fb3348a7c Added some (yet without function) information icons. [skip ci] [skip Scrutinizer] 2016-02-06 20:17:55 +01:00
James Cole
6c2df1a783 Give maintenance page a title as well [skip ci] 2016-02-06 19:10:24 +01:00
James Cole
55afc98108 Better maintenance page. 2016-02-06 19:06:10 +01:00
James Cole
b875eb31d2 Small cosmetic changes. 2016-02-06 19:00:01 +01:00
James Cole
060b031272 Added PHP7 return type statements. 2016-02-06 18:59:48 +01:00
James Cole
95c4c4a238 Fixed a small bug after changing the return type statements. 2016-02-06 16:23:54 +01:00
James Cole
4424e48926 Added PHP7 return type statements. 2016-02-06 16:22:12 +01:00
James Cole
b8c7876454 Simplified export controller. 2016-02-06 15:01:26 +01:00
James Cole
8256f60340 Fixed form elements. 2016-02-06 15:00:57 +01:00
James Cole
1d0cb45e4c List in translation. 2016-02-06 15:00:48 +01:00
James Cole
d1a184e3f2 Added PHP7 return type statements. 2016-02-06 10:17:41 +01:00
James Cole
aa38b31015 Added PHP7 return type statements. 2016-02-06 10:15:07 +01:00
James Cole
466067bd95 Added PHP7 return type statements. 2016-02-06 10:11:06 +01:00
James Cole
c9b56efaaa Mock stuff in tests. 2016-02-06 09:52:31 +01:00
James Cole
e56920edee Speed up some tests. [skip ci] 2016-02-06 05:15:17 +01:00
James Cole
0e0c475c83 Forgot a thing. 2016-02-06 05:04:41 +01:00
James Cole
241190c4da More consistent error handling. 2016-02-06 05:01:34 +01:00
James Cole
69d0c31ae5 Translation. 2016-02-06 04:55:41 +01:00
James Cole
c3993fd943 Merge branch 'hotfix/3.7.2.3' into develop 2016-02-06 04:37:33 +01:00
James Cole
8a3b7d7c1a Merge branch 'hotfix/3.7.2.3' 2016-02-06 04:37:29 +01:00
James Cole
87f14617cc Code fix for #172. 2016-02-06 04:37:18 +01:00
James Cole
9f24f765ea Fix in Javascript for #172. 2016-02-06 04:35:51 +01:00
James Cole
48c802e5cc New version. 2016-02-06 04:34:06 +01:00
James Cole
388d141d82 Fix for #172 2016-02-06 04:32:30 +01:00
James Cole
7fa93e97db Fix language [skip-ci] 2016-02-05 21:30:56 +01:00
James Cole
030d241130 Should fix a bug in Travis. 2016-02-05 21:29:03 +01:00
James Cole
bac392d331 Some new translations 2016-02-05 21:23:10 +01:00
James Cole
1542d5e386 Include IBAN 2016-02-05 21:12:19 +01:00
James Cole
f1b6b3386a Expanded entry for export. 2016-02-05 21:10:55 +01:00
James Cole
7d05999ced Fixed view. [skip-ci] 2016-02-05 19:59:38 +01:00
James Cole
d477feb930 Some fix [skip-ci] 2016-02-05 19:59:07 +01:00
James Cole
9465a6d2b5 This PHP7 thing is strict! 2016-02-05 19:57:17 +01:00
James Cole
c3f78b698d This PHP7 thing is strict! 2016-02-05 19:56:25 +01:00
James Cole
a4e699f781 Fix another php7 bug. 2016-02-05 19:54:25 +01:00
James Cole
cd871e5aad Let's see what happens. 2016-02-05 19:27:52 +01:00
James Cole
c9b215684c Also fixed tests. 2016-02-05 19:25:17 +01:00
James Cole
82a4c706b0 Update something in travis. 2016-02-05 19:16:42 +01:00
James Cole
082e6f5e99 Removed the composer.lock, see what happens. 2016-02-05 19:14:06 +01:00
James Cole
b90c7c09b6 Smaller travis file. Try to fix the search. 2016-02-05 19:12:54 +01:00
James Cole
1ee72a6ce5 Travis file update. 2016-02-05 18:53:31 +01:00
James Cole
f72a8c5c06 Fixed some errors. Debug tests. 2016-02-05 17:38:58 +01:00
James Cole
ba5db2c15f Fixed test data. 2016-02-05 17:29:51 +01:00
James Cole
f5b89ca783 Some code cleanup. 2016-02-05 15:41:40 +01:00
James Cole
4ef840e210 More test data tweaks. 2016-02-05 15:20:44 +01:00
James Cole
e2d0ee125f Cleaning up test data. 2016-02-05 15:01:33 +01:00
James Cole
8e1dbc03d9 Merge branch 'hotfix/3.7.2.2' into develop
Conflicts:
	app/Http/Controllers/RuleGroupController.php
2016-02-05 13:23:00 +01:00
James Cole
9c0893fa8c Merge branch 'hotfix/3.7.2.2' 2016-02-05 13:22:02 +01:00
James Cole
0dfb97c5f7 Fix #171 2016-02-05 13:21:56 +01:00
James Cole
cb52af28e7 Also fixes #171 2016-02-05 13:20:10 +01:00
James Cole
4b4384b1a8 Merge branch 'hotfix/3.7.2.1' 2016-02-05 13:16:21 +01:00
James Cole
62483e748b Merge branch 'hotfix/3.7.2.1' into develop 2016-02-05 13:16:21 +01:00
James Cole
9b10984d81 Fix for bug #171 2016-02-05 13:16:12 +01:00
James Cole
c5e283a13e This is a fix for #171 2016-02-05 13:13:47 +01:00
James Cole
df918e8529 Fixed all problems related to strict types. 2016-02-05 13:09:18 +01:00
James Cole
aa1193a9eb Fixed all problems related to strict types. 2016-02-05 12:28:05 +01:00
James Cole
8f7f263a48 Declare strict type. 2016-02-05 12:08:25 +01:00
James Cole
0bad227548 No more PHP 5.6 tests. 2016-02-05 09:30:06 +01:00
James Cole
78bcd3e1bb Changed a lot of parameters. 2016-02-05 09:25:15 +01:00
James Cole
554640c345 These are the first commits that make FF require php 7. 2016-02-05 08:03:26 +01:00
James Cole
baecc256f6 Secretly updated some migrations. 2016-02-05 07:55:36 +01:00
James Cole
10a2a4cf5b Merge branch 'hotfix/3.7.2' 2016-02-05 07:40:38 +01:00
James Cole
c5dc073d49 Merge branch 'hotfix/3.7.2' into develop 2016-02-05 07:40:38 +01:00
James Cole
d48e4c66b2 I have no idea what I'm doing 2016-02-05 07:40:15 +01:00
James Cole
d357142075 Merge branch 'release/3.7.1' 2016-02-05 07:34:34 +01:00
James Cole
af17381e04 Merge branch 'release/3.7.1' into develop 2016-02-05 07:34:34 +01:00
James Cole
2e7d339d7e Fix for bug #170, caught thanks to @boerbiet 2016-02-05 07:34:25 +01:00
James Cole
c6cddad13c Let's see if this works as well. 2016-02-05 07:31:22 +01:00
James Cole
54bd54b521 First install with no-dev, then update? 2016-02-05 07:27:07 +01:00
James Cole
8cbbb970e1 Attempt to fix the tests. 2016-02-05 07:26:20 +01:00
James Cole
fbbf7f75c3 Fix for test. 2016-02-05 07:24:33 +01:00
James Cole
5a23b95352 Final fix for #170. Now to make a new release! 2016-02-05 07:21:51 +01:00
James Cole
6f9675b6d6 Catch the latest exceptions for #170. 2016-02-05 07:16:55 +01:00
James Cole
bb8ce30552 Added missing ranges to Navigation, see issue #170 2016-02-05 06:56:10 +01:00
James Cole
581e2ad431 Updated all tests to include the range. 2016-02-05 06:45:54 +01:00
James Cole
45deb493ba Added the provider annotation to all tests. 2016-02-05 06:41:28 +01:00
James Cole
4531d0ee32 Expand test to set a "custom" range. 2016-02-05 06:37:08 +01:00
James Cole
a26e8a5f83 Added the $range argument to every test that might need it. See #170 2016-02-05 06:36:56 +01:00
James Cole
be74fbd677 The tests now reflect that not all category-related views support all date ranges, see issue #170 2016-02-05 06:31:27 +01:00
James Cole
ee8c83bbd8 Some small fixes. 2016-02-04 17:57:36 +01:00
James Cole
dbd32abdd1 Also delete old files. 2016-02-04 17:50:35 +01:00
James Cole
f300287814 Better cleanup routine. 2016-02-04 17:22:09 +01:00
James Cole
dd361bb9ad Delete files used. 2016-02-04 17:22:01 +01:00
James Cole
744205cb6e New composer. 2016-02-04 17:21:46 +01:00
James Cole
86c22c9fdd New export functionality. 2016-02-04 17:16:16 +01:00
James Cole
d7a66f6782 New model for export. 2016-02-04 17:14:59 +01:00
James Cole
902f310eb0 New export directory. 2016-02-04 17:14:32 +01:00
James Cole
3bb107e192 New migrations (also for export). 2016-02-04 17:13:58 +01:00
James Cole
78f8b1454d New export controller. 2016-02-04 17:13:42 +01:00
James Cole
70ba9a4db5 Some phpunit updates. 2016-02-04 17:13:34 +01:00
James Cole
93d9c44585 This should fix the tests. 2016-02-04 11:07:34 +01:00
James Cole
f0bb462f1c New test data. 2016-02-04 11:00:26 +01:00
James Cole
151e8e8f17 Experimenting with a negation for #159 2016-02-04 08:56:33 +01:00
James Cole
23f474b003 Don't add inactive unhit bills, see #159 2016-02-04 08:55:06 +01:00
James Cole
15104de84c This should clean up the monthly report a bit. See issue #159 2016-02-04 08:53:56 +01:00
James Cole
55e4875662 New method to collect a users accounts by the given ids. 2016-02-04 08:53:15 +01:00
James Cole
5c3165efa2 Site is gone. 2016-02-04 08:52:54 +01:00
James Cole
3690a53dc9 expand tests 2016-02-04 07:30:48 +01:00
James Cole
fb119cc208 Replaced success() with done () 2016-02-04 07:30:12 +01:00
James Cole
7343304284 Code cleanup. 2016-02-04 07:28:39 +01:00
James Cole
c1ecc62ac1 Replaced Session::get() with session() 2016-02-04 07:27:03 +01:00
James Cole
bd40615f8e Code cleanup. 2016-02-04 07:23:14 +01:00
James Cole
0df8d096f0 Removed unused use statements. 2016-02-04 07:23:02 +01:00
James Cole
749dd1e8e3 Text alignment. 2016-02-04 07:22:38 +01:00
James Cole
ade6558769 Mea culpa. Removed ide specific files from git ignore. 2016-02-04 07:22:26 +01:00
James Cole
6303b172b1 Merge branch 'release/3.7.0' into develop 2016-02-04 07:21:29 +01:00
James Cole
636ae193a7 Merge branch 'release/3.7.0' 2016-02-04 07:21:28 +01:00
James Cole
aff8493204 Fixed bug where download would not be pushed as download. 2016-02-03 11:46:28 +01:00
James Cole
8f2d4494d5 Fixed a bug in the beforeDraw() routine. 2016-01-31 14:02:52 +01:00
James Cole
7a2bb4eb96 Removed some old CSS. Might just fix #114 2016-01-30 10:00:52 +01:00
James Cole
4916c06797 Added new dates to transaction journal, see #122 2016-01-30 09:52:05 +01:00
James Cole
a818ab0942 Fixes #110 2016-01-30 09:41:48 +01:00
James Cole
9aa89393c0 Forgot some translations. 2016-01-30 08:57:25 +01:00
James Cole
216b304fe1 Updated composer.lock. 2016-01-30 08:47:37 +01:00
James Cole
cf8a687b4d Added some new lines to files. 2016-01-30 08:42:04 +01:00
James Cole
d1d6ba4114 Updated read me file. 2016-01-30 08:38:40 +01:00
James Cole
a5ac713310 Importer will now fire custom rules. 2016-01-30 07:36:22 +01:00
James Cole
6fa8c33672 Fixed some bugs in test data. 2016-01-30 07:36:11 +01:00
James Cole
dd2b019d3c Moved test data around. 2016-01-30 07:36:02 +01:00
James Cole
3a12ad192f Move more javascript around. 2016-01-29 18:39:50 +01:00
James Cole
d669b75352 This view does not use JS. 2016-01-29 18:33:01 +01:00
James Cole
746d50d459 Some javascript related cleaning up. 2016-01-29 17:53:49 +01:00
James Cole
f741552d91 Some javascript code cleanup. Should make some pages lighter. 2016-01-29 17:49:02 +01:00
James Cole
c38e4b86b4 I noticed a weird page jump in the piggy bank section so it seemed a good moment to clean up some javascript. 2016-01-29 17:31:07 +01:00
James Cole
b044d85e90 Expand report index to include both "normal" year and fiscal year. 2016-01-29 17:14:23 +01:00
James Cole
24d111f026 New text. 2016-01-29 17:14:02 +01:00
James Cole
f50058e3c2 Renamed fiscal year start and end variable. 2016-01-29 17:13:54 +01:00
James Cole
ce9445168c Move the start and end date for the fiscal date ranges to fiscal-start and fiscal-end respectively. 2016-01-29 17:09:23 +01:00
James Cole
27b8b4b35a Use the fiscal helper's interface instead of the fiscal helper itself. 2016-01-29 17:08:06 +01:00
James Cole
9ccb67db8a Charts "columnChart" and "stackedColumnChart" now support beforeDraw() which will check the data to see if the chart should be drawn. This cleans up the front page for new users and empty months. 2016-01-29 13:35:08 +01:00
James Cole
3d82afd4e6 Because the "options" parameter is used nowhere I've removed it to be used for something else. 2016-01-29 13:25:04 +01:00
James Cole
5f9cb61160 Some stuff moving around in test data generation. 2016-01-29 13:24:33 +01:00
James Cole
7f54b70c24 Make fiscal year quick link optional. 2016-01-29 07:47:18 +01:00
James Cole
a156dce281 Some minor code cleanup. 2016-01-29 07:35:14 +01:00
James Cole
c0b0e58720 Removed duplicated code. 2016-01-29 07:33:49 +01:00
James Cole
170ffbae04 Removed duplicate code. 2016-01-29 07:29:21 +01:00
James Cole
6755ec7eb0 Some code cleanup. 2016-01-29 07:17:50 +01:00
James Cole
c8bc9a096a Some other clean up. 2016-01-29 07:08:17 +01:00
James Cole
dc7f5a562b Clean up some migrations. 2016-01-29 07:08:04 +01:00
James Cole
3b5b51578d Merge pull request #153 from webenhanced/feature/current-fiscal-year-quicklink-report
Quicklink fiscal year report feature. As per github issue #131.
2016-01-29 06:45:36 +01:00
Graham Miller
41188a1bd6 Quicklink fiscal year report feature. As per github issue #131.
The reason for instantiating the helper at the beginning of the static function routeBinder
is I am hoping that the object will only be created once.
2016-01-29 09:11:36 +10:00
James Cole
d9bafe34eb Renamed some stuff, courtesy of sensiolabs. 2016-01-28 22:06:16 +01:00
James Cole
43dbba5378 Implemented wrong interface. 2016-01-28 21:59:40 +01:00
James Cole
168ed5ac56 Renamed some stuff, courtesy of sensiolabs. 2016-01-28 21:50:20 +01:00
James Cole
e5b4a55d8e Some code cleanup things courtesy of SensioLabs. 2016-01-28 21:33:45 +01:00
James Cole
167c057e8a Removed executable rights. 2016-01-28 21:22:26 +01:00
James Cole
71bf054ab1 Removed TODO items in favour of issues, or actual fixes. 2016-01-28 21:05:26 +01:00
James Cole
111fcd77c4 Code style stuff for @webenhanced 2016-01-28 16:05:39 +01:00
James Cole
287c1c4ffa Some code cleanup. 2016-01-28 16:03:49 +01:00
James Cole
3d69dc786d Some minor code cleanup. 2016-01-27 21:52:21 +01:00
James Cole
57a3f20c13 Moved more code around. 2016-01-27 21:35:59 +01:00
James Cole
eab2c57594 Moved another method. 2016-01-27 21:18:51 +01:00
James Cole
b019962f34 Moved a method. 2016-01-27 20:54:14 +01:00
James Cole
5c59c819b6 Moved method to new helper. 2016-01-27 20:48:35 +01:00
James Cole
93b97b8d72 Refer to new account helper. 2016-01-27 20:46:38 +01:00
James Cole
f1f922031a Refer to new account helper 2016-01-27 20:45:49 +01:00
James Cole
390cace775 New account report helper to make the report helper a lot lighter. 2016-01-27 20:45:05 +01:00
James Cole
28fdad9426 A set of small fixes, courtesy of scrutinizer-ci 2016-01-27 19:35:00 +01:00
James Cole
9155c13e08 A set of small fixes, courtesy of scrutinizer-ci 2016-01-27 18:31:44 +01:00
James Cole
e8776d44c5 Merge pull request #149 from webenhanced/feature/custom-fiscal-years
Feature - custom fiscal years
2016-01-27 17:57:13 +01:00
Graham Miller
5ee8d04800 Added modifications to reports enabling the custom fiscal year changes. 2016-01-27 13:38:34 +10:00
Graham Miller
eb31934fb7 Add a new helper to handle fiscal issues.
Used initially to provide fiscal year support to the reports.
2016-01-27 11:54:04 +10:00
Graham Miller
000f86d318 Added fiscal year start date stored in 'm-d' format to preferences.
Displays YYYY-MM-DD for current year to get input.
2016-01-27 11:31:33 +10:00
Graham Miller
d9b3ebc82f Add preferences option to enable or disable the custom fiscal year handling.
Stored in DB as 0 or 1 and converted:-
- twig expression in view (expandedform needs true boolean)
- checkbox true/false converted to integer in set function in controller

Oh and I worked out how to localize the label ... took me a while but ended up so simple.

This is stage 1 of the overall custom fiscal year extension for Firefly.
2016-01-27 11:28:14 +10:00
Graham Miller
91b3ca047a Merge branch 'develop' of https://github.com/JC5/firefly-iii.git 2016-01-27 10:35:33 +10:00
James Cole
08131e42af Implemented some new tests. 2016-01-24 20:38:58 +01:00
James Cole
a013553a6c More cleanup. 2016-01-24 18:11:57 +01:00
James Cole
7b2fe8eb4a Test code cleanup. 2016-01-24 18:05:04 +01:00
James Cole
610f782054 Translations. 2016-01-24 16:51:01 +01:00
James Cole
94700f4064 Fixed some things in the rule controllers. 2016-01-24 16:50:55 +01:00
James Cole
0f12ebb31c Expanded tests. 2016-01-24 16:25:03 +01:00
James Cole
00a8a9ac0e Removed parameter rule trigger / rule action since they weren't being used. 2016-01-24 16:12:59 +01:00
James Cole
92616c6ae3 New test data with required role. 2016-01-24 16:05:14 +01:00
James Cole
97db618cd8 Some code cleanup and reordering 2016-01-24 15:58:16 +01:00
James Cole
2832d308f1 Optimize scripts. 2016-01-24 15:55:48 +01:00
James Cole
a7ecdf715f New translations. 2016-01-24 15:54:54 +01:00
James Cole
935dc3ff9f Some new tests 2016-01-23 16:48:34 +01:00
James Cole
99d14e8cbe This prevents constraint errors when the specified category has already been set. 2016-01-23 16:48:15 +01:00
James Cole
664fde2344 Some forgotten translations. 2016-01-23 09:10:22 +01:00
James Cole
27c45eface Updated test env. 2016-01-23 08:51:34 +01:00
James Cole
f83bc3c8b3 Updated tests. 2016-01-23 08:48:36 +01:00
James Cole
0d5efb8d27 Better mocking of objects. 2016-01-23 06:59:22 +01:00
James Cole
bf9c1c1875 Fixed some tests so they will not be skipped. 2016-01-23 06:54:29 +01:00
James Cole
049d866f62 Unskipped some tests. 2016-01-22 23:00:32 +01:00
James Cole
d672f0c2ad Better scripts (accept arguments) 2016-01-22 22:39:51 +01:00
James Cole
7b040e8583 Some changes to test coverage. 2016-01-22 21:08:04 +01:00
James Cole
e1cf285272 Various updates in test data and test configuration. 2016-01-22 20:47:48 +01:00
James Cole
53f7f13362 New env file. 2016-01-22 20:44:25 +01:00
James Cole
f710677cdc Also check for CSV delimiter presence. 2016-01-22 20:43:44 +01:00
James Cole
b5fbc8b632 test data 2016-01-22 20:13:55 +01:00
James Cole
1fdc0a196c Test data. 2016-01-22 20:13:27 +01:00
James Cole
559f429f5e Merge pull request #148 from roberthorlings/bugfix/rulegrouprepository
Added binding for RuleGroupRepositoryInterface
2016-01-22 19:30:37 +01:00
James Cole
ae4b198d3d Merge pull request #147 from roberthorlings/develop
Fixed a bug in storing date changes for the opening balance
2016-01-22 19:30:02 +01:00
Robert Horlings
e088ecbbad Added binding for RuleGroupRepositoryInterface to enable storing a rulegroup 2016-01-22 16:01:33 +01:00
Robert Horlings
f6b7bd5b44 Fixed a bug in storing date changes for the opening balance of an account 2016-01-22 15:44:23 +01:00
James Cole
f5a21f64c0 More magic words. 2016-01-22 10:10:51 +01:00
James Cole
f5cbed7c0c Added magic words "currentMonthEnd" and "currentMonthStart". 2016-01-22 07:54:15 +01:00
James Cole
59fff8928b Simplified some methods. 2016-01-22 07:35:28 +01:00
James Cole
8743b49a17 Some fixes for code climate. 2016-01-22 07:27:49 +01:00
James Cole
19dc91937e Remove double badge. 2016-01-22 07:22:34 +01:00
James Cole
4846cb7b14 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop 2016-01-21 13:56:30 +01:00
James Cole
54e0ac816b Updated readme. [skip ci] 2016-01-21 13:56:08 +01:00
James Cole
9ce960b3d7 There are no converters that need the role of the current field. 2016-01-21 09:52:45 +01:00
James Cole
cc9d1c4bfd Some unrelated code cleanup. 2016-01-20 21:24:48 +01:00
James Cole
d211555beb Only fire post-processing specifix in the import routine. See issue #145 2016-01-20 21:24:27 +01:00
James Cole
9350557d10 Properly extend the current specifix to indicate they're all post-processors. See issue #145 2016-01-20 21:24:08 +01:00
James Cole
ea6c54cad0 Expand specifix to have a property that determines whether they fire before anything happens, or after. Could be expanded to allow for even more fine-grained control. See issue #145 2016-01-20 21:23:39 +01:00
James Cole
81287602d7 Updated tests. 2016-01-20 16:15:23 +01:00
James Cole
441ba79ec7 Some tests 2016-01-20 15:27:53 +01:00
James Cole
c9e4a09da6 Sort by alphabet. 2016-01-20 15:23:36 +01:00
James Cole
c84f4e2bc0 Sort by alphabet. 2016-01-20 15:21:27 +01:00
James Cole
6938f8ab89 I just realised this still said "watch movie". 2016-01-20 15:14:31 +01:00
James Cole
4fdd2c851f Fix registration. 2016-01-20 14:23:50 +01:00
James Cole
78b56712fc More new tests. 2016-01-20 10:47:29 +01:00
James Cole
6dcdb0f9a0 Committed wrong .gitignore file. 2016-01-20 10:14:27 +01:00
James Cole
cfab837b96 Create upload directory. 2016-01-20 10:14:05 +01:00
James Cole
b8461cdeb6 Touch empty attachment. 2016-01-20 10:13:44 +01:00
James Cole
e07d65ef6b Create default upload directory. 2016-01-20 10:13:33 +01:00
James Cole
80cbc35c89 More test data, more tests. 2016-01-20 09:31:24 +01:00
James Cole
2faf84780f Implemented some tests. 2016-01-20 09:15:33 +01:00
James Cole
ebdb1a8836 No more session flash. 2016-01-20 08:25:49 +01:00
James Cole
2dfa51652a Basic set of tests (incomplete). 2016-01-20 06:20:09 +01:00
James Cole
1cf1ea230f Updated read me. 2016-01-19 19:59:32 +01:00
James Cole
86e127ebff Fixed password reset routine. 2016-01-19 18:32:09 +01:00
James Cole
a313265785 Different URL for password reset. 2016-01-19 18:14:15 +01:00
James Cole
37693ad08d Fixed mail config. 2016-01-19 18:14:03 +01:00
James Cole
e8180d252b Wrong URL for login form. 2016-01-19 18:10:30 +01:00
James Cole
9957c95c68 Re-order auth controller. 2016-01-19 18:10:07 +01:00
James Cole
3354d53a48 Reset phpunit xml. 2016-01-19 18:09:53 +01:00
James Cole
ddaa53b940 Updated test code. 2016-01-19 16:55:53 +01:00
James Cole
c2e04a11bf Updated run scripts for tests. 2016-01-19 16:55:02 +01:00
James Cole
00d059b8df More tests. 2016-01-19 14:37:44 +01:00
James Cole
f3fff6f1c5 Code rearrangement. 2016-01-19 13:59:54 +01:00
James Cole
9360eb6a70 First account controller test. 2016-01-19 13:53:55 +01:00
James Cole
26fb03e6c8 Reformatted code according to scrutinizer-ci. 2016-01-19 09:11:15 +01:00
James Cole
eed3d021d9 Small cleanup. 2016-01-19 08:48:38 +01:00
James Cole
48728e8418 Merge pull request #146 from roberthorlings/feature/abn-amro-import-specifix
ABN AMRO Specifix
2016-01-19 08:36:06 +01:00
Robert Horlings
f39f25760a Added messages for new specifix 2016-01-18 15:43:30 +01:00
Robert Horlings
10ea60daaf Improved SEPA description parsing 2016-01-18 15:42:56 +01:00
Robert Horlings
f2fa5e140b Merge remote-tracking branch 'origin/develop' into feature/abn-amro-import-specifix 2016-01-18 15:35:08 +01:00
James Cole
be5ff35b13 Reversed the removal of the validating trait since @roberthorlings discovered it's actually still being used. 2016-01-18 13:15:11 +01:00
Robert Horlings
bd5d73d1e6 Removed transaction type from the description 2016-01-18 12:37:06 +01:00
Robert Horlings
cc712b0c75 Updated message identifier for unknown opposing account 2016-01-18 12:31:45 +01:00
Robert Horlings
a5ac84e1b9 Merge remote-tracking branch 'origin/develop' into feature/abn-amro-import-specifix 2016-01-18 09:09:35 +01:00
Robert Horlings
cbe1f762ca Fixing a bug with expense account being set to unknown 2016-01-18 09:09:30 +01:00
James Cole
e6db49c20c Some tests. 2016-01-17 15:48:18 +01:00
Robert Horlings
4909fcc8b4 Moved parsing of amount with decimal separator to Converter object 2016-01-17 15:37:49 +01:00
James Cole
68cdfd00b0 Update test things. 2016-01-17 15:28:01 +01:00
Robert Horlings
323c16ebe1 Implemented additional ABNAMRO description formats 2016-01-17 15:25:47 +01:00
James Cole
c20a38b7b0 Ignore file for coverage logs. 2016-01-17 08:38:19 +01:00
James Cole
20993342a2 Better wording. 2016-01-17 07:55:23 +01:00
James Cole
1b3198c143 New: upgrade instructions when installing or upgrading composer packages. 2016-01-17 07:50:09 +01:00
James Cole
173d0290ea New composer stuff. 2016-01-17 07:49:49 +01:00
James Cole
ae4cd8da12 This should fix the travis builds. 2016-01-17 07:30:14 +01:00
James Cole
a494398332 Actually correct database name for once. 2016-01-17 07:24:06 +01:00
James Cole
c82bdd1f5a New gitignore. 2016-01-17 07:22:36 +01:00
James Cole
e6ac3ccfad Fix travis configuration. 2016-01-17 07:19:44 +01:00
James Cole
b13b58a2b2 More test data and an actual test. 2016-01-17 07:18:35 +01:00
James Cole
2b6790f83f Fixed data seeder. 2016-01-17 07:07:22 +01:00
James Cole
fe30850568 Fixed some database migration stuff. 2016-01-16 21:32:36 +01:00
James Cole
493c71b89e Fix test data seeder. 2016-01-16 09:16:26 +01:00
James Cole
deaebc373c Some new code for testing. 2016-01-16 09:15:24 +01:00
James Cole
e834489206 Some cleaning up courtesy of PHPStorm. 2016-01-16 07:14:36 +01:00
James Cole
1b316e462e Also fire rules when updating. 2016-01-16 06:34:50 +01:00
James Cole
7bf75128a8 Some cleaning up courtesy of PHPStorm. 2016-01-15 23:12:52 +01:00
James Cole
3857e8d49f Remove old code. 2016-01-15 22:44:25 +01:00
James Cole
b16149b842 Wrong array name. 2016-01-15 22:44:17 +01:00
James Cole
32ed8a4d8d Removed some unnecessary methods. 2016-01-15 22:41:26 +01:00
James Cole
f949d2476b Move from getDates to array dates. 2016-01-15 22:32:21 +01:00
James Cole
0620830b10 Move from getDates to array dates. 2016-01-15 22:23:01 +01:00
James Cole
7ee25693aa Removed stuff no longer used. 2016-01-15 22:20:38 +01:00
James Cole
7cb86add64 New phpdoc. 2016-01-15 22:13:38 +01:00
James Cole
fbc9720f7a Clean up some report methods. 2016-01-15 21:50:57 +01:00
James Cole
ffdd37ddd5 More code cleanup. 2016-01-15 20:57:26 +01:00
James Cole
51062bc80b Some cleaning up and suppressing. 2016-01-15 20:48:06 +01:00
James Cole
31533b5ef8 No need to check for opening balance. 2016-01-15 19:48:35 +01:00
James Cole
3649b595df Will no longer recognise transactions of type "opening balance". 2016-01-15 19:48:09 +01:00
James Cole
83b7c9aa32 Fixed a bug in editing an opening balance 2016-01-15 19:45:34 +01:00
James Cole
4e3c59a2da Some cleaning up courtesy of PHPStorm. 2016-01-15 19:37:09 +01:00
James Cole
dcbfe90cf7 Some code cleanup courtesy of PHPStorm. 2016-01-15 18:21:59 +01:00
James Cole
f69be86c74 Some code cleanup courtesy of PHPStorm. 2016-01-15 17:53:54 +01:00
James Cole
820722f44e Some code cleanup courtesy of PHPStorm. 2016-01-15 17:38:09 +01:00
Robert Horlings
2ff806dedc Initial version of ABN AMRO import specifix with amount correction and SEPA description parser 2016-01-15 16:48:09 +01:00
James Cole
a755badd5f Use correct parameter. 2016-01-15 16:33:54 +01:00
James Cole
4df1e5393b Also updated all translations. 2016-01-15 16:33:03 +01:00
James Cole
8c55bd179f Moved the option right under the file selection. 2016-01-15 16:27:17 +01:00
James Cole
ccfc5ece66 Put the form options in the translation files. 2016-01-15 16:27:01 +01:00
James Cole
6c12f1bc86 Some refactoring, courtesy of PHPStorm. 2016-01-15 16:26:49 +01:00
James Cole
88839e9610 For more clarity in the code, moved the array of options to the controller itself. 2016-01-15 16:26:24 +01:00
James Cole
4f6a733238 For more clarity in the code, moved the array of options to the controller itself. 2016-01-15 16:26:19 +01:00
James Cole
dc9083a764 Also forget delimiter. 2016-01-15 16:26:02 +01:00
James Cole
6f231b840b Merge pull request #144 from roberthorlings/feature/import-csv-delimiter
Option to choose CSV delimiter when importing data
2016-01-15 16:19:53 +01:00
Robert Horlings
61a703e605 Implemented option to choose field delimiter in CSV import 2016-01-15 15:24:07 +01:00
Robert Horlings
8e0e9734a5 Updated gitignore with eclipse files and storage directory 2016-01-15 15:07:42 +01:00
James Cole
2afb455bac New translations. 2016-01-15 13:40:39 +01:00
James Cole
01792f91e2 Code cleanup 2016-01-15 13:13:33 +01:00
James Cole
651dff0750 Shorter method names. 2016-01-15 13:13:21 +01:00
James Cole
9cbfbd41dc Shorter method names. 2016-01-15 13:10:34 +01:00
James Cole
168d6f403c Shorter method names. 2016-01-15 13:09:27 +01:00
James Cole
41f200e630 Some code cleanup. 2016-01-15 13:08:25 +01:00
James Cole
0809cfdc6d Move methods around 2016-01-15 13:06:17 +01:00
James Cole
466d739da8 Start with new controller for rule groups. 2016-01-15 11:28:27 +01:00
James Cole
daf65cb387 Split rule and rule group repositories. 2016-01-15 11:27:27 +01:00
James Cole
2605f60983 Refactor. Split rules and rule groups. 2016-01-15 11:16:41 +01:00
James Cole
fcf6cdb134 Better order and display. 2016-01-15 10:52:35 +01:00
James Cole
209258b507 Fixed various bugs. 2016-01-15 09:25:32 +01:00
James Cole
f80bc214f9 Edit rules. 2016-01-15 08:45:39 +01:00
James Cole
f76990bb9b Twig methods. 2016-01-15 08:13:19 +01:00
James Cole
eef68c9b31 New extension for rules. 2016-01-15 08:10:22 +01:00
James Cole
006c2ae186 Refer to dedicated methods instead of variables. 2016-01-15 08:06:33 +01:00
James Cole
8b66ff6afe First edit-rule code. 2016-01-15 08:04:57 +01:00
James Cole
4cc6d57e6e Stop processing other rules if asked. 2016-01-15 06:43:00 +01:00
James Cole
af1c6b22bb Translation. 2016-01-15 06:35:53 +01:00
James Cole
5958990ed5 Stop processing. 2016-01-15 06:35:31 +01:00
James Cole
cd4cbdc197 Accidentally used a php 7 thing. 2016-01-15 06:25:09 +01:00
James Cole
1f538be16e More code for rules. 2016-01-14 21:34:17 +01:00
James Cole
9703439a4c Some more rule things before I merge a change to the CSV importer. 2016-01-14 19:20:02 +01:00
James Cole
42203ba872 Attempt at validating. 2016-01-14 18:57:52 +01:00
James Cole
cd60b852a1 This isn't really working. 2016-01-14 18:09:20 +01:00
James Cole
5b1d9e1a0d Start work on adding a rule. 2016-01-14 16:41:15 +01:00
James Cole
e02657a7c7 New font awesome 2016-01-14 13:12:20 +01:00
James Cole
c352eb0c74 First attempt at create rule form. 2016-01-14 12:37:49 +01:00
James Cole
81b9d5da09 User can now re-order triggers and actions. 2016-01-14 11:27:15 +01:00
James Cole
b9b0413510 More resources for rules. 2016-01-14 10:33:24 +01:00
James Cole
97770da619 Re-order rule groups. 2016-01-14 09:53:59 +01:00
James Cole
521623797e Move rule groups. 2016-01-14 09:49:12 +01:00
James Cole
15d3414443 Can order rules. 2016-01-14 09:38:48 +01:00
James Cole
245f06c93a Fix test, expand index. 2016-01-14 09:17:23 +01:00
James Cole
33899f0e2f New test data, new translations. 2016-01-14 09:08:44 +01:00
James Cole
4697fbdeef Routine to delete rules. Should include routine to move rules to other group. 2016-01-13 21:44:26 +01:00
James Cole
06174d6afb Edit rule group. 2016-01-13 18:50:15 +01:00
James Cole
b2bb16c1e0 Updated composer file. 2016-01-13 18:35:09 +01:00
James Cole
27aae279e6 More code for rules. 2016-01-13 18:34:56 +01:00
James Cole
e9ee93beb7 Expand view and translations. 2016-01-13 16:51:55 +01:00
James Cole
20941dedd3 Also fix rule group. 2016-01-13 16:08:05 +01:00
James Cole
5ac88623ed Prep stuff for routes and actions. 2016-01-13 16:05:39 +01:00
James Cole
768508dd4b First attempt at interface. 2016-01-13 15:59:45 +01:00
James Cole
668633e764 All actions and triggers. 2016-01-13 15:10:49 +01:00
James Cole
3dbb1f034d Fix the last triggers. 2016-01-13 14:51:49 +01:00
James Cole
1270e5d15c More valid triggers. 2016-01-13 14:37:19 +01:00
James Cole
afec8480fb More working triggers. 2016-01-13 14:12:46 +01:00
James Cole
8720511046 From account contains trigger. 2016-01-13 14:05:26 +01:00
James Cole
a7a00ecf40 More rule possibilities 2016-01-13 14:02:22 +01:00
James Cole
88bbafd3e8 If you get the destination account attribute before the model is saved, the cache breaks. 2016-01-13 14:01:40 +01:00
James Cole
ae3258b449 If you get the source account attribute before the model is saved, the cache breaks. 2016-01-13 14:01:09 +01:00
James Cole
cf4d7cfeef Grab rules properly. 2016-01-13 09:08:13 +01:00
James Cole
46ee2a0568 Can now automatically handle some rules. No user interface, yet. 2016-01-13 08:14:14 +01:00
James Cole
ce250c85fc Rename class. 2016-01-13 07:48:43 +01:00
James Cole
1087b9f5df Can now trigger. 2016-01-13 07:47:26 +01:00
James Cole
0dc74d9d14 Rules will now fire for a store-action. And fail. 2016-01-13 07:30:11 +01:00
James Cole
98b272383f Clean up triggers, add some new ones. 2016-01-13 07:16:29 +01:00
James Cole
e722daafd0 Removed old codeception file. 2016-01-13 05:54:42 +01:00
James Cole
670ab059d1 Simply log presence. 2016-01-13 05:37:25 +01:00
James Cole
09f826ceba First attempt at executing groups and rules. 2016-01-12 21:41:45 +01:00
James Cole
df5e3c9be9 Include handlers. 2016-01-12 21:41:19 +01:00
James Cole
31c336b3b1 New test data. 2016-01-12 21:40:31 +01:00
James Cole
b3a419b2f3 New events. 2016-01-12 21:38:12 +01:00
James Cole
11f63fa6ce Rename models for clarity 2016-01-12 21:38:05 +01:00
James Cole
4b35059140 Add connection to user. 2016-01-12 21:37:48 +01:00
James Cole
7836feba63 New trigger. 2016-01-12 21:10:16 +01:00
James Cole
1e54366f1f Update test data. 2016-01-12 21:09:51 +01:00
James Cole
d039bb0e03 Update database. 2016-01-12 21:09:38 +01:00
James Cole
166d32f073 Add actions 2016-01-12 21:09:28 +01:00
James Cole
321890992e Cleanup php doc. 2016-01-12 21:09:19 +01:00
James Cole
d644403d8a Add php doc to rule controller. 2016-01-12 20:56:53 +01:00
James Cole
44e76f9518 Cleanup rule migration. 2016-01-12 20:56:43 +01:00
James Cole
f9703eca4c Removed double configuration. 2016-01-12 20:56:36 +01:00
James Cole
48551e8bf5 Merge branch 'feature/rules' into develop 2016-01-12 20:39:49 +01:00
James Cole
74b538805b Expand config. 2016-01-12 20:38:19 +01:00
James Cole
35f493beff Move domain stuff to configuration. 2016-01-12 20:37:47 +01:00
James Cole
06d11c9133 New stuff for the rule thing. 2016-01-12 20:36:47 +01:00
James Cole
da7eb615db Added php doc. 2016-01-11 21:42:51 +01:00
James Cole
5da5024ad3 New models. 2016-01-11 21:28:29 +01:00
James Cole
c1346d4c86 Migration for rules. 2016-01-11 21:10:11 +01:00
James Cole
c38a4a15ff View 2016-01-11 20:42:24 +01:00
James Cole
bdec94ead6 Sidebar entry 2016-01-11 20:42:20 +01:00
James Cole
69bebf202f New translation 2016-01-11 20:42:15 +01:00
James Cole
38895afea6 New migration (empty) 2016-01-11 20:42:08 +01:00
James Cole
70ed4188b6 New controller for rules. 2016-01-11 20:41:57 +01:00
James Cole
d889094863 New route for rules index. 2016-01-11 20:41:50 +01:00
James Cole
c96eb8753e New bread crumb for rules controller. 2016-01-11 20:41:43 +01:00
James Cole
5a7607f6c6 More consistent monetary formatting. 2016-01-10 18:02:24 +01:00
James Cole
71bb88529a Also run php 7 tests. 2016-01-10 14:42:51 +01:00
James Cole
b26164a168 More test data. 2016-01-10 12:16:34 +01:00
James Cole
19444551e4 Get withdrawals only. 2016-01-10 12:16:25 +01:00
James Cole
e0b2a6e627 Translations. 2016-01-09 19:39:38 +01:00
James Cole
2973765866 New translations. 2016-01-09 19:37:21 +01:00
James Cole
2a08a25064 Fixed a translation. 2016-01-09 19:29:52 +01:00
James Cole
a55e291908 Removed money_format. 2016-01-09 18:02:36 +01:00
James Cole
2003d37a9a Fix for php 5.6 thing. 2016-01-09 16:10:12 +01:00
James Cole
29145bf6cf More bindings. 2016-01-09 16:09:26 +01:00
James Cole
caa1ff120a Built more binders. 2016-01-09 15:53:11 +01:00
James Cole
ef4e964c94 Fixed budget list binder. 2016-01-09 15:47:03 +01:00
James Cole
1f263f60a7 New binder for category lists. 2016-01-09 15:45:21 +01:00
James Cole
5fc7cafcbe All new binders. 2016-01-09 15:44:07 +01:00
James Cole
397c4926eb Update cookie policy 2016-01-09 15:39:41 +01:00
James Cole
a14544398b New middleware 2016-01-09 15:39:34 +01:00
James Cole
d439dceac1 New middleware. 2016-01-09 15:39:02 +01:00
James Cole
af29b31ea8 Remove "created by" message. 2016-01-09 15:38:48 +01:00
James Cole
b311ef70bc Point to website. 2016-01-09 14:34:28 +01:00
James Cole
9f9d744406 Cleared read me. [skip-ci] 2016-01-09 14:33:21 +01:00
James Cole
e094871bc9 Merge branch 'release/3.6.1' into develop
Conflicts:
	composer.lock
2016-01-09 14:31:52 +01:00
James Cole
dfc95cee45 Merge branch 'release/3.6.1' 2016-01-09 14:31:25 +01:00
James Cole
fdca234721 New composer lock file. 2016-01-09 14:31:17 +01:00
James Cole
cf5cc626d7 Important bug fix. 2016-01-09 14:27:35 +01:00
James Cole
358d9aac7d New version. 2016-01-09 14:27:17 +01:00
James Cole
681bc580c4 Removed GA beacon. 2016-01-09 12:54:43 +01:00
James Cole
4a2768f8d1 Reinstated test files. 2016-01-09 09:56:41 +01:00
James Cole
05f8773fa0 Fix user model. 2016-01-09 08:51:49 +01:00
James Cole
5e5fdfdd51 Move database reference. 2016-01-09 08:47:54 +01:00
James Cole
5e744390c0 Remove PHP requirement. 2016-01-09 08:45:27 +01:00
James Cole
cb5fa401cb Try to get travis working again. 2016-01-09 08:36:50 +01:00
James Cole
2980860377 Did some code cleanup. Comments and headers mostly. 2016-01-09 08:20:55 +01:00
James Cole
9ff0b282f3 With the growing popularity and frankly, quality of this software, I've decided to connect my actual name to it in the form of a license. Soon, every file will have a short reference to this license. 2016-01-09 07:57:42 +01:00
James Cole
4bc1c032bd Removed middle ware. 2016-01-09 07:48:45 +01:00
James Cole
9fcb00f10b Fixed some date range problems. 2016-01-09 07:46:11 +01:00
James Cole
723e461559 Fix logout. 2016-01-09 07:38:18 +01:00
James Cole
9b24e6d448 Remove explanation text. 2016-01-09 07:32:23 +01:00
James Cole
e622774775 Move to better spot 2016-01-08 20:48:34 +01:00
James Cole
84ce9bc94b Move locale code. 2016-01-08 20:47:35 +01:00
James Cole
a3a1bc30b1 Convert to number. 2016-01-08 20:43:46 +01:00
James Cole
b4c9a7698e Also call parent constructor. 2016-01-08 20:40:48 +01:00
James Cole
8b2d7fc32f Need to call parent constructor. 2016-01-08 19:13:51 +01:00
James Cole
90e66cbd94 Remove session guard. 2016-01-08 18:51:10 +01:00
James Cole
fd9a7080ea Move authentication around. 2016-01-08 18:29:47 +01:00
James Cole
c0fad106f0 Temp fix for redirect loop. 2016-01-08 16:38:20 +01:00
James Cole
78c8243184 Not the problem. 2016-01-08 16:36:41 +01:00
James Cole
780abecd53 Worked the last time.. 2016-01-08 16:35:44 +01:00
James Cole
ea6896816d Fix domain check. 2016-01-08 16:34:52 +01:00
James Cole
95a456860a Fix another URL. 2016-01-08 16:33:27 +01:00
James Cole
b1b2fda155 No 5.5 test. 2016-01-08 16:32:51 +01:00
James Cole
5847f534c3 Fix register route. 2016-01-08 16:32:31 +01:00
James Cole
e8e8163fa7 Allow registering by default. 2016-01-08 16:31:27 +01:00
James Cole
6a21d82dcf Debug class does not belong in production. 2016-01-08 16:29:14 +01:00
James Cole
d6b47656bc Updated various files after upgrade to laravel 5.2 2016-01-08 16:09:51 +01:00
James Cole
8c37ef3a95 Updated various files after upgrade to laravel 5.2 2016-01-08 16:02:15 +01:00
James Cole
35deed1d10 Update http related classes after upgrade to Laravel 5.2 2016-01-08 16:01:21 +01:00
James Cole
ba32a665f1 Update middleware after upgrade to Laravel 5.2 2016-01-08 16:00:57 +01:00
James Cole
bbd19be554 Update requests after upgrade to Laravel 5.2 2016-01-08 16:00:28 +01:00
James Cole
c360cc6db6 Update jobs after upgrade to Laravel 5.2 2016-01-08 16:00:16 +01:00
James Cole
7e4b9af315 Updated providers after upgrade to Laravel 5.2 2016-01-08 16:00:07 +01:00
James Cole
9b03e6b124 Updated config after upgrade to Laravel 5.2 2016-01-08 15:59:30 +01:00
James Cole
013e16e15f Updated config after upgrade to Laravel 5.2 2016-01-08 15:59:21 +01:00
James Cole
180ec52798 Various new files after upgrade to Laravel 5.2 2016-01-08 15:56:35 +01:00
James Cole
c7b47b4453 Fix view after upgrade to Laravel 5.2 2016-01-08 15:55:22 +01:00
James Cole
4b00db7662 Removed test code after upgrading to laravel 5.2 (will have to reinstate). 2016-01-08 14:30:19 +01:00
James Cole
78a7b995d2 Updated artisan after upgrading to laravel 5.2 2016-01-08 14:29:12 +01:00
James Cole
f7c50a123a Updated config file after upgrading to laravel 5.2 2016-01-08 14:28:59 +01:00
James Cole
9617d17aca Updated app file after upgrading to laravel 5.2 2016-01-08 14:28:15 +01:00
James Cole
d9884ddf73 Removed test code after upgrading to laravel 5.2 2016-01-08 14:28:04 +01:00
James Cole
8157f0a958 Updated htaccess file after upgrading to laraval 5.2 2016-01-08 14:27:35 +01:00
James Cole
b7580a5f83 Updated example env files after upgrading to laraval 5.2 2016-01-08 14:27:27 +01:00
James Cole
66703b30b3 Updated git files after laravel 5.2 upgrade 2016-01-08 14:27:05 +01:00
James Cole
53677e3c64 Moved views. 2016-01-08 13:35:27 +01:00
James Cole
feef6a1756 Merge branch 'release/3.6.0' into develop 2016-01-07 10:22:18 +01:00
James Cole
5f299b895b Merge branch 'release/3.6.0' 2016-01-07 10:22:17 +01:00
James Cole
4e1bb5fbac Update read me, composer 2016-01-07 10:21:57 +01:00
James Cole
47ccc513ad New version. 2016-01-07 10:11:37 +01:00
James Cole
cce1a01936 Update composer.lock 2016-01-07 10:10:52 +01:00
James Cole
6f2b1a6a76 The Sendgrid cron does not belong in Firefly. 2016-01-06 15:20:21 +01:00
James Cole
8526907f50 Expand multi-year report. 2016-01-05 21:23:58 +01:00
James Cole
bc192a8e54 Merge pull request #138 from leander091/develop
String is a reserved class name in php 7.
2016-01-03 20:25:34 +01:00
leander091
9ff6f8fc52 String is a reserved class name in php7 changed to Str according to the upstream project 2016-01-03 15:52:12 +01:00
James Cole
6573bd6b4b Code cleanup according to PHPStorm. 2016-01-02 19:33:44 +01:00
James Cole
9dc3f614af Localised date 2016-01-02 16:59:36 +01:00
James Cole
3888b8cceb Code cleanup according to PHPStorm. 2016-01-02 16:57:31 +01:00
James Cole
294df4a2b3 Simplified some code. 2016-01-02 16:32:08 +01:00
James Cole
265dd37212 Cleanup and add various warnings. 2016-01-02 16:31:14 +01:00
James Cole
eb7c79ad27 Can be written to. 2016-01-02 09:47:01 +01:00
James Cole
de111c7100 Fix broken route. 2016-01-01 21:59:19 +01:00
James Cole
e892c9a824 Followed up on some inspections. 2016-01-01 21:49:27 +01:00
James Cole
5eb0e18cae Cleaning up 2016-01-01 21:15:03 +01:00
James Cole
27cabb398e More queries filtered. 2016-01-01 21:07:15 +01:00
James Cole
64dbb14241 Method no longer used. 2016-01-01 20:05:14 +01:00
James Cole
bb4e2be9eb Method no longer used. 2016-01-01 20:04:44 +01:00
James Cole
7d1de0da17 Method no longer used. 2016-01-01 20:02:01 +01:00
James Cole
bf16c9a42b Method no longer used. 2016-01-01 20:01:07 +01:00
James Cole
1a7b1ce499 Method no longer used. 2016-01-01 20:00:20 +01:00
James Cole
efc9bc71a7 Method no longer used. 2016-01-01 19:58:31 +01:00
James Cole
fc5b315af0 Method no longer used. 2016-01-01 19:58:05 +01:00
James Cole
7a4a78628d Method no longer used. 2016-01-01 19:57:23 +01:00
James Cole
d16fb30a62 Method no longer used. 2016-01-01 19:56:23 +01:00
James Cole
2d177e660e Method no longer used. 2016-01-01 19:55:47 +01:00
James Cole
2f131dc170 Method no longer used. 2016-01-01 19:55:00 +01:00
James Cole
94810e371a Enable bill report. 2016-01-01 19:52:55 +01:00
James Cole
59731878f6 Month report optimised. 2016-01-01 19:46:12 +01:00
James Cole
54ede8aa18 Code cleanup. 2016-01-01 13:54:23 +01:00
James Cole
b415b6b043 Some code cleanup. 2016-01-01 12:41:00 +01:00
James Cole
70c922cdc5 Code cleanup. 2016-01-01 11:32:08 +01:00
James Cole
068fc32cb2 Some query cleaning up. 2015-12-31 20:12:49 +01:00
James Cole
3dcdacc3b8 Cleared lots of queries. In some cases, from 1400 back to 300. And those 300 have a different cause which is next. 2015-12-31 17:46:34 +01:00
James Cole
a6594358d8 Use a lot less queries 2015-12-31 17:20:54 +01:00
James Cole
f98921da46 Optimised summary chart. 2015-12-31 08:36:01 +01:00
James Cole
25747fbcf2 And optimised another chart. Amounts are slightly different. Will investigate 2015-12-31 08:31:28 +01:00
James Cole
aac5c2b13c Optimised another chart. 2015-12-31 08:26:04 +01:00
James Cole
cc810a5b6f Renamed a chart to be more consistent with the others. 2015-12-31 07:54:11 +01:00
James Cole
1b3592d959 Optimise chart. 2015-12-31 07:49:19 +01:00
James Cole
d75614e9a7 Optimised two charts, cleaned up some code. 2015-12-30 16:42:09 +01:00
James Cole
08703e282f Fix array. 2015-12-30 09:30:06 +01:00
James Cole
2904baf44e From 1100+ queries to a steady 6. 2015-12-30 09:17:29 +01:00
James Cole
f99e46bf75 Removed for-loop in favour of "pluck()" aka: RTFM. 2015-12-30 09:17:14 +01:00
James Cole
9f87890ead Removed for-loop in favour of "pluck()" aka: RTFM. 2015-12-30 09:17:05 +01:00
James Cole
638184cf66 Removed for-loop in favour of "pluck()" aka: RTFM. 2015-12-30 09:16:58 +01:00
James Cole
03babfe75c Removed for-loop in favour of "pluck()" aka: RTFM. 2015-12-30 09:16:53 +01:00
James Cole
238ed3c788 Rename a method. 2015-12-30 08:25:38 +01:00
James Cole
6a9d931ba3 More code cleanup. 2015-12-30 08:21:11 +01:00
James Cole
a3d2a9e00b Some cleaning up, and I hope simplification. 2015-12-30 08:15:04 +01:00
James Cole
39b88e8207 Added an alias to make methods more readable. 2015-12-30 08:00:52 +01:00
James Cole
449c6dfde5 Bind new class. 2015-12-29 22:51:31 +01:00
James Cole
7cc47ca0b1 Some cleaning up. 2015-12-29 22:48:55 +01:00
James Cole
95f4a83f41 Split category repository into two repositories. One for database calls for single categories, the other pertaining all categories. 2015-12-29 22:44:13 +01:00
James Cole
35154dc7a3 Another chart optimised 2015-12-29 18:55:30 +01:00
James Cole
0fd0d7d080 Less queries for category frontpage chart. 2015-12-29 10:08:40 +01:00
James Cole
658265c938 Optimised whole budget chart to use less queries. 2015-12-29 08:45:43 +01:00
James Cole
38fe9e7e1c Optimised chart. 2015-12-29 08:27:13 +01:00
James Cole
77056dcf8d Cleanup. 2015-12-29 08:27:05 +01:00
James Cole
026683a8e1 Made reportType camelCase. 2015-12-28 20:04:54 +01:00
James Cole
6ab6dd6ac3 First attempt at optimised query for multi-year budget chart. 2015-12-28 19:56:28 +01:00
James Cole
83de3482ce Optimised budget year chart. 2015-12-28 17:57:03 +01:00
James Cole
919a35aed3 Merge branch 'release/3.5.6.1' 2015-12-28 16:53:45 +01:00
James Cole
ad3defb071 Merge branch 'release/3.5.6.1' into develop 2015-12-28 16:53:45 +01:00
James Cole
9c929ecd1b New release. 2015-12-28 16:53:30 +01:00
James Cole
f79c9f7cf1 Cleanup. 2015-12-28 16:52:28 +01:00
James Cole
8e75c345d9 Found a bug that requires a new release of FF3 to fix. 2015-12-28 16:52:21 +01:00
James Cole
44886d9aad Merge branch 'release/3.5.6' into develop 2015-12-28 08:07:44 +01:00
James Cole
c2d444347d Merge branch 'release/3.5.6' 2015-12-28 08:07:43 +01:00
James Cole
5cb497596d New release. 2015-12-28 08:07:26 +01:00
James Cole
1857469d2f Removed unused parameters 2015-12-28 08:00:42 +01:00
James Cole
ea71b4843d Formatting fix in chart. 2015-12-28 07:58:40 +01:00
James Cole
97727e2e3d Some code cleanup courtesy of phpstorm. 2015-12-28 07:55:09 +01:00
James Cole
f81e7da8bb Code cleanup. 2015-12-28 07:49:27 +01:00
James Cole
8e827bf83b Removed parameter. 2015-12-28 07:43:57 +01:00
James Cole
9e1fa284ca Update php doc. 2015-12-28 07:43:05 +01:00
James Cole
3bf800be6e null check. 2015-12-28 07:41:44 +01:00
James Cole
635b9f9dba instance check. 2015-12-28 07:39:48 +01:00
James Cole
52a0d7cf7b Clean up code. 2015-12-28 07:38:02 +01:00
James Cole
a34516932b Rename include advised by scrutinizer. 2015-12-28 07:35:09 +01:00
James Cole
929a2a30a2 Fix TODO. 2015-12-28 07:31:48 +01:00
James Cole
ffa88eeb08 Made deleted piggy banks for piggy bank events visible. 2015-12-28 07:27:16 +01:00
James Cole
51b45b4ed4 Code cleanup. 2015-12-28 07:12:47 +01:00
James Cole
f263844793 Fix a bug where you cannot edit transactions. Will warrant a new release of FF. 2015-12-28 07:12:12 +01:00
James Cole
18c46df9aa Fix negative amounts and chart names. 2015-12-27 21:26:44 +01:00
James Cole
15846e157b From 200+ queries back to ~17. 2015-12-27 21:17:04 +01:00
James Cole
bc59f2db0d Optimised queries. 2015-12-27 20:07:49 +01:00
James Cole
cd2be8c1a4 Activate caching. 2015-12-27 19:51:20 +01:00
James Cole
f958115c50 Update composer file. 2015-12-27 17:57:32 +01:00
James Cole
e7d677bfb6 Add rounding, so the number will be a float. 2015-12-27 17:34:31 +01:00
James Cole
3e80ffc52b Huge change to bills and paid/unpaid/cc boxes. 2015-12-27 17:29:41 +01:00
James Cole
d0c7a5c076 Optimised query. 2015-12-27 09:44:12 +01:00
James Cole
f3f4e6b354 Stops date from skipping ahead slowly. 2015-12-27 09:40:28 +01:00
James Cole
5a45b25614 Merge branch 'hotfix/chart-fix' 2015-12-27 09:35:41 +01:00
James Cole
0b5ee1edfc Merge branch 'hotfix/chart-fix' into develop 2015-12-27 09:35:41 +01:00
James Cole
da3dc599f9 Fix chart call. 2015-12-27 09:35:24 +01:00
James Cole
f013b435ab Merge branch 'release/3.5.5' 2015-12-27 08:58:36 +01:00
James Cole
5f6975a113 Merge branch 'release/3.5.5' into develop 2015-12-27 08:58:36 +01:00
James Cole
c5dee29e4b New version. 2015-12-27 08:58:25 +01:00
James Cole
633ee02f13 Remove old Google references 2015-12-27 08:57:51 +01:00
James Cole
6b750c909a Fix forgotten call in bill repository. 2015-12-27 08:39:41 +01:00
James Cole
5f8b6640a9 A lot less queries thanks to efficient query. 2015-12-27 08:39:29 +01:00
James Cole
dd42d8437c Removed code for unused chart. 2015-12-27 08:12:46 +01:00
James Cole
67a178591d Some query optimisations. 2015-12-27 07:59:00 +01:00
James Cole
f5e5659c1f Code cleanup. 2015-12-26 09:40:24 +01:00
James Cole
8b0f0fb615 Optimise queries. 2015-12-26 09:39:35 +01:00
James Cole
209116e766 Query optimisations. 2015-12-26 09:21:45 +01:00
James Cole
79392ab656 Add caching to various queries and lists. 2015-12-26 08:44:34 +01:00
James Cole
3ca1207231 #135 2015-12-26 08:24:41 +01:00
James Cole
cec1b147f2 #135 2015-12-26 08:23:52 +01:00
James Cole
46cfcfa3e7 Update admin template. 2015-12-26 08:22:48 +01:00
James Cole
b833e8dfa2 #135 2015-12-26 08:16:30 +01:00
James Cole
77b843efd8 #135 2015-12-26 08:15:22 +01:00
James Cole
db72ad7c60 Issue #135 2015-12-26 08:12:51 +01:00
James Cole
eadc630fcb #135 2015-12-26 08:12:44 +01:00
James Cole
170c1793cc #135 2015-12-26 08:06:34 +01:00
James Cole
9f7c6c2d0c Extra cache. 2015-12-25 17:11:55 +01:00
James Cole
72d054c55c Add support for virtual balance currency, even though it cannot be stored yet. 2015-12-25 17:10:04 +01:00
James Cole
524edfe7c2 Better formatting (will take currency into account). 2015-12-25 16:40:27 +01:00
James Cole
c25c5623d2 Fixed the currency dropdown when multiple fields present on single page. 2015-12-25 16:38:53 +01:00
James Cole
4f38b77ef6 Better caching. 2015-12-25 09:34:37 +01:00
James Cole
5862803434 This saves some queries. 2015-12-25 09:34:23 +01:00
James Cole
5b3beded39 I can't believe I left this here all this time. 2015-12-25 07:58:19 +01:00
James Cole
c61fb7a598 Marked some unused stuff as deprecated. 2015-12-25 07:52:56 +01:00
James Cole
33d9148029 Make sure charts are cached. 2015-12-25 07:43:34 +01:00
James Cole
63969f5a33 Same routine but for money spent on accounts. 2015-12-25 07:42:00 +01:00
James Cole
edde18aeef Remove old chart. 2015-12-25 07:32:56 +01:00
James Cole
657116d361 Display new chart. 2015-12-25 07:32:03 +01:00
James Cole
e16269daa8 Collect data for new chart. 2015-12-25 07:31:54 +01:00
James Cole
c07591ff5c New method, earnedForAccounts 2015-12-25 07:31:43 +01:00
James Cole
75a478ad54 New chart, earned in period. 2015-12-25 07:31:29 +01:00
James Cole
8dae8b1a7f More code. Forgot to push. 2015-12-24 16:59:38 +01:00
James Cole
15fd8cf486 Completed the renaming of some methods. 2015-12-24 10:27:45 +01:00
James Cole
55333156ac Better cache control for some charts. 2015-12-24 10:14:01 +01:00
James Cole
8cdcba3231 Original fix in place. #133 2015-12-24 09:50:28 +01:00
James Cole
8bab9e84e2 Should not have edited that code. #133 2015-12-24 09:50:16 +01:00
James Cole
2faae83912 Include empty budgets. #133 2015-12-24 09:47:44 +01:00
James Cole
5a61a11a61 Attempt to fix bug #133 2015-12-24 09:45:21 +01:00
James Cole
a6d71988f2 Replaced some language calls. 2015-12-24 08:35:08 +01:00
James Cole
7069e242ae Removed useless entry. 2015-12-24 08:20:59 +01:00
James Cole
56ee830558 Moved locale information from the language to the translation files. 2015-12-24 08:20:47 +01:00
James Cole
6dd12729e6 Small disclaimer in readme. 2015-12-24 08:20:19 +01:00
James Cole
14a48303cb Cleanup. 2015-12-23 11:32:50 +01:00
James Cole
72cf6c9c0f Removed old route. 2015-12-23 11:32:41 +01:00
James Cole
144ee6b8ca Updated read me. 2015-12-23 10:38:42 +01:00
James Cole
8967d86da6 Updated language files. 2015-12-23 09:34:23 +01:00
James Cole
18c6edbb5d Update language files. 2015-12-23 09:09:51 +01:00
James Cole
53de3c4717 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix a bug where the frontpage would not honor transaction order.
  Fix a bug where the report page would mess up the session dates.
2015-12-22 20:46:52 +01:00
James Cole
ad577e4e81 Expand language files. 2015-12-22 20:46:16 +01:00
James Cole
44811a3e7c Fix a bug where the frontpage would not honor transaction order. 2015-12-21 11:30:58 +01:00
James Cole
1ab3f05b3a Fix a bug where the report page would mess up the session dates. 2015-12-21 10:25:57 +01:00
James Cole
5e76488ae7 Better localisation in charts. 2015-12-20 08:40:58 +01:00
James Cole
32771fe7e1 Add Português do Brasil 2015-12-20 08:20:50 +01:00
James Cole
9b40cc6881 Fix locale setting for Carbon. 2015-12-20 08:19:26 +01:00
James Cole
2e35260bbb Add some translations. 2015-12-20 07:34:10 +01:00
James Cole
a067704277 Move stuff around. 2015-12-20 07:34:01 +01:00
James Cole
de281818ac Add language 2015-12-19 21:16:09 +01:00
James Cole
c49bfad38d Move languages. 2015-12-19 20:54:59 +01:00
James Cole
c1ba591b26 Rename languages. 2015-12-19 20:54:27 +01:00
James Cole
719af38a61 Cleanup. 2015-12-18 18:42:56 +01:00
James Cole
ac61dfae6b File reformatting. 2015-12-18 16:38:50 +01:00
James Cole
813fb679a7 File reformatting. 2015-12-18 16:37:45 +01:00
James Cole
e7562781f7 File reformatting. 2015-12-18 16:37:27 +01:00
James Cole
56d36b7f53 Remove Google references. 2015-12-18 16:37:02 +01:00
James Cole
53b3f7f821 Merge branch 'release/3.5.4' 2015-12-18 08:13:28 +01:00
James Cole
08a53156bd Merge branch 'release/3.5.4' into develop 2015-12-18 08:13:28 +01:00
James Cole
8985cd6309 New composer for 3.5.4. 2015-12-18 08:13:19 +01:00
James Cole
3833da7410 Add something about security. 2015-12-18 08:11:05 +01:00
James Cole
4210cd10db Cleanup. 2015-12-18 08:10:41 +01:00
James Cole
a7bd1c6892 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  First attempt cleaning up chart money formatting.
2015-12-18 07:32:03 +01:00
James Cole
52b0111afa Expanded text in register dialog. 2015-12-18 07:31:49 +01:00
James Cole
7921d128e4 Cleanup routine that checks for blocked domains. 2015-12-18 07:31:36 +01:00
James Cole
d7e838701a Blocked domains now in .env file. 2015-12-18 07:31:14 +01:00
James Cole
289bcb22aa First attempt cleaning up chart money formatting. 2015-12-17 15:03:47 +01:00
James Cole
3fe57b7983 Report remembers budgets and categories. 2015-12-16 16:19:15 +01:00
James Cole
32e92c2a16 Committed some dev stuff. 2015-12-16 13:10:49 +01:00
James Cole
1b3d208540 First attempt at functional category chart. 2015-12-16 13:08:26 +01:00
James Cole
6a8bf0aa62 Fixed the "undefined" error. 2015-12-16 12:13:01 +01:00
James Cole
56715556ed Second attempt. 2015-12-16 10:54:56 +01:00
James Cole
838330b909 First attempt at multi-year budget chart. 2015-12-16 10:17:15 +01:00
James Cole
69553b138b First calculations for multi-year budget chart. 2015-12-15 12:52:42 +01:00
James Cole
36d7a02994 Some refactoring. 2015-12-15 12:46:40 +01:00
James Cole
301528e2d2 Quick links. 2015-12-15 12:38:18 +01:00
James Cole
0303b45707 First code for multi year budget chart. 2015-12-15 12:37:55 +01:00
James Cole
ba722e8ed5 Expanded error message. 2015-12-15 08:19:16 +01:00
James Cole
289e5a5442 Add new blocked domain. 2015-12-15 08:19:07 +01:00
James Cole
fdad96e2bc Replaced route. 2015-12-14 21:14:34 +01:00
James Cole
af994e4dae Included first multi-year chart. 2015-12-14 21:12:10 +01:00
James Cole
006d68e279 Expand chart generation. 2015-12-14 21:11:57 +01:00
James Cole
29dc122ad3 New charts (slight variations of previous charts) 2015-12-14 21:11:26 +01:00
James Cole
cf4a8c6204 New translations. 2015-12-14 21:11:12 +01:00
James Cole
3c73fe92bf Lower threshold. 2015-12-14 20:58:23 +01:00
James Cole
6637590797 Empty placeholder for multi-year report. 2015-12-14 20:54:19 +01:00
James Cole
b8bab11acd Fix bread crumbs, clean up routes. 2015-12-14 20:45:12 +01:00
James Cole
a2f600feac Nice clean code. 2015-12-14 20:37:38 +01:00
James Cole
80dd62ef0a Refer to correct translations. 2015-12-14 20:34:08 +01:00
James Cole
827b1c9cd8 Fix some translations. 2015-12-14 20:33:57 +01:00
James Cole
2e4fcf803d Fix JS references. 2015-12-14 20:33:50 +01:00
James Cole
d00d95fc6f Cleanup JS 2015-12-14 20:33:10 +01:00
James Cole
3e3ab9bd25 Move some JS around. 2015-12-14 20:25:48 +01:00
James Cole
6eecc7722d Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fix for left unbalanced field in report.
2015-12-14 20:22:47 +01:00
James Cole
ada4aaf69a This will generate buttloads of test data. 2015-12-14 20:21:24 +01:00
James Cole
93244c1f78 Fix for left unbalanced field in report. 2015-12-14 12:35:52 +01:00
James Cole
be056cea6b Update some queries. 2015-12-13 20:41:35 +01:00
James Cole
659ca8be14 Update some queries. 2015-12-13 20:40:41 +01:00
James Cole
ea9af8366d Update some queries. 2015-12-13 20:39:26 +01:00
James Cole
80edd47d36 First attempts at building a multi-year report. 2015-12-13 17:31:25 +01:00
James Cole
d7746b3649 Support multi-year, not implemented yet. 2015-12-13 10:18:25 +01:00
James Cole
c4c4fbc34c Refactor 2015-12-13 10:05:13 +01:00
James Cole
59f57c96e9 Refactor names. 2015-12-13 09:41:22 +01:00
James Cole
a2f852fecf Clean up code. 2015-12-13 09:35:58 +01:00
James Cole
ad114ed329 Remove unused methods. 2015-12-13 09:30:02 +01:00
James Cole
c4c3d0f07f Some refactoring. 2015-12-13 09:01:17 +01:00
James Cole
6cf8102de5 Update version for coming release. 2015-12-12 22:32:19 +01:00
James Cole
e7e4aa2218 Update composer.lock. 2015-12-12 22:32:04 +01:00
James Cole
6d84f4b6c1 Update screenshots. 2015-12-12 22:31:34 +01:00
James Cole
ce3e9ffd11 Better cache control. 2015-12-12 21:20:20 +01:00
James Cole
3ada260e0e This will keep history. 2015-12-12 20:59:29 +01:00
James Cole
8fdd0cb795 Fixed some yearly charts. 2015-12-12 20:56:07 +01:00
James Cole
913e05a2e6 Really, reversed. 2015-12-12 20:20:18 +01:00
James Cole
fa1f703ef6 Some negative sums were failing regarding transfers. 2015-12-12 20:19:40 +01:00
James Cole
4004c53e1b Fix negative amount thing. 2015-12-12 20:16:30 +01:00
James Cole
4838670649 Transfer fix. 2015-12-12 20:13:07 +01:00
James Cole
a985e09282 Fix query. 2015-12-12 20:10:52 +01:00
James Cole
9bd1503cb4 Expand query to catch all expenses. 2015-12-12 20:07:33 +01:00
James Cole
a2ccbf7844 Jump to year report if the period is too long. 2015-12-12 19:04:30 +01:00
James Cole
61bbe8a905 Don't need this file. 2015-12-12 17:51:40 +01:00
James Cole
59bc5d22d1 Clean up some urls 2015-12-12 17:51:07 +01:00
James Cole
1423d5b314 Expand query, let's see what happens. 2015-12-12 12:36:36 +01:00
James Cole
152d0eb1d0 Cleanup and translations. 2015-12-12 12:29:54 +01:00
James Cole
6426d1df06 Fix the report chart. 2015-12-12 10:41:51 +01:00
James Cole
9284eb3fe9 First attempt at account specific bill report. 2015-12-12 10:33:19 +01:00
James Cole
afdae8bc1e Fix a sum for #129 2015-12-12 08:26:12 +01:00
James Cole
2a7085e593 Experimental budget lines. #129 2015-12-12 08:25:08 +01:00
James Cole
2408fb3ed4 Experimental budget lines. #129 2015-12-12 08:24:17 +01:00
James Cole
8316afb176 Experimental budget lines. #129 2015-12-12 08:21:46 +01:00
James Cole
e59fd098a3 Spent amount / withdrawals are negative, #129. 2015-12-12 08:15:14 +01:00
James Cole
e044199693 Spent amount / withdrawals are negative, #129. 2015-12-12 08:14:17 +01:00
James Cole
8f8e29fc22 Fix a sum. 2015-12-12 08:12:27 +01:00
James Cole
8de5384158 Spent amount / withdrawals are negative, #129. 2015-12-12 08:11:30 +01:00
James Cole
216c659335 Spent amount / withdrawals are negative, #129. 2015-12-12 08:07:25 +01:00
James Cole
041ca8a5d3 Amount reversal for #129 2015-12-12 08:05:10 +01:00
James Cole
fe4f1b306d Fix a sum for #129 2015-12-11 18:52:21 +01:00
James Cole
a0972d99fb Made a negative amount a positive as per #129 2015-12-11 18:49:07 +01:00
James Cole
e332bfef7c First attempt at budgets (split by account). 2015-12-11 18:45:39 +01:00
James Cole
cba5e226d8 Fix display of amount. 2015-12-11 18:36:19 +01:00
James Cole
5aff0c4943 Some fixes for #129 2015-12-11 18:35:49 +01:00
James Cole
cb49c00f4d Fix another JS error 2015-12-11 18:33:47 +01:00
James Cole
e26d797d57 Fix JS error. 2015-12-11 18:32:57 +01:00
James Cole
938581527e Fix sorting. 2015-12-11 18:31:15 +01:00
James Cole
c38ae09735 Negative expenses, as per #129 2015-12-11 18:30:28 +01:00
James Cole
28c3cfe084 Fix display of amount. See issue #129 2015-12-11 18:15:37 +01:00
James Cole
4a2823bcba Reverse sort. 2015-12-11 18:05:07 +01:00
James Cole
18eba02026 Expanded report for categories. 2015-12-11 18:03:13 +01:00
James Cole
d4690ce580 Fix date in budget report 2015-12-11 17:54:52 +01:00
James Cole
a785c450b1 First attempt at including a budget report. 2015-12-11 17:53:17 +01:00
James Cole
7480dc4a19 Fix a query. 2015-12-11 16:39:33 +01:00
James Cole
ad01891a67 First attempt at including expense report. 2015-12-11 16:36:40 +01:00
James Cole
67fe35d564 Small query fix. 2015-12-11 11:32:22 +01:00
James Cole
7f19b6957a Expanded new report a bit. Mainly copy/paste work. Will have to see how it pans out. 2015-12-11 09:39:17 +01:00
James Cole
0a54caf202 Tweak more translations. 2015-12-11 08:48:07 +01:00
James Cole
4b4c1c7f8f Moved some translations to see if they will still be picked up by Laravel. 2015-12-11 08:40:45 +01:00
James Cole
d071f3947e Merge pull request #127 from tonicospinelli/demeter-law
applying Demeter law for Transaction Type. Looking good!
2015-12-11 08:36:03 +01:00
Antonio Spinelli
b3d99cd210 apply demeter law for transaction type calls
- adds contants for transaction type names
- demeter law = never speaks with strangers
2015-12-10 16:53:48 -02:00
James Cole
90e696f82c Period is a month 2015-12-07 14:42:28 +01:00
James Cole
958fcd1cfa Report IP address 2015-12-07 14:41:04 +01:00
James Cole
8f57c7dcb3 Some fixes to amounts. 2015-12-06 13:17:00 +01:00
James Cole
77262f52a4 First functional view of default report. 2015-12-06 13:11:43 +01:00
James Cole
16bfbc8a12 Some JS to process the report form beforehand. 2015-12-06 08:42:04 +01:00
James Cole
1fd375b875 Better redirect after logout. 2015-12-05 17:45:33 +01:00
James Cole
46131ad39d Updated view for new reports. 2015-12-04 06:57:08 +01:00
James Cole
0b5c5b2ae9 Some mediocre Javascript for report thing. 2015-12-04 06:56:59 +01:00
James Cole
55be174037 Method to find an account. 2015-12-04 06:56:45 +01:00
James Cole
a17b7025f1 New function to build URL report. 2015-12-04 06:56:35 +01:00
James Cole
170cf7fd77 New routes for new reports. 2015-12-04 06:56:03 +01:00
James Cole
23cdb4d326 Expand month list for new reports. 2015-12-04 06:55:54 +01:00
James Cole
cbbe529572 Show bill if one is connected. 2015-12-04 06:16:19 +01:00
James Cole
0b382426e9 First experimental report generator / choice thing. 2015-12-03 14:52:10 +01:00
James Cole
1cbbf9baa4 Added a missing translation. 2015-12-03 11:46:05 +01:00
James Cole
8d41ff7b79 Prev should be next. Duh. 2015-12-03 11:41:06 +01:00
James Cole
e3b6057bf8 Catch Swift exceptions and do a log only (instead of crashing) because the email message isn't actually critical. 2015-12-03 11:30:43 +01:00
James Cole
66a4042cad Updated composer file. 2015-12-03 11:25:12 +01:00
James Cole
56c08d8302 Can block certain domains from registering, such as ten-minute-mail services. Two example domains provided in configuration. 2015-12-03 11:17:48 +01:00
James Cole
d4e759754d Make password reset impossible for blocked users. 2015-12-02 13:28:11 +01:00
James Cole
a96e171cbf Update composer. 2015-12-02 13:26:58 +01:00
James Cole
bd4a8c8397 Fixed "under" column 2015-12-02 09:03:34 +01:00
James Cole
04f71b3b43 Removed old code. 2015-12-02 09:01:40 +01:00
James Cole
d124de51db Shouldn't be like this? 2015-12-02 09:00:28 +01:00
James Cole
d87d12a0f5 Better query. See if works. 2015-12-02 08:58:40 +01:00
James Cole
f2b08346d0 Log. 2015-12-02 08:50:28 +01:00
James Cole
d3682a6727 Another fix in reports. 2015-12-02 08:46:03 +01:00
James Cole
371bbd9508 Some cosmetic fixes to reports 2015-12-02 08:44:23 +01:00
James Cole
a8a28f442f Also show "zero" amounts. 2015-12-02 08:38:57 +01:00
James Cole
65ddd8a736 One 'equals' sign too many! 2015-12-02 08:37:35 +01:00
James Cole
8bb27de233 More report subtleties. 2015-12-02 08:37:08 +01:00
James Cole
37e2f097ba To make budget report more clear, add spent amount to "spent" column. 2015-12-02 08:35:15 +01:00
James Cole
1966d87ce6 Small formatting fixes in reports. 2015-12-02 08:33:22 +01:00
James Cole
7b8c86e1e3 Only get active piggy banks. 2015-12-02 08:25:38 +01:00
unknown
de634da513 Only get active savings accounts. 2015-12-02 08:22:25 +01:00
James Cole
96836e2d6c Update read me. 2015-11-28 16:04:30 +01:00
James Cole
8a9d576f61 Allow change to default currency. issue #121 2015-11-22 11:30:06 +01:00
James Cole
791d12fbb4 Fix for issue #123 2015-11-22 11:25:15 +01:00
James Cole
d1329be2fa Bill scan routine should not grab transfers and income. 2015-11-20 20:13:10 +01:00
James Cole
3ed6561702 Updated all packages. 2015-11-13 07:16:23 +01:00
James Cole
7a0587f433 Merge branch 'release/3.5.3' 2015-11-13 07:01:29 +01:00
James Cole
0fe682bfe6 Merge branch 'release/3.5.3' into develop 2015-11-13 07:01:29 +01:00
James Cole
0f685e8789 New version. 2015-11-13 07:01:14 +01:00
James Cole
420771c233 New translations. See issue #117 2015-11-13 07:00:30 +01:00
James Cole
5e3e9271ca Added encryption to new password. See issue #118 2015-11-13 06:59:08 +01:00
James Cole
1e603c0833 Merge pull request #113 from RonaldvanMeer/develop
Removed duplicated controlbar item
2015-11-01 08:22:33 +01:00
James Cole
03e1673e92 Fix login message. 2015-11-01 08:06:51 +01:00
James Cole
9f992f003d Fix redirect loop. 2015-11-01 08:03:41 +01:00
James Cole
f50244a41f Merge branch 'release/3.5.2' into develop 2015-10-30 07:23:43 +01:00
James Cole
8b9607f9b5 Merge branch 'release/3.5.2' 2015-10-30 07:23:42 +01:00
James Cole
af107ad5e8 New release. 2015-10-30 07:23:33 +01:00
James Cole
8926d62165 Remake of: Merge pull request #111 from colinodell/patch-1
Loosen league/commonmark version
2015-10-30 07:22:39 +01:00
James Cole
45344ee347 Fixed a bug where budget chart would come up negative on overspent amounts. 2015-10-30 07:16:15 +01:00
RonaldvanMeer
baf9ebab15 Update control-bar.twig 2015-10-27 12:31:21 +01:00
James Cole
b7dab817f2 Merge pull request #111 from colinodell/patch-1
Loosen league/commonmark version
2015-10-27 12:17:25 +01:00
RonaldvanMeer
fb2fa54480 Merge pull request #1 from RonaldvanMeer/master
Duplicate controlbar item
2015-10-26 22:45:38 +01:00
James Cole
2c966a1234 Fixed ambiguous column. 2015-10-19 15:21:17 +02:00
James Cole
143ea69c0d Fixed the fix (fixeption). 2015-10-19 15:20:18 +02:00
James Cole
8a02ead013 Blind validator update. 2015-10-19 15:16:30 +02:00
James Cole
930d5ab941 Better fix. 2015-10-17 21:15:16 +02:00
James Cole
e54a56d3a8 Experimental chart fix. 2015-10-17 21:14:25 +02:00
James Cole
f5216c0d85 Fixed absolute uri 2015-10-05 20:30:57 +02:00
James Cole
ebc77540b9 Fix some reports. 2015-10-03 22:49:12 +02:00
James Cole
28d2583c10 Remove multiplication. 2015-10-03 22:34:25 +02:00
James Cole
b0988a7b00 Fix zero division. 2015-10-03 22:32:36 +02:00
James Cole
2c4920db2d Fix amount thing. 2015-10-03 22:31:55 +02:00
James Cole
8321663815 Some amount fixes. 2015-10-03 22:29:34 +02:00
James Cole
ac0280d460 Fixed some amounts. 2015-10-03 22:23:42 +02:00
James Cole
ba6f4268f0 Get correct fields. 2015-10-03 17:55:08 +02:00
James Cole
0bd18f94ac Fix ambiguous id. 2015-10-03 17:54:15 +02:00
James Cole
66fb63661f Less journals. 2015-10-03 17:53:13 +02:00
James Cole
d9b16beb0a Added some debug. 2015-10-03 17:51:13 +02:00
James Cole
6a01a9bdfd Fix bill scan. 2015-10-01 07:48:50 +02:00
James Cole
b81b34a706 Fixed amount in bill chart. 2015-10-01 07:46:47 +02:00
James Cole
3750a00b5f Fix amount, make it positive. 2015-09-30 19:43:02 +02:00
James Cole
05ddcc169d Fix amount thing. 2015-09-30 19:41:21 +02:00
James Cole
f571a5f1bd Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fixed the other chart too.
  Trying to fix chart.
  New code. Debug.
2015-09-30 19:32:58 +02:00
James Cole
48b786adea Some fixes for amounts. 2015-09-30 19:31:21 +02:00
James Cole
d691fa9b4d Fixed the other chart too. 2015-09-29 09:29:28 +02:00
James Cole
da50f9e419 Trying to fix chart. 2015-09-29 09:28:16 +02:00
James Cole
103de5e18a New code. Debug. 2015-09-29 09:20:50 +02:00
James Cole
dac6efd98b Fix amount in box. 2015-09-28 21:45:11 +02:00
James Cole
46aa7f81b2 Fixed a method call. 2015-09-28 20:41:53 +02:00
James Cole
0683c7cd67 Fixed chart 2015-09-28 14:43:08 +02:00
James Cole
50d7aa7b6a Fix so chart will not display negatives. 2015-09-28 14:32:12 +02:00
James Cole
b781215d0a Date range fixes. 2015-09-27 17:45:01 +02:00
James Cole
866bc2f3bd Cleanup in budgets. 2015-09-27 17:44:49 +02:00
James Cole
49d4705014 Chart was negative. 2015-09-27 09:52:02 +02:00
James Cole
9163fcfccb Quicker amount thing. 2015-09-27 09:47:13 +02:00
James Cole
7e10641461 Organized some category charts. Still needs some translating 2015-09-26 07:18:12 +02:00
James Cole
cdc0e3cfd8 Some cleaning up. 2015-09-25 20:40:24 +02:00
James Cole
466e81d56a Fixed some sorting. 2015-09-25 20:25:22 +02:00
James Cole
5953f691d1 More should fit. 2015-09-25 20:15:38 +02:00
James Cole
e2790ca6c1 Try to limit the collection returned to the user. 2015-09-25 20:13:43 +02:00
James Cole
66dbd48b76 Fix something with the dates. 2015-09-25 19:36:03 +02:00
James Cole
73cfbbd2ba Fix some things so the date range has a better display. 2015-09-25 19:28:39 +02:00
James Cole
38bc38bf26 Add some period things. 2015-09-25 17:28:42 +02:00
James Cole
e12d13c838 Fixed a negative chart. 2015-09-25 16:43:34 +02:00
James Cole
fcc3af6136 Fixed something. 2015-09-25 16:38:36 +02:00
James Cole
491298e1cb Some fixes in titles and bread crumbs. 2015-09-25 16:33:45 +02:00
James Cole
72b5895217 Added a subtitle to the category view. 2015-09-25 16:25:17 +02:00
James Cole
0a8f4017bd Fix some chart things. Again. 2015-09-25 16:18:50 +02:00
James Cole
cb985f5897 Make sure the month chart can show the spent / earned. 2015-09-25 16:08:10 +02:00
James Cole
968ec0853f Fixed the chart. Forgot an argument. 2015-09-25 16:06:06 +02:00
James Cole
0bde72d3df Spent should not be negative for the chart. 2015-09-25 16:04:22 +02:00
James Cole
45293fbd42 Fixes for #109. 2015-09-25 16:00:14 +02:00
Colin O'Dell
72997065f0 Loosen league/commonmark version
See https://github.com/thephpleague/commonmark#versioning
2015-09-19 10:49:55 -04:00
James Cole
a838dc163d I need unit tests again. #109 2015-09-14 17:22:31 +02:00
James Cole
3d15a4ca6d I need unit tests again. #109 2015-09-14 17:20:20 +02:00
James Cole
51c7d4fb1b Properly show spent and earned. #109 2015-09-13 07:40:37 +02:00
James Cole
fa586dba7e Also include all types. 2015-09-13 07:35:53 +02:00
James Cole
8ad40389f2 Corrected the field used for bug #109 2015-09-13 07:34:58 +02:00
James Cole
b3333cc2d3 Experimental fix for issue #109. 2015-09-13 07:32:39 +02:00
James Cole
3699a7ba9a Some cleaning up. 2015-09-08 19:38:04 +02:00
James Cole
204e521ba4 Fixed sorting for contracts. 2015-09-08 19:36:54 +02:00
James Cole
c9bab3e5c3 Tag list show sum. 2015-08-29 08:43:18 +02:00
James Cole
3d00e20238 Fixed a translation. 2015-08-29 08:35:11 +02:00
James Cole
c3958ed3c4 Fixed some bugs that caused inconsistencies in the monthly reports. 2015-08-29 07:20:53 +02:00
James Cole
e5b88be5fa Fix a bug where an transfer to and from a shared asset would count as an expense/income. 2015-08-29 06:48:12 +02:00
James Cole
425552988a Fix month report so transfers from a shared account to another shared account do not count as income. 2015-08-28 06:19:50 +02:00
James Cole
a81dd8abe5 Send search engine spiders away, as suggested in issue #105 2015-08-24 20:11:04 +02:00
James Cole
bac8154a5b Merge branch 'release/3.5.1' 2015-08-23 07:43:02 +02:00
James Cole
737d15fa0e Merge branch 'release/3.5.1' into develop 2015-08-23 07:43:02 +02:00
James Cole
5f2317af7f New version 2015-08-23 07:42:32 +02:00
James Cole
2bd1f783e5 Cleaned up some translations. 2015-08-23 07:41:12 +02:00
James Cole
d6c0c9f963 Cleanup composer. 2015-08-23 07:10:02 +02:00
James Cole
21b6ad7a41 More checks in the bounce cron job. 2015-08-19 19:21:39 +02:00
James Cole
a65d609fdc Fixed bug #104 2015-08-16 21:18:12 +02:00
James Cole
04e676b936 Fix bug #103 2015-08-16 20:27:25 +02:00
James Cole
be8eaaffdf Some code cleanup. 2015-08-16 20:26:11 +02:00
James Cole
28c753523f Caught a nasty bug thanks to an alert Tweakers.net user. This fix will make the account-edit screen inconsistent for a select number of users. This will be detailed on the wiki. 2015-08-15 21:45:29 +02:00
James Cole
7fbd0b2ffc Fixed some inconsistencies in the delete-form. 2015-08-15 21:44:29 +02:00
James Cole
7ffb48a87a New translations 2015-08-15 21:42:45 +02:00
James Cole
d485270e1f Merge branch 'release/3.5.0' 2015-08-13 17:37:55 +02:00
James Cole
5fd688b266 Merge branch 'release/3.5.0' into develop 2015-08-13 17:37:55 +02:00
James Cole
3716668e0c Updated read me. 2015-08-13 17:37:45 +02:00
James Cole
ae7fd18c34 New composer file. 2015-08-13 17:35:48 +02:00
James Cole
4f59b1d32f No Google thing when no Analytics ID present. 2015-08-13 17:35:41 +02:00
James Cole
90cb3279df Better example env file. 2015-08-13 17:34:08 +02:00
James Cole
cf0c7ef6b2 New version. 2015-08-13 17:32:22 +02:00
James Cole
47c23781d9 Fixed password reset. 2015-08-13 17:32:15 +02:00
James Cole
e258c050f7 Merge branch 'release/3.4.11' 2015-08-10 20:13:38 +02:00
James Cole
57801b2f34 Merge branch 'release/3.4.11' into develop 2015-08-10 20:13:38 +02:00
James Cole
710e9c9423 new version. 2015-08-10 20:13:33 +02:00
James Cole
deefef83bd Added sum for the current period, see issue #99 2015-08-09 17:01:12 +02:00
James Cole
51e30aed66 Added a sum of the current page and the sum of the entire category, in reference to issue #99. 2015-08-09 16:56:38 +02:00
James Cole
8d109a3cfe Fixed a null pointer exception. 2015-08-09 13:54:58 +02:00
James Cole
3424e019b5 Removed animation, again [skip ci] 2015-08-06 16:39:53 +02:00
James Cole
c6b4bceb67 Animation test [skip ci] 2015-08-06 16:39:06 +02:00
James Cole
afb4155015 Remove animation thing. [skip ci] 2015-08-06 16:37:53 +02:00
James Cole
8d99baf38a Update charts.js 2015-08-05 09:02:33 +02:00
James Cole
b91cb60328 Fix translations [skip ci] 2015-08-02 09:01:13 +02:00
James Cole
c0d62237fc Made the date thing throw a FF error. 2015-08-02 08:53:34 +02:00
James Cole
223ea80860 Fixed some embarrassing spelling errors in the CSV importer. [skip ci] 2015-08-02 08:53:19 +02:00
James Cole
5a77bef494 Sort chart and code cleanup [skip ci] 2015-08-02 07:41:47 +02:00
James Cole
80c0efe821 Small rearrangement of front page boxes. [skip ci] 2015-08-02 07:35:09 +02:00
James Cole
8044d89557 Display correct amount [skip ci] 2015-08-02 07:08:47 +02:00
James Cole
4f0ed97410 Fixed a bug where the category list in a monthly report would be empty. 2015-08-02 07:04:43 +02:00
James Cole
af7952f204 Removed old references to Google [skip ci] 2015-08-01 07:22:48 +02:00
James Cole
d8dcae856b Remove log. 2015-08-01 07:12:34 +02:00
James Cole
7296796ed9 Fix chart. 2015-08-01 07:12:03 +02:00
James Cole
a2c2bb4948 Forgot a dot [skip ci] 2015-08-01 07:09:51 +02:00
James Cole
72ebfdc20e Debug log. 2015-08-01 07:09:12 +02:00
James Cole
16b95ea78a New chart. 2015-08-01 07:04:41 +02:00
James Cole
c04f08dfd8 Filter empty budgets. 2015-07-31 18:18:54 +02:00
James Cole
a30793e818 Fix chart. Related to #99 2015-07-31 18:14:24 +02:00
James Cole
e39e1eaf21 Included opening balance. 2015-07-31 18:10:55 +02:00
James Cole
ab22d2cbaa Fixed the overview chart for categories, so it will properly reflect income and expenses. See bug #99 2015-07-31 14:26:22 +02:00
James Cole
96ddbe7227 Reorganized the category charts in the year report to properly reflect income and expenses. Necessary to facilitate the changes needed for bug #99 2015-07-31 14:20:18 +02:00
James Cole
4d09235aef Update composer.lock 2015-07-31 14:17:49 +02:00
James Cole
136b8975e3 Sort piggy bank list. 2015-07-31 13:44:56 +02:00
James Cole
e21b1eca17 Remove script. 2015-07-31 07:31:05 +02:00
James Cole
244b90b1d4 Fix bug #98 2015-07-30 21:32:58 +02:00
James Cole
b318f3f940 Merge branch 'release/3.4.10' 2015-07-27 21:23:20 +02:00
James Cole
e211c9812e Fixed some math things. 2015-07-26 19:42:28 +02:00
James Cole
eef28d96f4 Code cleanup [skip ci] 2015-07-26 19:13:06 +02:00
James Cole
c8227e09ee id was ambiguous. 2015-07-26 19:10:31 +02:00
James Cole
3e05fd91d9 Lots of cleaning up. 2015-07-26 19:07:02 +02:00
James Cole
450baba56a Removed some dead code and fixed some other. 2015-07-26 17:03:05 +02:00
James Cole
17a8c4918c Code cleanup. 2015-07-26 15:51:07 +02:00
James Cole
0e2419d61a New translations [skip ci] 2015-07-26 09:44:31 +02:00
James Cole
79b1a2ca6d Gave cron controller a new line. [skip ci] 2015-07-26 07:42:34 +02:00
James Cole
2213c68155 Added a missing breadcrumb. 2015-07-26 07:41:10 +02:00
James Cole
2492b1fa96 Expanded the message a user may get when his credentials do not work. 2015-07-26 07:39:21 +02:00
James Cole
6c6598dac5 Lots of new translations. 2015-07-26 07:39:04 +02:00
James Cole
a137112e66 New read me. 2015-07-25 19:28:19 +02:00
James Cole
8642ae8180 New version. 2015-07-25 19:27:14 +02:00
James Cole
894c4dc5a7 New composer.lock. 2015-07-25 19:24:07 +02:00
James Cole
d96063ea6e Also expand interface. 2015-07-25 19:23:00 +02:00
James Cole
c3dc193f3e First attempt at new last activity thing. 2015-07-25 19:22:41 +02:00
James Cole
3c2952009e Some new stuff. 2015-07-25 19:04:39 +02:00
James Cole
f4ade470df Remove if statements. 2015-07-25 18:48:48 +02:00
James Cole
2e33b43389 CSS and invalid account warning. 2015-07-25 18:40:45 +02:00
James Cole
92799699bc Better attachment handling. 2015-07-25 18:33:19 +02:00
James Cole
7ab0508167 Some new translations. 2015-07-25 18:31:05 +02:00
James Cole
3c65c28936 Some translations. 2015-07-25 16:48:32 +02:00
James Cole
43892da07e may edit fields [skip ci] 2015-07-25 07:05:27 +02:00
James Cole
7c436920a4 Some formatting and translations. [skip ci] 2015-07-25 07:04:09 +02:00
James Cole
89d565e63b Check for block code. [skip ci] 2015-07-25 07:03:50 +02:00
James Cole
150b6fe5b6 Add block code [skip ci] 2015-07-25 07:03:42 +02:00
James Cole
0e77574c26 Also give block code. [skip ci] 2015-07-25 07:03:35 +02:00
James Cole
df23863443 Remove bounce error thing. 2015-07-24 22:08:38 +02:00
James Cole
581bf11b21 Fixed a translation [skip ci] 2015-07-24 13:34:22 +02:00
James Cole
d602d4b429 Add some debug logging. 2015-07-24 13:26:42 +02:00
James Cole
d1d4a52934 Catch empty send grid credentials. 2015-07-24 13:23:02 +02:00
James Cole
375d113769 Find users not already blocked only. 2015-07-24 13:20:09 +02:00
James Cole
9b83974bff Improve the cron controller. Force blocked users to logout. 2015-07-24 13:17:47 +02:00
James Cole
3c68c99bd5 Fixed some translations. 2015-07-24 09:03:40 +02:00
James Cole
ec4b37c596 Updated chart. 2015-07-24 08:36:49 +02:00
James Cole
ba9601d21c Better display for piggy bank events. 2015-07-24 08:34:30 +02:00
James Cole
50c13fd469 Clear cache. 2015-07-22 22:13:40 +02:00
James Cole
7af072b8fc Show message. 2015-07-22 19:35:39 +02:00
James Cole
faa128d41e Made a cron controller. 2015-07-22 19:09:17 +02:00
James Cole
868fe46932 Some more debug stuff. 2015-07-22 18:44:51 +02:00
James Cole
e9e4307ce5 Better debug. 2015-07-22 18:09:14 +02:00
James Cole
774d4844a9 Another try to fix csrf 2015-07-22 17:58:06 +02:00
James Cole
586c53e670 Remove CSRF check. 2015-07-22 17:52:55 +02:00
James Cole
68e073fbff A new controller that can be used in combination with SendGrid. 2015-07-22 17:50:02 +02:00
James Cole
8101dc37b1 New route for attachment preview. 2015-07-19 22:19:36 +02:00
James Cole
63f16c458d Small fixes for piggy banks data seed. 2015-07-19 22:19:26 +02:00
James Cole
821e007e95 If zero, other thing. 2015-07-19 18:39:06 +02:00
James Cole
1656a2f11a Experimenting with a preview for attachments. 2015-07-19 18:37:29 +02:00
James Cole
4dbc135dce Added max file size for uploads. 2015-07-19 14:30:20 +02:00
James Cole
fc886f6bc1 Seed some tags. 2015-07-19 13:46:41 +02:00
James Cole
f93e480466 Better notifications. 2015-07-19 13:46:34 +02:00
James Cole
fe807e23f8 Fixed sorting in tags. 2015-07-19 13:46:20 +02:00
James Cole
ecf61c31f1 Add new line to file. 2015-07-19 12:23:27 +02:00
James Cole
4feff18af5 Fix test data. 2015-07-19 12:21:51 +02:00
James Cole
a07c52e0d8 Fix some route names. 2015-07-19 12:21:38 +02:00
James Cole
7bb07d7f55 Add non-breaking space to fix issue #95. 2015-07-19 12:20:35 +02:00
James Cole
f12dfc8a14 Icons for attachments. 2015-07-19 11:47:56 +02:00
James Cole
be030f15c4 New composer.lock. 2015-07-19 09:57:26 +02:00
James Cole
f5fb6c063b Also delete attachments. 2015-07-19 09:53:58 +02:00
James Cole
fb722f06b9 Some added newlines. 2015-07-19 09:38:44 +02:00
James Cole
c0ea19e15e Test data no longer runs into the future. 2015-07-19 09:37:52 +02:00
James Cole
cdeb1ad87c Some model updates. 2015-07-19 09:37:37 +02:00
James Cole
0dbe4e94fa Allow to edit an attachment. 2015-07-19 09:37:28 +02:00
James Cole
b5e2e8aa1d Edit attachment page. 2015-07-18 23:51:51 +02:00
James Cole
9502010248 Some new routes. 2015-07-18 23:06:51 +02:00
James Cole
fea0557b47 Going to allow edit of attachment. 2015-07-18 22:49:27 +02:00
James Cole
ed4fcc9011 Some optimisation. 2015-07-18 22:17:31 +02:00
James Cole
ed12ea7cfb Check for double files and some code clean up. 2015-07-18 21:46:16 +02:00
James Cole
73e526645e Uncomment providers. 2015-07-18 21:33:52 +02:00
James Cole
72aeafb2b5 Some model code block updates 2015-07-18 21:33:10 +02:00
James Cole
cc1af60cb4 Basic attachment download function. 2015-07-18 21:32:31 +02:00
James Cole
359fab315f A fix in the model and a simple view for attachments. 2015-07-18 21:12:34 +02:00
James Cole
6a9574bab9 Allow jpeg and PDF. 2015-07-18 19:49:35 +02:00
James Cole
83d6158483 Basic upload working. 2015-07-18 09:49:59 +02:00
James Cole
63ef89b6cc Basic interface for upload. 2015-07-18 09:49:29 +02:00
James Cole
b0beab4cd3 Attachment model and database changes. 2015-07-18 09:49:19 +02:00
James Cole
a34782575f Fix form and upload thing. 2015-07-18 08:59:33 +02:00
James Cole
142bdc9430 Add attachment thing to upload form. 2015-07-17 21:45:58 +02:00
James Cole
14b79cb0a4 Fixed a bug where deposits and/or transfers would be assigned budgets if you had selected a budget at the withdrawal screen earlier. 2015-07-17 21:03:13 +02:00
James Cole
ce5beeaf2c Better compare for amounts because floatval can be inaccurate. 2015-07-17 17:35:04 +02:00
James Cole
31114a2ca5 Fixed a bug where tags would be recreated instead of "found". 2015-07-17 17:34:49 +02:00
James Cole
32528094ad Updated composer file. 2015-07-16 20:39:20 +02:00
James Cole
0a2a01c44c Code reformat. 2015-07-15 21:06:26 +02:00
James Cole
c1888dc3ac Merge branch 'release/3.4.9' 2015-07-15 21:02:36 +02:00
James Cole
4d76afbe01 Merge branch 'release/3.4.9' into develop 2015-07-15 21:02:36 +02:00
James Cole
76d7a97f93 New release with all changes so far. Change log coming soon. 2015-07-15 21:02:27 +02:00
James Cole
8b1366b20a Merge pull request #93 from RonaldvanMeer/master
fix issue #91
2015-07-15 21:00:29 +02:00
RonaldvanMeer
e0f9685578 Spacing fixes 2015-07-15 12:29:11 +02:00
RonaldvanMeer
5235657954 Fixing missing IBAN field on Create New User request 2015-07-15 12:25:09 +02:00
James Cole
a15fbc8094 Now committing to correct branch. 2015-07-14 22:48:34 +02:00
James Cole
546f1d9c50 Revert "Some login and session updates."
This reverts commit 74231f552a.
2015-07-14 22:45:14 +02:00
James Cole
74231f552a Some login and session updates. 2015-07-14 22:45:00 +02:00
James Cole
b250a10e3c Merge branch 'release/3.4.8'
Conflicts:
	resources/twig/auth/login.twig
	resources/twig/auth/password.twig
	resources/twig/auth/register.twig
2015-07-12 22:45:37 +02:00
James Cole
a9f1b31dd6 New version. 2015-07-12 22:43:43 +02:00
James Cole
7fe393acaf Updated composer.lock. 2015-07-12 22:43:01 +02:00
James Cole
04faba4db5 Fix URL things. 2015-07-12 22:37:05 +02:00
James Cole
91bba40c20 Cleanup code. 2015-07-12 17:59:13 +02:00
James Cole
79e39f7de8 Code cleanup. 2015-07-12 17:36:38 +02:00
James Cole
9c09353559 Some improvements in tour 2015-07-12 12:45:41 +02:00
James Cole
50752a5bfe Implemented a short tour. 2015-07-11 10:01:13 +02:00
James Cole
d59879db7d Add bootstrap tour references. 2015-07-11 08:37:21 +02:00
James Cole
aab125da27 Add bootstrap tour files. 2015-07-11 08:36:46 +02:00
James Cole
74fc731f96 Full Bootstrap. 2015-07-11 08:35:51 +02:00
James Cole
bd0050fec2 Fix balance display. 2015-07-10 20:59:20 +02:00
James Cole
aa5e313b92 Save transactions by moving them. 2015-07-10 20:48:45 +02:00
James Cole
e89d613b7e Removed confidential data from logging routine. [skip ci] 2015-07-10 20:25:17 +02:00
James Cole
8757929ead Make log [skip ci] 2015-07-10 20:19:31 +02:00
James Cole
e0a9b19802 Some new translations and what-not. 2015-07-10 20:17:17 +02:00
James Cole
308da6dc6e Clean up some lists [skip ci] 2015-07-10 07:39:59 +02:00
James Cole
b6960fb0e5 Small layout and translation fixes [skip ci] 2015-07-10 05:39:35 +02:00
James Cole
137208c3fd Typical. 2015-07-09 21:59:02 +02:00
James Cole
d7a9a62a1d Should fix some scrutinyizer problems. 2015-07-09 21:48:05 +02:00
James Cole
075315bdaa Added some model thingies so scrutinizer will stop whining. 2015-07-09 21:29:30 +02:00
James Cole
3948fcd614 Added newlines to files. 2015-07-09 21:26:40 +02:00
James Cole
8e61e129ab More debug, some bug fixes. 2015-07-09 19:36:14 +02:00
James Cole
20cffd0502 Fixed Rabo importer. 2015-07-09 19:23:49 +02:00
James Cole
5df09dab09 Put specifix in json. 2015-07-09 19:05:59 +02:00
James Cole
7446b911e5 Logging in Rabo specifix. 2015-07-09 19:03:39 +02:00
James Cole
f15267c1ab Better import feedback. 2015-07-09 18:38:15 +02:00
James Cole
9c9fc2b5dc Some fixes in csv importer. 2015-07-09 18:33:09 +02:00
James Cole
28f601b54b Import fix asset account. 2015-07-09 16:37:42 +02:00
James Cole
18b8a05014 Extra logging. 2015-07-09 16:07:05 +02:00
James Cole
910c995ed8 Log account id. [skip ci] 2015-07-09 16:03:47 +02:00
James Cole
498468aa2c Display error. [skip ci] 2015-07-09 15:39:41 +02:00
James Cole
637aebcb34 Bug fix for importer. [skip ci] 2015-07-09 15:36:56 +02:00
James Cole
9afd5cb277 Fix specific [skip ci] 2015-07-09 15:27:40 +02:00
James Cole
bc525e7272 Date format in config downloader. [skip ci] 2015-07-09 15:25:24 +02:00
James Cole
a80180780d Use log [skip ci] 2015-07-09 15:21:34 +02:00
James Cole
0d73086c37 More logging [skip ci] 2015-07-09 15:20:55 +02:00
James Cole
02ae39238d Forgot one iban key. 2015-07-09 14:04:01 +02:00
James Cole
43d6b51d42 Some cleaning up [skip ci] 2015-07-09 11:13:38 +02:00
James Cole
84566310de Cleaned up model comments. 2015-07-09 09:42:09 +02:00
James Cole
6a6ec9fbe4 Cleaned up some bill related code. 2015-07-09 09:41:54 +02:00
James Cole
84a7f825d7 Some small code optimisations. 2015-07-09 06:13:39 +02:00
James Cole
0372c1aaf1 Small fix to make account journal list sortable. [skip ci] 2015-07-08 20:18:51 +02:00
James Cole
c9fff197f7 Some improved sorting. 2015-07-08 13:11:51 +02:00
James Cole
6900392e43 Fixed some sorting. 2015-07-08 13:05:33 +02:00
James Cole
c00bcd78cc Some dependency clean up. 2015-07-07 19:09:45 +02:00
James Cole
b2b82124e6 Merge branch 'release/3.4.7' 2015-07-07 11:12:30 +02:00
James Cole
3de57c668f Merge branch 'release/3.4.7' into develop 2015-07-07 11:12:30 +02:00
James Cole
43669648ce New test data. 2015-07-07 11:10:13 +02:00
James Cole
3b73b416d5 New read me. 2015-07-07 11:10:07 +02:00
James Cole
5153591c8f New version. 2015-07-07 10:38:53 +02:00
James Cole
3172bc90da Some small fixes. 2015-07-07 10:05:11 +02:00
James Cole
76a1b2cd51 Improve some search methods. 2015-07-07 09:46:19 +02:00
James Cole
bdf7eee72f Clean up some code routines. 2015-07-07 01:07:19 +02:00
James Cole
2d4b148b2c Various optimisations. 2015-07-06 22:23:34 +02:00
James Cole
d67db74ca2 Optimized some code. 2015-07-06 22:12:35 +02:00
James Cole
516725456f Scrutiniser will now include duplicate code. 2015-07-06 21:57:43 +02:00
James Cole
001d72a484 Code cleanup. 2015-07-06 20:56:20 +02:00
James Cole
c555e28988 Add new bank specific fixes. 2015-07-06 20:21:55 +02:00
James Cole
af13d1943f Should fix the last issues. 2015-07-06 18:57:15 +02:00
James Cole
52df2edc8f Fixed the last issues. Now onto code complexity. 2015-07-06 18:48:17 +02:00
James Cole
cd08484a13 Code cleanup. 2015-07-06 18:13:57 +02:00
James Cole
f38d38f139 Math fixes. Not bugs. 2015-07-06 18:06:31 +02:00
James Cole
93b6c68938 Some math fixes. Not bugs. 2015-07-06 18:04:13 +02:00
James Cole
a4cc25175a Fixed some duplication. 2015-07-06 17:45:59 +02:00
James Cole
3fb14b4708 Code cleanup. 2015-07-06 16:52:18 +02:00
James Cole
6bdb6db330 Fixed some problems. 2015-07-06 16:42:19 +02:00
James Cole
d05c165ace These might be the final issues on scrutiniser, apart from code complexity. 2015-07-06 16:33:54 +02:00
James Cole
ab53cdb896 Cleanup redirect code. 2015-07-06 16:27:21 +02:00
James Cole
c1f142af78 Fix some redirect things. 2015-07-06 16:12:22 +02:00
James Cole
6e261abb73 Some code improvements. 2015-07-06 16:08:36 +02:00
James Cole
39af9e4414 More translations. 2015-07-06 10:39:44 +02:00
James Cole
5b50abb2c7 Bread crumbs and fine tuning. 2015-07-06 08:33:39 +02:00
James Cole
13bda0a264 Mainly layout improvements. 2015-07-06 08:14:19 +02:00
James Cole
1658c666ab Some changes. 2015-07-05 21:47:59 +02:00
James Cole
170aebfe54 Some code improvements. 2015-07-05 19:57:44 +02:00
James Cole
c4ef379d0e Cleanup post processing. 2015-07-05 19:31:58 +02:00
James Cole
18b038d8ff Fixed most importers. 2015-07-05 18:18:44 +02:00
James Cole
12ee5da872 Massively complex but working never the less. 2015-07-05 16:39:25 +02:00
James Cole
601f9f86bb Some more importers. 2015-07-05 15:16:44 +02:00
James Cole
d7329a5915 Expanded CSV configuration. 2015-07-05 14:37:36 +02:00
James Cole
9e7b730002 Somehow CSV reader got lost in translation. 2015-07-05 09:34:57 +02:00
James Cole
2d59d845bc Account iban thing fix [skip ci] 2015-07-05 09:19:51 +02:00
James Cole
c2645894e0 Allow update iban [skip ci] 2015-07-05 09:07:05 +02:00
James Cole
3751106317 Fix name in option list. 2015-07-05 09:05:51 +02:00
James Cole
60bb639351 Add IBAN to account list. 2015-07-05 08:52:35 +02:00
James Cole
74c50930bd Merge branch 'feature/csv-import' into develop
Conflicts:
	composer.json
	composer.lock
	resources/lang/en/form.php
	resources/lang/nl/form.php
2015-07-05 08:50:54 +02:00
James Cole
9105104303 Make CSV import a feature that can be turned on / off. 2015-07-05 08:47:16 +02:00
James Cole
540dde135e CSV importer now indicates the problems it has. 2015-07-05 08:45:05 +02:00
James Cole
f8936210cf Small fixes. 2015-07-05 07:18:48 +02:00
James Cole
1dc6d8de40 First working version, very beta. 2015-07-05 06:59:05 +02:00
James Cole
1069db3c13 Some new converters. 2015-07-05 06:26:34 +02:00
James Cole
65122f0144 Greatly expanded the CSV routine. 2015-07-05 06:18:02 +02:00
James Cole
d2c018f7da First (almost) functional CSV importer. 2015-07-04 07:53:37 +02:00
James Cole
46493c2af6 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Update model info.
  Accounts can now have IBAN.
  Add IBAN field.
  New read me.
2015-07-03 12:54:45 +02:00
James Cole
c303e03f76 Update model info. 2015-07-03 12:54:35 +02:00
James Cole
d8b65f62e7 Accounts can now have IBAN. 2015-07-03 12:54:35 +02:00
James Cole
854368a8f3 Add IBAN field. 2015-07-03 12:54:35 +02:00
James Cole
7653a34aea New read me. 2015-07-03 12:54:35 +02:00
James Cole
ee50b58e00 Update model info. 2015-07-03 12:52:03 +02:00
James Cole
1eb60ab100 Accounts can now have IBAN. 2015-07-03 12:51:14 +02:00
James Cole
4a20eef351 Add IBAN field. 2015-07-03 12:27:49 +02:00
James Cole
26c9b2c353 Initial process form. 2015-07-03 12:22:20 +02:00
James Cole
16374bce9b Fixed upload form, made a new form element, added some processing. 2015-07-03 11:52:51 +02:00
James Cole
86011d4ea2 Initial commit for CSV import. 2015-07-03 10:45:00 +02:00
James Cole
fcb8b02da9 Merge branch 'release/3.4.6.1' 2015-07-03 10:32:31 +02:00
James Cole
571165c2bb Merge branch 'release/3.4.6.1' into develop 2015-07-03 10:32:31 +02:00
James Cole
c842113610 New read me. 2015-07-03 10:32:16 +02:00
James Cole
974a8b3b70 Merge branch 'master' of https://github.com/JC5/firefly-iii
# By Richard Ebbers
# Via James Cole (2) and Richard Ebbers (1)
* 'master' of https://github.com/JC5/firefly-iii:
  updated authentication pages to use dynamic urls
  use relative path in login screen
2015-07-03 10:30:57 +02:00
Richard Ebbers
2e20c99ada updated authentication pages to use dynamic urls 2015-07-03 10:30:32 +02:00
Richard Ebbers
aa88ff6f2c use relative path in login screen 2015-07-03 10:30:32 +02:00
James Cole
5e6aa63d03 Merge pull request #86 from ebbz/master
use relative path in login screen improved
2015-07-03 10:29:35 +02:00
James Cole
ad6700c114 An example test. Will continue later. 2015-07-03 10:28:40 +02:00
Richard Ebbers
f08c6efb00 updated authentication pages to use dynamic urls 2015-07-03 09:37:59 +02:00
James Cole
cc807ec132 Remove database setup from single test. 2015-07-03 08:16:14 +02:00
James Cole
24e7c68243 Initial codeception installation. 2015-07-03 08:15:30 +02:00
James Cole
ab25edd37a Updated to include codeception. 2015-07-03 08:13:50 +02:00
James Cole
be47fde6c2 Removed all tests. 2015-07-03 07:38:55 +02:00
James Cole
1ffa8c5e72 Removed code coverage logic. 2015-07-03 07:33:43 +02:00
James Cole
d855ccb8a7 Removed help button for small layouts [skip ci] 2015-07-03 07:28:20 +02:00
James Cole
d88919474b Reversed codeception. 2015-07-03 07:27:01 +02:00
James Cole
e139664301 Revert "Some updates to unit tests."
This reverts commit 5adf5f6e3f.
2015-07-03 07:25:07 +02:00
James Cole
5adf5f6e3f Some updates to unit tests. 2015-07-03 07:24:34 +02:00
James Cole
aef2075c8e Cleanup test case. 2015-07-02 09:49:45 +02:00
James Cole
922b2962a3 Bootstrap codeception. 2015-07-02 09:45:21 +02:00
James Cole
b4a401700e Installed codeception. 2015-07-02 09:44:56 +02:00
James Cole
e9601bb9c1 Add codeception. 2015-07-02 09:36:43 +02:00
James Cole
58af3dc6ea Removed everything related to unit tests. Can restore later. 2015-07-02 08:51:53 +02:00
Richard Ebbers
074295df61 use relative path in login screen 2015-07-01 20:03:43 +02:00
James Cole
ec349b31c7 Fixed tests. 2015-07-01 16:41:59 +02:00
James Cole
5ae236e016 With tooltips. 2015-07-01 15:08:09 +02:00
James Cole
d7c5897aba Optimise bootstrap. [skip ci] 2015-07-01 15:04:56 +02:00
James Cole
5252e7efe7 Cleanup css [skip ci] 2015-07-01 15:02:27 +02:00
James Cole
fc7d65629a Reorder bill chart [skip ci] 2015-07-01 13:18:50 +02:00
James Cole
f28fdf8252 Fixed chart tooltip [skip ci] 2015-07-01 11:08:14 +02:00
James Cole
5d07c4a949 Add date format to category charts [skip ci] 2015-07-01 11:07:10 +02:00
James Cole
fdd9eaab4b Added a better date for some budget charts [skip ci] 2015-07-01 11:04:08 +02:00
James Cole
e0d863a46f Create bills in test data, sort them [skip ci] 2015-07-01 10:52:42 +02:00
James Cole
3aacb6f5f3 New packages, updated read me, new composer.lock 2015-06-29 16:42:38 +02:00
James Cole
428e331b3e Reinstated the help button. 2015-06-29 15:23:50 +02:00
James Cole
847e05e9a7 Small experimental fix [skip ci] 2015-06-29 12:34:31 +02:00
James Cole
087eb5dbe6 Merge branch 'release/3.4.6' into develop 2015-06-29 09:53:26 +02:00
James Cole
f15932b2ac Merge branch 'release/3.4.6' 2015-06-29 09:53:25 +02:00
James Cole
d3a4c3795d New version. 2015-06-29 09:53:10 +02:00
James Cole
b15d55e1d9 Ignore untestable stuff. 2015-06-29 09:23:39 +02:00
James Cole
4f5889cc5b New tests for navigation. 2015-06-29 09:14:39 +02:00
James Cole
bf2a104a4e Fixed some tests. 2015-06-29 07:59:06 +02:00
James Cole
0c6dd5cd16 Removed some dead code. 2015-06-29 07:22:51 +02:00
James Cole
5efb06a7aa Removed unused code. 2015-06-29 07:17:39 +02:00
James Cole
b13acef272 Removed some dead code. 2015-06-29 07:16:43 +02:00
James Cole
cfa67d6c0f Implemented google chart tests. 2015-06-28 21:33:39 +02:00
James Cole
e70444f19a Fixed the bug that would unintentionally not let you edit accounts without changing their name. Closed #83 2015-06-28 21:13:08 +02:00
James Cole
0258982e60 Implemented two google chart tests. 2015-06-28 20:56:04 +02:00
James Cole
70eed5cb5e New tests. 2015-06-28 18:00:11 +02:00
James Cole
a650fa51f7 Implemented bill chart JS test. 2015-06-28 16:41:12 +02:00
James Cole
cb205580d8 First test for chartJS. 2015-06-28 16:20:14 +02:00
James Cole
f9329aac00 Removed unnecessary html tags. [skip ci] 2015-06-28 13:09:20 +02:00
James Cole
745f4a7523 Small chart and layout fixes [skip ci] 2015-06-28 13:07:23 +02:00
James Cole
60254dafd7 Implemented a forgotten chart. 2015-06-28 12:41:58 +02:00
James Cole
a8d60388ba New (empty) tests. 2015-06-28 10:38:51 +02:00
James Cole
83ec60254c New tests. 2015-06-28 10:03:34 +02:00
James Cole
c15c45f765 Some small fixes. 2015-06-28 08:42:06 +02:00
James Cole
cbe52b5089 Optimised chart generation. 2015-06-28 08:33:23 +02:00
James Cole
e4e2921f3e Fixed some tests. 2015-06-28 08:24:12 +02:00
James Cole
4673170531 Restored some cache [skip ci] 2015-06-27 22:22:27 +02:00
James Cole
2c2ed26c38 Optimise some charts [skip ci] 2015-06-27 22:11:03 +02:00
James Cole
94be5244fe Final chart. First version. 2015-06-27 20:52:06 +02:00
James Cole
f137a08493 Implemented some more charts. 2015-06-27 20:39:50 +02:00
James Cole
48624d0a34 A new chart, single count. 2015-06-27 17:38:16 +02:00
James Cole
4cceb3ddaa Completed the index. 2015-06-27 17:32:52 +02:00
James Cole
f728395603 Added some more charts 2015-06-27 17:05:39 +02:00
James Cole
3e82d43807 Expand some code to generate chartJS charts. 2015-06-27 16:01:06 +02:00
James Cole
2194c4e0a9 Expand some layouts to accept chartJS charts. 2015-06-27 16:00:50 +02:00
James Cole
c581080f3f Added option for other charts (chartJS currently). 2015-06-27 12:21:04 +02:00
James Cole
f6b1ec27e5 Renamed google chart methods and data. 2015-06-27 12:04:53 +02:00
James Cole
368b183230 Fixed category chart [skip ci] 2015-06-27 11:46:14 +02:00
James Cole
9028ad36ad Moved charts to separate generators. 2015-06-27 11:44:18 +02:00
James Cole
6cc041cd39 Fixed the chart generator. 2015-06-27 08:38:27 +02:00
James Cole
63ff01e78d Outsourced a chart to a specialised Google chart thing. 2015-06-27 08:18:47 +02:00
James Cole
9e5484937e Code cleanup [skip ci] 2015-06-27 08:06:24 +02:00
James Cole
b8ed489b14 Updated the read me [skip ci] 2015-06-27 07:55:59 +02:00
James Cole
765152d04b Reimplemented GA code. [skip ci] 2015-06-26 05:19:11 +02:00
James Cole
14934367d8 Simplified account name for cash accounts. 2015-06-26 04:57:30 +02:00
James Cole
04164500c8 Optimised some layout things. 2015-06-25 17:06:20 +02:00
James Cole
5160f2c298 Some new tests and a bug fix for piggy banks. 2015-06-24 21:02:34 +02:00
James Cole
124c9303b9 This should fix the tests. 2015-06-23 22:13:13 +02:00
James Cole
cd27f0ad69 Some database and css fixes. [skip ci] 2015-06-23 21:14:21 +02:00
James Cole
a7555bcce3 Some layout and file updates. 2015-06-23 19:07:37 +02:00
James Cole
6b5c4fd3f4 Merge branch 'master' of https://github.com/JC5/firefly-iii into develop
* 'master' of https://github.com/JC5/firefly-iii:
  New images [skip ci]
2015-06-23 07:40:50 +02:00
James Cole
cc55e2acee Lets see if this fixes the database. 2015-06-23 07:38:48 +02:00
James Cole
1511f75a80 Fixed tests. Broke database. 2015-06-22 22:04:46 +02:00
James Cole
f01bbefc1f Fixed tests. 2015-06-22 21:45:32 +02:00
James Cole
1d1eb5ffa8 Fix migration thing. 2015-06-22 21:37:02 +02:00
James Cole
a465cb2191 Remove all references to reminders. 2015-06-22 21:31:12 +02:00
James Cole
42d13e02ef New images [skip ci] 2015-06-22 21:04:31 +02:00
James Cole
d00786c43f Merge branch 'release/3.4.5' into develop 2015-06-22 19:12:05 +02:00
James Cole
4b47f99829 Merge branch 'release/3.4.5' 2015-06-22 19:12:04 +02:00
James Cole
35aaf40003 Updated composer file. 2015-06-22 19:11:17 +02:00
James Cole
cc5b4a1e02 Actually fix version [skip ci] 2015-06-22 19:03:03 +02:00
James Cole
7079521e8c Fix version in develop. 2015-06-22 19:02:28 +02:00
James Cole
b5025560a5 Merge branch 'feature/admin-lte' into develop 2015-06-22 18:59:36 +02:00
James Cole
3f4bdd7f0e Remove unnecessary code. 2015-06-22 18:58:19 +02:00
James Cole
e94bb9b549 Fixed some html errors [skip ci] 2015-06-22 18:50:54 +02:00
James Cole
1ddaacbef5 Some updated templates [skip ci] 2015-06-22 17:55:37 +02:00
James Cole
e8b40518e0 Hide boxes [skip ci] 2015-06-22 17:23:02 +02:00
James Cole
0f88cbb41b Fixed some layouts [skip ci] 2015-06-22 07:24:44 +02:00
James Cole
780d137b76 Fixed tests. 2015-06-21 16:10:32 +02:00
James Cole
ad8a9717d1 Fixed some views. [skip ci] 2015-06-21 15:09:10 +02:00
James Cole
9d6ea6b2f6 Some view updates [skip ci] 2015-06-21 11:59:35 +02:00
James Cole
7559383089 Cleaned up lots of views. 2015-06-21 10:50:45 +02:00
James Cole
f84381c927 Fixed search [skip ci] 2015-06-21 05:58:05 +02:00
James Cole
cb0122a43f Different colour scheme. [skip ci] 2015-06-21 05:48:47 +02:00
James Cole
6776b20989 Cleaned up tag views [skip ci] 2015-06-21 05:48:07 +02:00
James Cole
e98d556022 Some new templates and a bug fix [skip ci] 2015-06-20 22:18:54 +02:00
James Cole
5bf18b69d7 Smaller css footprint [skip ci] 2015-06-20 21:57:54 +02:00
James Cole
ea17f045a7 Added language stuff [skip ci] 2015-06-20 21:57:03 +02:00
James Cole
526f565ea7 Updated stuff from the control list. 2015-06-20 21:55:55 +02:00
James Cole
4aff9d6e73 Some more stuff done. Layout mostly. 2015-06-20 18:22:33 +02:00
James Cole
bf516d4d21 Fix some things. 2015-06-20 09:54:01 +02:00
James Cole
ae92e409d9 First functional run of new layout. 2015-06-20 07:48:44 +02:00
James Cole
4d017dc8a9 Updated boxes and what-not. 2015-06-20 07:29:25 +02:00
James Cole
707f4e2965 First implementation of new template. 2015-06-19 20:59:14 +02:00
James Cole
1c3bffdc50 Trigger a build. 2015-06-19 08:38:21 +02:00
James Cole
e54ddcb8b0 Small fix in edit form. [skip ci] 2015-06-18 18:12:57 +02:00
James Cole
ddefb0debc Improved tag view [skip ci] 2015-06-18 18:05:06 +02:00
James Cole
92d8dde90d Fixed sort commands [skip ci] 2015-06-17 06:11:35 +02:00
James Cole
1bb0508ddf Fix balance report [skip ci] 2015-06-16 18:34:19 +02:00
James Cole
a280a326b9 Fix report [skip ci] 2015-06-16 18:32:34 +02:00
James Cole
683e9b7c2c Small bugs in transaction controller [skip ci] 2015-06-16 18:26:17 +02:00
James Cole
a44e5da421 Add save routine to each transaction. [skip ci] 2015-06-16 06:52:30 +02:00
James Cole
8cd2c90ad7 Fixed menu in mobile [skip ci] 2015-06-15 20:24:58 +02:00
James Cole
5e57a390a2 Fixed tests. 2015-06-15 19:25:54 +02:00
James Cole
620848272e Implement tag count and fix a count thing. 2015-06-14 21:27:04 +02:00
James Cole
1e86794416 Add tag count to journal for easier amount calculations [skip ci] 2015-06-14 11:52:07 +02:00
James Cole
e36717259b Put tags in test data [skip ci] 2015-06-14 11:51:47 +02:00
James Cole
75b9238b90 Code cleanup [skip ci] 2015-06-14 11:51:33 +02:00
James Cole
ce5b20027e Newlines [skip ci] 2015-06-14 11:22:41 +02:00
James Cole
0de1242c83 Some cleaning up [skip ci] 2015-06-14 08:22:02 +02:00
James Cole
8bd445ab19 Some code cleanup [skip ci] 2015-06-13 10:02:36 +02:00
James Cole
fdef0de163 Increased test coverage. 2015-06-13 08:17:38 +02:00
James Cole
b1b03a4325 Upgrade to laravel 5.1 2015-06-11 21:19:40 +02:00
James Cole
0587d96474 Fixed tests [skip ci] 2015-06-11 20:14:15 +02:00
James Cole
c2241567e4 New translations. [skip ci] 2015-06-11 18:32:31 +02:00
James Cole
7ac24ba418 Some new translations [skip ci] 2015-06-09 17:56:08 +02:00
James Cole
c933ffec66 Quick fix in budget edit. [skip ci] 2015-06-09 16:20:37 +02:00
James Cole
e587d934b1 Switch menu around [skip ci] 2015-06-09 15:47:10 +02:00
James Cole
f354e90656 Some small menu optimisations. [skip ci] 2015-06-09 15:46:13 +02:00
James Cole
1b0bc7ec6e Clean up language. [skip ci] 2015-06-08 21:36:54 +02:00
James Cole
ee1acb9c00 Merge branch 'hotfix/3.4.4.2' 2015-06-08 18:52:30 +02:00
James Cole
06862a2812 Merge branch 'hotfix/3.4.4.2' into develop 2015-06-08 18:52:30 +02:00
James Cole
5fa87e18db Fix tag bug. (again) 2015-06-08 18:51:45 +02:00
James Cole
77989e2720 Fix read me. 2015-06-08 18:50:48 +02:00
James Cole
3a1102fa4e New code for auth controller [skip ci] 2015-06-08 18:42:19 +02:00
James Cole
8a9974ce53 New menu and new boxes [skip ci] 2015-06-08 18:41:47 +02:00
James Cole
4be8f1ca03 New email messages [skip ci] 2015-06-08 18:41:36 +02:00
James Cole
1ec2970ee3 Merge branch 'hotfix/3.4.4.1' 2015-06-08 18:41:02 +02:00
James Cole
81b3a22606 Merge branch 'hotfix/3.4.4.1' into develop 2015-06-08 18:41:02 +02:00
James Cole
f81a475cc9 Fixed a bug where the source and destination account could be the same one. 2015-06-08 18:40:52 +02:00
Sander Dorigo
d7ee03d4f9 New HTML view. 2015-06-08 09:48:53 +02:00
Sander Dorigo
c1c06410c2 Add HTML view. 2015-06-08 09:47:02 +02:00
James Cole
657d16bb60 Merge branch 'release/3.4.4' 2015-06-07 18:24:40 +02:00
James Cole
e65a4c1010 Merge branch 'release/3.4.4' into develop 2015-06-07 18:24:40 +02:00
James Cole
e23d3f5661 Mark a new release. 2015-06-07 18:24:23 +02:00
James Cole
e13611f7af Stupid faker messes up again. 2015-06-07 16:58:49 +02:00
James Cole
596cd09489 With a little luck this will cover a lot. 2015-06-07 15:32:01 +02:00
James Cole
0be5b27d34 Fixed some test coverage. 2015-06-07 10:28:26 +02:00
James Cole
a27471ae55 Fixed test. [skip ci] 2015-06-07 09:30:24 +02:00
James Cole
e27e3622a8 Fixed translation [skip ci] 2015-06-07 09:10:44 +02:00
James Cole
e95273b72b Simplified (or tried to) some code. [skip ci] 2015-06-07 09:09:27 +02:00
James Cole
583d4f3249 Cleanup scan method. [skip ci] 2015-06-07 08:13:19 +02:00
James Cole
d6967c4516 Cleaning up the relevantTags thing [skip ci] 2015-06-07 07:48:53 +02:00
James Cole
40b3097374 Lots of cleanup and stuff. 2015-06-06 23:09:12 +02:00
James Cole
1a1f127993 Cleanup code. 2015-06-06 17:40:41 +02:00
James Cole
a0f34a7ce1 Fix tests. 2015-06-06 16:26:26 +02:00
James Cole
db020db34b Fix tests and fix coverage. 2015-06-06 15:36:12 +02:00
James Cole
681167bc1b Some code cleanup. 2015-06-05 19:02:23 +02:00
James Cole
40e49ffc37 Some bug fixes and cleanup. 2015-06-05 16:49:16 +02:00
James Cole
834b1afb38 Updated some code [skip ci] 2015-06-05 13:39:24 +02:00
James Cole
62d5a1da87 Cleaning up [skip ci] 2015-06-05 12:48:58 +02:00
James Cole
8d8308e557 Cleanup another validator [skip ci] 2015-06-05 12:34:45 +02:00
James Cole
e1aa63487a Optimized a validator. [skip ci] 2015-06-05 12:18:20 +02:00
Sander Dorigo
b7fbe110d4 Merge pull request #82 from JC5/scrutinizer-patch-5
Scrutinizer Auto-Fixes
2015-06-05 11:39:08 +02:00
Scrutinizer Auto-Fixer
58859eb35a Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-06-05 08:40:26 +00:00
James Cole
4b7e1ae1c6 Removed duplicate code. 2015-06-05 10:02:40 +02:00
James Cole
3a06a6ac07 Removed unnecessary code. 2015-06-05 09:51:52 +02:00
James Cole
db0f269dc8 Fix class reference. 2015-06-05 09:50:59 +02:00
James Cole
3cabe6ca5a Improved test coverage. 2015-06-05 08:39:23 +02:00
James Cole
d483005219 Expanded some tests. 2015-06-05 07:49:07 +02:00
James Cole
fea9bc4e7e Increased coverage and fixed a nasty bug. 2015-06-05 07:10:51 +02:00
James Cole
d579992c98 Slightly improved test coverage. 2015-06-04 23:08:44 +02:00
James Cole
ad1c61d959 Improved test coverage. 2015-06-04 21:35:36 +02:00
James Cole
bb1da31830 Increase test coverage. 2015-06-04 17:43:50 +02:00
James Cole
a50949e554 Cache preferences. 2015-06-03 22:11:50 +02:00
James Cole
14dce8a10b Optimized preferences. 2015-06-03 21:58:06 +02:00
James Cole
1240c8f685 Update models [skip ci] 2015-06-03 21:27:36 +02:00
James Cole
cc7c2e952c Code cleanup [skip ci] 2015-06-03 21:25:11 +02:00
James Cole
409ec2e086 Should fix tests. 2015-06-03 21:15:52 +02:00
James Cole
a7f6848e53 Lots of stuff gets cached now. 2015-06-03 18:22:47 +02:00
James Cole
4b0b79199d Some cleanup. 2015-06-03 17:32:50 +02:00
Sander Dorigo
d1d6c48d9b Update GA code 2015-06-03 11:27:47 +02:00
James Cole
21631780bb Fix some tests 2015-06-02 22:22:47 +02:00
James Cole
b935e32340 Fix amount in tag list [skip ci] 2015-06-02 22:07:38 +02:00
James Cole
72dd064932 Fix count in transaction search [skip ci] 2015-06-02 21:58:30 +02:00
James Cole
2e75446665 Fixed some JS bugs [skip ci] 2015-06-02 18:13:23 +02:00
James Cole
be17e4481e Cache boxes. 2015-06-02 18:05:42 +02:00
James Cole
616c849b1f Fixed tests. 2015-06-02 17:58:30 +02:00
James Cole
71947c097f Some experiments with a cache control thing. [skip ci] 2015-06-02 17:44:50 +02:00
James Cole
546787802d Some code cleanup [skip ci] 2015-06-02 17:14:03 +02:00
James Cole
294d0e388a Add cache to main chart. 2015-06-01 18:41:18 +02:00
James Cole
193a1b0325 Basic tutorial for new users. 2015-06-01 18:13:54 +02:00
James Cole
12743217a2 Merge branch 'release/3.4.3' into develop 2015-06-01 17:37:03 +02:00
James Cole
b252b9da66 Merge branch 'release/3.4.3' 2015-06-01 17:37:02 +02:00
James Cole
cdef9c3c7e New version. 2015-06-01 17:36:53 +02:00
James Cole
71dcebb744 New read me [skip ci] 2015-06-01 17:36:13 +02:00
James Cole
25f248c60a New read me [skip ci] 2015-06-01 17:35:48 +02:00
James Cole
d5cbc17831 Update read me. 2015-06-01 17:35:03 +02:00
James Cole
7a10217511 New read me and scrutiniser instructions. 2015-05-31 20:53:31 +02:00
James Cole
7559efab77 Update build thing. 2015-05-31 20:52:20 +02:00
James Cole
8254efbd03 Fix modal. 2015-05-31 20:24:06 +02:00
James Cole
4ae24225a5 Cleanup some modals. 2015-05-31 20:23:49 +02:00
James Cole
67d9154563 Added some new code to implement a permission scheme. 2015-05-28 06:43:07 +02:00
James Cole
ad0319c188 Some new translations [skip ci] 2015-05-28 06:11:39 +02:00
James Cole
eb650ea3ec Some code cleanup 2015-05-27 08:36:26 +02:00
James Cole
7eba33e805 Fixed some issues for scrutiniser [skip ci] 2015-05-27 07:58:54 +02:00
James Cole
e1cb9d387e Fixed chart and redirect 2015-05-27 07:51:33 +02:00
James Cole
2ace7c3ca0 Some code cleanup [skip ci] 2015-05-27 07:27:05 +02:00
James Cole
58014f0592 Extra translation [skip ci] 2015-05-27 06:57:02 +02:00
James Cole
1d4938bb09 Small fix in error handler. 2015-05-26 22:12:34 +02:00
James Cole
bbf4007c3e Fixed return type [skip ci] 2015-05-26 20:59:16 +02:00
Sander Dorigo
4d5124fb4c Merge pull request #81 from JC5/scrutinizer-patch-4
Scrutinizer Auto-Fixes
2015-05-26 20:58:11 +02:00
Scrutinizer Auto-Fixer
14a7cd05b1 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-05-26 18:57:31 +00:00
James Cole
946be80eef Fix route urls. 2015-05-26 20:37:01 +02:00
James Cole
9ad8b1a980 Some optimisations. 2015-05-26 20:28:18 +02:00
James Cole
f733216fcb Trigger a build. 2015-05-26 20:18:21 +02:00
Sander Dorigo
ffc6139e21 Merge pull request #80 from JC5/scrutinizer-patch-3
Scrutinizer Auto-Fixes
2015-05-26 20:16:39 +02:00
Scrutinizer Auto-Fixer
571cac6644 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-05-26 17:50:09 +00:00
James Cole
2738ac5a5c Did some cleanup [skip ci] 2015-05-26 19:48:49 +02:00
James Cole
7dfde51b84 Fixed tests. 2015-05-26 19:38:52 +02:00
James Cole
2d2f18e538 Code cleanup. 2015-05-26 12:19:11 +02:00
James Cole
3af0dd2e3b Some code cleanup [skip ci] 2015-05-26 12:08:46 +02:00
James Cole
349e077802 Added model data to models to aid scrutiniser. 2015-05-26 11:15:45 +02:00
James Cole
812aae358f Some code cleanup. 2015-05-26 08:17:58 +02:00
James Cole
c3c59d0627 Fixed some JS things [skip ci] 2015-05-26 07:50:38 +02:00
James Cole
89518b412d Merge branch 'release/3.4.2' into develop 2015-05-25 23:18:33 +02:00
James Cole
f43b026162 Merge branch 'release/3.4.2' 2015-05-25 23:18:32 +02:00
James Cole
b806c70f52 New read me. 2015-05-25 22:58:49 +02:00
James Cole
10bff3c0b8 Fix tests. 2015-05-25 22:56:00 +02:00
James Cole
65c12fd0b2 Merge branch 'release/3.4.1' 2015-05-25 22:24:28 +02:00
James Cole
50f71c4130 Merge branch 'release/3.4.1' into develop 2015-05-25 22:24:28 +02:00
James Cole
8e401a53dc New version. 2015-05-25 22:24:21 +02:00
James Cole
64a289a47c Cleanup some code [skip ci] 2015-05-25 22:17:41 +02:00
James Cole
8f2c37061b Update translations [skip ci] 2015-05-25 22:16:00 +02:00
James Cole
39f2de6b90 Cleanup code [skip ci] 2015-05-25 22:04:24 +02:00
James Cole
855ba8d4f3 Cleanup [skip ci] 2015-05-25 22:01:48 +02:00
James Cole
74f098e718 Some new translations [skip ci] 2015-05-25 21:39:05 +02:00
James Cole
56c8a84691 Update translations [skip ci] 2015-05-25 21:26:34 +02:00
James Cole
8bbf319032 Some translations and a new test. 2015-05-25 21:17:36 +02:00
James Cole
afbca4ae65 Newline in travis.ml [skip ci] 2015-05-25 20:08:31 +02:00
James Cole
0ef6d2f91a Code cleanup. 2015-05-25 19:58:13 +02:00
James Cole
fbe4435599 Fix translation [skip ci] 2015-05-25 19:19:27 +02:00
James Cole
34be565dd1 New translations [skip ci] 2015-05-25 19:18:16 +02:00
James Cole
af838e4ed1 New translations. 2015-05-25 09:23:45 +02:00
James Cole
60fe8ce011 New GA events [skip ci] 2015-05-25 08:12:31 +02:00
James Cole
8ece341467 Add GA events [skip ci] 2015-05-25 08:01:06 +02:00
James Cole
dfa6bdbcb8 Fixed menu for mobile screens [skip ci] 2015-05-25 07:53:13 +02:00
James Cole
fb2481ebaa Add some GA events. 2015-05-25 07:26:19 +02:00
James Cole
4874c116cf Add GA to 503 page. [skip ci] 2015-05-25 07:23:35 +02:00
James Cole
e19c44efbd Some code cleanup. 2015-05-25 07:14:04 +02:00
James Cole
4b687b9bdc Clean up config 2015-05-25 07:03:26 +02:00
James Cole
6af79ef601 Fixed tests 2015-05-24 23:08:55 +02:00
James Cole
352b996ad2 Cleanup some code. 2015-05-24 22:59:48 +02:00
James Cole
4a93bb35f8 Cleanup budget view. 2015-05-24 22:54:59 +02:00
James Cole
8e1f493daf Another build routine. 2015-05-24 21:45:10 +02:00
James Cole
59ee153375 Fixed test. 2015-05-24 21:11:37 +02:00
James Cole
60f7f1fc16 New build routine. 2015-05-24 21:07:22 +02:00
James Cole
b7433683d8 Cleanup cleanup [skip ci] 2015-05-24 20:57:27 +02:00
James Cole
42799b9273 Some JS cleanup. 2015-05-24 20:48:31 +02:00
James Cole
860a0f790e Update js [skip ci] 2015-05-24 20:41:14 +02:00
James Cole
8daccbfbb4 Add JSHint stuff. [skip ci] 2015-05-24 18:22:41 +02:00
James Cole
285b77dcb7 Merge branch 'release/3.4.0.10' into develop 2015-05-24 15:56:05 +02:00
James Cole
6e48827d3f Merge branch 'release/3.4.0.10' 2015-05-24 15:56:04 +02:00
James Cole
f0c20cc706 New release. 2015-05-24 15:55:59 +02:00
James Cole
8916c0a3de Clean code [skip ci] 2015-05-24 15:18:19 +02:00
James Cole
7193a77840 Some translations and cleanup [skip ci] 2015-05-24 15:13:07 +02:00
James Cole
61930b5b51 Code cleanup [skip ci] 2015-05-24 15:03:45 +02:00
James Cole
11a494cacf Remove some middleware, fix cleanup [skip ci] 2015-05-24 12:53:47 +02:00
James Cole
17f9bf0339 Merge branch 'release/3.4.0.9' into develop 2015-05-24 11:53:44 +02:00
James Cole
3d9755ca8c Merge branch 'release/3.4.0.9' 2015-05-24 11:53:43 +02:00
James Cole
b5cf2d03e6 New version. 2015-05-24 11:53:34 +02:00
James Cole
e3b35b8f35 Add code climate file [skip ci] 2015-05-24 11:46:41 +02:00
James Cole
1c1fe672bd Some code cleanup [skip ci] 2015-05-24 11:41:52 +02:00
James Cole
6c71f68ed8 Should cover models. 2015-05-24 11:13:46 +02:00
James Cole
8f2f912cdf New (empty) tests for models. 2015-05-24 10:01:00 +02:00
James Cole
bf6ea16acb Fixed test. 2015-05-24 09:29:44 +02:00
James Cole
288546c2b9 Fixed some math. 2015-05-24 08:00:40 +02:00
James Cole
724db6c34c Built some new tests 2015-05-24 07:43:48 +02:00
James Cole
067c451c1d Fixed tests 2015-05-23 21:41:04 +02:00
James Cole
11e3696191 Cleanup tests. 2015-05-23 21:23:51 +02:00
James Cole
41e20664de Fixed coverage. 2015-05-23 21:18:20 +02:00
James Cole
d8de90d6f3 Ignore constructors. 2015-05-23 20:49:57 +02:00
James Cole
b01e8299d3 Fixed tests 2015-05-23 20:47:31 +02:00
James Cole
1ec11e3e2e Compartmentalised all tests. 2015-05-23 19:41:54 +02:00
James Cole
422f429725 Experimental count thing. 2015-05-23 17:38:16 +02:00
James Cole
5c55fa5fbb Remove encrypted amounts because it stinks. 2015-05-23 17:33:04 +02:00
James Cole
80d845fdf2 Save but don't use. 2015-05-23 17:18:23 +02:00
James Cole
601fe68346 Don't multiply transactions. 2015-05-23 17:14:36 +02:00
James Cole
9e050fb059 Updated some tests. 2015-05-23 17:11:16 +02:00
James Cole
99d4adf5e6 Translations [skip ci] 2015-05-23 15:57:38 +02:00
James Cole
85f8d1e8e9 Math is hard [skip ci] 2015-05-23 15:45:01 +02:00
James Cole
8334d3d99f Translation error [skip ci] 2015-05-23 15:43:48 +02:00
James Cole
cff08d19eb Slowly move away from using the raw 'transactions.amount' field. 2015-05-23 15:42:19 +02:00
James Cole
2d86390bc1 Experimental query.Code cleanup [skip ci] 2015-05-23 09:11:59 +02:00
James Cole
7a20835571 Code cleanup [skip ci] 2015-05-23 09:09:25 +02:00
James Cole
ff3c9676b5 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:05:08 +02:00
James Cole
055f97dab1 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:03:52 +02:00
James Cole
8a867e71a1 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:02:27 +02:00
James Cole
b8275b4734 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:01:38 +02:00
James Cole
36b951b146 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:01:07 +02:00
James Cole
c5a5f17643 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 09:00:11 +02:00
James Cole
16b909c4df Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 08:59:23 +02:00
James Cole
92b7648e03 Encrypt more stuff in the cleanup routine [skip ci] 2015-05-23 08:58:21 +02:00
James Cole
ca46ebe3b2 Encrypt bill amounts [skip ci] 2015-05-23 08:57:02 +02:00
James Cole
676e48254a Whoops [skip ci] 2015-05-23 08:55:16 +02:00
James Cole
b15b55227d Add another cleanup routine. [skip ci] 2015-05-23 08:54:25 +02:00
James Cole
3c3b723913 Some code cleanup [skip ci] 2015-05-23 08:51:24 +02:00
James Cole
f05002c729 Updated models for encryption. 2015-05-23 08:46:46 +02:00
James Cole
1c2cbd5b40 New stuff for encrypted amounts. 2015-05-23 07:47:36 +02:00
James Cole
54c6ca9f45 Expanded some tests. 2015-05-22 20:25:12 +02:00
James Cole
c10efbb170 Also encrypt meta data for reminders. 2015-05-22 19:19:18 +02:00
James Cole
a496ad5814 Simple routine to encrypt entries which were not encrypted yet. 2015-05-22 19:18:00 +02:00
James Cole
50cf7f6a3b Merge branch 'release/3.4.0.8' 2015-05-22 18:55:13 +02:00
James Cole
f946f10afd Merge branch 'release/3.4.0.8' into develop 2015-05-22 18:55:13 +02:00
James Cole
eecb4db34c Built chart tests. 2015-05-22 18:31:57 +02:00
James Cole
1f865d3ea4 Improved coverage. 2015-05-22 15:05:32 +02:00
James Cole
623bb4b350 New tests. 2015-05-22 10:17:20 +02:00
James Cole
dc8ad673a6 New test to cover some reminder stuff. 2015-05-22 08:52:30 +02:00
James Cole
4914ad821e Fixed coverage for transaction controller. 2015-05-22 08:03:34 +02:00
James Cole
f099cbadc3 Version increment. 2015-05-22 07:16:36 +02:00
James Cole
42cda384c8 Fix help routes 2015-05-22 07:15:40 +02:00
James Cole
23c91b9990 Some translations, playing around with popups. [skip ci] 2015-05-21 23:05:31 +02:00
James Cole
ff0379182e Sort chart [skip ci] 2015-05-21 18:57:14 +02:00
James Cole
e08a23948f Fixed chart. [skip ci] 2015-05-21 18:50:23 +02:00
James Cole
bd56de6d36 Fix other translations [skip ci] 2015-05-21 17:47:10 +02:00
James Cole
42970aea80 Fix some translations. 2015-05-21 17:45:01 +02:00
James Cole
003a05ee8d Fixed the category chart. 2015-05-21 17:27:48 +02:00
James Cole
ffb11b01a6 Some new translations. 2015-05-21 07:44:44 +02:00
James Cole
e426f5d5da Some new translations. 2015-05-21 07:30:38 +02:00
James Cole
6989f61e1b Extra translations [skip ci] 2015-05-20 20:10:01 +02:00
James Cole
0e6677ccb3 Remove cash accounts from list [skip ci] 2015-05-20 20:04:27 +02:00
James Cole
8f104d555a Added newlines to files. 2015-05-20 19:56:14 +02:00
James Cole
b1d3158db1 Code cleanup. 2015-05-20 19:55:53 +02:00
James Cole
7645005d5a Return of account id. 2015-05-20 18:18:05 +02:00
James Cole
411f77fd29 Fixed some other displays of money 2015-05-20 18:09:44 +02:00
James Cole
568ab26db1 Spell check [skip ci] 2015-05-20 17:06:47 +02:00
James Cole
29652108f0 Fixed tests. 2015-05-20 17:04:53 +02:00
James Cole
f07e4dc711 Fix sort. [skip ci] 2015-05-20 07:21:40 +02:00
James Cole
8a2ac457c2 Name fix [skip ci] 2015-05-20 07:21:01 +02:00
James Cole
9e54eecfaa Fixed some views. 2015-05-20 07:20:02 +02:00
James Cole
95ef691077 Fixed some more reports and charts. [skip ci] 2015-05-20 07:07:46 +02:00
James Cole
7a0ad5a587 Fixed a chart [skip ci] 2015-05-20 06:50:24 +02:00
James Cole
42b49d0e4b Added some correcting methods. [skip ci] 2015-05-20 06:50:15 +02:00
James Cole
9217c2f003 Corrected some charts [skip ci] 2015-05-20 06:49:51 +02:00
James Cole
fbdf66998d Added a forgotten chart, corrected some others. [skip ci] 2015-05-20 06:49:22 +02:00
James Cole
deda9d3c54 Add corrected expense routes [skip ci] 2015-05-20 06:49:03 +02:00
James Cole
a5d78f20ae Add corrected income and expense methods [skip ci] 2015-05-20 06:48:52 +02:00
James Cole
5ed09e3f38 Call the corrected spent function [skip ci] 2015-05-20 06:47:53 +02:00
James Cole
3e9774cd66 Merge branch 'release/3.4.0.7' 2015-05-18 18:23:07 +02:00
James Cole
54387c8fdf Merge branch 'release/3.4.0.7' into develop 2015-05-18 18:23:07 +02:00
James Cole
7eec949a13 Push new release. 2015-05-18 18:23:01 +02:00
James Cole
4113c4ff40 Fixed the tests. 2015-05-18 17:57:44 +02:00
James Cole
1bf0968bfe Show correct icon. [skip ci] 2015-05-18 17:05:22 +02:00
James Cole
374b90fb00 Show correct amount [skip ci] 2015-05-18 17:04:10 +02:00
James Cole
064e60e9d5 Show tag amount better [skip ci] 2015-05-18 17:02:18 +02:00
James Cole
b637455970 New translations [skip ci] 2015-05-18 16:59:01 +02:00
James Cole
68158937d1 Fixed translation [skip ci] 2015-05-18 06:56:59 +02:00
James Cole
adb1356b7a Small bug fix in display of income vs. expenses [skip ci] 2015-05-18 06:55:36 +02:00
James Cole
d880ccb8e0 Small bug fix in display of income vs. expenses [skip ci] 2015-05-18 06:54:46 +02:00
James Cole
050fb1d1ef Some translations [skip ci] 2015-05-17 18:06:00 +02:00
James Cole
6580752bde Now includes chart! [skip ci] 2015-05-17 18:03:16 +02:00
James Cole
c9df265c9b Included bills in month report. [skip ci] 2015-05-17 17:54:13 +02:00
James Cole
098e5bc162 Small translation fix [skip ci] 2015-05-17 17:27:56 +02:00
James Cole
4b2dcc74d4 Expanded the amount thing. 2015-05-17 16:12:00 +02:00
James Cole
a9254c5c9a Some new translations, better tag view [skip ci] 2015-05-17 15:55:24 +02:00
James Cole
7ce57e6ccb Fix a view, fix tag format. 2015-05-17 15:24:30 +02:00
James Cole
0fcb32a66f Fix update error. 2015-05-17 15:17:06 +02:00
James Cole
9946535f01 Some new bread crumbs [skip ci] 2015-05-17 15:12:45 +02:00
James Cole
2b17396d6b Fix some translations. 2015-05-17 13:44:58 +02:00
James Cole
b01d5bc237 Translation fixes [skip ci] 2015-05-17 12:53:32 +02:00
James Cole
b123860304 More stuff. 2015-05-17 12:49:09 +02:00
James Cole
033f5b67db Code cleanup 2015-05-17 11:28:58 +02:00
James Cole
6280448dfb Fixed more tests. 2015-05-17 10:47:12 +02:00
James Cole
01cd3333e4 Fixing tests. 2015-05-17 10:36:11 +02:00
James Cole
63050907b9 Code cleanup. 2015-05-17 10:30:18 +02:00
James Cole
beedf7d780 Cleaning up 2015-05-17 10:10:58 +02:00
James Cole
6b8194261f Clean up and simplify code. 2015-05-17 10:01:47 +02:00
James Cole
dbb1c4d534 Fixed some reports. 2015-05-17 09:35:49 +02:00
James Cole
e6263f9ff5 Some cleaning up 2015-05-17 09:18:44 +02:00
James Cole
6ca119c4db Minor changes [skip ci] 2015-05-17 09:04:55 +02:00
James Cole
c483a1ab3a Ignore simple classes. 2015-05-16 19:08:54 +02:00
James Cole
2e7edd033c Some expanded things. 2015-05-16 16:47:52 +02:00
James Cole
c576902501 Fixed tests. 2015-05-16 16:04:51 +02:00
James Cole
66c2951594 Cleanup 2015-05-16 15:52:09 +02:00
James Cole
b812881cdb More hip report stuff. 2015-05-16 15:43:58 +02:00
James Cole
cdeac2c6db Should simplify reports. 2015-05-16 14:51:23 +02:00
James Cole
bca2ddd529 Budget report thing. 2015-05-16 14:14:22 +02:00
James Cole
e7285c6499 Some overhauls. 2015-05-16 13:53:08 +02:00
James Cole
bdff275672 Simplified report code. 2015-05-16 13:06:38 +02:00
James Cole
bec58a1ee6 Experimental test coverage. 2015-05-16 10:34:38 +02:00
James Cole
f64616748c Expenses only [skip ci] 2015-05-16 10:18:32 +02:00
James Cole
512ce15973 Small tweaks in charts. 2015-05-16 10:13:41 +02:00
James Cole
ed8b301574 Routes and JS cleanup. 2015-05-16 10:05:22 +02:00
James Cole
d22a6c019c Fixed lots of chart references. 2015-05-16 09:57:31 +02:00
James Cole
a0cb1b9d9e Clean up and split chart controllers 2015-05-16 09:41:14 +02:00
James Cole
a5294c62ea Renamed a method. 2015-05-16 09:26:54 +02:00
James Cole
e155d3311c Fixed tests 2015-05-16 09:25:14 +02:00
James Cole
0a372b0daf Cleanup tests 2015-05-16 09:16:32 +02:00
James Cole
69143399d1 Moved some stuff around. 2015-05-16 09:09:52 +02:00
James Cole
3270d3bf96 Cleanup. 2015-05-16 08:14:26 +02:00
James Cole
3896a66122 Fixed tests. 2015-05-16 08:09:15 +02:00
James Cole
b94781aef1 Some optimisations. 2015-05-16 08:05:04 +02:00
James Cole
bed1adc367 Fixed budget. 2015-05-16 07:56:15 +02:00
James Cole
ae54497efa Differ between shared and normal transactions (not build yet). 2015-05-16 07:49:02 +02:00
James Cole
06b747c221 Some cleanup and translations. 2015-05-16 07:28:58 +02:00
James Cole
f159beee0d Fixed preferences tests. 2015-05-15 23:24:55 +02:00
James Cole
49d7dea086 Fixed some coverage. 2015-05-15 23:02:42 +02:00
James Cole
3e65733dc5 Small fix in report view [skip ci] 2015-05-15 22:12:31 +02:00
James Cole
cc375d58bb Fixed tests. 2015-05-15 22:06:52 +02:00
James Cole
911c7c662a Expanded reports. 2015-05-15 22:00:00 +02:00
James Cole
aae003be33 Some more cleaning up and fixing 2015-05-15 21:01:24 +02:00
James Cole
aede03d8b2 Some more layout changes. 2015-05-15 20:43:50 +02:00
James Cole
f0f5ada7de More changes to reports. 2015-05-15 20:38:39 +02:00
James Cole
58365121a3 Fixed tests. 2015-05-15 20:15:58 +02:00
James Cole
d5a154d2e6 Cleaned up reports and associated views. 2015-05-15 20:07:51 +02:00
James Cole
b20f369aef Some new tests. 2015-05-15 18:39:59 +02:00
James Cole
abb8aa0b29 Merge branch 'feature/translations' into develop 2015-05-15 18:38:26 +02:00
James Cole
5368a0f1d7 Some new translations. 2015-05-14 19:44:20 +02:00
James Cole
d3897eece7 This should fix the tests on the translations branch. 2015-05-14 18:15:31 +02:00
James Cole
a82b829da9 More translations. 2015-05-14 18:00:56 +02:00
James Cole
9f5058e81a Some new translations. 2015-05-14 17:52:50 +02:00
James Cole
5b19263720 Some more [skip ci] 2015-05-14 16:43:12 +02:00
James Cole
9d5a0db0d9 [skip ci] 2015-05-14 16:36:08 +02:00
James Cole
4bd8a7014f Count things [skip ci] 2015-05-14 16:35:41 +02:00
James Cole
353e96d951 Better (and translated) delete forms. [skip ci] 2015-05-14 16:32:35 +02:00
James Cole
149a6f92b0 Translations [skip ci] 2015-05-14 15:56:23 +02:00
James Cole
d66426c137 Nieuw vertalingen [skip ci] 2015-05-14 15:53:56 +02:00
James Cole
4fc9966392 Chart translations [skip ci] 2015-05-14 13:43:58 +02:00
James Cole
417766f0db Various date localisation. [skip ci] 2015-05-14 13:41:21 +02:00
James Cole
de9ac97887 Also english. [skip ci] 2015-05-14 13:19:26 +02:00
James Cole
6be42f112a Charts and titles in Dutch. [skip ci] 2015-05-14 13:17:53 +02:00
James Cole
3895ae63c7 Some translations for lists [skip ci] 2015-05-14 13:00:43 +02:00
James Cole
607d416d54 Better translation for 'balance' [skip ci] 2015-05-14 12:11:56 +02:00
James Cole
038693dc86 More index translations [skip ci] 2015-05-14 12:10:42 +02:00
James Cole
cc9be13544 Added a bread crumb [skip ci] 2015-05-14 11:50:48 +02:00
James Cole
9c1474087f Forgot one [skip ci] 2015-05-14 11:50:04 +02:00
James Cole
831de2bcf4 New menu translations [skip ci] 2015-05-14 11:48:59 +02:00
James Cole
eb687333bb Small edits to buttons and others. [skip ci] 2015-05-14 11:31:54 +02:00
James Cole
5cc7966d54 Some new form things. [skip ci] 2015-05-14 11:25:43 +02:00
James Cole
d1a34e7a6f Breadcrumbs translated to English. [skip ci] 2015-05-14 11:22:20 +02:00
James Cole
d63d791717 Translated all bread crumbs to Dutch. [skip ci] 2015-05-14 11:17:56 +02:00
James Cole
015570c741 Small translations as a basic start [skip ci] 2015-05-14 10:26:15 +02:00
James Cole
8400ebc9c6 Added a language test, added Dutch basic file. [skip ci] 2015-05-14 10:03:57 +02:00
James Cole
9f99e7c0af Edit and set language [skip ci] 2015-05-14 09:59:30 +02:00
James Cole
392c1fc399 Add language selector to preferences [skip ci] 2015-05-14 09:56:41 +02:00
James Cole
d3cea7a89c Add new supported languages [skip ci] 2015-05-14 09:52:58 +02:00
James Cole
1dcf7407e6 Cleanup [skip ci] 2015-05-14 09:51:54 +02:00
James Cole
d543c033a3 Small fixes to translations. 2015-05-14 09:50:07 +02:00
James Cole
aaa186be5e Merge branch 'release/3.4.0.6' 2015-05-14 09:21:23 +02:00
James Cole
2054b5b3dd Merge branch 'release/3.4.0.6' into develop 2015-05-14 09:21:23 +02:00
James Cole
98ae5b0ca0 New read me. 2015-05-14 09:21:12 +02:00
James Cole
36c8171d0f Clean up and tests. 2015-05-14 09:01:10 +02:00
James Cole
3603eb94cc Different budget query [skip ci] 2015-05-14 08:08:25 +02:00
James Cole
0e068d4ccf Fixed some tests. 2015-05-13 21:37:11 +02:00
James Cole
199f348ff4 Smaller mobile pages. 2015-05-13 21:32:33 +02:00
James Cole
b22655fb7c Fix helper 2015-05-13 21:32:27 +02:00
James Cole
06cc9618ba Some new tests 2015-05-13 21:32:21 +02:00
James Cole
b9019c8c7f Smaller screens update [skip ci] 2015-05-13 06:34:17 +02:00
James Cole
77e133e67c Some cleaning up for mobile screens [skip ci] 2015-05-13 06:31:32 +02:00
James Cole
571e7df807 Some tiny optimisations. 2015-05-12 20:51:03 +02:00
James Cole
22f4d2979a Added some more ignores, edited some middleware. 2015-05-11 22:12:53 +02:00
James Cole
e46e366694 Added some tests to cover an event. 2015-05-11 21:45:31 +02:00
James Cole
7b4bc23815 Merge branch 'release/3.4.0.5' 2015-05-10 19:18:57 +02:00
James Cole
9ca79f767c Merge branch 'release/3.4.0.5' into develop 2015-05-10 19:18:57 +02:00
James Cole
274dba7408 Update read me. 2015-05-10 19:18:49 +02:00
James Cole
31708ca29e Ignore some code. 2015-05-10 19:18:43 +02:00
James Cole
671b025588 More ignore stuff. 2015-05-10 13:40:29 +02:00
James Cole
a7956e4856 Adding lots of ignore statements because testing the models is pointless. 2015-05-10 13:22:00 +02:00
James Cole
355862025a Auth and password controller. 2015-05-10 13:06:02 +02:00
James Cole
a2a39ee0f8 Ignore piggy bank part. 2015-05-10 09:35:42 +02:00
James Cole
ec8e39c16f Fixed currency tests. 2015-05-10 09:26:44 +02:00
James Cole
88f714999e Add test to get full coverage. 2015-05-10 08:53:49 +02:00
James Cole
c0c2aa3be0 Fixed one test. 2015-05-10 08:49:15 +02:00
James Cole
822044820e Ignored more files. 2015-05-10 08:26:42 +02:00
James Cole
6ffc182142 Ignore lots of code in test coverage. 2015-05-10 08:08:07 +02:00
James Cole
3d54a78573 Tag repository tests 2015-05-10 07:48:33 +02:00
James Cole
8ddf7d953a Ignore constructor. 2015-05-10 07:09:21 +02:00
James Cole
8b9e9ad103 Tests for reminder repository. 2015-05-10 07:07:17 +02:00
James Cole
5737224c40 Simplified translations [skip ci] 2015-05-09 22:42:45 +02:00
James Cole
ec9aacbcae More new tests. 2015-05-09 22:30:16 +02:00
James Cole
9395454997 Small optimalizations [skip ci] 2015-05-09 19:27:25 +02:00
James Cole
66198a8d98 Expanded bread crumb [skip ci] 2015-05-09 19:23:37 +02:00
James Cole
96ed9a4256 Finished journal repository. 2015-05-09 18:30:58 +02:00
James Cole
10e54b2263 Tested part of the journal repository. 2015-05-09 18:11:48 +02:00
James Cole
cf00922ad2 Merge branch 'release/3.4.0.4' 2015-05-09 15:13:20 +02:00
James Cole
84e8e007a5 Merge branch 'release/3.4.0.4' into develop 2015-05-09 15:13:20 +02:00
James Cole
d07b2e773b Update read me 2015-05-09 15:13:14 +02:00
James Cole
506ef7b0b9 Covered currency repository. 2015-05-09 15:11:12 +02:00
James Cole
2cd5dae8e2 New read me [skip ci] 2015-05-09 15:08:56 +02:00
James Cole
a1cd49c111 First attempt at translations. 2015-05-09 13:56:03 +02:00
James Cole
aca2973aef Experimental chart [skip ci] 2015-05-09 13:55:07 +02:00
James Cole
0a7a691c95 Experimental chart [skip ci] 2015-05-09 13:53:58 +02:00
James Cole
72906a7afd Experimental chart [skip ci] 2015-05-09 13:52:33 +02:00
James Cole
d1a4a83570 Covered category repository. 2015-05-09 13:14:02 +02:00
James Cole
e0396b29e8 Add GA beacon [skip ci] 2015-05-09 10:43:37 +02:00
James Cole
536833cfe0 Fixed tests. 2015-05-09 10:25:52 +02:00
James Cole
317b02d1b9 Finished budget repository tests. 2015-05-09 10:23:13 +02:00
James Cole
75e279ea0d Update read me [skip ci] 2015-05-09 09:17:09 +02:00
James Cole
dc2ad21f4c Updated read me [skip ci] 2015-05-09 09:15:39 +02:00
James Cole
484d49aae1 Fixed tests 2015-05-09 09:15:27 +02:00
James Cole
ca39438ad4 Small update to the read me. [skip ci] 2015-05-09 09:11:54 +02:00
James Cole
49a65ebff4 New budget repository tests. 2015-05-09 09:05:37 +02:00
James Cole
befdc05084 Rewrote read me. [skip ci] 2015-05-08 19:34:03 +02:00
James Cole
1fbffe761b Merge branch 'release/3.4.0.3' into develop 2015-05-08 17:35:03 +02:00
James Cole
36aad379ff Merge branch 'release/3.4.0.3' 2015-05-08 17:35:02 +02:00
James Cole
540cfa072e Update read me. 2015-05-08 17:34:54 +02:00
James Cole
3b049c15cc Updated composer.json [skip ci] 2015-05-08 17:15:16 +02:00
James Cole
3e93ed0a17 Small JS fix. [skip ci] 2015-05-08 17:13:49 +02:00
James Cole
d7d9358136 Fix sorting [skip ci] 2015-05-08 17:04:24 +02:00
James Cole
5cf0939ff9 Fixed sorting [skip ci] 2015-05-08 17:03:20 +02:00
James Cole
8dc6f91d3c Add sort options. [skip ci] 2015-05-08 17:00:39 +02:00
James Cole
a3a25db230 New tests. 2015-05-08 16:44:57 +02:00
James Cole
c06f18c815 Some new tests 2015-05-08 14:00:49 +02:00
James Cole
6802f04036 First two tests for bill repository. 2015-05-08 12:50:39 +02:00
James Cole
beeccdf345 New (incomplete) tests [skip ci] 2015-05-08 12:44:42 +02:00
James Cole
58241ed39d Covered account repository. 2015-05-08 12:42:12 +02:00
James Cole
31128020f0 Merge branch 'release/3.4.0.2' 2015-05-08 07:57:06 +02:00
James Cole
6c48afc37b Merge branch 'release/3.4.0.2' into develop 2015-05-08 07:57:06 +02:00
James Cole
7a2f169dfc Push new version. 2015-05-08 07:56:55 +02:00
James Cole
ed910b99a7 Update travis configuration [skip ci] 2015-05-08 07:48:04 +02:00
James Cole
54195c0826 Updated tests. 2015-05-08 07:39:05 +02:00
James Cole
cefbbcd1df Fixed some tests. 2015-05-08 07:27:29 +02:00
James Cole
cc01592085 Cover some more account repository. 2015-05-08 06:01:39 +02:00
James Cole
5a98a5252d Added tests. 2015-05-07 21:26:00 +02:00
James Cole
184e8b1132 Some new tests. 2015-05-07 20:56:27 +02:00
James Cole
2b6b896c2e Some more coverage. 2015-05-06 18:09:45 +02:00
James Cole
96d06b7a93 Added incomplete tests. 2015-05-05 22:46:28 +02:00
James Cole
f54f1611b5 First tests for account repository. 2015-05-05 20:46:13 +02:00
James Cole
69ad757e8b Lazily remove todo's [skip ci] 2015-05-05 13:03:39 +02:00
James Cole
e0beb796ad Some cleaning up [skip ci] 2015-05-05 13:03:04 +02:00
James Cole
f331e7d820 Removed unnecessary imports (use statements) [skip ci] 2015-05-05 12:57:27 +02:00
James Cole
cbb62d3d78 Added new line at the end of files. [skip ci] 2015-05-05 12:51:57 +02:00
James Cole
c85bc59c1d Merge branch 'release/3.4.0.1' into develop 2015-05-05 12:35:23 +02:00
James Cole
8081eeb007 Merge branch 'release/3.4.0.1' 2015-05-05 12:35:22 +02:00
James Cole
56f91bd10d Increment version. 2015-05-05 12:35:11 +02:00
James Cole
8e20b78731 Cleanup. 2015-05-05 10:30:39 +02:00
James Cole
23a09b7081 Code cleanup. 2015-05-05 10:23:01 +02:00
James Cole
67fdd27499 Various code cleanup [skip ci] 2015-05-05 07:51:02 +02:00
James Cole
e1941daedd Updated phpdoc. [skip ci] 2015-05-05 07:48:34 +02:00
James Cole
f28bc568a4 Some cleanup [skip ci] 2015-05-05 07:43:16 +02:00
James Cole
f24cfe39aa Expanded some tests. 2015-05-05 07:41:30 +02:00
James Cole
59d2bf3f79 Covered transaction controller. 2015-05-05 07:28:04 +02:00
James Cole
3176e54614 Partial coverage of the transaction controller. 2015-05-04 23:46:14 +02:00
James Cole
eb090f7265 Better factory. 2015-05-04 22:33:52 +02:00
James Cole
6d3a9bfd18 Some cleaning up 2015-05-04 22:33:03 +02:00
James Cole
76f08b7acb Full coverage for chart controller. 2015-05-04 19:28:49 +02:00
James Cole
1ff99346aa Update chart [skip ci] 2015-05-04 18:51:51 +02:00
James Cole
369695ab32 Update chart [skip ci] 2015-05-04 18:51:38 +02:00
James Cole
7e23dd1d66 Update composer.lock [skip ci] 2015-05-04 18:45:32 +02:00
James Cole
0205d3fc5c Overspent transactions have a separate colour [skip ci] 2015-05-04 18:45:20 +02:00
James Cole
4660cf2ad5 Fixed a bug in the display of the current currency code. 2015-05-03 16:16:43 +02:00
James Cole
e26d08d674 Update git ignore. [skip ci] 2015-05-03 16:14:15 +02:00
James Cole
0932bf2797 Don't need these files [skip ci] 2015-05-03 16:13:38 +02:00
James Cole
f560fc6d76 Covered search controller. 2015-05-03 15:55:19 +02:00
James Cole
aa6209af00 Covered tag controller. 2015-05-03 15:00:39 +02:00
James Cole
4a51176193 General cleanup. 2015-05-03 12:58:55 +02:00
James Cole
bb84f7a434 Fixed parameter order [skip ci] 2015-05-03 12:54:39 +02:00
James Cole
48168b1ef0 Covered report controller. 2015-05-03 11:02:34 +02:00
James Cole
8281c7c83e Don't escape currency symbol [skip ci] 2015-05-03 10:11:16 +02:00
James Cole
a07c1e3c71 See code. [skip ci] 2015-05-03 10:07:18 +02:00
James Cole
0766bb31fe Better amount formatting [skip ci] 2015-05-03 10:03:50 +02:00
James Cole
ff4472c1a5 FormatAmountPlain is HTML safe [skip ci] 2015-05-03 10:01:38 +02:00
James Cole
17424740e5 Show plain amount instead of coloured amounts. [skip ci] 2015-05-03 10:00:47 +02:00
James Cole
dad0b2fcd3 Show plain amount instead of coloured amounts. [skip ci] 2015-05-03 10:00:03 +02:00
James Cole
c48dbf030f Covered the reminder controller. 2015-05-03 09:55:22 +02:00
James Cole
617808d603 Covered profile controller with tests. 2015-05-03 09:19:14 +02:00
James Cole
845149deee Boxes are empty, so even when it's zero, place the amount. 2015-05-03 08:56:44 +02:00
James Cole
1a9e009327 Merge branch 'release/3.4' into develop 2015-05-02 23:51:45 +02:00
James Cole
ae90815708 Merge branch 'release/3.4' 2015-05-02 23:51:44 +02:00
James Cole
1c460343b7 New version! 2015-05-02 23:51:34 +02:00
James Cole
26079622f9 Fixed JSON controller tests. 2015-05-02 23:39:39 +02:00
James Cole
06c6d6096f Fixed coverage. 2015-05-02 23:28:04 +02:00
James Cole
c8183aea51 Format amount [skip ci] 2015-05-02 22:50:40 +02:00
James Cole
7531134ad2 Some tag related fine tuning. 2015-05-02 22:41:32 +02:00
James Cole
cd0c6439c2 Delete tags now possible. 2015-05-02 22:30:59 +02:00
James Cole
c918c93f51 Forget me own head next. [skip ci] 2015-05-02 22:13:37 +02:00
James Cole
97d3bd68ed Show balance act tags. 2015-05-02 22:12:26 +02:00
James Cole
75f1e034ae Fixed menu. [skip ci] 2015-05-02 22:09:21 +02:00
James Cole
8e72f218f1 Show HTML 2015-05-02 22:05:57 +02:00
James Cole
d643e05c5a Basic amount format fix. 2015-05-02 22:05:18 +02:00
James Cole
fea44834d0 Fixed test to match fixed controller. 2015-05-02 21:22:27 +02:00
James Cole
195a2d7523 Removed all the old views. 2015-05-02 21:18:04 +02:00
James Cole
b2fd346ef8 Merge branch 'feature/twig' into develop 2015-05-02 21:16:21 +02:00
James Cole
1ff8b62cb7 And now with actual coverage. 2015-05-02 19:44:31 +02:00
James Cole
c7ae15a41a This should fix all twig tests. Let's find out! 2015-05-02 19:44:12 +02:00
James Cole
efe6f59f79 Last templates. Should cover everything. [skip ci] 2015-05-02 19:19:47 +02:00
James Cole
8e31d0491d Fixed search [skip ci] 2015-05-02 18:30:59 +02:00
James Cole
73d4a10351 Fixed reports [skip ci] 2015-05-02 18:26:55 +02:00
James Cole
81d9d4dbc7 Various files updated to twig [skip ci] 2015-05-02 13:20:49 +02:00
James Cole
184ec13f99 Fixed bills [skip ci] 2015-05-02 12:51:02 +02:00
James Cole
dee0422eff Fix preferences [skip ci] 2015-05-02 12:22:19 +02:00
James Cole
81a2975f1a Show piggy banks [skip ci] 2015-05-02 11:32:45 +02:00
James Cole
5cd2ef4a5e Some generic templates and the first piggy bank ones [skip ci] 2015-05-02 10:53:54 +02:00
James Cole
466c2a68c2 Add delete form [skip ci] 2015-05-02 10:42:41 +02:00
James Cole
0fb9fba531 New currency routes 2015-05-02 10:40:20 +02:00
James Cole
356dd2c6cd Creat / edit / index [skip ci] 2015-05-02 10:37:16 +02:00
James Cole
32c4661233 Fixed no budget / no category bread crumb [skip ci] 2015-05-02 09:49:37 +02:00
James Cole
a245b504ec Fixed bread crumbs. 2015-05-02 09:31:57 +02:00
James Cole
a2f5fbdfd3 Working on two more views [skip ci] 2015-05-02 09:29:34 +02:00
James Cole
04be26adc5 Fixed title [skip ci] 2015-05-02 09:26:20 +02:00
James Cole
be0adb7cf2 Create / edit category 2015-05-02 09:25:45 +02:00
James Cole
84fd92bf5a Categories [skip ci] 2015-05-02 09:21:42 +02:00
James Cole
ee4e061739 Removed code from budget index [skip ci] 2015-05-02 09:21:32 +02:00
James Cole
4a2b01cd9a Menu fixes [skip ci] 2015-05-02 09:16:17 +02:00
James Cole
efdd6460fb Fixed injection. 2015-05-02 09:08:41 +02:00
James Cole
803827e05c Fixed more views. [skip ci] 2015-05-02 09:06:07 +02:00
James Cole
a41d5e9ab3 New budget [skip ci] 2015-05-02 08:32:20 +02:00
James Cole
e94333f877 Can view budgets [skip ci] 2015-05-02 08:28:24 +02:00
James Cole
6dbb80d687 Optimisations [skip ci] 2015-05-02 08:09:54 +02:00
James Cole
31a1031624 And delete is fixed. 2015-05-01 23:39:45 +02:00
James Cole
f8e9ce0d52 Can edit as well. 2015-05-01 23:35:35 +02:00
James Cole
11baa968cd Can create accounts. 2015-05-01 23:17:17 +02:00
James Cole
3e5e5b376f Made it almost to the accounts. 2015-05-01 22:44:35 +02:00
James Cole
bda18f296d Optimised Twig extensions. 2015-05-01 20:17:06 +02:00
James Cole
287d110c84 Small bug fix in budget chart. 2015-05-01 18:45:42 +02:00
James Cole
c98275e73a More templates converted to twig. 2015-05-01 18:44:49 +02:00
James Cole
aa573cc951 Fix redirect 2015-05-01 14:32:31 +02:00
James Cole
883d3d86e3 Update a test. 2015-05-01 14:32:26 +02:00
James Cole
fb047bd5f4 Fix migration. 2015-05-01 08:34:53 +02:00
James Cole
66a04d8365 Slightly different chart on index. 2015-05-01 08:34:44 +02:00
James Cole
a0e501f9fd First attempt at implementing Twig. 2015-05-01 08:29:41 +02:00
James Cole
8b40d3346d An attempt at showing tag info. 2015-05-01 06:47:24 +02:00
James Cole
eddf5cd250 Fix button, close #74 2015-05-01 06:38:48 +02:00
James Cole
ee5c534ca3 Took the time to fix the tests. 2015-04-30 17:32:00 +02:00
James Cole
fd4e77ae0f Catch empty tags. 2015-04-28 21:01:54 +02:00
James Cole
b747c50aa3 Fix method to return object, not key. 2015-04-28 21:00:26 +02:00
James Cole
deebdd86a6 And another small JS fix [skip ci] 2015-04-28 20:20:16 +02:00
James Cole
b2db79cc10 Fixed some small CSS / JS problems. 2015-04-28 20:17:31 +02:00
James Cole
bbab370b1e Some new code. 2015-04-28 17:10:52 +02:00
James Cole
db4adf399d Cleaning up. 2015-04-28 15:26:30 +02:00
James Cole
0683c87e52 Small check in tags. 2015-04-28 14:08:58 +02:00
James Cole
3f62b647fc Removed code related to "related transactions". 2015-04-28 13:50:53 +02:00
James Cole
2562a5b30d Don't save all tags unconditionally. 2015-04-28 13:47:13 +02:00
James Cole
e232f2e223 Delete tags 2015-04-28 11:04:46 +02:00
James Cole
21644ff4dd Routes will throw 404's 2015-04-28 11:04:38 +02:00
James Cole
be96a4fce5 Show tags in transaction. 2015-04-28 10:51:56 +02:00
James Cole
a1cabcbed3 Show tag icons. 2015-04-28 10:50:43 +02:00
James Cole
ce933b1f06 Edit and update tags. 2015-04-28 10:36:13 +02:00
James Cole
51ae130922 Fixed the build by adding new migrations for each step. 2015-04-28 09:54:22 +02:00
James Cole
da1bc18a47 Better list for piggy banks. 2015-04-28 09:15:31 +02:00
James Cole
e7165a526b First attempt at basic tag functionality. 2015-04-28 08:58:01 +02:00
James Cole
6081cc399f Small bug fixes and cleaning up. 2015-04-28 08:12:12 +02:00
James Cole
7c5c24e15d Moved edit buttons. 2015-04-26 07:42:55 +02:00
James Cole
e3e55b4347 Moved all create-buttons lower. 2015-04-26 07:39:49 +02:00
James Cole
40d8e7d1ad Fixed a bug where transfers away from a piggy bank's account would not properly reflect the piggy bank. 2015-04-24 12:06:13 +02:00
James Cole
59e23b89f2 Removed unnecessary sort. 2015-04-24 11:54:23 +02:00
James Cole
cc33af8193 Could not set order. 2015-04-24 10:00:56 +02:00
James Cole
0e1e7eb2a9 Merge branch 'release/3.3.9' 2015-04-22 08:08:14 +02:00
James Cole
52a28a7758 Merge branch 'release/3.3.9' into develop 2015-04-22 08:08:14 +02:00
James Cole
3f752d6832 New read me. 2015-04-22 08:08:05 +02:00
James Cole
fe714e9989 Built a routine that will allow you to completely delete an account. 2015-04-22 07:54:56 +02:00
James Cole
0d3213a379 Covered the preferences controller. 2015-04-21 17:19:14 +02:00
James Cole
44056629e8 Use local db instead of constant migrating. 2015-04-20 22:08:24 +02:00
James Cole
54125c05d3 New tests and prep for future runs. 2015-04-20 21:57:20 +02:00
James Cole
7d32e50f25 Mentioned wrong amount. 2015-04-20 20:56:28 +02:00
James Cole
4af9ff49a0 Fixed a bug in the report controller that grouped transactions wrong. 2015-04-20 20:54:55 +02:00
James Cole
23faef845c Merge branch 'release/3.3.8' 2015-04-20 18:07:02 +02:00
James Cole
41dad4091a Merge branch 'release/3.3.8' into develop 2015-04-20 18:07:02 +02:00
James Cole
daf859b977 Updated read me. 2015-04-20 18:06:37 +02:00
James Cole
f47ba6c977 Update example file. 2015-04-20 18:06:21 +02:00
James Cole
4b9b207d92 Removed development references. 2015-04-20 17:59:04 +02:00
James Cole
875cbf66af 1 should be 0 2015-04-19 19:10:53 +02:00
James Cole
412d6d4fd7 Small CSS fix for piggy banks [skip ci] 2015-04-19 17:43:04 +02:00
James Cole
91c6deeb1f Renamed another field. 2015-04-19 14:28:17 +02:00
James Cole
6d1978fd9a Showed the wrong value. 2015-04-19 14:27:08 +02:00
James Cole
52d23b6ef5 Referred to an id which turned out to be a index. 2015-04-19 14:19:25 +02:00
James Cole
0656ccbdd9 Fixed a bug where the query would include deleted transactions. 2015-04-19 13:57:43 +02:00
James Cole
e774ebd0a3 Possible bug in account create thing. [skip ci] 2015-04-18 16:04:21 +02:00
James Cole
edbda32a84 Fix balance. 2015-04-13 21:13:05 +02:00
James Cole
721fa04e3c Added home screen information about piggy banks. 2015-04-13 20:43:58 +02:00
James Cole
9fd8d8915d amount > queryAmount 2015-04-12 10:53:53 +02:00
James Cole
7a9f5ebdd1 Added "what" variable. 2015-04-12 10:22:15 +02:00
James Cole
a3423f0321 Add the correct path to category overview. 2015-04-12 10:19:37 +02:00
James Cole
c37e9a4467 Covered the JSON controller. 2015-04-11 19:59:41 +02:00
James Cole
6157d82a0b time format 2015-04-11 18:52:03 +02:00
James Cole
38b27fec92 Without moment.js 2015-04-11 18:49:57 +02:00
James Cole
c43439bb68 Test for date. 2015-04-11 18:47:37 +02:00
James Cole
8d9561d7a5 Removed data-value. 2015-04-11 18:45:01 +02:00
James Cole
2a72cce3b7 Included date format. 2015-04-11 15:11:45 +02:00
James Cole
d3bbb6fb1f Removed date value. 2015-04-11 15:11:19 +02:00
James Cole
7b6723e9a2 Update date format. 2015-04-11 15:10:29 +02:00
James Cole
1ee741460d Updated empty entries as well. 2015-04-11 15:09:48 +02:00
James Cole
967b0b493b Switched dates around. 2015-04-11 15:07:42 +02:00
James Cole
b53aaf7dde Fixed sort format. 2015-04-11 15:06:10 +02:00
James Cole
714c13bdbf Include moment.js 2015-04-11 15:04:16 +02:00
James Cole
651a4fd3cc Sortable accounts. 2015-04-11 15:01:42 +02:00
James Cole
505aee22bb Sortable categories. 2015-04-11 14:53:22 +02:00
James Cole
ca3d59dc33 Another fix. 2015-04-11 12:51:58 +02:00
James Cole
13890e32a1 Fixed a view and a botched include. 2015-04-11 12:50:56 +02:00
James Cole
df8976eabe Journals that no longer match a bill will be removed. 2015-04-11 12:40:47 +02:00
James Cole
3e01daa172 Query & loop optimizations. 2015-04-11 12:36:17 +02:00
James Cole
f6999f355b Some foreach loop cleaning up. 2015-04-11 12:27:56 +02:00
James Cole
5c06b45eb1 Code cleanup. 2015-04-11 07:32:11 +02:00
James Cole
1802bb967a Moved JSON money boxes to individual functions. 2015-04-11 07:24:07 +02:00
James Cole
d8d92f147f Removed logging, found bug. 2015-04-10 07:29:36 +02:00
James Cole
4a95bdd8ba Added temporary debug to google chart. 2015-04-10 07:25:24 +02:00
James Cole
db5d94d956 Added temporary debug entries. 2015-04-10 07:19:45 +02:00
James Cole
06f2e34bb5 Renamed the amount variable so it stops interfering with another variable 2015-04-10 06:57:39 +02:00
James Cole
2ef7a01945 Fixed a bug where the bill chart and boxes would inaccurately reflect the amount of bills yet to pay. 2015-04-10 06:52:36 +02:00
James Cole
d3f642551d Fixed a small bug in the bill-chart and simplified yet another Json box. 2015-04-09 21:36:58 +02:00
James Cole
490997157e Switched two queries around. 2015-04-09 21:30:35 +02:00
James Cole
2432af7883 Simplified the in and out-box. 2015-04-09 21:29:58 +02:00
James Cole
7abeece3f0 Simplified the "out"-box. 2015-04-09 21:27:35 +02:00
James Cole
3851652821 Renamed various fields from 'amount' to 'queryAmount' to prevent interfering with the getAmountAttribute property. 2015-04-09 21:18:18 +02:00
James Cole
1d67d2250a Renamed various fields from 'amount' to 'queryAmount' to prevent interfering with the getAmountAttribute property. 2015-04-09 21:16:35 +02:00
James Cole
37f40d8637 Renamed various fields from 'amount' to 'queryAmount' to prevent interfering with the getAmountAttribute property. 2015-04-09 21:14:15 +02:00
James Cole
0224d1d59b Accidentally commented out date limits in query. 2015-04-09 21:01:08 +02:00
James Cole
587b94153d Removed some foreach() routines that are no longer necessary now that getAmountAttribute() exists. 2015-04-09 20:58:57 +02:00
James Cole
5124ce0302 Fixed a bug where getAmountAttribute would interfere with queries that contained a "amount"-field. 2015-04-09 20:52:47 +02:00
James Cole
950c4045b0 Fix total savings to accurately reflect end of current period. 2015-04-09 19:10:24 +02:00
James Cole
9c8ba66873 Order categories by name. 2015-04-09 17:54:24 +02:00
James Cole
25d1d1be1b Merge pull request #72 from vbali/feature/savings-total
Add savings total for savings widget on dashboard
2015-04-09 17:47:24 +02:00
James Cole
339c352505 Fixed a bug where categories would be created even though they already existed. 2015-04-09 17:46:47 +02:00
Balazs Varkonyi
c587081fe4 Add savings total for savings widget on dashboard 2015-04-09 11:52:35 +02:00
James Cole
8f9b1b866b Included full home controller tests. 2015-04-07 20:54:43 +02:00
James Cole
ff5ecf6182 More tests. 2015-04-07 19:58:49 +02:00
James Cole
05670cf393 Optimize test code. 2015-04-07 18:52:15 +02:00
James Cole
f10f5d30bf Mock previously unmocked calls. 2015-04-07 18:48:34 +02:00
James Cole
0d336727e8 Automated code cleanup. 2015-04-07 18:26:14 +02:00
James Cole
bf354275b3 Some general cleaning up. 2015-04-07 18:25:21 +02:00
James Cole
1932bf277a More tests 2015-04-07 17:51:22 +02:00
James Cole
192db4bb6e Accidentally included JS twice. 2015-04-07 10:14:20 +02:00
James Cole
701efb943d Lots of new tests. 2015-04-07 10:14:10 +02:00
James Cole
b2674971f1 Updated composer.lock. 2015-04-06 09:20:45 +02:00
James Cole
c907cb4cf1 General cleanup and new (incomplete) tests. 2015-04-06 09:15:59 +02:00
James Cole
bb1462b4d9 Merge branch 'release/3.3.7' 2015-04-05 21:15:01 +02:00
James Cole
1035f0e139 Merge branch 'release/3.3.7' into develop 2015-04-05 21:15:01 +02:00
James Cole
8475757716 Removed iconv() commented code. See other commit. 2015-04-05 21:14:41 +02:00
James Cole
20ffd8d61b New read me. 2015-04-05 21:14:25 +02:00
James Cole
8601428c4c Fixed a bug in the form request that wouldn't accept fairly long names. 2015-04-05 21:12:54 +02:00
James Cole
59998573ee Removed iconv thing that doesn't seem to matter. See screenshot at https://imgur.com/8r26ZZu 2015-04-05 21:12:31 +02:00
James Cole
293cd72001 Add currency tests. 2015-04-05 20:47:19 +02:00
James Cole
22ab9ebb2f Included tests for the category controller. 2015-04-05 19:43:20 +02:00
James Cole
9136e592d3 Included bill controller. 2015-04-05 18:20:06 +02:00
James Cole
ed8e392616 Fixed budget controller tests. 2015-04-05 15:53:03 +02:00
James Cole
e57ce6e644 Test now works. 2015-04-05 15:25:35 +02:00
James Cole
8204e46086 Removed inspiring quotes. 2015-04-05 10:38:53 +02:00
James Cole
9e365d9f80 Mar tests. 2015-04-05 10:36:28 +02:00
James Cole
6b40a933e9 And.. completed the account controller. 2015-04-04 22:53:49 +02:00
James Cole
8520a5002f Another attempt at fixing some tests. I'm probably searching in the wrong direction with this. 2015-04-04 22:27:51 +02:00
James Cole
b38ed06f6e New tests. 2015-04-04 21:52:56 +02:00
James Cole
48427b1143 A mediocre fix for the database failures. 2015-04-04 21:33:36 +02:00
James Cole
5d505f4ed0 Fixed more tests but the factories are not perfect yet. 2015-04-04 21:23:37 +02:00
James Cole
0c02a08954 Merge pull request #65 from vbali/master
Fixes for chart and account creation
2015-04-04 06:50:30 +02:00
Balazs Varkonyi
0221bd0f80 Merge branch 'hotfix/diff–fix' 2015-04-04 01:56:25 +02:00
Balazs Varkonyi
28216cbcb5 Removed merge conflict from CategoryController 2015-04-04 01:56:19 +02:00
Balazs Varkonyi
3e08a8cd6b Merge branch 'hotfix/account-fix' 2015-04-04 01:37:05 +02:00
Balazs Varkonyi
67fafdeef7 Return the new account from firstOrCreateEncrypted 2015-04-04 01:36:55 +02:00
Balazs Varkonyi
cc82505b66 Merge branch 'hotfix/chart-fix' 2015-04-04 01:33:36 +02:00
Balazs Varkonyi
fd5f075f63 Chart fix for accounts with accented letters 2015-04-04 01:31:57 +02:00
James Cole
a115960411 Merge branch 'release/3.3.6'
Conflicts:
	app/Http/Controllers/CategoryController.php
2015-04-03 23:31:29 +02:00
James Cole
e9fa4ca816 New version in read me. 2015-04-03 23:30:54 +02:00
James Cole
75d92bc7f0 Allow FF to send events. 2015-04-03 23:22:23 +02:00
James Cole
74aa6e911e Make boxes respond to unpaid / paid credit card bills. 2015-04-03 23:10:51 +02:00
James Cole
9d000c1898 Added amount because debug. 2015-04-03 23:05:50 +02:00
James Cole
b2254875b2 Expanded to credit cards. 2015-04-03 22:54:21 +02:00
James Cole
78d04230d5 New CC help text. 2015-04-03 21:25:04 +02:00
James Cole
1c04477393 Support credit cards (in name only). 2015-04-03 21:12:54 +02:00
James Cole
2a9679c94e Textual fix in bill [skip ci] 2015-04-03 21:05:41 +02:00
James Cole
6009f8ecde Better chart for bills. 2015-04-03 21:05:01 +02:00
James Cole
35cdbec70a Clean up for budget limits. 2015-04-03 19:39:36 +02:00
James Cole
0faef542c1 Fixed a bug in the budget controller. 2015-04-03 19:11:55 +02:00
James Cole
8b085af6a1 First attempt at account controller::index. 2015-04-03 12:14:40 +02:00
James Cole
e3b11a9eb2 New test for edit form that is more inclusive. 2015-04-03 09:30:44 +02:00
James Cole
72fc88f3c6 Even more tests. 2015-04-03 08:55:24 +02:00
James Cole
a5b759f268 Updates TestCase.php 2015-04-03 08:37:53 +02:00
James Cole
6a9ffae25d New tests and factories. 2015-04-03 08:31:50 +02:00
James Cole
64c031c7fe Small updates [skip ci] 2015-04-03 07:44:44 +02:00
James Cole
720926c50d Tests now run without a database, as they should. 2015-04-03 07:33:18 +02:00
James Cole
36ec974284 Add heavy but working migrate routine. Will fix the tests but must be optimised. Also, should not be necessary. 2015-04-02 22:51:00 +02:00
James Cole
cff77c39e2 Update travis-ci and composer.lock and composer.json 2015-04-02 22:46:50 +02:00
James Cole
056a0a1736 Smaller boxes. 2015-04-02 22:43:12 +02:00
James Cole
f301da83c6 Fixed the tests. 2015-04-02 22:39:31 +02:00
James Cole
5362231efa Ignore virtual balance in select places. 2015-04-01 19:46:16 +02:00
James Cole
4bb14cad73 Allow virtual balance to be ignored. 2015-04-01 19:45:13 +02:00
James Cole
7f5188f5a4 Added something fancy called "virtual balance". 2015-04-01 19:42:14 +02:00
James Cole
a80b7aac6c Fix more redirections. 2015-04-01 18:59:34 +02:00
James Cole
83f32478fa Fixed more redirections. 2015-04-01 09:43:19 +02:00
James Cole
7578ec6801 Fix redirections in budget. 2015-04-01 09:40:19 +02:00
James Cole
e14a32f76f Also fix delete/destroy redirection routine. 2015-04-01 09:23:51 +02:00
James Cole
58faa189ac Can now actually store transactions without an expense / revenue account. 2015-04-01 09:17:07 +02:00
James Cole
9b4f87d44a Fix checkbox for edit screen. 2015-04-01 09:16:51 +02:00
James Cole
7830a64170 Fix redirect. 2015-04-01 09:16:41 +02:00
James Cole
8f0fa02107 Better redirection for new transactions. 2015-04-01 09:12:49 +02:00
James Cole
e000fb5d80 Optimized decryption. 2015-03-31 22:46:11 +02:00
James Cole
566fadad15 Add decryption routine. 2015-03-31 21:18:22 +02:00
James Cole
cf23858c10 Gokje. 2015-03-31 20:52:48 +02:00
James Cole
216a223617 Fix in year list. 2015-03-31 20:49:02 +02:00
James Cole
638f38d823 New flush method. 2015-03-31 20:46:37 +02:00
James Cole
98ee70f04e Fix range thing. 2015-03-31 20:45:06 +02:00
James Cole
b365db5a4b New hidden id field. 2015-03-31 20:39:28 +02:00
James Cole
02e55496df Remove reminders when piggy bank is reminded. 2015-03-31 20:22:51 +02:00
James Cole
e11e53913a Some new code + GA 2015-03-31 19:21:49 +02:00
James Cole
f8a5fb4225 Fixed tests. 2015-03-31 17:49:47 +02:00
James Cole
3a49450461 Made sure migrations can be rolled back. 2015-03-31 15:38:44 +02:00
James Cole
3c375fb955 Remove build stuff because sqlite does not work with change things. 2015-03-31 15:24:13 +02:00
James Cole
011fea2cc6 Fix encryption in home chart. 2015-03-31 15:10:22 +02:00
James Cole
a079eec2cb Better unicity for objects. 2015-03-31 14:16:25 +02:00
James Cole
776b37f4ea Clean up some code, optimise the 503 error. 2015-03-30 21:24:56 +02:00
James Cole
a4d8bbe3da Fixed a bug where certain types of accounts could not be validated. 2015-03-30 20:16:33 +02:00
James Cole
72166743fa Merge branches 'develop' and 'develop' of https://github.com/JC5/firefly-iii into develop 2015-03-30 20:08:40 +02:00
James Cole
c4312c0b11 Extra large code cleanup. 2015-03-30 20:08:27 +02:00
James Cole
38ba645415 Add hidden-xs class. 2015-03-30 09:23:18 +02:00
James Cole
ac12a47071 Hide inactive budgets when there are none. 2015-03-29 21:29:37 +02:00
James Cole
bea321939e Code rearrange and optimise. 2015-03-29 21:27:51 +02:00
James Cole
210f84b6ea Allow edit from budget overview, and allow changing of active setting. 2015-03-29 21:27:13 +02:00
James Cole
d4c642741f Fixed division by zero. 2015-03-29 21:09:33 +02:00
James Cole
e6b1b58379 Enable inactive budgets. 2015-03-29 19:50:29 +02:00
James Cole
8d982c1a90 Some extensions. 2015-03-29 19:44:59 +02:00
James Cole
be10e836dc Updated composer.lock 2015-03-29 19:40:22 +02:00
James Cole
9be05e7e17 Small optimisations. 2015-03-29 18:28:49 +02:00
James Cole
bd96b2819f Removed double code. 2015-03-29 12:32:00 +02:00
James Cole
f601af3da0 Cleaned up report controller. 2015-03-29 12:25:46 +02:00
James Cole
70a01c082b Removed some double code. 2015-03-29 12:12:06 +02:00
James Cole
bcf066ead7 Cleaned up some double code. 2015-03-29 11:51:26 +02:00
James Cole
24dd3578ed Merge branch 'release/3.3.5' into develop 2015-03-29 08:43:55 +02:00
James Cole
d5c39d54d8 Merge branch 'release/3.3.5' 2015-03-29 08:43:54 +02:00
James Cole
6e3f6abc67 New read me. 2015-03-29 08:43:46 +02:00
James Cole
463201df2c New gitignore. 2015-03-29 08:43:03 +02:00
James Cole
a7501c396f Renamed some methods. 2015-03-29 08:24:56 +02:00
James Cole
4c8bc49a7e Add newlines. 2015-03-29 08:22:48 +02:00
James Cole
f254674f88 Add newlines. 2015-03-29 08:21:33 +02:00
James Cole
a97c267378 Added new lines 2015-03-29 08:20:37 +02:00
James Cole
eaa947894b Updated composer.son 2015-03-29 08:20:30 +02:00
James Cole
fb3a26510b Removed some unused use statements. 2015-03-29 08:20:20 +02:00
James Cole
bfe8b14e49 Cleaned up. 2015-03-29 08:18:15 +02:00
James Cole
afb47eb742 Add newlines. 2015-03-29 08:14:32 +02:00
James Cole
ba97f96288 Removed unused use statements. 2015-03-29 08:03:53 +02:00
James Cole
ecbafb8f4b Removed commented out code. 2015-03-29 07:59:18 +02:00
James Cole
12d3800d67 Removed unused use statements. 2015-03-29 07:51:56 +02:00
James Cole
d586b82372 New composer.son file. 2015-03-29 07:45:14 +02:00
James Cole
ba9877c9b4 Add typehints to object parameters 2015-03-29 07:43:20 +02:00
James Cole
907933f3df Removed debug logic and bad operators. 2015-03-29 07:32:24 +02:00
James Cole
2e91d21a88 Add return to form routine to budgets. 2015-03-28 18:22:36 +01:00
James Cole
dca395a018 Merge branch 'release/3.3.4' 2015-03-28 17:45:56 +01:00
James Cole
625070a5b9 Merge branch 'release/3.3.4' into develop 2015-03-28 17:45:56 +01:00
James Cole
f875c7cbf5 Updated read me file. 2015-03-28 17:45:46 +01:00
James Cole
eed88fc103 Don't fail on repeated piggy banks, just log it. 2015-03-28 17:45:15 +01:00
James Cole
6fc54d1d27 Fixed the tests 2015-03-28 07:00:53 +01:00
James Cole
0ef52bf909 Remove recurring transactions [skip ci] 2015-03-28 06:59:43 +01:00
James Cole
95e34af6ef Update script [skip ci] 2015-03-28 06:51:54 +01:00
James Cole
650b99ead2 Ignore apple files. [skip ci] 2015-03-28 06:50:26 +01:00
James Cole
57941a19de Excutable. 2015-03-28 06:48:54 +01:00
James Cole
6157db0b6a Some new tests 2015-03-28 06:48:38 +01:00
James Cole
c9358acf5d Update tests and token replace routine. 2015-03-28 06:25:36 +01:00
James Cole
ed29eb8a5d New lock file. 2015-03-28 06:19:37 +01:00
James Cole
bcf7452312 Some new tests. 2015-03-28 06:19:09 +01:00
James Cole
b9000519e4 Fixed unique piggy check. 2015-03-27 20:20:52 +01:00
James Cole
2694297466 Fixed a bug where start / end would be used incorrectly. 2015-03-27 19:48:55 +01:00
James Cole
53ff5c1490 Wrong operator, 2015-03-27 19:47:31 +01:00
James Cole
32a036b076 Add certainty to chart. 2015-03-27 19:45:47 +01:00
James Cole
aae2ab2693 Unnecessary if statement. 2015-03-27 19:43:53 +01:00
James Cole
4ef23e28a3 Update year report. 2015-03-27 19:43:20 +01:00
James Cole
38beb7f8d2 Fallback. 2015-03-27 19:42:35 +01:00
James Cole
0129a66906 Debug hidden accounts in year reports. 2015-03-27 19:37:00 +01:00
James Cole
45bced7b34 Hide accounts with no activity during a year. 2015-03-27 19:34:37 +01:00
James Cole
7f5a55dffb Small updates to read me. 2015-03-27 19:21:51 +01:00
James Cole
80289df6d3 Capital letter 2015-03-27 18:58:28 +01:00
James Cole
2115c3ced8 Read me 2015-03-27 18:58:11 +01:00
James Cole
1c2d0e6618 Updated read me file 2015-03-27 18:57:49 +01:00
James Cole
ea4f7f79ce Removed more references. 2015-03-27 18:17:15 +01:00
James Cole
b17f8ac311 Removed references to repeated expenses. 2015-03-27 18:15:10 +01:00
James Cole
6870d13b72 Removed repeated expenses. 2015-03-27 18:14:17 +01:00
James Cole
81fa304fd2 Removed repeated expenses. 2015-03-27 18:13:53 +01:00
James Cole
a663ddb0d9 Hide accounts with no activity. 2015-03-27 13:39:12 +01:00
James Cole
f7969afc22 Hide accounts with no activity in budget report. 2015-03-27 13:36:33 +01:00
James Cole
52ce4cd313 Resort array. 2015-03-27 13:25:46 +01:00
James Cole
247175881f Moved some code. 2015-03-27 13:24:04 +01:00
James Cole
fcf5009338 Moved some code around. 2015-03-27 13:20:48 +01:00
James Cole
12542d8f63 Auto fill transaction descriptions. 2015-03-27 13:16:14 +01:00
James Cole
e94194e28b New favicon. 2015-03-27 13:04:53 +01:00
James Cole
115499f3b2 New favicon. 2015-03-27 11:59:07 +01:00
James Cole
12af05b94f Only display budgets when there's money in the envelope or when there's money spent. 2015-03-27 09:43:29 +01:00
James Cole
88b83d8164 Merge branch 'release/3.3.3' into develop 2015-03-27 09:36:04 +01:00
James Cole
fcc22c692a Merge branch 'release/3.3.3' 2015-03-27 09:36:03 +01:00
James Cole
a876e8005c New version. 2015-03-27 09:35:52 +01:00
James Cole
2288e3705a Fixed order view. 2015-03-27 09:29:14 +01:00
James Cole
e8b58154e0 Bug fix. 2015-03-27 09:24:26 +01:00
James Cole
4393475af3 Remove debug. 2015-03-27 09:22:08 +01:00
James Cole
3fc560597c Validation bug. 2015-03-27 09:21:09 +01:00
James Cole
9f9af0b693 Moved to account list. 2015-03-27 08:11:13 +01:00
James Cole
a83fe2caea Correct ordering (everywhere). 2015-03-27 07:32:06 +01:00
James Cole
30c5376217 Fix order. 2015-03-27 07:29:01 +01:00
James Cole
6dddd6629d Thing with order and should fix Travis. 2015-03-27 07:20:32 +01:00
James Cole
f80de12cb5 Fix sorting. 2015-03-26 22:53:34 +01:00
James Cole
544ffca3a5 Sortable transactions. 2015-03-26 22:52:49 +01:00
James Cole
e0730c7b39 Fixed double named accounts. 2015-03-26 18:05:23 +01:00
James Cole
3d59d141c4 Push! 2015-03-26 17:46:08 +01:00
James Cole
ccddc2623d Merge branch 'develop' of github.com:JC5/firefly-iii into develop 2015-03-26 17:45:58 +01:00
James Cole
fcc47b58b4 Return to edit / create screen when user indicates. 2015-03-26 17:45:03 +01:00
James Cole
f67ac2e25e Update AccountController.php 2015-03-26 14:50:49 +01:00
James Cole
26127c9ccf Update AccountController.php 2015-03-26 14:49:02 +01:00
James Cole
d624efa799 Fix registration bug. 2015-03-25 22:30:36 +01:00
James Cole
ed3d40a4e0 Whoops. 2015-03-25 22:29:32 +01:00
James Cole
6e90ce5496 Cant dismiss reminders again. 2015-03-25 19:12:33 +01:00
James Cole
ab851b1be4 Fixed transfers 2015-03-25 17:44:06 +01:00
James Cole
340de53825 Use normal logging. 2015-03-25 17:42:33 +01:00
James Cole
a867b60af0 Update CategoryController.php 2015-03-25 16:14:28 +01:00
James Cole
26eafb0bd2 Update CategoryController.php 2015-03-25 16:13:39 +01:00
James Cole
0dbe44764b Update GoogleChartController.php 2015-03-25 16:00:06 +01:00
James Cole
2159df6802 Update GoogleChartController.php
Fixed chart.
2015-03-25 15:58:37 +01:00
James Cole
23389b9f17 Update FireflyValidator.php
Update uniqueForUser.
2015-03-25 15:56:32 +01:00
James Cole
6d3e3b894a Update AccountFormRequest.php
Update rules to include belongsToUser.
2015-03-25 15:55:39 +01:00
James Cole
55340aefa3 Remove code. 2015-03-24 21:06:45 +01:00
James Cole
94bc751e41 Sum starts at 0. 2015-03-24 21:05:15 +01:00
James Cole
89259c11e2 Fix chart. 2015-03-24 21:04:53 +01:00
James Cole
6bbaf1523c Fixed a bug in relevantOnDate 2015-03-24 21:00:42 +01:00
James Cole
fa3f18b60f Expand log for event. 2015-03-24 20:56:58 +01:00
James Cole
3dc794002f This should catch the missing piggy bank events. 2015-03-24 20:54:25 +01:00
James Cole
f50b133f2e Cleaned up some icons, improved routine for repeated expenses. 2015-03-21 21:33:52 +01:00
James Cole
1d6f6d28c9 Update font in calendar. 2015-03-21 10:29:25 +01:00
James Cole
c913de3c8b Fix percentage. 2015-03-21 08:56:24 +01:00
James Cole
bbc7b54a38 Catch 0 start balance. 2015-03-21 08:55:55 +01:00
James Cole
05fa1b40d1 Support > 100% 2015-03-21 08:53:43 +01:00
James Cole
6a88c8634d Added a block with savings. 2015-03-21 08:51:34 +01:00
James Cole
8ae1efa230 Added type savings account. 2015-03-20 23:17:59 +01:00
James Cole
ab8df4c8ab Fixed css reference. 2015-03-20 22:50:50 +01:00
James Cole
c259a46ed3 Clean up sql codes. 2015-03-20 22:39:07 +01:00
James Cole
5dc0677599 Fixed search sort 2015-03-20 18:30:17 +01:00
James Cole
7ed662ecc2 Fixed search in encrypted entries. 2015-03-20 18:21:14 +01:00
James Cole
4361cc69d4 Update font options in charts. 2015-03-20 15:54:40 +01:00
James Cole
461cbcbc28 Update to use Roboto font. 2015-03-20 13:34:59 +01:00
James Cole
09ae6c488b Fixed a bug where the session date would be edited by a chart. 2015-03-20 08:16:16 +01:00
James Cole
271a0ade26 Add code coverage to phpunit. 2015-03-18 22:24:54 +01:00
James Cole
4b076d227a Touch db so it can be created. 2015-03-18 22:17:18 +01:00
James Cole
3c4e7158a1 Config for test database. 2015-03-18 22:16:00 +01:00
James Cole
0b16765f37 Add sudo: false to enable container based builds. 2015-03-18 21:51:56 +01:00
James Cole
20c2ff3443 Add debug output to phpunit. 2015-03-18 21:43:19 +01:00
James Cole
96f2e598f4 Better position for titles. 2015-03-16 19:03:52 +01:00
James Cole
7374f0f9dd Removed Material Design. 2015-03-16 18:02:52 +01:00
James Cole
ccc44a74a0 Removed debug information. 2015-03-15 19:02:33 +01:00
James Cole
66cd63a68d Fixed a bug. 2015-03-15 18:08:52 +01:00
James Cole
decf7e5485 Set order in title. 2015-03-15 18:02:40 +01:00
James Cole
063c8025aa Allow piggy banks to be ordered. 2015-03-15 18:00:33 +01:00
James Cole
2fa7d2bd56 Add some text alignments. 2015-03-15 14:24:25 +01:00
James Cole
e55e7bce74 Misspelled a class name. 2015-03-15 14:23:26 +01:00
James Cole
f572445a65 Small updates. 2015-03-15 09:34:57 +01:00
James Cole
8b4f656d90 Switched to Google Material design line charts. 2015-03-15 08:38:12 +01:00
James Cole
6c1e093ebd Merge branch 'release/3.3.2' into develop 2015-03-14 22:06:12 +01:00
James Cole
6dd1b4537a Merge branch 'release/3.3.2' 2015-03-14 22:06:11 +01:00
James Cole
39ca9bea72 Update read me. 2015-03-14 22:06:01 +01:00
James Cole
999103277e Updated composer. 2015-03-14 22:05:36 +01:00
James Cole
3cc57ab89c Remove hash routine from user model. 2015-03-14 22:00:57 +01:00
James Cole
4e830079de New icon. 2015-03-14 17:31:17 +01:00
James Cole
ea7231e9fe Update mail config. 2015-03-14 17:25:35 +01:00
James Cole
ddfaca6d0c Cleanup and added some icons. 2015-03-14 17:21:43 +01:00
James Cole
3b11bd0593 Fixed some basic tests. 2015-03-13 08:44:07 +01:00
James Cole
3f89057528 Fixed a bug where the home budget chart would not actually list transactions without a budget. 2015-03-13 07:10:26 +01:00
James Cole
2f1073712f Merge pull request #63 from niekvanderkooy/fix-migrations
Fix migrations
2015-03-13 07:00:55 +01:00
James Cole
678e504c48 Fix charts to match report. 2015-03-10 20:26:52 +01:00
James Cole
e69545fd95 Include shared accounts. 2015-03-10 20:07:02 +01:00
James Cole
a7ed025cd6 Fine tune query. 2015-03-10 20:05:27 +01:00
James Cole
3d8e1f2484 Forgot the javascript. 2015-03-10 20:03:44 +01:00
James Cole
c38c9608da Fine tune query. 2015-03-10 20:01:49 +01:00
James Cole
2396b75e3c Fine tune income. 2015-03-10 20:00:43 +01:00
James Cole
e5c19b7562 Small fixes. 2015-03-10 19:58:05 +01:00
James Cole
114788567d More code for previous. 2015-03-10 19:57:20 +01:00
James Cole
17ae4b7d2a See if we can easily generate reports with shared accounts. 2015-03-10 19:51:24 +01:00
Niek van der Kooy
12d652bd0e We cannot entirely drop the foreign key constraint, since it is originally created (and dropped) in v3.2.1. 2015-03-10 18:25:23 +01:00
Niek van der Kooy
ff1bed97b8 We need to include models we use
Probably some left over L5 migration stuff, since you wouldn't notice it until reversing a migration
2015-03-10 18:24:28 +01:00
Niek van der Kooy
56490f0e84 Fix error when reverting changed migration.
When reverting changed migration, the down would fail because the foreign key constraint has to be dropped before you are able to rename the column.
2015-03-10 18:04:31 +01:00
James Cole
0b028a8923 Correctly order account names. 2015-03-10 17:26:31 +01:00
James Cole
43ac541cb8 Add reminders to top right menu. 2015-03-08 20:27:07 +01:00
James Cole
5218443678 Can now successfully act on reminders. 2015-03-08 20:20:58 +01:00
James Cole
d9028ed9b7 Small optimizations to the reminders 2015-03-08 09:00:04 +01:00
James Cole
9b9bd11ebb Small fix to table fix. 2015-03-07 19:42:45 +01:00
James Cole
07011ec5f7 Tiny chart improvement because I said so 2015-03-07 19:41:56 +01:00
James Cole
c3990ac32f Small updates to icons and code. 2015-03-07 12:34:03 +01:00
James Cole
081ff3ff55 View single reminder. 2015-03-07 09:29:43 +01:00
James Cole
93996ada96 Expanded reminders. 2015-03-07 09:21:06 +01:00
James Cole
a60671d4c1 First stuff for acting on reminders. 2015-03-06 20:33:23 +01:00
James Cole
3f716cc369 First new display of piggy bank reminders. 2015-03-06 17:23:29 +01:00
James Cole
9f23cffd1b Clean up code. 2015-03-06 15:26:21 +01:00
James Cole
07c416cfbf Fix set reminder. 2015-03-06 15:24:36 +01:00
James Cole
389fcc1c8d Update reminder in database. 2015-03-06 15:21:44 +01:00
James Cole
fa07811375 Add logging for debug purposes. 2015-03-06 15:18:07 +01:00
James Cole
fc91a50979 Reimplemented a routine that creates reminders. Cannot act on them yet. 2015-03-06 15:12:07 +01:00
James Cole
f9c518f321 Smaller font for boxes. 2015-03-06 10:10:07 +01:00
James Cole
015b439f0d New icons. 2015-03-06 08:30:15 +01:00
James Cole
0675622508 Experiment with boxes. 2015-03-06 08:20:27 +01:00
James Cole
e9969bdd5f Update the ranges to reflect the current dates. 2015-03-05 21:13:38 +01:00
James Cole
1139f950ed Fixed some views. 2015-03-04 21:11:47 +01:00
James Cole
284732c7a6 Better list for bills. 2015-03-04 20:58:57 +01:00
James Cole
0cb0720d8b No popup when the amount is zero. 2015-03-04 20:57:40 +01:00
James Cole
8ad1ede0c5 Popups in the reports as we've always promised. 2015-03-04 20:47:00 +01:00
James Cole
a349aac8a4 Fix balance thing. 2015-03-04 19:09:57 +01:00
James Cole
83b169c6ef Search related transfers, cleanup. 2015-03-04 16:04:17 +01:00
James Cole
49c37baac5 Update to related manager. 2015-03-04 15:30:44 +01:00
James Cole
8d62088576 Order bills. 2015-03-04 09:44:48 +01:00
James Cole
f5437a17f8 Lots of changes. 2015-03-04 09:42:47 +01:00
James Cole
92af4e5c96 Layout tweaks. 2015-03-04 05:12:05 +01:00
James Cole
0619adb0cd Support any bill in any range. 2015-03-03 17:40:17 +01:00
James Cole
65a5107854 Small layout updates. 2015-03-03 09:35:06 +01:00
James Cole
0fcc1e252b Mail user registration confirmation. 2015-03-03 09:29:02 +01:00
James Cole
4b7f817475 Removed panel for table. 2015-03-03 09:19:16 +01:00
James Cole
0439599971 Layout update. 2015-03-03 09:15:28 +01:00
James Cole
fa344d5308 Do not update when no event connected. 2015-03-03 08:46:14 +01:00
James Cole
f0316f09ed Do not over / undercorrect 2015-03-02 20:29:10 +01:00
James Cole
b1af6bab28 Cleaning up and bug fixing. 2015-03-02 20:05:28 +01:00
James Cole
ad2aebb54d Sort account list. 2015-03-02 15:46:31 +01:00
James Cole
23fc652092 Table border. 2015-03-02 15:45:24 +01:00
James Cole
f0a5756f25 Add a panel-body for the layout. 2015-03-02 15:45:00 +01:00
James Cole
14c7ad201a Paginated the account list. 2015-03-02 15:44:06 +01:00
James Cole
08ca3c89d3 Expanded account view. 2015-03-02 15:27:36 +01:00
James Cole
edda470bf8 Add everything range 2015-03-02 13:19:13 +01:00
James Cole
7183d72e5c Update chart to include other budget repetitions. 2015-03-02 12:50:51 +01:00
James Cole
5e38ebfce5 Merge branch 'feature/date-range' into develop 2015-03-02 12:35:34 +01:00
James Cole
56e36847a5 New code for new date range thing. 2015-03-02 12:35:14 +01:00
James Cole
6dba916d02 New code & css for date range. 2015-03-02 12:04:40 +01:00
James Cole
fd57086ffd Better mostly report lists. 2015-03-02 11:54:20 +01:00
James Cole
d98d366eea Some small bug fixes in the account views. 2015-03-02 11:42:27 +01:00
James Cole
b261b0b447 Shared expense should of course be shared asset. 2015-03-02 11:27:46 +01:00
James Cole
c6042a9053 Try to fix modal dialog for piggy banks. 2015-03-01 19:47:42 +01:00
James Cole
ae1245abec Fixed update transactions. 2015-03-01 19:31:00 +01:00
James Cole
e26d2376fc Fixed piggy bank delete routine. 2015-03-01 19:26:30 +01:00
James Cole
bb36ad64a7 Moved the form. 2015-03-01 13:39:16 +01:00
James Cole
262d4f92d4 Fixed a bug where consecutive payments from one source would not be summed up. 2015-03-01 10:55:20 +01:00
James Cole
675530458c Account show didn't show anything. 2015-03-01 10:44:10 +01:00
James Cole
19e34b460f Update event. 2015-03-01 08:34:59 +01:00
James Cole
dddb8cdbc0 This loops. 2015-03-01 08:25:12 +01:00
James Cole
0d0df5f143 Scan bills when editing and creating journals. 2015-03-01 08:15:24 +01:00
James Cole
d1cf683f57 Some layout and content updates 2015-03-01 07:50:26 +01:00
James Cole
d099c33e5b No more code climate for now. 2015-02-27 21:40:49 +01:00
James Cole
21fb41545b Now with son_path variable. 2015-02-27 21:24:14 +01:00
James Cole
4c56814785 Do code coverage from phpunit. 2015-02-27 21:15:21 +01:00
James Cole
cffe05e22b Add coveralls to composer.json 2015-02-27 21:01:18 +01:00
James Cole
4237850299 Restoring code coverage 2015-02-27 20:52:49 +01:00
James Cole
b5fc36a8e1 Clean up test stuff. 2015-02-27 20:46:39 +01:00
James Cole
4586c1ef52 Removed all test cases. 2015-02-27 20:45:17 +01:00
James Cole
2722f0b749 Merge branch 'release/3.3.1' 2015-02-27 20:42:12 +01:00
James Cole
d6cf7c4872 Merge branch 'release/3.3.1' into develop 2015-02-27 20:42:12 +01:00
James Cole
3aedfed432 Updated version. 2015-02-27 20:42:04 +01:00
James Cole
edeaf13259 New CSS / JS code. 2015-02-27 18:05:40 +01:00
James Cole
c1290c4e9b Forgot to commit one view. 2015-02-27 16:53:06 +01:00
James Cole
b2c1527b17 Lost a lot of stuff along the way. 2015-02-27 16:48:33 +01:00
James Cole
a4a65ea56e Merge branch 'release/3.3' into develop 2015-02-27 16:15:30 +01:00
James Cole
ccf0e1875e Merge branch 'release/3.3' 2015-02-27 16:15:29 +01:00
James Cole
9c009aceaf Updated the readme. 2015-02-27 16:15:16 +01:00
James Cole
da4b1c7276 Merge branch 'laravel5' into develop
Conflicts:
	resources/views/reports/month.blade.php

Upgraded to Laravel 5.
2015-02-27 16:13:36 +01:00
James Cole
add098d5c0 Update example environment file and composer lock. 2015-02-27 16:09:00 +01:00
James Cole
aca096548c Fixed user login and authentication. 2015-02-27 16:08:46 +01:00
James Cole
75aa3abcae Update and create transactions. 2015-02-27 14:27:04 +01:00
James Cole
e685d262cc Sub/addDay routine to fix the account list. 2015-02-27 12:55:24 +01:00
James Cole
d2599d6ef9 Removed a subDay() call that ruined some reports. 2015-02-27 12:54:24 +01:00
James Cole
cd5223d98d Removed a group clause that broke the budget report. 2015-02-27 12:15:58 +01:00
James Cole
7b68d9047d Order budgets by name. 2015-02-27 12:02:14 +01:00
James Cole
9a7ea06d66 Order budgets by name 2015-02-27 11:58:49 +01:00
James Cole
c69ef34ac9 Order accounts by name. 2015-02-27 11:57:47 +01:00
James Cole
021999d05f Ignore .env file. 2015-02-27 11:46:07 +01:00
James Cole
6054430a5e Remove default .env file. 2015-02-27 11:45:47 +01:00
James Cole
8f578ed95a Search controller. 2015-02-27 11:09:23 +01:00
James Cole
fc5c339e27 Repeated expenses. 2015-02-27 11:02:08 +01:00
James Cole
defad3d820 More code. 2015-02-25 21:19:06 +01:00
James Cole
c0f96aa948 Piggy banks 2015-02-25 19:32:33 +01:00
James Cole
f2eae2fc98 Implemented the help. 2015-02-25 16:10:02 +01:00
James Cole
0e4f786978 Fixed currencies. 2015-02-25 15:57:43 +01:00
James Cole
d36b2318fd New code for bills. 2015-02-25 15:19:14 +01:00
James Cole
d83b508bbc Add and remove transactions. 2015-02-24 22:53:38 +01:00
James Cole
5b9c2cdc13 Newly converted code. 2015-02-24 21:10:25 +01:00
James Cole
49066c282a Updates 2015-02-23 21:55:52 +01:00
James Cole
3e28c0c00a Extra report and cleanup. 2015-02-23 21:19:16 +01:00
James Cole
220d689f69 Reports! 2015-02-23 20:25:48 +01:00
James Cole
5a0a28a04c Stuff for categories. 2015-02-22 16:19:32 +01:00
James Cole
b44e69e09b Fixed tests. 2015-02-22 15:45:32 +01:00
James Cole
fcbe10f5ec New code. 2015-02-22 15:40:13 +01:00
James Cole
182fe170fd Up to budgets now! 2015-02-22 09:46:21 +01:00
James Cole
184e9bdaf6 Fixed even more tests! 2015-02-22 08:38:46 +01:00
James Cole
0096f50cde Update month.blade.php
Add decryption routine.
2015-02-21 12:20:42 +01:00
James Cole
460f14deca Some new code. 2015-02-21 12:16:41 +01:00
James Cole
910ad45bee Update test [skip ci] 2015-02-14 17:35:45 +01:00
James Cole
74e319855d Updated the test to be more dynamic. 2015-02-14 17:31:51 +01:00
James Cole
9af0fb4cd5 Update tests 2015-02-14 16:22:33 +01:00
James Cole
185f5cce29 environment files. 2015-02-14 16:13:28 +01:00
James Cole
aca1174566 New git ignore. 2015-02-14 16:11:20 +01:00
James Cole
e791f7fde2 Fixed test. 2015-02-14 15:53:56 +01:00
James Cole
7bba7fcf66 Should fix the test. 2015-02-14 14:31:43 +01:00
James Cole
1d78f98ec8 This should complete the account handler. 2015-02-14 14:25:29 +01:00
James Cole
7ed2e03654 Merge pull request #62 from kilya11/master
Handle foreign keys
2015-02-11 14:29:19 +01:00
Ilya Kil
549e0f3477 Handle foreign keys
Installation fails without these changes
2015-02-11 13:19:24 +01:00
James Cole
7785ec0222 Code cleanup. 2015-02-11 07:35:10 +01:00
James Cole
ca504965f9 Should allow to store new accounts. 2015-02-09 07:56:24 +01:00
James Cole
3841259779 First attempt at storing an account. 2015-02-09 07:23:39 +01:00
James Cole
169d1065cc Removed debug 2015-02-08 09:45:00 +01:00
James Cole
e864f5507a No exit is kind of cheating. 2015-02-08 09:35:09 +01:00
James Cole
434b4ded4a Reimplemented forms, added an overdue fix. 2015-02-08 01:15:15 +01:00
James Cole
3d01669cea Reinstated soft deletes, added first steps for account controller. 2015-02-07 23:19:28 +01:00
James Cole
1499b2cd40 Login and some routes fixed. 2015-02-07 22:50:47 +01:00
James Cole
6b54ef8398 More code. 2015-02-07 13:15:40 +01:00
James Cole
07ad43f7a2 Updated models and tests to match. 2015-02-07 12:15:53 +01:00
James Cole
72e72c60c2 Laravel 4 > Laravel 5 2015-02-07 12:00:31 +01:00
James Cole
f9a242d33e Updated codeception config. 2015-02-07 11:05:56 +01:00
James Cole
b0f43eaa07 Moved C3 handler. 2015-02-07 11:01:47 +01:00
James Cole
b02046b884 Moar packages! 2015-02-07 10:52:51 +01:00
James Cole
864c931ee9 Fixed factory muffin 2015-02-07 10:46:14 +01:00
James Cole
5cd8da6d91 Added factory muffin. 2015-02-07 10:42:40 +01:00
James Cole
4a4671c2ae Add debug info to codeception 2015-02-07 10:39:36 +01:00
James Cole
8de142cd9a Add c3 code coverage. 2015-02-07 10:38:27 +01:00
James Cole
1a42bec51c Database in the right spot. 2015-02-07 10:32:15 +01:00
James Cole
577e38759e Try again. 2015-02-07 10:30:41 +01:00
James Cole
9cdf43a2c9 Commit new env files. 2015-02-07 10:24:54 +01:00
James Cole
62d43c2cb2 Lets see fit his works. 2015-02-07 10:16:14 +01:00
James Cole
2dc67d1674 Added all the old test things. 2015-02-07 08:42:20 +01:00
James Cole
fb1c78c657 Chart re-implemented and added coveralls and other instructions, which will probably not work at all. 2015-02-07 08:23:44 +01:00
James Cole
37e58ac13a Fixed more of the index. 2015-02-07 06:49:24 +01:00
James Cole
de715c14be Some new stuffs. 2015-02-06 21:23:14 +01:00
James Cole
c4d8a0da05 Fixed the range thing 2015-02-06 20:43:19 +01:00
James Cole
1b54b14671 All kinds of new stuff. 2015-02-06 19:33:31 +01:00
James Cole
a92efbc55f Exceptions. 2015-02-06 19:31:38 +01:00
James Cole
1bd02529e0 New resources mostly. 2015-02-06 07:23:26 +01:00
James Cole
bc16298b6e Some updates. 2015-02-06 05:35:00 +01:00
James Cole
804a97cad7 References 2015-02-06 05:14:27 +01:00
James Cole
ab52bdec15 Not changed much 2015-02-06 05:05:40 +01:00
James Cole
ddc3e82c14 Update references 2015-02-06 05:04:06 +01:00
James Cole
57691471bb Updated models and imports. 2015-02-06 05:01:24 +01:00
James Cole
c502dd445b New and old code. 2015-02-06 04:52:16 +01:00
James Cole
ed475b1b9c Database & seeds. 2015-02-06 04:41:00 +01:00
James Cole
df165a817c Fresh L5 installation. 2015-02-06 04:39:52 +01:00
James Cole
d16015d625 Moved all old code for Laravel 5. 2015-02-06 04:27:37 +01:00
James Cole
a4b3bf3ef4 Moved to hidden "stash" directory. 2015-02-06 04:22:46 +01:00
James Cole
6b006853e6 Stash is a directory which will hold pretty much all code before it's implemented into Laravel 5. 2015-02-06 04:21:22 +01:00
James Cole
6001180e29 Capitalisation for code coverage. 2015-02-04 06:25:19 +01:00
James Cole
662fbed1d0 Added a "valid" email address so certain tests go through. 2015-02-04 06:15:14 +01:00
James Cole
19c7e08c5d Code coverage. 2015-02-03 19:40:13 +01:00
James Cole
72f04aaedc Some cleaning up. 2015-02-01 17:20:51 +01:00
James Cole
2998382969 Check if entries have an encrypted description and act accordingly. 2015-02-01 14:56:25 +01:00
James Cole
37fe79944f Reorder bills [skip ci] 2015-02-01 14:52:40 +01:00
James Cole
536735519a Fixed related transaction tests. 2015-02-01 12:31:11 +01:00
James Cole
6b0a711395 Expanded test coverage. 2015-02-01 12:07:06 +01:00
James Cole
13d3d40376 More code cleanup [skip ci] 2015-02-01 09:30:27 +01:00
James Cole
6873336aca More cleanup [skip ci] 2015-02-01 09:08:39 +01:00
James Cole
c2d2eb53e8 Some code cleanup. 2015-02-01 08:51:27 +01:00
James Cole
210d597a48 Close issue #46 2015-01-31 21:10:00 +01:00
James Cole
e41ede0a6b Forgot the return statement 2015-01-31 17:30:41 +01:00
James Cole
4a8b17ac7c Fixed the search for related transfers. 2015-01-31 17:24:26 +01:00
James Cole
1f5f515d72 Cleanup JS. 2015-01-31 15:10:07 +01:00
James Cole
1e6242b89f Updated composer.lock 2015-01-31 15:10:00 +01:00
James Cole
dde09f9f89 Various code cleanup things inspired by Code Climate [skip ci] 2015-01-31 08:51:40 +01:00
James Cole
916d85c3fe Simplified the account opening balance code. 2015-01-31 08:32:00 +01:00
James Cole
b243ed93aa Merge branch 'release/3.2.5' 2015-01-31 06:35:37 +01:00
James Cole
70d28bbf6e Merge branch 'release/3.2.5' into develop 2015-01-31 06:35:37 +01:00
James Cole
3c76da7132 Update version in readme file. 2015-01-31 06:35:19 +01:00
James Cole
3254565c09 Seed only in test [skip ci] 2015-01-31 06:34:31 +01:00
James Cole
cd0033791f New SQL reference for 3.2.5 [skip ci] 2015-01-31 06:34:10 +01:00
James Cole
2427ee44a5 Updated travis to handle SSL errors when communicating with Code climate. 2015-01-31 06:29:45 +01:00
James Cole
ff0e617b2a This triggers CC 2015-01-31 06:21:40 +01:00
James Cole
e6cfe040b5 Clean up some javascript, small fix for the test reporter 2015-01-31 06:11:55 +01:00
James Cole
94e2f9b6dc Updated tests to understand encrypted database content. 2015-01-30 22:43:52 +01:00
James Cole
512b81ad93 Fixed some tests. 2015-01-30 22:32:12 +01:00
James Cole
fc0e76f431 Some new seeds and the ability to search encrypted transaction journals. 2015-01-30 22:24:02 +01:00
James Cole
9da69358e2 Included code for code climate. 2015-01-30 22:09:47 +01:00
James Cole
aa246b0b2b New full set of favicon. 2015-01-30 21:40:37 +01:00
James Cole
6ed649bc8a Update list of what currency support there is in Firefly. 2015-01-30 18:40:30 +01:00
James Cole
725f5b7110 Creating and editing an account now allows the opening balance to be set in a certain currency. Issue #37 2015-01-30 18:22:55 +01:00
James Cole
5a890c5c3a It is now possible to select a different currency if desired (issue #37). 2015-01-30 18:09:13 +01:00
James Cole
7752329b94 Fixed a bug where the rules where too tight in transaction journal. 2015-01-29 18:21:56 +01:00
James Cole
5f48f13890 Exceptions for stupid sqlite. 2015-01-29 17:44:13 +01:00
James Cole
a734e04561 Default value and rename for encrypted field values. 2015-01-29 17:31:18 +01:00
James Cole
5aa1db293f 3.2.5 will once again be capable of encrypting journal descriptions (and more, in the future). 2015-01-29 05:23:31 +01:00
James Cole
f89aee37f5 Fixed a bug where the referer might not be picked up correctly. 2015-01-29 05:11:00 +01:00
James Cole
538018fed1 Should fix query [skip ci] 2015-01-27 19:22:54 +01:00
James Cole
a2327c50ec Should fix query [skip ci] 2015-01-27 19:19:44 +01:00
James Cole
c2711023e2 Updated query, lets see what happens [skip ci] 2015-01-27 18:52:59 +01:00
James Cole
cac30f0b4c Updated code coverage. 2015-01-25 15:29:09 +01:00
James Cole
4bb17019a4 Test transaction views for transactions without budgets and categories. 2015-01-25 13:17:32 +01:00
James Cole
ba2a40bdf3 Removed unused methods. 2015-01-25 12:21:56 +01:00
James Cole
f3460cca49 Ignore methods in code coverage that are not implemented. 2015-01-25 11:36:34 +01:00
James Cole
64ce53ac30 Test for opening balance. 2015-01-25 10:55:15 +01:00
James Cole
a43238360c Update caps. 2015-01-25 10:50:44 +01:00
James Cole
b2cbadf5d8 New chart route. 2015-01-25 10:06:31 +01:00
James Cole
81640ba06d Revamped and simplified form code. 2015-01-25 10:06:19 +01:00
James Cole
9327430484 Small optimalizations. 2015-01-25 08:28:59 +01:00
James Cole
a24c90eae8 Other redirects [skip ci] 2015-01-24 21:27:07 +01:00
James Cole
1d3987ece6 Fixed the tests. 2015-01-24 17:58:03 +01:00
James Cole
83f5b5e293 New budget charts for year report. 2015-01-24 08:54:33 +01:00
James Cole
f231263085 Updated chart, closed magic number issue. 2015-01-24 08:43:35 +01:00
James Cole
4ad67a87f1 Fixed budget charts. 2015-01-24 07:46:57 +01:00
James Cole
b766d93d9a Fixed the account role view. 2015-01-24 07:15:03 +01:00
James Cole
0905ceb1d5 Codeception will not run in hhvm [skip ci] 2015-01-24 07:00:58 +01:00
James Cole
2fbf837354 Closed #40 [skip ci] 2015-01-24 06:56:02 +01:00
James Cole
4bd79c880c Build in hack. 2015-01-24 06:55:42 +01:00
James Cole
4af041e015 Let's see what happens when we run Hack. 2015-01-24 06:52:22 +01:00
James Cole
8dc3e3ec93 Add an actions menu to the account view. 2015-01-23 06:50:40 +01:00
James Cole
f4b68d26d6 Fixed a bug where a deposit would not get linked to a cash account. 2015-01-23 06:45:20 +01:00
James Cole
1887977b92 Small experimental cleaning up. 2015-01-19 07:21:44 +01:00
James Cole
8eb84acf4f Show the view for transactions without a category. 2015-01-19 06:33:30 +01:00
James Cole
1b685da3e3 Code cleanup and query optimisation. 2015-01-18 21:40:00 +01:00
James Cole
406b658801 Code cleanup. 2015-01-18 21:07:40 +01:00
James Cole
bba1ee1264 Last attempt. 2015-01-18 11:18:06 +01:00
James Cole
02b6191d47 Another attempt at catching the sqlite error. 2015-01-18 11:12:17 +01:00
James Cole
c5a3de09cd Catch a sqlite error. 2015-01-18 10:33:01 +01:00
James Cole
0afe2a680e Gave report a subtitle. 2015-01-18 09:50:51 +01:00
James Cole
03e0510c4f Fixed a bug where certain reports would not show incomes from shared accounts. 2015-01-18 09:49:53 +01:00
James Cole
1068dcb8a4 Cleanup and refactor 2015-01-18 09:49:32 +01:00
James Cole
10a93df653 Clean up test data seeder 2015-01-18 09:48:58 +01:00
James Cole
79ff67852f Deleted an old unique index. 2015-01-18 09:48:48 +01:00
James Cole
a36cab969f Code cleanup. 2015-01-18 09:48:36 +01:00
James Cole
45447646fa Code cleanup. 2015-01-18 09:48:29 +01:00
James Cole
8a0f76ab68 Code cleanup. 2015-01-18 09:48:24 +01:00
James Cole
037135e764 A complete gamble on my side to fix a bug where transfers FROM shared accounts were not counted as income. 2015-01-18 00:10:57 +01:00
James Cole
21e89c3b64 Remove composer.lock when running Travis. 2015-01-17 11:31:12 +01:00
James Cole
bd11ec69fa Reinstated test data seeder, fixed the tests. 2015-01-17 10:41:29 +01:00
James Cole
9e2b34bc12 Various cleanup. 2015-01-17 10:06:12 +01:00
James Cole
0faebc290f Suppress warnings. 2015-01-17 10:05:51 +01:00
James Cole
fc0ef4b79d Small optimizations. 2015-01-17 10:05:43 +01:00
James Cole
027b954b50 Cleanup various factories and libraries. 2015-01-17 08:58:49 +01:00
James Cole
33c830a432 Cleaned up seeders. 2015-01-17 08:58:30 +01:00
James Cole
a7887f1e25 Added inspections for all migrations. 2015-01-17 08:58:19 +01:00
James Cole
fa7a59572a Code cleanup for all controllers. 2015-01-17 08:57:55 +01:00
James Cole
d9c2df5b0d Removed unused methods. 2015-01-17 07:33:43 +01:00
James Cole
a854b2c17e Some code cleanup in the account code. 2015-01-17 07:25:44 +01:00
James Cole
7d4006b205 Fixed some bugs while registering users. 2015-01-17 07:14:01 +01:00
James Cole
86ecca6011 Removed weird config values. 2015-01-16 07:11:03 +01:00
James Cole
0ea5cf2caa Merge branch 'master' of github.com:JC5/firefly-iii
Conflicts:
	app/config/app.php
2015-01-16 07:09:46 +01:00
James Cole
a950e02e9b Revert "Cleanup in preparation of an overhaul."
This reverts commit 5662a02a36.
2015-01-16 07:08:56 +01:00
James Cole
9eec6641dd Cleanup in preparation of an overhaul. 2015-01-16 07:08:56 +01:00
James Cole
18f46676fd Bug fix in new accounts. 2015-01-16 07:08:56 +01:00
James Cole
9735ef6d41 Revert "Cleanup in preparation of an overhaul."
This reverts commit 5662a02a36.
2015-01-16 07:07:57 +01:00
James Cole
d3e8ceee00 Cleanup in preparation of an overhaul. 2015-01-14 12:24:08 +01:00
James Cole
144e329eca Merge branch 'release/3.2.4'
Conflicts:
	app/config/app.php
2015-01-13 20:44:40 +01:00
James Cole
21d5420b2a Bug fix in new accounts. 2015-01-13 20:43:54 +01:00
1160 changed files with 79720 additions and 33657 deletions

50
.codeclimate.yml Normal file
View File

@@ -0,0 +1,50 @@
---
engines:
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- ruby
- javascript
- python
- php
eslint:
enabled: true
fixme:
enabled: true
phpmd:
enabled: true
ratings:
paths:
- "**.css"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.module"
- "**.php"
- "**.py"
- "**.rb"
exclude_paths:
- gulpfile.js
- public/packages/maximebf/php-debugbar/debugbar.js
- public/packages/maximebf/php-debugbar/widgets.js
- public/packages/maximebf/php-debugbar/openhandler.js
- public/packages/maximebf/php-debugbar/widgets/sqlqueries/widget.js
- public/js/bootstrap3-typeahead.min.js
- public/js/bootstrap-sortable.js
- public/js/bootstrap-tagsinput.min.js
- public/js/bootstrap-tagsinput.min.js.map
- public/js/daterangepicker.js
- public/js/jquery-2.1.3.min.js
- public/js/jquery-2.1.3.min.js.map
- public/js/jquery-ui.min.js
- public/js/metisMenu.js
- public/js/moment.min.js
- public/js/sb-admin-2.js
- public/bootstrap/*
- resources/lang/*
- tests/*
- database/*
- storage/*

View File

@@ -1,3 +0,0 @@
src_dir: .
coverage_clover: tests/_output/coverage.xml
json_path: tests/_output/coveralls-upload.json

44
.env.example Executable file
View File

@@ -0,0 +1,44 @@
APP_ENV=production
APP_DEBUG=false
APP_FORCE_SSL=false
APP_KEY=SomeRandomStringOf32CharsExactly
LOG_LEVEL=warning
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
DEFAULT_CURRENCY=EUR
DEFAULT_LANGUAGE=en_US
REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_FROM=enter_your_email_here
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SEND_REGISTRATION_MAIL=true
MUST_CONFIRM_ACCOUNT=false
SHOW_INCOMPLETE_TRANSLATIONS=false
SHOW_DEMO_WARNING=false
ANALYTICS_ID=
RUNCLEANUP=true
SITE_OWNER=mail@example.com

38
.env.testing Executable file
View File

@@ -0,0 +1,38 @@
APP_ENV=testing
APP_DEBUG=true
APP_FORCE_SSL=false
APP_KEY=SomeRandomStringOf32CharsExactly
LOG_LEVEL=debug
DB_CONNECTION=sqlite
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=array
DEFAULT_CURRENCY=EUR
DEFAULT_LANGUAGE=en_US
REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=log
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_FROM=your_address_here@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SHOW_INCOMPLETE_TRANSLATIONS=false
ANALYTICS_ID=abcde
RUNCLEANUP=false
SITE_OWNER=your_address_here@example.com
BLOCKED_DOMAINS=

2
.gitattributes vendored Normal file → Executable file
View File

@@ -1 +1,3 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored

33
.gitignore vendored
View File

@@ -1,27 +1,8 @@
/bootstrap/compiled.php
/vendor
composer.phar
.env.*.php
.env.php
Thumbs.db
.idea/
tests/_output/*
_ide_helper.php
/build/logs/clover.xml
index.html*
app/storage/firefly-export*
.vagrant
firefly-iii-import-*.json
tests/_output/*
testing.sqlite
_ide_helper_models.php
clean.sqlite
tests/acceptance/AcceptanceTester.php
tests/functional/FunctionalTester.php
tests/unit/UnitTester.php
pi.php
tests/_data/db.sqlite
tests/_data/dump.sql
db.sqlite_snapshot
c3.php
db.sqlite-journal
/node_modules
.env
_development
.env.local
result.html
test-import.sh
test-import-report.txt

6
.scrutinizer.yml Normal file
View File

@@ -0,0 +1,6 @@
# .scrutinizer.yml
tools:
external_code_coverage: false
filter:
excluded_paths:
- app/Support/Migration/*

View File

@@ -1,16 +0,0 @@
language: php
php:
- 5.5
- 5.6
install:
- composer install
script:
- ./tests/_data/db.sh
- php vendor/bin/codecept build
- php vendor/bin/codecept run --coverage --coverage-xml
after_script:
- php vendor/bin/coveralls

166
CHANGELOG.md Normal file
View File

@@ -0,0 +1,166 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
- No unreleased changes yet.
## [3.10] - 2015-05-25
### Added
- New charts in year report
- Can add / remove money from piggy bank on mobile device.
- Bill overview shows some useful things.
- Firefly will track registration / activation IP addresses.
### Changed
- Rewrote the import routine.
- The date picker now supports more ranges and periods.
- Rewrote all migrations. #272
### Deprecated
- Initial release.
### Removed
- Initial release.
### Fixed
- Issue #264
- Issue #265
- Fixed amount calculation problems, #266, thanks @xzaz
- Issue #271
- Issue #278, #273, thanks @StevenReitsma and @rubella
- Bug in attachment download routine would report the wrong size to the user's browser.
- Various NULL errors fixed.
- Various strict typing errors fixed.
- Fixed pagination problems, #276, thanks @xzaz
- Fixed a bug where an expense would be assigned to a piggy bank if you created a transfer first.
- Bulk update problems, #280, thanks @stickgrinder
- Fixed various problems with amount reporting of split transactions.
### Security
- Initial release.
[3.9.1]
### Fixed
- Fixed a bug where removing money from a piggy bank would not work. See issue #265 and #269
[3.9.0]
### Added
- @zjean has added code that allows you to force "https://"-URL's.
- @tonicospinelli has added Portuguese (Brazil) translations.
- Firefly III supports the *splitting* of transactions:
- A withdrawal (expense) can be split into multiple sub-transactions (with multiple destinations)
- Likewise for deposits (incomes). You can set multiple sources.
- Likewise for transfers.
### Changed
- Update a lot of libraries.
- Big improvement to test data generation.
- Cleaned up many repositories.
### Removed
- Front page boxes will no longer respond to credit card bills.
### Fixed
- Many bugs
## [3.8.4] - 2016-04-24
### Added
- Lots of new translations.
- Can now set page size.
- Can now mass edit transactions.
- Can now mass delete transactions.
- Firefly will now attempt to verify the integrity of your database when updating.
### Changed
- New version of Charts library.
### Fixed
- Several CSV related bugs.
- Several other bugs.
- Bugs fixed by @Bonno.
## [3.8.3] - 2016-04-17
### Added
- New audit report to see what happened.
### Changed
- New Chart JS release used.
- Help function is more reliable.
### Fixed
- Expected bill amount is now correct.
- Upgrade will now invalidate cache.
- Search was broken.
- Queries run better
## [3.8.2] - 2016-04-03
### Added
- Small user administration at /admin.
- Informational popups are working in reports.
### Changed
- User activation emails are better
### Fixed
- Some bugs related to accounts and rules.
## [3.8.1] - 2016-03-29
### Added
- More translations
- Extended cookie control.
- User accounts can now be activated (disabled by default).
- Bills can now take the source and destination account name into account.
### Changed
- The pages related to rules have new URL's.
### Fixed
- Spelling errors.
- Problems related to the "account repository".
- Some views showed empty (0.0) amounts.
## [3.8.0] - 2016-03-20
### Added
- Two factor authentication, thanks to the excellent work of [zjean](https://github.com/zjean).
- A new chart showing your net worth in year and multi-year reports.
- You can now see if your current or future rules actually match any transactions, thanks to the excellent work of @roberthorlings.
- New date fields for transactions. They are not used yet in reports or anything, but they can be filled in.
- New routine to export your data.
- Firefly III will mail the site owner when blocked users try to login, or when blocked domains are used in registrations.
### Changed
- Firefly III now requires PHP 7.0 minimum.
### Fixed
- HTML fixes, thanks to [roberthorlings](https://github.com/roberthorlings) and [zjean](https://github.com/zjean)..
- A bug fix in the ABN Amro importer, thanks to [roberthorlings](https://github.com/roberthorlings)
- It was not possible to change the opening balance, once it had been set. Thanks to [xnyhps](https://github.com/xnyhps) and [marcoveeneman](https://github.com/marcoveeneman) for spotting this.
- Various other bug fixes.
## [3.4.2] - 2015-05-25
### Added
- Initial release.
### Changed
- Initial release.
### Deprecated
- Initial release.
### Removed
- Initial release.
### Fixed
- Initial release.
### Security
- Initial release.

7
LICENSE Normal file
View File

@@ -0,0 +1,7 @@
Copyright (C) 2016 thegrumpydictator@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,75 +1,30 @@
Firefly III
===========
# Firefly III [![Requires PHP7](https://img.shields.io/badge/php-7.0-red.svg)](https://secure.php.net/downloads.php#v7.0.4) [![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable)](https://packagist.org/packages/grumpydictator/firefly-iii) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/JC5/firefly-iii/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/JC5/firefly-iii/?branch=master)
[![Build Status](https://travis-ci.org/JC5/firefly-iii.svg?branch=develop)](https://travis-ci.org/JC5/firefly-iii)
[![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii)
[![Coverage Status](https://coveralls.io/repos/JC5/firefly-iii/badge.png?branch=master)](https://coveralls.io/r/JC5/firefly-iii?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102/mini.png)](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102)
## A personal finances manager
[![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Total Downloads](https://poser.pugx.org/grumpydictator/firefly-iii/downloads.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Latest Unstable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/unstable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![License](https://poser.pugx.org/grumpydictator/firefly-iii/license.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Screenshot](https://i.nder.be/hhfv03hp/400)](https://i.nder.be/hhfv03hp) [![Screenshot](https://i.nder.be/hhmwmqw9/400)](https://i.nder.be/hhmwmqw9)
Firefly II is a tool to help you manage your finances. Please read the full description [in the wiki](https://github.com/JC5/firefly-iii/wiki/full-description).
[![Screenshot](https://i.nder.be/g63q05m0/400)](https://i.nder.be/g63q05m0) [![Screenshot](https://i.nder.be/c2g30ngg/400)](https://i.nder.be/c2g30ngg)
Firefly Mark III is a new version of Firefly built upon best practices and lessons learned
from building [Firefly](https://github.com/JC5/Firefly). It's Mark III since the original Firefly never made it outside of my
laptop and [Firefly II](https://github.com/JC5/Firefly) is live.
"Firefly III" is a financial manager. It can help you keep track of expenses, income, budgets and everything in between. It even supports credit cards, shared household accounts and savings accounts! It's pretty fancy. You should use it to save and organise money.
## Current features
## Installation
- [A double-entry bookkeeping system](http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system);
- You can store, edit and remove withdrawals, deposits and transfers. This allows you full financial management;
- It's possible to create, change and manage money using _budgets_;
- Organize transactions using categories;
- Save towards a goal using piggy banks;
- Predict and anticipate large expenses using "repeated expenses" (ie. yearly taxes);
- Predict and anticipate bills using "recurring transactions" (rent for example);
- View basic income / expense reports.
- Lots of help text in case you don't get it;
To install Firefly III, you'll need a web server (preferrably on Linux) and access to the command line. Then, please read the [installation guide](https://jc5.github.io/firefly-iii/installation-guide/).
Everything is organised:
## More about Firefly III
- Clear views that should show you how you're doing;
- Easy navigation through your records;
- Browse back and forth to see previous months or even years;
- Lots of charts because we all love them.
- Financial reporting showing you how well you are doing;
Personal financial management is pretty difficult, and everybody has their own approach to it. Some people make budgets, other people limit their cashflow by throwing away their credit cards, others try to increase their current cashflow. There are tons of ways to save and earn money.
## Changes
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
Firefly III will feature, but does not feature yet:
#### Some advantages of using Firefly
- Firefly can import any CSV file, so migrating from other systems is easy.
- Firefly runs on your own server, so you are fully in control of your data. Remember, there is no such thing as "the cloud", its just somebody elses computer!
- Firefly has lots of features without becoming fancy or bloated.
- If you feel you're missing something you can just ask me and I'll add it!
- More control over other resources outside of personal finance
- Accounts shared with a partner (household accounts)
- Debts
- Credit cards
- More test-coverage;
- Firefly will be able to split transactions; a single purchase can be split in multiple entries, for more fine-grained control.
- Firefly will be able to join transactions.
- Any other features I might not have thought of.
Firefly is pretty awesome. [You can read more about Firefly III, and its features, on the Github Pages](https://jc5.github.io/firefly-iii/).
Some stuff has been removed:
- The nesting of budgets, categories and beneficiaries is removed because it was pretty pointless.
- Firefly will not encrypt the content of the (MySQL) tables. Old versions of Firefly had this capability but it sucks when searching, sorting and organizing entries.
## Screenshots
![Index](http://i.imgur.com/TkZNIer.png)
![Accounts](http://i.imgur.com/YE8WavP.png)
![Budgets](http://i.imgur.com/Go0M6Nd.png)
![Reports](http://i.imgur.com/EnEIyQI.png)
## Current state
I have the basics up and running. Test coverage is currently coming, slowly.
Although I have not checked extensively, some forms and views have CSRF vulnerabilities. This is because not all
views escape all characters by default. Will be fixed.
Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!
If you want to contact me, please open an issue or [email me](mailto:thegrumpydictator@gmail.com).

View File

@@ -1,606 +0,0 @@
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.6.19-0ubuntu0.14.04.1)
# Database: homestead
# Generation Time: 2015-01-02 19:01:30 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table account_meta
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_meta`;
CREATE TABLE `account_meta` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_id` int(10) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`data` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `account_meta_account_id_name_unique` (`account_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table account_types
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_types`;
CREATE TABLE `account_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`editable` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `account_types_type_unique` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `account_types` WRITE;
/*!40000 ALTER TABLE `account_types` DISABLE KEYS */;
INSERT INTO `account_types` (`id`, `created_at`, `updated_at`, `type`, `editable`)
VALUES
(1,'2015-01-02 19:00:13','2015-01-02 19:00:13','Default account',1),
(2,'2015-01-02 19:00:13','2015-01-02 19:00:13','Cash account',0),
(3,'2015-01-02 19:00:13','2015-01-02 19:00:13','Asset account',1),
(4,'2015-01-02 19:00:13','2015-01-02 19:00:13','Expense account',1),
(5,'2015-01-02 19:00:13','2015-01-02 19:00:13','Revenue account',1),
(6,'2015-01-02 19:00:13','2015-01-02 19:00:13','Initial balance account',0),
(7,'2015-01-02 19:00:13','2015-01-02 19:00:13','Beneficiary account',1),
(8,'2015-01-02 19:00:13','2015-01-02 19:00:13','Import account',0);
/*!40000 ALTER TABLE `account_types` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table accounts
# ------------------------------------------------------------
DROP TABLE IF EXISTS `accounts`;
CREATE TABLE `accounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`account_type_id` int(10) unsigned NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`active` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `accounts_user_id_account_type_id_name_unique` (`user_id`,`account_type_id`,`name`),
KEY `accounts_account_type_id_foreign` (`account_type_id`),
CONSTRAINT `accounts_account_type_id_foreign` FOREIGN KEY (`account_type_id`) REFERENCES `account_types` (`id`) ON DELETE CASCADE,
CONSTRAINT `accounts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table bills
# ------------------------------------------------------------
DROP TABLE IF EXISTS `bills`;
CREATE TABLE `bills` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`user_id` int(10) unsigned NOT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`match` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`amount_min` decimal(10,2) NOT NULL,
`amount_max` decimal(10,2) NOT NULL,
`date` date NOT NULL,
`active` tinyint(1) NOT NULL,
`automatch` tinyint(1) NOT NULL,
`repeat_freq` enum('daily','weekly','monthly','quarterly','half-year','yearly') COLLATE utf8_unicode_ci NOT NULL,
`skip` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uid_name_unique` (`user_id`,`name`),
CONSTRAINT `bills_uid_for` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table budget_limits
# ------------------------------------------------------------
DROP TABLE IF EXISTS `budget_limits`;
CREATE TABLE `budget_limits` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`budget_id` int(10) unsigned DEFAULT NULL,
`startdate` date NOT NULL,
`amount` decimal(10,2) NOT NULL,
`repeats` tinyint(1) NOT NULL,
`repeat_freq` enum('daily','weekly','monthly','quarterly','half-year','yearly') COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_ci_combi` (`startdate`,`repeat_freq`),
UNIQUE KEY `unique_bl_combi` (`budget_id`,`startdate`,`repeat_freq`),
CONSTRAINT `bid_foreign` FOREIGN KEY (`budget_id`) REFERENCES `budgets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table budget_transaction_journal
# ------------------------------------------------------------
DROP TABLE IF EXISTS `budget_transaction_journal`;
CREATE TABLE `budget_transaction_journal` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`budget_id` int(10) unsigned NOT NULL,
`transaction_journal_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `budid_tjid_unique` (`budget_id`,`transaction_journal_id`),
KEY `budget_transaction_journal_transaction_journal_id_foreign` (`transaction_journal_id`),
CONSTRAINT `budget_transaction_journal_transaction_journal_id_foreign` FOREIGN KEY (`transaction_journal_id`) REFERENCES `transaction_journals` (`id`) ON DELETE CASCADE,
CONSTRAINT `budget_transaction_journal_budget_id_foreign` FOREIGN KEY (`budget_id`) REFERENCES `budgets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table budgets
# ------------------------------------------------------------
DROP TABLE IF EXISTS `budgets`;
CREATE TABLE `budgets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `budgets_user_id_name_unique` (`user_id`,`name`),
CONSTRAINT `budgets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table categories
# ------------------------------------------------------------
DROP TABLE IF EXISTS `categories`;
CREATE TABLE `categories` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `categories_user_id_name_unique` (`user_id`,`name`),
CONSTRAINT `categories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table category_transaction_journal
# ------------------------------------------------------------
DROP TABLE IF EXISTS `category_transaction_journal`;
CREATE TABLE `category_transaction_journal` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`category_id` int(10) unsigned NOT NULL,
`transaction_journal_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `catid_tjid_unique` (`category_id`,`transaction_journal_id`),
KEY `category_transaction_journal_transaction_journal_id_foreign` (`transaction_journal_id`),
CONSTRAINT `category_transaction_journal_transaction_journal_id_foreign` FOREIGN KEY (`transaction_journal_id`) REFERENCES `transaction_journals` (`id`) ON DELETE CASCADE,
CONSTRAINT `category_transaction_journal_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table components
# ------------------------------------------------------------
DROP TABLE IF EXISTS `components`;
CREATE TABLE `components` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`class` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `components_user_id_class_name_unique` (`user_id`,`class`,`name`),
CONSTRAINT `components_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table limit_repetitions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `limit_repetitions`;
CREATE TABLE `limit_repetitions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`budget_limit_id` int(10) unsigned NOT NULL,
`startdate` date NOT NULL,
`enddate` date NOT NULL,
`amount` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `limit_repetitions_limit_id_startdate_enddate_unique` (`budget_limit_id`,`startdate`,`enddate`),
CONSTRAINT `limit_repetitions_limit_id_foreign` FOREIGN KEY (`budget_limit_id`) REFERENCES `budget_limits` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table migrations
# ------------------------------------------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` (`migration`, `batch`)
VALUES
('2014_06_27_163032_create_users_table',1),
('2014_06_27_163145_create_account_types_table',1),
('2014_06_27_163259_create_accounts_table',1),
('2014_06_27_163817_create_components_table',1),
('2014_06_27_163818_create_piggybanks_table',1),
('2014_06_27_164042_create_transaction_currencies_table',1),
('2014_06_27_164512_create_transaction_types_table',1),
('2014_06_27_164619_create_recurring_transactions_table',1),
('2014_06_27_164620_create_transaction_journals_table',1),
('2014_06_27_164836_create_transactions_table',1),
('2014_06_27_165344_create_component_transaction_table',1),
('2014_07_05_171326_create_component_transaction_journal_table',1),
('2014_07_06_123842_create_preferences_table',1),
('2014_07_09_204843_create_session_table',1),
('2014_07_17_183717_create_limits_table',1),
('2014_07_19_055011_create_limit_repeat_table',1),
('2014_08_06_044416_create_component_recurring_transaction_table',1),
('2014_08_12_173919_create_piggybank_repetitions_table',1),
('2014_08_18_100330_create_piggybank_events_table',1),
('2014_08_23_113221_create_reminders_table',1),
('2014_11_10_172053_create_account_meta_table',1),
('2014_11_29_135749_create_transaction_groups_table',1),
('2014_11_29_140217_create_transaction_group_transaction_journal_table',1),
('2014_12_13_190730_changes_for_v321',1),
('2014_12_24_191544_changes_for_v322',1);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table piggy_bank_events
# ------------------------------------------------------------
DROP TABLE IF EXISTS `piggy_bank_events`;
CREATE TABLE `piggy_bank_events` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`piggy_bank_id` int(10) unsigned NOT NULL,
`transaction_journal_id` int(10) unsigned DEFAULT NULL,
`date` date NOT NULL,
`amount` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
KEY `piggybank_events_piggybank_id_foreign` (`piggy_bank_id`),
KEY `piggybank_events_transaction_journal_id_foreign` (`transaction_journal_id`),
CONSTRAINT `piggybank_events_transaction_journal_id_foreign` FOREIGN KEY (`transaction_journal_id`) REFERENCES `transaction_journals` (`id`) ON DELETE SET NULL,
CONSTRAINT `piggybank_events_piggybank_id_foreign` FOREIGN KEY (`piggy_bank_id`) REFERENCES `piggy_banks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table piggy_bank_repetitions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `piggy_bank_repetitions`;
CREATE TABLE `piggy_bank_repetitions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`piggy_bank_id` int(10) unsigned NOT NULL,
`startdate` date DEFAULT NULL,
`targetdate` date DEFAULT NULL,
`currentamount` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `piggybank_repetitions_piggybank_id_startdate_targetdate_unique` (`piggy_bank_id`,`startdate`,`targetdate`),
CONSTRAINT `piggybank_repetitions_piggybank_id_foreign` FOREIGN KEY (`piggy_bank_id`) REFERENCES `piggy_banks` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table piggy_banks
# ------------------------------------------------------------
DROP TABLE IF EXISTS `piggy_banks`;
CREATE TABLE `piggy_banks` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_id` int(10) unsigned NOT NULL,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`targetamount` decimal(10,2) NOT NULL,
`startdate` date DEFAULT NULL,
`targetdate` date DEFAULT NULL,
`repeats` tinyint(1) NOT NULL,
`rep_length` enum('day','week','quarter','month','year') COLLATE utf8_unicode_ci DEFAULT NULL,
`rep_every` smallint(5) unsigned NOT NULL,
`rep_times` smallint(5) unsigned DEFAULT NULL,
`reminder` enum('day','week','quarter','month','year') COLLATE utf8_unicode_ci DEFAULT NULL,
`reminder_skip` smallint(5) unsigned NOT NULL,
`remind_me` tinyint(1) NOT NULL,
`order` int(10) unsigned NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `piggybanks_account_id_name_unique` (`account_id`,`name`),
CONSTRAINT `piggybanks_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table preferences
# ------------------------------------------------------------
DROP TABLE IF EXISTS `preferences`;
CREATE TABLE `preferences` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`user_id` int(10) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`data` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `preferences_user_id_name_unique` (`user_id`,`name`),
CONSTRAINT `preferences_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table reminders
# ------------------------------------------------------------
DROP TABLE IF EXISTS `reminders`;
CREATE TABLE `reminders` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`user_id` int(10) unsigned NOT NULL,
`startdate` date NOT NULL,
`enddate` date DEFAULT NULL,
`active` tinyint(1) NOT NULL,
`notnow` tinyint(1) NOT NULL DEFAULT '0',
`remindersable_id` int(10) unsigned DEFAULT NULL,
`remindersable_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `reminders_user_id_foreign` (`user_id`),
CONSTRAINT `reminders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table sessions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE `sessions` (
`id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`payload` text COLLATE utf8_unicode_ci NOT NULL,
`last_activity` int(11) NOT NULL,
UNIQUE KEY `sessions_id_unique` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table transaction_currencies
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transaction_currencies`;
CREATE TABLE `transaction_currencies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL,
`symbol` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `transaction_currencies_code_unique` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `transaction_currencies` WRITE;
/*!40000 ALTER TABLE `transaction_currencies` DISABLE KEYS */;
INSERT INTO `transaction_currencies` (`id`, `created_at`, `updated_at`, `deleted_at`, `code`, `name`, `symbol`)
VALUES
(1,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'EUR','Euro','&#8364;'),
(2,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'USD','US Dollar','$'),
(3,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'HUF','Hungarian forint','Ft');
/*!40000 ALTER TABLE `transaction_currencies` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table transaction_group_transaction_journal
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transaction_group_transaction_journal`;
CREATE TABLE `transaction_group_transaction_journal` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`transaction_group_id` int(10) unsigned NOT NULL,
`transaction_journal_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `tt_joined` (`transaction_group_id`,`transaction_journal_id`),
KEY `tr_trj_id` (`transaction_journal_id`),
CONSTRAINT `tr_trj_id` FOREIGN KEY (`transaction_journal_id`) REFERENCES `transaction_journals` (`id`) ON DELETE CASCADE,
CONSTRAINT `tr_grp_id` FOREIGN KEY (`transaction_group_id`) REFERENCES `transaction_groups` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table transaction_groups
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transaction_groups`;
CREATE TABLE `transaction_groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`relation` enum('balance') COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `transaction_groups_user_id_foreign` (`user_id`),
CONSTRAINT `transaction_groups_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table transaction_journals
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transaction_journals`;
CREATE TABLE `transaction_journals` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`user_id` int(10) unsigned NOT NULL,
`transaction_type_id` int(10) unsigned NOT NULL,
`bill_id` int(10) unsigned DEFAULT NULL,
`transaction_currency_id` int(10) unsigned NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`completed` tinyint(1) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `transaction_journals_user_id_foreign` (`user_id`),
KEY `transaction_journals_transaction_type_id_foreign` (`transaction_type_id`),
KEY `transaction_journals_transaction_currency_id_foreign` (`transaction_currency_id`),
KEY `bill_id_foreign` (`bill_id`),
CONSTRAINT `bill_id_foreign` FOREIGN KEY (`bill_id`) REFERENCES `bills` (`id`) ON DELETE SET NULL,
CONSTRAINT `transaction_journals_transaction_currency_id_foreign` FOREIGN KEY (`transaction_currency_id`) REFERENCES `transaction_currencies` (`id`) ON DELETE CASCADE,
CONSTRAINT `transaction_journals_transaction_type_id_foreign` FOREIGN KEY (`transaction_type_id`) REFERENCES `transaction_types` (`id`) ON DELETE CASCADE,
CONSTRAINT `transaction_journals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table transaction_types
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transaction_types`;
CREATE TABLE `transaction_types` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `transaction_types_type_unique` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
LOCK TABLES `transaction_types` WRITE;
/*!40000 ALTER TABLE `transaction_types` DISABLE KEYS */;
INSERT INTO `transaction_types` (`id`, `created_at`, `updated_at`, `deleted_at`, `type`)
VALUES
(1,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'Withdrawal'),
(2,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'Deposit'),
(3,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'Transfer'),
(4,'2015-01-02 19:00:13','2015-01-02 19:00:13',NULL,'Opening balance');
/*!40000 ALTER TABLE `transaction_types` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table transactions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `transactions`;
CREATE TABLE `transactions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted_at` timestamp NULL DEFAULT NULL,
`account_id` int(10) unsigned NOT NULL,
`transaction_journal_id` int(10) unsigned NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`amount` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`),
KEY `transactions_account_id_foreign` (`account_id`),
KEY `transactions_transaction_journal_id_foreign` (`transaction_journal_id`),
CONSTRAINT `transactions_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE,
CONSTRAINT `transactions_transaction_journal_id_foreign` FOREIGN KEY (`transaction_journal_id`) REFERENCES `transaction_journals` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table users
# ------------------------------------------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`reset` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`remember_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@@ -0,0 +1,45 @@
<?php
/**
* ConfigureLogging.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Foundation\Bootstrap\ConfigureLogging as IlluminateConfigureLogging;
use Illuminate\Log\Writer;
/**
* Class ConfigureLogging
*
* @package FireflyIII\Bootstrap
*/
class ConfigureLogging extends IlluminateConfigureLogging
{
/**
* @param Application $app
* @param Writer $log
*/
protected function configureDailyHandler(Application $app, Writer $log)
{
$log->useDailyFiles(
$app->storagePath() . '/logs/firefly-iii.log',
$app->make('config')->get('app.log_max_files', 5)
);
}
/**
* @param Application $app
* @param Writer $log
*/
protected function configureSingleHandler(Application $app, Writer $log)
{
$log->useFiles($app->storagePath() . '/logs/firefly-iii.log');
}
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* EncryptFile.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Crypt;
use Illuminate\Console\Command;
/**
* Class EncryptFile
*
* @package FireflyIII\Console\Commands
*/
class EncryptFile extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Encrypts a file and places it in the storage/upload directory.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:encrypt {file} {key}';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$file = e(strval($this->argument('file')));
if (!file_exists($file)) {
$this->error(sprintf('File "%s" does not seem to exist.', $file));
return;
}
$content = file_get_contents($file);
$content = Crypt::encrypt($content);
$newName = e(strval($this->argument('key'))) . '.upload';
$path = storage_path('upload') . '/' . $newName;
file_put_contents($path, $content);
$this->line(sprintf('Encrypted "%s" and put it in "%s"', $file, $path));
}
}

View File

@@ -0,0 +1,113 @@
<?php
/**
* Import.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use FireflyIII\Crud\Account\AccountCrud;
use FireflyIII\Import\Importer\ImporterInterface;
use FireflyIII\Import\ImportStorage;
use FireflyIII\Import\ImportValidator;
use FireflyIII\Import\Logging\CommandHandler;
use FireflyIII\Models\ImportJob;
use Illuminate\Console\Command;
use Log;
/**
* Class Import
*
* @package FireflyIII\Console\Commands
*/
class Import extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Import stuff into Firefly III.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:import {key}';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$jobKey = $this->argument('key');
$job = ImportJob::whereKey($jobKey)->first();
if (is_null($job)) {
$this->error('This job does not seem to exist.');
return;
}
if ($job->status != 'settings_complete') {
$this->error('This job is not ready to be imported.');
return;
}
$this->line('Going to import job with key "' . $job->key . '" of type ' . $job->file_type);
$valid = array_keys(config('firefly.import_formats'));
$class = 'INVALID';
if (in_array($job->file_type, $valid)) {
$class = config('firefly.import_formats.' . $job->file_type);
}
/** @var ImporterInterface $importer */
$importer = app($class);
$importer->setJob($job);
// intercept logging by importer.
$monolog = Log::getMonolog();
$handler = new CommandHandler($this);
$monolog->pushHandler($handler);
// create import entries
$collection = $importer->createImportEntries();
// validate / clean collection:
$validator = new ImportValidator($collection);
$validator->setUser($job->user);
if ($job->configuration['import-account'] != 0) {
$repository = app(AccountCrud::class, [$job->user]);
$validator->setDefaultImportAccount($repository->find($job->configuration['import-account']));
}
$cleaned = $validator->clean();
// then import collection:
$storage = new ImportStorage($cleaned);
$storage->setUser($job->user);
// and run store routine:
$storage->store();
$this->line('Something something import: ' . $jobKey);
}
}

View File

@@ -0,0 +1,76 @@
<?php
/**
* UpgradeFireflyInstructions.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Illuminate\Console\Command;
/**
* Class UpgradeFireflyInstructions
*
* @package FireflyIII\Console\Commands
*/
class UpgradeFireflyInstructions extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Instructions in case of upgrade trouble.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:upgrade-instructions';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
/** @var string $version */
$version = config('firefly.version');
$config = config('upgrade.text');
$text = $config[$version] ?? null;
$this->line('+------------------------------------------------------------------------------+');
$this->line('');
if (is_null($text)) {
$this->line('Thank you for installing Firefly III, v' . $version);
$this->line('If you are upgrading from a previous version,');
$this->info('there are no extra upgrade instructions.');
$this->line('Firefly III should be ready for use.');
} else {
$this->line('Thank you for installing Firefly III, v' . $version);
$this->line('If you are upgrading from a previous version,');
$this->line('please follow these upgrade instructions carefully:');
$this->info(wordwrap($text));
}
$this->line('');
$this->line('+------------------------------------------------------------------------------+');
}
}

View File

@@ -0,0 +1,307 @@
<?php
/**
* VerifyDatabase.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Crypt;
use DB;
use FireflyIII\Models\Account;
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Builder;
use stdClass;
/**
* Class VerifyDatabase
*
* @package FireflyIII\Console\Commands
*/
class VerifyDatabase extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Will verify your database.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:verify';
/**
* Create a new command instance.
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
// accounts with no transactions.
$this->reportAccounts();
// budgets with no limits
$this->reportBudgetLimits();
// budgets with no transactions
$this->reportBudgets();
// categories with no transactions
$this->reportCategories();
// tags with no transactions
$this->reportTags();
// sum of transactions is not zero.
$this->reportSum();
// any deleted transaction journals that have transactions that are NOT deleted:
$this->reportJournals();
// deleted transactions that are connected to a not deleted journal.
$this->reportTransactions();
// deleted accounts that still have not deleted transactions or journals attached to them.
$this->reportDeletedAccounts();
// report on journals with no transactions at all.
$this->reportNoTransactions();
}
/**
* Reports on accounts with no transactions.
*/
private function reportAccounts()
{
$set = Account
::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
->leftJoin('users', 'accounts.user_id', '=', 'users.id')
->groupBy('accounts.id')
->having('transaction_count', '=', 0)
->get(['accounts.id', 'accounts.name', 'accounts.user_id', 'users.email', DB::raw('COUNT(`transactions`.`id`) AS `transaction_count`')]);
/** @var stdClass $entry */
foreach ($set as $entry) {
$line = 'User #' . $entry->user_id . ' (' . $entry->email . ') has account #' . $entry->id . ' ("' . Crypt::decrypt($entry->name)
. '") which has no transactions.';
$this->line($line);
}
}
/**
* Reports on budgets with no budget limits (which makes them pointless).
*/
private function reportBudgetLimits()
{
$set = Budget
::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id')
->leftJoin('users', 'budgets.user_id', '=', 'users.id')
->groupBy('budgets.id')
->having('budget_limit_count', '=', 0)
->get(['budgets.id', 'budgets.name', 'budgets.user_id', 'users.email', DB::raw('COUNT(`budget_limits`.`id`) AS `budget_limit_count`')]);
/** @var stdClass $entry */
foreach ($set as $entry) {
$line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name)
. '") which has no budget limits.';
$this->line($line);
}
}
/**
* Reports on budgets without any transactions.
*/
private function reportBudgets()
{
$set = Budget
::leftJoin('budget_transaction_journal', 'budgets.id', '=', 'budget_transaction_journal.budget_id')
->leftJoin('users', 'budgets.user_id', '=', 'users.id')
->distinct()
->whereNull('budget_transaction_journal.budget_id')
->whereNull('budgets.deleted_at')
->get(['budgets.id', 'budgets.name', 'budgets.user_id', 'users.email']);
/** @var stdClass $entry */
foreach ($set as $entry) {
$line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has budget #' . $entry->id . ' ("' . Crypt::decrypt($entry->name)
. '") which has no transactions.';
$this->line($line);
}
}
/**
* Reports on categories without any transactions.
*/
private function reportCategories()
{
$set = Category
::leftJoin('category_transaction_journal', 'categories.id', '=', 'category_transaction_journal.category_id')
->leftJoin('users', 'categories.user_id', '=', 'users.id')
->distinct()
->whereNull('category_transaction_journal.category_id')
->whereNull('categories.deleted_at')
->get(['categories.id', 'categories.name', 'categories.user_id', 'users.email']);
/** @var stdClass $entry */
foreach ($set as $entry) {
$line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has category #' . $entry->id . ' ("' . Crypt::decrypt($entry->name)
. '") which has no transactions.';
$this->line($line);
}
}
/**
* Reports on deleted accounts that still have not deleted transactions or journals attached to them.
*/
private function reportDeletedAccounts()
{
$set = Account
::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->whereNotNull('accounts.deleted_at')
->whereNotNull('transactions.id')
->where(
function (Builder $q) {
$q->whereNull('transactions.deleted_at');
$q->orWhereNull('transaction_journals.deleted_at');
}
)
->get(
['accounts.id as account_id', 'accounts.deleted_at as account_deleted_at', 'transactions.id as transaction_id',
'transactions.deleted_at as transaction_deleted_at', 'transaction_journals.id as journal_id',
'transaction_journals.deleted_at as journal_deleted_at']
);
/** @var stdClass $entry */
foreach ($set as $entry) {
$date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at;
$this->error(
'Error: Account #' . $entry->account_id . ' should have been deleted, but has not.' .
' Find it in the table called `accounts` and change the `deleted_at` field to: "' . $date . '"'
);
}
}
/**
* Any deleted transaction journals that have transactions that are NOT deleted:
*/
private function reportJournals()
{
$set = TransactionJournal
::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->whereNotNull('transaction_journals.deleted_at')// USE THIS
->whereNull('transactions.deleted_at')
->whereNotNull('transactions.id')
->get(
[
'transaction_journals.id as journal_id',
'transaction_journals.description',
'transaction_journals.deleted_at as journal_deleted',
'transactions.id as transaction_id',
'transactions.deleted_at as transaction_deleted_at']
);
/** @var stdClass $entry */
foreach ($set as $entry) {
$this->error(
'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' .
' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted . '"'
);
}
}
private function reportNoTransactions()
{
/*
* select transaction_journals.id, count(transactions.id) as transaction_count from transaction_journals
left join transactions ON transaction_journals.id = transactions.transaction_journal_id
group by transaction_journals.id
having transaction_count = 0
*/
$set = TransactionJournal
::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->groupBy('transaction_journals.id')
->having('transaction_count', '=', 0)
->get(['transaction_journals.id', DB::raw('COUNT(`transactions`.`id`) as `transaction_count`')]);
foreach ($set as $entry) {
$this->error(
'Error: Journal #' . $entry->id . ' has zero transactions. Open table `transaction_journals` and delete the entry with id #' . $entry->id
);
}
}
/**
* Reports for each user when the sum of their transactions is not zero.
*/
private function reportSum()
{
/** @var UserRepositoryInterface $userRepository */
$userRepository = app(UserRepositoryInterface::class);
/** @var User $user */
foreach ($userRepository->all() as $user) {
$sum = strval($user->transactions()->sum('amount'));
if (bccomp($sum, '0') !== 0) {
$this->error('Error: Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!');
}
}
}
/**
* Reports on tags without any transactions.
*/
private function reportTags()
{
$set = Tag
::leftJoin('tag_transaction_journal', 'tags.id', '=', 'tag_transaction_journal.tag_id')
->leftJoin('users', 'tags.user_id', '=', 'users.id')
->distinct()
->whereNull('tag_transaction_journal.tag_id')
->whereNull('tags.deleted_at')
->get(['tags.id', 'tags.tag', 'tags.user_id', 'users.email']);
/** @var stdClass $entry */
foreach ($set as $entry) {
$line = 'Notice: User #' . $entry->user_id . ' (' . $entry->email . ') has tag #' . $entry->id . ' ("' . $entry->tag
. '") which has no transactions.';
$this->line($line);
}
}
/**
* Reports on deleted transactions that are connected to a not deleted journal.
*/
private function reportTransactions()
{
$set = Transaction
::leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->whereNotNull('transactions.deleted_at')
->whereNull('transaction_journals.deleted_at')
->get(
['transactions.id as transaction_id', 'transactions.deleted_at as transaction_deleted', 'transaction_journals.id as journal_id',
'transaction_journals.deleted_at']
);
/** @var stdClass $entry */
foreach ($set as $entry) {
$this->error(
'Error: Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' .
' Find it in the table called `transaction_journals` and change the `deleted_at` field to: "' . $entry->transaction_deleted . '"'
);
}
}
}

59
app/Console/Kernel.php Normal file
View File

@@ -0,0 +1,59 @@
<?php
/**
* Kernel.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console;
use FireflyIII\Console\Commands\EncryptFile;
use FireflyIII\Console\Commands\Import;
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
use FireflyIII\Console\Commands\VerifyDatabase;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
/**
* Class Kernel
*
* @package FireflyIII\Console
*/
class Kernel extends ConsoleKernel
{
/**
* The bootstrap classes for the application.
*
* This needs to be for with the next upgrade.
*
* @var array
*/
protected $bootstrappers
= [
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
'FireflyIII\Bootstrap\ConfigureLogging',
'Illuminate\Foundation\Bootstrap\HandleExceptions',
'Illuminate\Foundation\Bootstrap\RegisterFacades',
'Illuminate\Foundation\Bootstrap\SetRequestForConsole',
'Illuminate\Foundation\Bootstrap\RegisterProviders',
'Illuminate\Foundation\Bootstrap\BootProviders',
];
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands
= [
UpgradeFireflyInstructions::class,
VerifyDatabase::class,
Import::class,
EncryptFile::class,
];
}

View File

@@ -0,0 +1,541 @@
<?php
/**
* AccountCrud.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Crud\Account;
use Carbon\Carbon;
use DB;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountMeta;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;
use Log;
/**
* Class AccountCrud
*
* @package FireflyIII\Crud\Account
*/
class AccountCrud implements AccountCrudInterface
{
/** @var User */
private $user;
/** @var array */
private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber'];
/**
* AccountCrud constructor.
*
* @param User $user
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* @param Account $account
* @param Account $moveTo
*
* @return bool
*/
public function destroy(Account $account, Account $moveTo): bool
{
if (!is_null($moveTo->id)) {
// update all transactions:
DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]);
}
if (!is_null($account)) {
Log::debug('Now trigger account delete #' . $account->id);
$account->delete();
}
return true;
}
/**
* @param $accountId
*
* @return Account
*/
public function find(int $accountId): Account
{
Log::debug('Searching for user ', ['user' => $this->user->id]);
$account = $this->user->accounts()->find($accountId);
if (is_null($account)) {
return new Account;
}
return $account;
}
/**
* @param string $number
* @param array $types
*
* @return Account
*/
public function findByAccountNumber(string $number, array $types): Account
{
$query = $this->user->accounts()
->leftJoin('account_meta', 'account_meta.account_id', '=', 'accounts.id')
->where('account_meta.name', 'accountNumber')
->where('account_meta.data', json_encode($number));
if (count($types) > 0) {
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
$query->whereIn('account_types.type', $types);
}
/** @var Collection $accounts */
$accounts = $query->get(['accounts.*']);
if ($accounts->count() > 0) {
return $accounts->first();
}
return new Account;
}
/**
* @param string $iban
* @param array $types
*
* @return Account
*/
public function findByIban(string $iban, array $types): Account
{
$query = $this->user->accounts()->where('iban', '!=', '');
if (count($types) > 0) {
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
$query->whereIn('account_types.type', $types);
}
$accounts = $query->get(['accounts.*']);
/** @var Account $account */
foreach ($accounts as $account) {
if ($account->iban === $iban) {
return $account;
}
}
return new Account;
}
/**
* @param string $name
* @param array $types
*
* @return Account
*/
public function findByName(string $name, array $types): Account
{
$query = $this->user->accounts();
Log::debug('Now in findByName()', ['name' => $name, 'types' => $types]);
if (count($types) > 0) {
$query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id');
$query->whereIn('account_types.type', $types);
}
$accounts = $query->get(['accounts.*']);
Log::debug(sprintf('Total set count is %d ', $accounts->count()));
/** @var Account $account */
foreach ($accounts as $account) {
if ($account->name === $name) {
Log::debug('Account name is an exact match. ', ['db' => $account->name, 'source' => $name, 'id' => $account->id]);
return $account;
}
}
Log::debug('Found nothing in findByName()', ['name' => $name, 'types' => $types]);
return new Account;
}
/**
* @param array $accountIds
*
* @return Collection
*/
public function getAccountsById(array $accountIds): Collection
{
/** @var Collection $result */
$query = $this->user->accounts()->with(
['accountmeta' => function (HasMany $query) {
$query->where('name', 'accountRole');
}]
);
if (count($accountIds) > 0) {
$query->whereIn('accounts.id', $accountIds);
}
$result = $query->get(['accounts.*']);
$result = $result->sortBy(
function (Account $account) {
return strtolower($account->name);
}
);
return $result;
}
/**
* @param array $types
*
* @return Collection
*/
public function getAccountsByType(array $types): Collection
{
/** @var Collection $result */
$query = $this->user->accounts()->with(
['accountmeta' => function (HasMany $query) {
$query->where('name', 'accountRole');
}]
);
if (count($types) > 0) {
$query->accountTypeIn($types);
}
$result = $query->get(['accounts.*']);
$result = $result->sortBy(
function (Account $account) {
return strtolower($account->name);
}
);
return $result;
}
/**
* @param array $data
*
* @return Account
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*/
public function store(array $data): Account
{
$newAccount = $this->storeAccount($data);
if (!is_null($newAccount->id)) {
$this->storeMetadata($newAccount, $data);
}
if ($data['openingBalance'] != 0) {
$this->storeInitialBalance($newAccount, $data);
}
return $newAccount;
}
/**
* @param $account
* @param $name
* @param $value
*
* @return AccountMeta
*/
public function storeMeta(Account $account, string $name, $value): AccountMeta
{
return AccountMeta::create(['name' => $name, 'data' => $value, 'account_id' => $account->id,]);
}
/**
* @param Account $account
* @param array $data
*
* @return Account
*/
public function update(Account $account, array $data): Account
{
// update the account:
$account->name = $data['name'];
$account->active = $data['active'] == '1' ? true : false;
$account->virtual_balance = $data['virtualBalance'];
$account->iban = $data['iban'];
$account->save();
$this->updateMetadata($account, $data);
$this->updateInitialBalance($account, $data);
return $account;
}
/**
* @param Account $account
* @param string $type
*
* @return Account
*/
public function updateAccountType(Account $account, string $type): Account
{
$type = AccountType::whereType($type)->first();
if (!is_null($type)) {
$account->accountType()->associate($type);
$account->save();
}
return $this->find($account->id);
}
/**
* @param array $data
*
* @return Account
*/
protected function storeAccount(array $data): Account
{
$type = config('firefly.accountTypeByIdentifier.' . $data['accountType']);
$accountType = AccountType::whereType($type)->first();
$newAccount = new Account(
[
'user_id' => $data['user'],
'account_type_id' => $accountType->id,
'name' => $data['name'],
'virtual_balance' => $data['virtualBalance'],
'active' => $data['active'] === true ? true : false,
'iban' => $data['iban'],
]
);
if (!$newAccount->isValid()) {
// does the account already exist?
$searchData = [
'user_id' => $data['user'],
'account_type_id' => $accountType->id,
'virtual_balance' => $data['virtualBalance'],
'name' => $data['name'],
'iban' => $data['iban'],
];
$existingAccount = Account::firstOrNullEncrypted($searchData);
if (!$existingAccount) {
Log::error('Account create error', $newAccount->getErrors()->toArray());
return new Account;
}
$newAccount = $existingAccount;
}
$newAccount->save();
return $newAccount;
}
/**
* @param Account $account
* @param array $data
*
* @return TransactionJournal
*/
protected function storeInitialBalance(Account $account, array $data): TransactionJournal
{
$amount = $data['openingBalance'];
$user = $data['user'];
$name = $data['name'];
$opposing = $this->storeOpposingAccount($amount, $user, $name);
$transactionType = TransactionType::whereType(TransactionType::OPENING_BALANCE)->first();
$journal = TransactionJournal::create(
[
'user_id' => $data['user'],
'transaction_type_id' => $transactionType->id,
'transaction_currency_id' => $data['openingBalanceCurrency'],
'description' => 'Initial balance for "' . $account->name . '"',
'completed' => true,
'date' => $data['openingBalanceDate'],
'encrypted' => true,
]
);
$firstAccount = $account;
$secondAccount = $opposing;
$firstAmount = $amount;
$secondAmount = $amount * -1;
if ($data['openingBalance'] < 0) {
$firstAccount = $opposing;
$secondAccount = $account;
$firstAmount = $amount * -1;
$secondAmount = $amount;
}
$one = new Transaction(['account_id' => $firstAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $firstAmount]);
$one->save();// first transaction: from
$two = new Transaction(['account_id' => $secondAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $secondAmount]);
$two->save(); // second transaction: to
return $journal;
}
/**
* @param Account $account
* @param array $data
*/
protected function storeMetadata(Account $account, array $data)
{
foreach ($this->validFields as $field) {
if (isset($data[$field])) {
$metaData = new AccountMeta(
[
'account_id' => $account->id,
'name' => $field,
'data' => $data[$field],
]
);
$metaData->save();
}
}
}
/**
* @param Account $account
* @param array $data
*
* @return bool
*/
protected function updateInitialBalance(Account $account, array $data): bool
{
$openingBalance = $this->openingBalanceTransaction($account);
if ($data['openingBalance'] != 0) {
if (!is_null($openingBalance->id)) {
$date = $data['openingBalanceDate'];
$amount = $data['openingBalance'];
return $this->updateJournal($account, $openingBalance, $date, $amount);
}
$this->storeInitialBalance($account, $data);
return true;
}
// else, delete it:
if ($openingBalance) { // opening balance is zero, should we delete it?
$openingBalance->delete(); // delete existing opening balance.
}
return true;
}
/**
* @param Account $account
* @param array $data
*
*/
protected function updateMetadata(Account $account, array $data)
{
foreach ($this->validFields as $field) {
$entry = $account->accountMeta()->where('name', $field)->first();
if (isset($data[$field])) {
// update if new data is present:
if (!is_null($entry)) {
$entry->data = $data[$field];
$entry->save();
continue;
}
$metaData = new AccountMeta(
[
'account_id' => $account->id,
'name' => $field,
'data' => $data[$field],
]
);
$metaData->save();
}
}
}
/**
* @param Account $account
*
* @return TransactionJournal|null
*/
private function openingBalanceTransaction(Account $account): TransactionJournal
{
$journal = TransactionJournal
::sortCorrectly()
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('transactions.account_id', $account->id)
->transactionTypes([TransactionType::OPENING_BALANCE])
->first(['transaction_journals.*']);
if (is_null($journal)) {
return new TransactionJournal;
}
return $journal;
}
/**
* @param float $amount
* @param int $user
* @param string $name
*
* @return Account
*/
private function storeOpposingAccount(float $amount, int $user, string $name):Account
{
$type = $amount < 0 ? 'expense' : 'revenue';
$opposingData = [
'user' => $user,
'accountType' => $type,
'name' => $name . ' initial balance',
'active' => false,
'iban' => '',
'virtualBalance' => 0,
];
return $this->storeAccount($opposingData);
}
/**
* @param Account $account
* @param TransactionJournal $journal
* @param Carbon $date
* @param float $amount
*
* @return bool
*/
private function updateJournal(Account $account, TransactionJournal $journal, Carbon $date, float $amount): bool
{
// update date:
$journal->date = $date;
$journal->save();
// update transactions:
/** @var Transaction $transaction */
foreach ($journal->transactions()->get() as $transaction) {
if ($account->id == $transaction->account_id) {
$transaction->amount = $amount;
$transaction->save();
}
if ($account->id != $transaction->account_id) {
$transaction->amount = $amount * -1;
$transaction->save();
}
}
return true;
}
}

View File

@@ -0,0 +1,109 @@
<?php
/**
* AccountCrudInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Crud\Account;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountMeta;
use Illuminate\Support\Collection;
/**
* Interface AccountCrudInterface
*
* @package FireflyIII\Crud\Account
*/
interface AccountCrudInterface
{
/**
* @param Account $account
* @param Account $moveTo
*
* @return bool
*/
public function destroy(Account $account, Account $moveTo): bool;
/**
* @param int $accountId
*
* @return Account
*/
public function find(int $accountId): Account;
/**
* @param string $number
* @param array $types
*
* @return Account
*/
public function findByAccountNumber(string $number, array $types): Account;
/**
* @param string $iban
* @param array $types
*
* @return Account
*/
public function findByIban(string $iban, array $types): Account;
/**
* @param string $name
* @param array $types
*
* @return Account
*/
public function findByName(string $name, array $types): Account;
/**
* @param array $accountIds
*
* @return Collection
*/
public function getAccountsById(array $accountIds): Collection;
/**
* @param array $types
*
* @return Collection
*/
public function getAccountsByType(array $types): Collection;
/**
* @param array $data
*
* @return Account
*/
public function store(array $data) : Account;
/**
* @param $account
* @param $name
* @param $value
*
* @return AccountMeta
*/
public function storeMeta(Account $account, string $name, $value): AccountMeta;
/**
* @param Account $account
* @param array $data
*
* @return Account
*/
public function update(Account $account, array $data): Account;
/**
* @param Account $account
* @param string $type
*
* @return Account
*/
public function updateAccountType(Account $account, string $type): Account;
}

216
app/Crud/Split/Journal.php Normal file
View File

@@ -0,0 +1,216 @@
<?php
/**
* Journal.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Crud\Split;
use FireflyIII\Events\TransactionStored;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\User;
use Illuminate\Support\Collection;
/**
* Class Journal
*
* @package FireflyIII\Crud\Split
*/
class Journal implements JournalInterface
{
/** @var User */
private $user;
/**
* AttachmentRepository constructor.
*
* @param User $user
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* @param $journal
*
* @return bool
*/
public function markAsComplete(TransactionJournal $journal)
{
$journal->completed = 1;
$journal->save();
return true;
}
/**
* @param TransactionJournal $journal
* @param array $transaction
*
* @return Collection
*/
public function storeTransaction(TransactionJournal $journal, array $transaction): Collection
{
// store accounts (depends on type)
list($sourceAccount, $destinationAccount) = $this->storeAccounts($journal->transactionType->type, $transaction);
// store transaction one way:
/** @var Transaction $one */
$one = Transaction::create(
['account_id' => $sourceAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $transaction['amount'] * -1,
'description' => $transaction['description']]
);
$two = Transaction::create(
['account_id' => $destinationAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $transaction['amount'],
'description' => $transaction['description']]
);
if (strlen($transaction['category']) > 0) {
$category = Category::firstOrCreateEncrypted(['name' => $transaction['category'], 'user_id' => $journal->user_id]);
$one->categories()->save($category);
$two->categories()->save($category);
}
if (intval($transaction['budget_id']) > 0) {
$budget = Budget::find($transaction['budget_id']);
$one->budgets()->save($budget);
$two->budgets()->save($budget);
}
if ($transaction['piggy_bank_id'] > 0) {
$transaction['date'] = $journal->date->format('Y-m-d');
event(new TransactionStored($transaction));
}
return new Collection([$one, $two]);
}
/**
* @param TransactionJournal $journal
* @param array $data
*
* @return TransactionJournal
*/
public function updateJournal(TransactionJournal $journal, array $data): TransactionJournal
{
$journal->description = $data['journal_description'];
$journal->transaction_currency_id = $data['journal_currency_id'];
$journal->date = $data['date'];
$journal->interest_date = $data['interest_date'];
$journal->book_date = $data['book_date'];
$journal->process_date = $data['process_date'];
$journal->save();
// delete original transactions, and recreate them.
$journal->transactions()->delete();
foreach ($data['transactions'] as $transaction) {
$this->storeTransaction($journal, $transaction);
}
$journal->completed = true;
$journal->save();
return $journal;
}
/**
* @param string $type
* @param array $transaction
*
* @return array
* @throws FireflyException
*/
private function storeAccounts(string $type, array $transaction): array
{
$sourceAccount = null;
$destinationAccount = null;
switch ($type) {
case TransactionType::WITHDRAWAL:
list($sourceAccount, $destinationAccount) = $this->storeWithdrawalAccounts($transaction);
break;
case TransactionType::DEPOSIT:
list($sourceAccount, $destinationAccount) = $this->storeDepositAccounts($transaction);
break;
case TransactionType::TRANSFER:
$sourceAccount = Account::where('user_id', $this->user->id)->where('id', $transaction['source_account_id'])->first();
$destinationAccount = Account::where('user_id', $this->user->id)->where('id', $transaction['destination_account_id'])->first();
break;
default:
throw new FireflyException('Cannot handle ' . e($type));
}
return [$sourceAccount, $destinationAccount];
}
/**
* @param array $data
*
* @return array
*/
private function storeDepositAccounts(array $data): array
{
$destinationAccount = Account::where('user_id', $this->user->id)->where('id', $data['destination_account_id'])->first(['accounts.*']);
if (isset($data['source_account_name']) && strlen($data['source_account_name']) > 0) {
$sourceType = AccountType::where('type', 'Revenue account')->first();
$sourceAccount = Account::firstOrCreateEncrypted(
['user_id' => $this->user->id, 'account_type_id' => $sourceType->id, 'name' => $data['source_account_name'], 'active' => 1]
);
return [$sourceAccount, $destinationAccount];
}
$sourceType = AccountType::where('type', 'Cash account')->first();
$sourceAccount = Account::firstOrCreateEncrypted(
['user_id' => $this->user->id, 'account_type_id' => $sourceType->id, 'name' => 'Cash account', 'active' => 1]
);
return [$sourceAccount, $destinationAccount];
}
/**
* @param array $data
*
* @return array
*/
private function storeWithdrawalAccounts(array $data): array
{
$sourceAccount = Account::where('user_id', $this->user->id)->where('id', $data['source_account_id'])->first(['accounts.*']);
if (strlen($data['destination_account_name']) > 0) {
$destinationType = AccountType::where('type', 'Expense account')->first();
$destinationAccount = Account::firstOrCreateEncrypted(
[
'user_id' => $this->user->id,
'account_type_id' => $destinationType->id,
'name' => $data['destination_account_name'],
'active' => 1,
]
);
return [$sourceAccount, $destinationAccount];
}
$destinationType = AccountType::where('type', 'Cash account')->first();
$destinationAccount = Account::firstOrCreateEncrypted(
['user_id' => $this->user->id, 'account_type_id' => $destinationType->id, 'name' => 'Cash account', 'active' => 1]
);
return [$sourceAccount, $destinationAccount];
}
}

View File

@@ -0,0 +1,47 @@
<?php
/**
* JournalInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Crud\Split;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
/**
* Interface JournalInterface
*
* @package FireflyIII\Crud\Split
*/
interface JournalInterface
{
/**
* @param $journal
*
* @return bool
*/
public function markAsComplete(TransactionJournal $journal);
/**
* @param TransactionJournal $journal
* @param array $transaction
*
* @return Collection
*/
public function storeTransaction(TransactionJournal $journal, array $transaction): Collection;
/**
* @param TransactionJournal $journal
* @param array $data
*
* @return TransactionJournal
*/
public function updateJournal(TransactionJournal $journal, array $data): TransactionJournal;
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* BudgetLimitStored.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use Carbon\Carbon;
use FireflyIII\Models\BudgetLimit;
use Illuminate\Queue\SerializesModels;
/**
* Class BudgetLimitStored
*
* @package FireflyIII\Events
*/
class BudgetLimitStored extends Event
{
use SerializesModels;
/** @var BudgetLimit */
public $budgetLimit;
/** @var Carbon */
public $end; // the only variable we can't get from the budget limit (if necessary).
/**
* BudgetLimitEvents constructor.
*
* @param BudgetLimit $budgetLimit
* @param Carbon $end
*/
public function __construct(BudgetLimit $budgetLimit, Carbon $end)
{
//
$this->budgetLimit = $budgetLimit;
$this->end = $end;
}
}

View File

@@ -0,0 +1,48 @@
<?php
/**
* BudgetLimitUpdated.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use Carbon\Carbon;
use FireflyIII\Models\BudgetLimit;
use Illuminate\Queue\SerializesModels;
/**
* Class BudgetLimitUpdated
*
* @package FireflyIII\Events
*/
class BudgetLimitUpdated extends Event
{
use SerializesModels;
/** @var BudgetLimit */
public $budgetLimit;
/** @var Carbon */
public $end; // the only variable we can't get from the budget limit (if necessary).
/**
* BudgetLimitEvents constructor.
*
* @param BudgetLimit $budgetLimit
* @param Carbon $end
*/
public function __construct(BudgetLimit $budgetLimit, Carbon $end)
{
//
$this->budgetLimit = $budgetLimit;
$this->end = $end;
}
}

21
app/Events/Event.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
/**
* Event.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
/**
* Class Event
*
* @package FireflyIII\Events
*/
abstract class Event
{
//
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* ResendConfirmation.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class ResendConfirmation
*
* @package FireflyIII\Events
*/
class ResendConfirmation extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* TransactionJournalStored.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class TransactionJournalStored
*
* @package FireflyIII\Events
*/
class TransactionJournalStored extends Event
{
use SerializesModels;
public $journal;
public $piggyBankId;
/**
* Create a new event instance.
*
* @param TransactionJournal $journal
* @param int $piggyBankId
*/
public function __construct(TransactionJournal $journal, int $piggyBankId)
{
//
$this->journal = $journal;
$this->piggyBankId = $piggyBankId;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* TransactionJournalUpdated.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class TransactionJournalUpdated
*
* @package FireflyIII\Events
*/
class TransactionJournalUpdated extends Event
{
use SerializesModels;
public $journal;
/**
* Create a new event instance.
*
* @param TransactionJournal $journal
*/
public function __construct(TransactionJournal $journal)
{
//
$this->journal = $journal;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* TransactionStored.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class TransactionJournalStored
*
* @package FireflyIII\Events
*/
class TransactionStored extends Event
{
use SerializesModels;
public $transaction = [];
/**
* Create a new event instance.
*
* @param array $transaction
*/
public function __construct(array $transaction)
{
//
$this->transaction = $transaction;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* UserIsConfirmed.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserIsConfirmed
*
* @package FireflyIII\Events
*/
class UserIsConfirmed extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* UserIsDeleted.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserIsDeleted
*
* @package FireflyIII\Events
*/
class UserIsDeleted extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* UserRegistration.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class UserRegistration
*
* @package FireflyIII\Events
*/
class UserRegistration extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* FireflyException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class FireflyException
*
* @package FireflyIII\Exceptions
*/
class FireflyException extends \Exception
{
}

101
app/Exceptions/Handler.php Normal file
View File

@@ -0,0 +1,101 @@
<?php
/**
* Handler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
use Auth;
use ErrorException;
use Exception;
use FireflyIII\Jobs\MailError;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Request;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
* Class Handler
*
* @package FireflyIII\Exceptions
*/
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport
= [
AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
];
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
*
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
$isDebug = env('APP_DEBUG', false);
return response()->view('errors.FireflyException', ['exception' => $exception, 'debug' => $isDebug], 500);
}
return parent::render($request, $exception);
}
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param Exception $exception
*
* @return void
*/
public function report(Exception $exception)
{
if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
$userData = [
'id' => 0,
'email' => 'unknown@example.com',
];
if (Auth::check()) {
$userData['id'] = Auth::user()->id;
$userData['email'] = Auth::user()->email;
}
$data = [
'class' => get_class($exception),
'errorMessage' => $exception->getMessage(),
'time' => date('r'),
'stackTrace' => $exception->getTraceAsString(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
'code' => $exception->getCode(),
];
// create job that will mail.
$job = new MailError($userData, env('SITE_OWNER'), Request::ip(), $data);
dispatch($job);
}
parent::report($exception);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* NotImplementedException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class NotImplementedException
*
* @package FireflyIII\Exceptions
*/
class NotImplementedException extends \Exception
{
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* ValidationException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class ValidationExceptions
*
* @package FireflyIII\Exception
*/
class ValidationException extends \Exception
{
}

View File

@@ -0,0 +1,147 @@
<?php
/**
* AttachmentCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use Amount;
use Crypt;
use FireflyIII\Models\Attachment;
use FireflyIII\Models\ExportJob;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Support\Collection;
use Log;
use Storage;
/**
* Class AttachmentCollector
*
* @package FireflyIII\Export\Collector
*/
class AttachmentCollector extends BasicCollector implements CollectorInterface
{
/** @var string */
private $explanationString = '';
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $exportDisk;
/** @var AttachmentRepositoryInterface */
private $repository;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $uploadDisk;
/**
* AttachmentCollector constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
/** @var AttachmentRepositoryInterface repository */
$this->repository = app(AttachmentRepositoryInterface::class);
// make storage:
$this->uploadDisk = Storage::disk('upload');
$this->exportDisk = Storage::disk('export');
parent::__construct($job);
}
/**
* @return bool
*/
public function run(): bool
{
// grab all the users attachments:
$attachments = $this->getAttachments();
/** @var Attachment $attachment */
foreach ($attachments as $attachment) {
$this->exportAttachment($attachment);
}
// put the explanation string in a file and attach it as well.
$file = $this->job->key . '-Source of all your attachments explained.txt';
$this->exportDisk->put($file, $this->explanationString);
$this->getFiles()->push($file);
return true;
}
/**
* @param Attachment $attachment
*/
private function explain(Attachment $attachment)
{
/** @var TransactionJournal $journal */
$journal = $attachment->attachable;
$args = [
'attachment_name' => e($attachment->filename),
'attachment_id' => $attachment->id,
'type' => strtolower($journal->transactionType->type),
'description' => e($journal->description),
'journal_id' => $journal->id,
'date' => $journal->date->formatLocalized(strval(trans('config.month_and_day'))),
'amount' => Amount::formatJournal($journal, false),
];
$string = trans('firefly.attachment_explanation', $args) . "\n";
$this->explanationString .= $string;
}
/**
* @param Attachment $attachment
*
* @return bool
*/
private function exportAttachment(Attachment $attachment): bool
{
$file = $attachment->fileName();
if ($this->uploadDisk->exists($file)) {
try {
$decrypted = Crypt::decrypt($this->uploadDisk->get($file));
$exportFile = $this->exportFileName($attachment);
$this->exportDisk->put($exportFile, $decrypted);
$this->getFiles()->push($exportFile);
// explain:
$this->explain($attachment);
} catch (DecryptException $e) {
Log::error('Catchable error: could not decrypt attachment #' . $attachment->id . ' because: ' . $e->getMessage());
}
}
return true;
}
/**
* Returns the new file name for the export file.
*
* @param $attachment
*
* @return string
*/
private function exportFileName($attachment): string
{
return sprintf('%s-Attachment nr. %s - %s', $this->job->key, strval($attachment->id), $attachment->filename);
}
/**
* @return Collection
*/
private function getAttachments(): Collection
{
$attachments = $this->repository->get();
return $attachments;
}
}

View File

@@ -0,0 +1,58 @@
<?php
/**
* BasicCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use FireflyIII\Models\ExportJob;
use Illuminate\Support\Collection;
/**
* Class BasicCollector
*
* @package FireflyIII\Export\Collector
*/
class BasicCollector
{
/** @var ExportJob */
protected $job;
/** @var Collection */
private $files;
/**
* BasicCollector constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
$this->files = new Collection;
$this->job = $job;
}
/**
* @return Collection
*/
public function getFiles(): Collection
{
return $this->files;
}
/**
* @param Collection $files
*/
public function setFiles(Collection $files)
{
$this->files = $files;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* CollectorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use Illuminate\Support\Collection;
/**
* Interface CollectorInterface
*
* @package FireflyIII\Export\Collector
*/
interface CollectorInterface
{
/**
* @return Collection
*/
public function getFiles(): Collection;
/**
* @return bool
*/
public function run(): bool;
/**
* @param Collection $files
*
*/
public function setFiles(Collection $files);
}

View File

@@ -0,0 +1,119 @@
<?php
/**
* UploadCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use Auth;
use Crypt;
use FireflyIII\Models\ExportJob;
use Illuminate\Contracts\Encryption\DecryptException;
use Log;
use Storage;
/**
* Class UploadCollector
*
* @package FireflyIII\Export\Collector
*/
class UploadCollector extends BasicCollector implements CollectorInterface
{
/** @var string */
private $expected;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $exportDisk;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $uploadDisk;
/**
*
* AttachmentCollector constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
parent::__construct($job);
// make storage:
$this->uploadDisk = Storage::disk('upload');
$this->exportDisk = Storage::disk('export');
$this->expected = 'csv-upload-' . Auth::user()->id . '-';
}
/**
* @return bool
*/
public function run(): bool
{
// grab upload directory.
$files = $this->uploadDisk->files();
foreach ($files as $entry) {
$this->processOldUpload($entry);
}
return true;
}
/**
* @param string $entry
*
* @return string
*/
private function getOriginalUploadDate(string $entry): string
{
// this is an original upload.
$parts = explode('-', str_replace(['.csv.encrypted', $this->expected], '', $entry));
$originalUpload = intval($parts[1]);
$date = date('Y-m-d \a\t H-i-s', $originalUpload);
return $date;
}
/**
* @param string $entry
*
* @return bool
*/
private function isValidFile(string $entry): bool
{
$len = strlen($this->expected);
if (substr($entry, 0, $len) === $this->expected) {
return true;
}
return false;
}
/**
* @param $entry
*/
private function processOldUpload(string $entry)
{
$content = '';
if ($this->isValidFile($entry)) {
try {
$content = Crypt::decrypt($this->uploadDisk->get($entry));
} catch (DecryptException $e) {
Log::error('Could not decrypt old CSV import file ' . $entry . '. Skipped because ' . $e->getMessage());
}
}
if (strlen($content) > 0) {
// continue with file:
$date = $this->getOriginalUploadDate($entry);
$file = $this->job->key . '-Old CSV import dated ' . $date . '.csv';
$this->exportDisk->put($file, $content);
$this->getFiles()->push($file);
}
}
}

View File

@@ -0,0 +1,66 @@
<?php
/**
* ConfigurationFile.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export;
use FireflyIII\Export\Entry\Entry;
use FireflyIII\Models\ExportJob;
use Storage;
/**
* Class ConfigurationFile
*
* @package FireflyIII\Export
*/
class ConfigurationFile
{
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $exportDisk;
/** @var ExportJob */
private $job;
/**
* ConfigurationFile constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
$this->job = $job;
$this->exportDisk = Storage::disk('export');
}
/**
* @return string
*/
public function make(): string
{
$fields = array_keys(Entry::getFieldsAndTypes());
$types = Entry::getFieldsAndTypes();
$configuration = [
'date-format' => 'Y-m-d', // unfortunately, this is hard-coded.
'has-headers' => true,
'map' => [], // we could build a map if necessary for easy re-import.
'roles' => [],
'mapped' => [],
'specifix' => [],
];
foreach ($fields as $field) {
$configuration['roles'][] = $types[$field];
}
$file = $this->job->key . '-configuration.json';
$this->exportDisk->put($file, json_encode($configuration, JSON_PRETTY_PRINT));
return $file;
}
}

130
app/Export/Entry/Entry.php Normal file
View File

@@ -0,0 +1,130 @@
<?php
/**
* Entry.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
/**
* To extend the exported object, in case of new features in Firefly III for example,
* do the following:
*
* - Add the field(s) to this class. If you add more than one related field, add a new object.
* - Make sure the "fromJournal"-routine fills these fields.
* - Add them to the static function that returns its type (key=value. Remember that the only
* valid types can be found in config/csv.php (under "roles").
*
* These new entries should be should be strings and numbers as much as possible.
*
*
*
* Class Entry
*
* @package FireflyIII\Export\Entry
*/
final class Entry
{
/** @var string */
public $amount;
/** @var EntryBill */
public $bill;
/** @var EntryBudget */
public $budget;
/** @var EntryCategory */
public $category;
/** @var string */
public $date;
/** @var string */
public $description;
/** @var EntryAccount */
public $destinationAccount;
/** @var Collection */
public $destinationAccounts;
/** @var EntryAccount */
public $sourceAccount;
/** @var Collection */
public $sourceAccounts;
/**
* Entry constructor.
*/
private function __construct()
{
$this->sourceAccounts = new Collection;
$this->destinationAccounts = new Collection;
}
/**
* @param TransactionJournal $journal
*
* @return Entry
*/
public static function fromJournal(TransactionJournal $journal)
{
$entry = new self;
$entry->description = $journal->description;
$entry->date = $journal->date->format('Y-m-d');
$entry->amount = TransactionJournal::amount($journal);
$entry->budget = new EntryBudget($journal->budgets->first());
$entry->category = new EntryCategory($journal->categories->first());
$entry->bill = new EntryBill($journal->bill);
$sources = TransactionJournal::sourceAccountList($journal);
$destinations = TransactionJournal::destinationAccountList($journal);
$entry->sourceAccount = new EntryAccount($sources->first());
$entry->destinationAccount = new EntryAccount($destinations->first());
foreach ($sources as $source) {
$entry->sourceAccounts->push(new EntryAccount($source));
}
foreach ($destinations as $destination) {
$entry->destinationAccounts->push(new EntryAccount($destination));
}
return $entry;
}
/**
* @return array
*/
public static function getFieldsAndTypes(): array
{
// key = field name (see top of class)
// value = field type (see csv.php under 'roles')
return [
'description' => 'description',
'amount' => 'amount',
'date' => 'date-transaction',
'source_account_id' => 'account-id',
'source_account_name' => 'account-name',
'source_account_iban' => 'account-iban',
'source_account_type' => '_ignore',
'source_account_number' => 'account-number',
'destination_account_id' => 'opposing-id',
'destination_account_name' => 'opposing-name',
'destination_account_iban' => 'opposing-iban',
'destination_account_type' => '_ignore',
'destination_account_number' => 'account-number',
'budget_id' => 'budget-id',
'budget_name' => 'budget-name',
'category_id' => 'category-id',
'category_name' => 'category-name',
'bill_id' => 'bill-id',
'bill_name' => 'bill-name',
];
}
}

View File

@@ -0,0 +1,47 @@
<?php
/**
* EntryAccount.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use FireflyIII\Models\Account;
/**
* Class EntryAccount
*
* @package FireflyIII\Export\Entry
*/
class EntryAccount
{
/** @var int */
public $accountId;
/** @var string */
public $iban;
/** @var string */
public $name;
/** @var string */
public $number;
/** @var string */
public $type;
/**
* EntryAccount constructor.
*
* @param Account $account
*/
public function __construct(Account $account)
{
$this->accountId = $account->id;
$this->name = $account->name;
$this->iban = $account->iban;
$this->type = $account->accountType->type;
$this->number = $account->getMeta('accountNumber');
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* EntryBill.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use FireflyIII\Models\Bill;
/**
* Class EntryBill
*
* @package FireflyIII\Export\Entry
*/
class EntryBill
{
/** @var int */
public $billId = '';
/** @var string */
public $name = '';
/**
* EntryBill constructor.
*
* @param Bill $bill
*/
public function __construct(Bill $bill = null)
{
if (!is_null($bill)) {
$this->billId = $bill->id;
$this->name = $bill->name;
}
}
}

View File

@@ -0,0 +1,41 @@
<?php
/**
* EntryBudget.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use FireflyIII\Models\Budget;
/**
* Class EntryBudget
*
* @package FireflyIII\Export\Entry
*/
class EntryBudget
{
/** @var int */
public $budgetId = '';
/** @var string */
public $name = '';
/**
* EntryBudget constructor.
*
* @param Budget $budget
*/
public function __construct(Budget $budget = null)
{
if (!is_null($budget)) {
$this->budgetId = $budget->id;
$this->name = $budget->name;
}
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* EntryCategory.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use FireflyIII\Models\Category;
/**
* Class EntryCategory
*
* @package FireflyIII\Export\Entry
*/
class EntryCategory
{
/** @var int */
public $categoryId = '';
/** @var string */
public $name = '';
/**
* EntryCategory constructor.
*
* @param Category $category
*/
public function __construct(Category $category = null)
{
if (!is_null($category)) {
$this->categoryId = $category->id;
$this->name = $category->name;
}
}
}

View File

@@ -0,0 +1,57 @@
<?php
/**
* BasicExporter.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Exporter;
use FireflyIII\Models\ExportJob;
use Illuminate\Support\Collection;
/**
* Class BasicExporter
*
* @package FireflyIII\Export\Exporter
*/
class BasicExporter
{
/** @var ExportJob */
protected $job;
private $entries;
/**
* BasicExporter constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
$this->entries = new Collection;
$this->job = $job;
}
/**
* @return Collection
*/
public function getEntries(): Collection
{
return $this->entries;
}
/**
* @param Collection $entries
*/
public function setEntries(Collection $entries)
{
$this->entries = $entries;
}
}

View File

@@ -0,0 +1,172 @@
<?php
/**
* CsvExporter.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Exporter;
use FireflyIII\Export\Entry\Entry;
use FireflyIII\Export\Entry\EntryAccount;
use FireflyIII\Models\ExportJob;
use Illuminate\Support\Collection;
use League\Csv\Writer;
use SplFileObject;
/**
* Class CsvExporter
*
* @package FireflyIII\Export\Exporter
*/
class CsvExporter extends BasicExporter implements ExporterInterface
{
/** @var string */
private $fileName;
/**
* CsvExporter constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
parent::__construct($job);
}
/**
* @return string
*/
public function getFileName(): string
{
return $this->fileName;
}
/**
* @return bool
*/
public function run(): bool
{
// create temporary file:
$this->tempFile();
// necessary for CSV writer:
$fullPath = storage_path('export') . DIRECTORY_SEPARATOR . $this->fileName;
$writer = Writer::createFromPath(new SplFileObject($fullPath, 'a+'), 'w');
$rows = [];
// Count the maximum number of sources and destinations each entry has. May need to expand the number of export fields:
$maxSourceAccounts = 1;
$maxDestAccounts = 1;
/** @var Entry $entry */
foreach ($this->getEntries() as $entry) {
$sources = $entry->sourceAccounts->count();
$destinations = $entry->destinationAccounts->count();
$maxSourceAccounts = max($maxSourceAccounts, $sources);
$maxDestAccounts = max($maxDestAccounts, $destinations);
}
$rows[] = array_keys($this->getFieldsAndTypes($maxSourceAccounts, $maxDestAccounts));
/** @var Entry $entry */
foreach ($this->getEntries() as $entry) {
// order is defined in Entry::getFieldsAndTypes.
$current = [$entry->description, $entry->amount, $entry->date];
$sourceData = $this->getAccountData($maxSourceAccounts, $entry->sourceAccounts);
$current = array_merge($current, $sourceData);
$destData = $this->getAccountData($maxDestAccounts, $entry->destinationAccounts);
$current = array_merge($current, $destData);
$rest = [$entry->budget->budgetId, $entry->budget->name, $entry->category->categoryId, $entry->category->name, $entry->bill->billId,
$entry->bill->name];
$current = array_merge($current, $rest);
$rows[] = $current;
}
$writer->insertAll($rows);
return true;
}
/**
* @param int $max
* @param Collection $accounts
*
* @return array
*/
private function getAccountData(int $max, Collection $accounts): array
{
$current = [];
for ($i = 0; $i < $max; $i++) {
/** @var EntryAccount $source */
$source = $accounts->get($i);
$currentId = '';
$currentName = '';
$currentIban = '';
$currentType = '';
$currentNumber = '';
if ($source) {
$currentId = $source->accountId;
$currentName = $source->name;
$currentIban = $source->iban;
$currentType = $source->type;
$currentNumber = $source->number;
}
$current[] = $currentId;
$current[] = $currentName;
$current[] = $currentIban;
$current[] = $currentType;
$current[] = $currentNumber;
}
unset($source);
return $current;
}
/**
* @param int $sources
* @param int $destinations
*
* @return array
*/
private function getFieldsAndTypes(int $sources, int $destinations): array
{
// key = field name (see top of class)
// value = field type (see csv.php under 'roles')
$array = [
'description' => 'description',
'amount' => 'amount',
'date' => 'date-transaction',
];
for ($i = 0; $i < $sources; $i++) {
$array['source_account_' . $i . '_id'] = 'account-id';
$array['source_account_' . $i . '_name'] = 'account-name';
$array['source_account_' . $i . '_iban'] = 'account-iban';
$array['source_account_' . $i . '_type'] = '_ignore';
$array['source_account_' . $i . '_number'] = 'account-number';
}
for ($i = 0; $i < $destinations; $i++) {
$array['destination_account_' . $i . '_id'] = 'account-id';
$array['destination_account_' . $i . '_name'] = 'account-name';
$array['destination_account_' . $i . '_iban'] = 'account-iban';
$array['destination_account_' . $i . '_type'] = '_ignore';
$array['destination_account_' . $i . '_number'] = 'account-number';
}
$array['budget_id'] = 'budget-id';
$array['budget_name'] = 'budget-name';
$array['category_id'] = 'category-id';
$array['category_name'] = 'category-name';
$array['bill_id'] = 'bill-id';
$array['bill_name'] = 'bill-name';
return $array;
}
private function tempFile()
{
$this->fileName = $this->job->key . '-records.csv';
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* ExporterInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Exporter;
use Illuminate\Support\Collection;
/**
* Interface ExporterInterface
*
* @package FireflyIII\Export\Exporter
*/
interface ExporterInterface
{
/**
* @return Collection
*/
public function getEntries(): Collection;
/**
* @return string
*/
public function getFileName(): string;
/**
* @return bool
*/
public function run(): bool;
/**
* @param Collection $entries
*
*/
public function setEntries(Collection $entries);
}

203
app/Export/Processor.php Normal file
View File

@@ -0,0 +1,203 @@
<?php
/**
* Processor.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Export\Collector\AttachmentCollector;
use FireflyIII\Export\Collector\UploadCollector;
use FireflyIII\Export\Entry\Entry;
use FireflyIII\Models\ExportJob;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Collection;
use Storage;
use ZipArchive;
/**
* Class Processor
*
* @package FireflyIII\Export
*/
class Processor
{
/** @var Collection */
public $accounts;
/** @var string */
public $exportFormat;
/** @var bool */
public $includeAttachments;
/** @var bool */
public $includeConfig;
/** @var bool */
public $includeOldUploads;
/** @var ExportJob */
public $job;
/** @var array */
public $settings;
/** @var \FireflyIII\Export\ConfigurationFile */
private $configurationMaker;
/** @var Collection */
private $exportEntries;
/** @var Collection */
private $files;
/** @var Collection */
private $journals;
/**
* Processor constructor.
*
* @param array $settings
*/
public function __construct(array $settings)
{
// save settings
$this->settings = $settings;
$this->accounts = $settings['accounts'];
$this->exportFormat = $settings['exportFormat'];
$this->includeAttachments = $settings['includeAttachments'];
$this->includeConfig = $settings['includeConfig'];
$this->includeOldUploads = $settings['includeOldUploads'];
$this->job = $settings['job'];
$this->journals = new Collection;
$this->exportEntries = new Collection;
$this->files = new Collection;
}
/**
* @return bool
*/
public function collectAttachments(): bool
{
/** @var AttachmentCollector $attachmentCollector */
$attachmentCollector = app(AttachmentCollector::class, [$this->job]);
$attachmentCollector->run();
$this->files = $this->files->merge($attachmentCollector->getFiles());
return true;
}
/**
* @return bool
*/
public function collectJournals(): bool
{
/** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepositoryInterface::class);
$this->journals = $repository->getJournalsInRange($this->accounts, $this->settings['startDate'], $this->settings['endDate']);
return true;
}
/**
* @return bool
*/
public function collectOldUploads(): bool
{
/** @var UploadCollector $uploadCollector */
$uploadCollector = app(UploadCollector::class, [$this->job]);
$uploadCollector->run();
$this->files = $this->files->merge($uploadCollector->getFiles());
return true;
}
/**
* @return bool
*/
public function convertJournals(): bool
{
$count = 0;
/** @var TransactionJournal $journal */
foreach ($this->journals as $journal) {
$this->exportEntries->push(Entry::fromJournal($journal));
$count++;
}
return true;
}
/**
* @return bool
*/
public function createConfigFile(): bool
{
$this->configurationMaker = app(ConfigurationFile::class, [$this->job]);
$this->files->push($this->configurationMaker->make());
return true;
}
/**
* @return bool
* @throws FireflyException
*/
public function createZipFile(): bool
{
$zip = new ZipArchive;
$file = $this->job->key . '.zip';
$fullPath = storage_path('export') . '/' . $file;
if ($zip->open($fullPath, ZipArchive::CREATE) !== true) {
throw new FireflyException('Cannot store zip file.');
}
// for each file in the collection, add it to the zip file.
$disk = Storage::disk('export');
foreach ($this->getFiles() as $entry) {
// is part of this job?
$zipFileName = str_replace($this->job->key . '-', '', $entry);
$zip->addFromString($zipFileName, $disk->get($entry));
}
$zip->close();
// delete the files:
$this->deleteFiles($disk);
return true;
}
/**
* @return bool
*/
public function exportJournals(): bool
{
$exporterClass = config('firefly.export_formats.' . $this->exportFormat);
$exporter = app($exporterClass, [$this->job]);
$exporter->setEntries($this->exportEntries);
$exporter->run();
$this->files->push($exporter->getFileName());
return true;
}
/**
* @return Collection
*/
public function getFiles(): Collection
{
return $this->files;
}
/**
* @param FilesystemAdapter $disk
*/
private function deleteFiles(FilesystemAdapter $disk)
{
foreach ($this->getFiles() as $file) {
$disk->delete($file);
}
}
}

View File

@@ -0,0 +1,52 @@
<?php
/**
* AccountChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Account;
use Carbon\Carbon;
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
/**
* Interface AccountChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Account
*/
interface AccountChartGeneratorInterface
{
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array;
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array;
/**
* @param Account $account
* @param array $labels
* @param array $dataSet
*
* @return array
*/
public function single(Account $account, array $labels, array $dataSet): array;
}

View File

@@ -0,0 +1,107 @@
<?php
/**
* ChartJsAccountChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Account;
use Carbon\Carbon;
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
/**
* Class ChartJsAccountChartGenerator
*
* @package FireflyIII\Generator\Chart\Account
*/
class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
{
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array
{
$data = [
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.spent'),
'data' => []]]];
foreach ($accounts as $account) {
if ($account->difference > 0) {
$data['labels'][] = $account->name;
$data['datasets'][0]['data'][] = $account->difference;
}
}
return $data;
}
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array
{
// language:
$format = (string)trans('config.month_and_day');
$data = ['count' => 0, 'labels' => [], 'datasets' => [],];
$current = clone $start;
while ($current <= $end) {
$data['labels'][] = $current->formatLocalized($format);
$current->addDay();
}
foreach ($accounts as $account) {
$data['datasets'][] = [
'label' => $account->name,
'fillColor' => 'rgba(220,220,220,0.2)',
'strokeColor' => 'rgba(220,220,220,1)',
'pointColor' => 'rgba(220,220,220,1)',
'pointStrokeColor' => '#fff',
'pointHighlightFill' => '#fff',
'pointHighlightStroke' => 'rgba(220,220,220,1)',
'data' => $account->balances,
];
}
$data['count'] = count($data['datasets']);
return $data;
}
/**
* @param Account $account
* @param array $labels
* @param array $dataSet
*
* @return array
*/
public function single(Account $account, array $labels, array $dataSet): array
{
$data = [
'count' => 1,
'labels' => $labels,
'datasets' => [
[
'label' => $account->name,
'data' => $dataSet,
],
],
];
return $data;
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* BillChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Bill;
use FireflyIII\Models\Bill;
use Illuminate\Support\Collection;
/**
* Interface BillChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Bill
*/
interface BillChartGeneratorInterface
{
/**
* @param string $paid
* @param string $unpaid
*
* @return array
*/
public function frontpage(string $paid, string $unpaid): array;
/**
* @param Bill $bill
* @param Collection $entries
*
* @return array
*/
public function single(Bill $bill, Collection $entries): array;
}

View File

@@ -0,0 +1,91 @@
<?php
/**
* ChartJsBillChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Bill;
use FireflyIII\Models\Bill;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
/**
* Class ChartJsBillChartGenerator
*
* @package FireflyIII\Generator\Chart\Bill
*/
class ChartJsBillChartGenerator implements BillChartGeneratorInterface
{
/**
* @param string $paid
* @param string $unpaid
*
* @return array
*/
public function frontpage(string $paid, string $unpaid): array
{
$data = [
'datasets' => [
[
'data' => [round($unpaid, 2), round(bcmul($paid, '-1'), 2)],
'backgroundColor' => ['rgba(53, 124, 165,0.7)', 'rgba(0, 141, 76, 0.7)',],
],
],
'labels' => [strval(trans('firefly.unpaid')), strval(trans('firefly.paid'))],
];
return $data;
}
/**
* @param Bill $bill
* @param Collection $entries
*
* @return array
*/
public function single(Bill $bill, Collection $entries): array
{
$format = (string)trans('config.month');
$data = ['count' => 3, 'labels' => [], 'datasets' => [],];
$minAmount = [];
$maxAmount = [];
$actualAmount = [];
/** @var TransactionJournal $entry */
foreach ($entries as $entry) {
$data['labels'][] = $entry->date->formatLocalized($format);
$minAmount[] = round($bill->amount_min, 2);
$maxAmount[] = round($bill->amount_max, 2);
// journalAmount has been collected in BillRepository::getJournals
$actualAmount[] = round(TransactionJournal::amountPositive($entry), 2);
}
$data['datasets'][] = [
'type' => 'bar',
'label' => trans('firefly.minAmount'),
'data' => $minAmount,
];
$data['datasets'][] = [
'type' => 'line',
'label' => trans('firefly.billEntry'),
'data' => $actualAmount,
];
$data['datasets'][] = [
'type' => 'bar',
'label' => trans('firefly.maxAmount'),
'data' => $maxAmount,
];
$data['count'] = count($data['datasets']);
return $data;
}
}

View File

@@ -0,0 +1,62 @@
<?php
/**
* BudgetChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Budget;
use Illuminate\Support\Collection;
/**
* Interface BudgetChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Budget
*/
interface BudgetChartGeneratorInterface
{
/**
* @param Collection $entries
* @param string $dateFormat
*
* @return array
*/
public function budgetLimit(Collection $entries, string $dateFormat): array;
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries): array;
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries): array;
/**
* @param Collection $entries
* @param string $viewRange
*
* @return array
*/
public function period(Collection $entries, string $viewRange) : array;
/**
* @param Collection $budgets
* @param Collection $entries
*
* @return array
*/
public function year(Collection $budgets, Collection $entries): array;
}

View File

@@ -0,0 +1,208 @@
<?php
/**
* ChartJsBudgetChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Budget;
use Illuminate\Support\Collection;
use Navigation;
/**
* Class ChartJsBudgetChartGenerator
*
* @package FireflyIII\Generator\Chart\Budget
*/
class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface
{
/**
*
* @param Collection $entries
* @param string $dateFormat
*
* @return array
*/
public function budgetLimit(Collection $entries, string $dateFormat = 'month_and_day'): array
{
$format = strval(trans('config.' . $dateFormat));
$data = [
'labels' => [],
'datasets' => [
[
'label' => 'Amount',
'data' => [],
],
],
];
/** @var array $entry */
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized($format);
$data['datasets'][0]['data'][] = $entry[1];
}
$data['count'] = count($data['datasets']);
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries): array
{
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
$left = [];
$spent = [];
$overspent = [];
$filtered = $entries->filter(
function ($entry) {
return ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0);
}
);
foreach ($filtered as $entry) {
$data['labels'][] = $entry[0];
$left[] = round($entry[1], 2);
$spent[] = round(bcmul($entry[2], '-1'), 2); // spent is coming in negative, must be positive
$overspent[] = round(bcmul($entry[3], '-1'), 2); // same
}
$data['datasets'][] = [
'label' => trans('firefly.overspent'),
'data' => $overspent,
];
$data['datasets'][] = [
'label' => trans('firefly.left'),
'data' => $left,
];
$data['datasets'][] = [
'label' => trans('firefly.spent'),
'data' => $spent,
];
$data['count'] = 3;
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries): array
{
// dataset:
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
// get labels from one of the budgets (assuming there's at least one):
$first = $entries->first();
$keys = array_keys($first['budgeted']);
foreach ($keys as $year) {
$data['labels'][] = strval($year);
}
// then, loop all entries and create datasets:
foreach ($entries as $entry) {
$name = $entry['name'];
$spent = $entry['spent'];
$budgeted = $entry['budgeted'];
$data['datasets'][] = ['label' => 'Spent on ' . $name, 'data' => array_values($spent)];
$data['datasets'][] = ['label' => 'Budgeted for ' . $name, 'data' => array_values($budgeted)];
}
$data['count'] = count($data['datasets']);
return $data;
}
/**
* @param Collection $entries
* @param string $viewRange
*
* @return array
*/
public function period(Collection $entries, string $viewRange) : array
{
$data = [
'labels' => [],
'datasets' => [
0 => [
'label' => trans('firefly.budgeted'),
'data' => [],
],
1 => [
'label' => trans('firefly.spent'),
'data' => [],
],
],
'count' => 2,
];
foreach ($entries as $entry) {
$label = Navigation::periodShow($entry['date'], $viewRange);
$data['labels'][] = $label;
// data set 0 is budgeted
// data set 1 is spent:
$data['datasets'][0]['data'][] = $entry['budgeted'];
$data['datasets'][1]['data'][] = round(($entry['spent'] * -1), 2);
}
return $data;
}
/**
* @param Collection $budgets
* @param Collection $entries
*
* @return array
*/
public function year(Collection $budgets, Collection $entries): array
{
// language:
$format = (string)trans('config.month');
$data = [
'labels' => [],
'datasets' => [],
];
foreach ($budgets as $budget) {
$data['labels'][] = $budget->name;
}
// also add "no budget"
$data['labels'][] = strval(trans('firefly.no_budget'));
/** @var array $entry */
foreach ($entries as $entry) {
$array = [
'label' => $entry[0]->formatLocalized($format),
'data' => [],
];
array_shift($entry);
$array['data'] = $entry;
$data['datasets'][] = $array;
}
$data['count'] = count($data['datasets']);
return $data;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* CategoryChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Category;
use Illuminate\Support\Collection;
/**
* Interface CategoryChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Category
*/
interface CategoryChartGeneratorInterface
{
/**
* @param Collection $entries
*
* @return array
*/
public function all(Collection $entries): array;
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInPeriod(Collection $categories, Collection $entries): array;
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries): array;
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries): array;
/**
* @param Collection $entries
*
* @return array
*/
public function period(Collection $entries): array;
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInPeriod(Collection $categories, Collection $entries): array;
}

View File

@@ -0,0 +1,190 @@
<?php
/**
* ChartJsCategoryChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Category;
use Illuminate\Support\Collection;
/**
* Class ChartJsCategoryChartGenerator
*
* @package FireflyIII\Generator\Chart\Category
*/
class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
{
/**
* @param Collection $entries
*
* @return array
*/
public function all(Collection $entries): array
{
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.spent'),
'data' => [],
],
[
'label' => trans('firefly.earned'),
'data' => [],
],
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[1];
$spent = $entry[2];
$earned = $entry[3];
$data['datasets'][0]['data'][] = bccomp($spent, '0') === 0 ? null : round(bcmul($spent, '-1'), 4);
$data['datasets'][1]['data'][] = bccomp($earned, '0') === 0 ? null : round($earned, 4);
}
return $data;
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInPeriod(Collection $categories, Collection $entries): array
{
// language:
$format = (string)trans('config.month');
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries): array
{
$data = [
'count' => 1,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.spent'),
'data' => [],
],
],
];
foreach ($entries as $entry) {
if ($entry->spent != 0) {
$data['labels'][] = $entry->name;
$data['datasets'][0]['data'][] = round(bcmul($entry->spent, '-1'), 2);
}
}
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function multiYear(Collection $entries): array
{
// get labels from one of the categories (assuming there's at least one):
$first = $entries->first();
$data = ['count' => 0, 'labels' => array_keys($first['spent']), 'datasets' => [],];
// then, loop all entries and create datasets:
foreach ($entries as $entry) {
$name = $entry['name'];
$spent = $entry['spent'];
$earned = $entry['earned'];
if (array_sum(array_values($spent)) != 0) {
$data['datasets'][] = ['label' => 'Spent in category ' . $name, 'data' => array_values($spent)];
}
if (array_sum(array_values($earned)) != 0) {
$data['datasets'][] = ['label' => 'Earned in category ' . $name, 'data' => array_values($earned)];
}
}
$data['count'] = count($data['datasets']);
return $data;
}
/**
*
* @param Collection $entries
*
* @return array
*/
public function period(Collection $entries): array
{
return $this->all($entries);
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInPeriod(Collection $categories, Collection $entries): array
{
// language:
$format = (string)trans('config.month');
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
foreach ($categories as $category) {
$data['labels'][] = $category->name;
}
foreach ($entries as $entry) {
$date = $entry[0]->formatLocalized($format);
array_shift($entry);
$data['count']++;
$data['datasets'][] = ['label' => $date, 'data' => $entry];
}
return $data;
}
}

View File

@@ -0,0 +1,56 @@
<?php
/**
* ChartJsPiggyBankChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\PiggyBank;
use Carbon\Carbon;
use Illuminate\Support\Collection;
/**
* Class ChartJsPiggyBankChartGenerator
*
* @package FireflyIII\Generator\Chart\PiggyBank
*/
class ChartJsPiggyBankChartGenerator implements PiggyBankChartGeneratorInterface
{
/**
* @param Collection $set
*
* @return array
*/
public function history(Collection $set): array
{
// language:
$format = (string)trans('config.month_and_day');
$data = [
'count' => 1,
'labels' => [],
'datasets' => [
[
'label' => 'Diff',
'data' => [],
],
],
];
$sum = '0';
foreach ($set as $key => $value) {
$date = new Carbon($key);
$sum = bcadd($sum, $value);
$data['labels'][] = $date->formatLocalized($format);
$data['datasets'][0]['data'][] = round($sum, 2);
}
return $data;
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* PiggyBankChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\PiggyBank;
use Illuminate\Support\Collection;
/**
* Interface PiggyBankChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\PiggyBank
*/
interface PiggyBankChartGeneratorInterface
{
/**
* @param Collection $set
*
* @return array
*/
public function history(Collection $set): array;
}

View File

@@ -0,0 +1,178 @@
<?php
/**
* ChartJsReportChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Report;
use Illuminate\Support\Collection;
/**
* Class ChartJsReportChartGenerator
*
* @package FireflyIII\Generator\Chart\Report
*/
class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
{
/**
* Same as above but other translations.
*
* @param Collection $entries
*
* @return array
*/
public function multiYearInOut(Collection $entries): array
{
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => [],
],
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized('%Y');
$data['datasets'][0]['data'][] = round($entry[1], 2);
$data['datasets'][1]['data'][] = round($entry[2], 2);
}
return $data;
}
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function multiYearInOutSummarized(string $income, string $expense, int $count): array
{
$data = [
'count' => 2,
'labels' => [trans('firefly.sum_of_years'), trans('firefly.average_of_years')],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => [],
],
],
];
$data['datasets'][0]['data'][] = round($income, 2);
$data['datasets'][1]['data'][] = round($expense, 2);
$data['datasets'][0]['data'][] = round(($income / $count), 2);
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function netWorth(Collection $entries) : array
{
$format = (string)trans('config.month_and_day');
$data = [
'count' => 1,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.net_worth'),
'data' => [],
],
],
];
foreach ($entries as $entry) {
$data['labels'][] = trim($entry['date']->formatLocalized($format));
$data['datasets'][0]['data'][] = round($entry['net-worth'], 2);
}
return $data;
}
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries): array
{
// language:
$format = (string)trans('config.month');
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => [],
],
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized($format);
$data['datasets'][0]['data'][] = round($entry[1], 2);
$data['datasets'][1]['data'][] = round($entry[2], 2);
}
return $data;
}
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function yearInOutSummarized(string $income, string $expense, int $count): array
{
$data = [
'count' => 2,
'labels' => [trans('firefly.sum_of_year'), trans('firefly.average_of_year')],
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => [],
],
],
];
$data['datasets'][0]['data'][] = round($income, 2);
$data['datasets'][1]['data'][] = round($expense, 2);
$data['datasets'][0]['data'][] = round(($income / $count), 2);
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
return $data;
}
}

View File

@@ -0,0 +1,63 @@
<?php
/**
* ReportChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Report;
use Illuminate\Support\Collection;
/**
* Interface ReportChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Report
*/
interface ReportChartGeneratorInterface
{
/**
* @param Collection $entries
*
* @return array
*/
public function multiYearInOut(Collection $entries): array;
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function multiYearInOutSummarized(string $income, string $expense, int $count): array;
/**
* @param Collection $entries
*
* @return array
*/
public function netWorth(Collection $entries) : array;
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries): array;
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function yearInOutSummarized(string $income, string $expense, int $count): array;
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* AttachUserRole.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\UserRegistration;
use FireflyIII\Repositories\User\UserRepositoryInterface;
/**
* Class AttachUserRole
*
* @package FireflyIII\Handlers\Events
*/
class AttachUserRole
{
/**
* Create the event listener.
*
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param UserRegistration $event
*/
public function handle(UserRegistration $event)
{
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
// first user ever?
if ($repository->count() == 1) {
$repository->attachRole($event->user, 'owner');
}
}
}

View File

@@ -0,0 +1,107 @@
<?php
/**
* BudgetLimitEventHandler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\BudgetLimitStored;
use FireflyIII\Events\BudgetLimitUpdated;
use FireflyIII\Models\LimitRepetition;
use Illuminate\Database\QueryException;
use Log;
/**
* Class BudgetLimitEventHandler
*
* @package FireflyIII\Handlers\Events
*/
class BudgetLimitEventHandler
{
/**
* Create the event listener.
*
*/
public function __construct()
{
}
/**
* In a perfect world, the store() routine should be different from the update()
* routine. It would not have to check count() == 0 because there could be NO
* limit repetitions at this point. However, the database can be wrong so we check.
*
* @param BudgetLimitStored $event
*/
public function store(BudgetLimitStored $event)
{
$budgetLimit = $event->budgetLimit;
$end = $event->end;
$set = $budgetLimit->limitrepetitions()
->where('startdate', $budgetLimit->startdate->format('Y-m-d 00:00:00'))
->where('enddate', $end->format('Y-m-d 00:00:00'))
->get();
if ($set->count() == 0) {
$repetition = new LimitRepetition;
$repetition->startdate = $budgetLimit->startdate;
$repetition->enddate = $end;
$repetition->amount = $budgetLimit->amount;
$repetition->budgetLimit()->associate($budgetLimit);
try {
$repetition->save();
} catch (QueryException $e) {
Log::error('Trying to save new LimitRepetition failed: ' . $e->getMessage());
}
}
if ($set->count() == 1) {
$repetition = $set->first();
$repetition->amount = $budgetLimit->amount;
$repetition->save();
}
}
/**
* @param BudgetLimitUpdated $event
*/
public function update(BudgetLimitUpdated $event)
{
$budgetLimit = $event->budgetLimit;
$end = $event->end;
$set = $budgetLimit->limitrepetitions()
->where('startdate', $budgetLimit->startdate->format('Y-m-d 00:00:00'))
->where('enddate', $end->format('Y-m-d 00:00:00'))
->get();
if ($set->count() == 0) {
$repetition = new LimitRepetition;
$repetition->startdate = $budgetLimit->startdate;
$repetition->enddate = $end;
$repetition->amount = $budgetLimit->amount;
$repetition->budgetLimit()->associate($budgetLimit);
try {
$repetition->save();
} catch (QueryException $e) {
Log::error('Trying to save new LimitRepetition failed: ' . $e->getMessage());
}
}
if ($set->count() == 1) {
$repetition = $set->first();
$repetition->amount = $budgetLimit->amount;
$repetition->save();
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* ConnectJournalToPiggyBank.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use Auth;
use FireflyIII\Events\TransactionJournalStored;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\TransactionJournal;
/**
* Class ConnectJournalToPiggyBank
*
* @package FireflyIII\Handlers\Events
*/
class ConnectJournalToPiggyBank
{
/**
* Connect a new transaction journal to any related piggy banks.
*
* @param TransactionJournalStored $event
*
* @return bool
*/
public function handle(TransactionJournalStored $event): bool
{
/** @var TransactionJournal $journal */
$journal = $event->journal;
$piggyBankId = $event->piggyBankId;
/** @var PiggyBank $piggyBank */
$piggyBank = Auth::user()->piggybanks()->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
if (is_null($piggyBank)) {
return true;
}
// update piggy bank rep for date of transaction journal.
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
if (is_null($repetition)) {
return true;
}
$amount = TransactionJournal::amountPositive($journal);
// if piggy account matches source account, the amount is positive
$sources = TransactionJournal::sourceAccountList($journal)->pluck('id')->toArray();
if (in_array($piggyBank->account_id, $sources)) {
$amount = bcmul($amount, '-1');
}
$repetition->currentamount = bcadd($repetition->currentamount, $amount);
$repetition->save();
PiggyBankEvent::create(['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount]);
return true;
}
}

View File

@@ -0,0 +1,68 @@
<?php
/**
* ConnectTransactionToPiggyBank.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionStored;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
/**
* Class ConnectTransactionToPiggyBank
*
* @package FireflyIII\Handlers\Events
*/
class ConnectTransactionToPiggyBank
{
/**
* Connect a new transaction journal to any related piggy banks.
*
* @param TransactionStored $event
*
* @return bool
*/
public function handle(TransactionStored $event): bool
{
/** @var PiggyBankRepositoryInterface $repository */
$repository = app(PiggyBankRepositoryInterface::class);
$transaction = $event->transaction;
$piggyBank = $repository->find($transaction['piggy_bank_id']);
// valid piggy:
if (is_null($piggyBank->id)) {
return true;
}
$amount = strval($transaction['amount']);
// piggy bank account something with amount:
if ($transaction['source_account_id'] == $piggyBank->account_id) {
// if the source of this transaction is the same as the piggy bank,
// the money is being removed from the piggy bank. So the
// amount must be negative:
$amount = bcmul($amount, '-1');
}
$repetition = $piggyBank->currentRelevantRep();
// add or remove the money from the piggy bank:
$newAmount = bcadd(strval($repetition->currentamount), $amount);
$repetition->currentamount = $newAmount;
$repetition->save();
// now generate a piggy bank event:
PiggyBankEvent::create(['piggy_bank_id' => $piggyBank->id, 'date' => $transaction['date'], 'amount' => $newAmount]);
return true;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* FireRulesForStore.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionJournalStored;
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Rules\Processor;
use FireflyIII\User;
use Illuminate\Support\Facades\Auth;
/**
* Class FireRulesForStore
*
* @package FireflyIII\Handlers\Events
*/
class FireRulesForStore
{
/**
* Connect a new transaction journal to any related piggy banks.
*
* @param TransactionJournalStored $event
*
* @return bool
*/
public function handle(TransactionJournalStored $event): bool
{
// get all the user's rule groups, with the rules, order by 'order'.
/** @var User $user */
$user = Auth::user();
$groups = $user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
//
/** @var RuleGroup $group */
foreach ($groups as $group) {
$rules = $group->rules()
->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id')
->where('rule_triggers.trigger_type', 'user_action')
->where('rule_triggers.trigger_value', 'store-journal')
->where('rules.active', 1)
->get(['rules.*']);
/** @var Rule $rule */
foreach ($rules as $rule) {
$processor = Processor::make($rule);
$processor->handleTransactionJournal($event->journal);
if ($rule->stop_processing) {
return true;
}
}
}
return true;
}
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* FireRulesForUpdate.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use Auth;
use FireflyIII\Events\TransactionJournalUpdated;
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Rules\Processor;
use FireflyIII\User;
/**
* Class FireRulesForUpdate
*
* @package FireflyIII\Handlers\Events
*/
class FireRulesForUpdate
{
/**
* Handle the event.
*
* @param TransactionJournalUpdated $event
*
* @return bool
*/
public function handle(TransactionJournalUpdated $event): bool
{
// get all the user's rule groups, with the rules, order by 'order'.
/** @var User $user */
$user = Auth::user();
$groups = $user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
//
/** @var RuleGroup $group */
foreach ($groups as $group) {
$rules = $group->rules()
->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id')
->where('rule_triggers.trigger_type', 'user_action')
->where('rule_triggers.trigger_value', 'update-journal')
->where('rules.active', 1)
->get(['rules.*']);
/** @var Rule $rule */
foreach ($rules as $rule) {
$processor = Processor::make($rule);
$processor->handleTransactionJournal($event->journal);
if ($rule->stop_processing) {
break;
}
}
}
return true;
}
}

View File

@@ -0,0 +1,40 @@
<?php
/**
* ScanForBillsAfterStore.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionJournalStored;
use FireflyIII\Support\Events\BillScanner;
/**
* Class RescanJournal
*
* @package FireflyIII\Handlers\Events
*/
class ScanForBillsAfterStore
{
/**
* Scan a transaction journal for possible links to bills, right after storing.
*
* @param TransactionJournalStored $event
*
* @return bool
*/
public function handle(TransactionJournalStored $event): bool
{
$journal = $event->journal;
BillScanner::scan($journal);
return true;
}
}

View File

@@ -0,0 +1,39 @@
<?php
/**
* ScanForBillsAfterUpdate.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionJournalUpdated;
use FireflyIII\Support\Events\BillScanner;
/**
* Class RescanJournal
*
* @package FireflyIII\Handlers\Events
*/
class ScanForBillsAfterUpdate
{
/**
* Scan a transaction journal for possibly related bills after it has been updated.
*
* @param TransactionJournalUpdated $event
*
* @return bool
*/
public function handle(TransactionJournalUpdated $event): bool
{
$journal = $event->journal;
BillScanner::scan($journal);
return true;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/**
* SendRegistrationMail.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\UserRegistration;
use Illuminate\Mail\Message;
use Log;
use Mail;
use Swift_TransportException;
/**
* Class SendRegistrationMail
*
* @package FireflyIII\Handlers\Events
*/
class SendRegistrationMail
{
/**
* Create the event listener.
*
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param UserRegistration $event
*
* @return bool
*/
public function handle(UserRegistration $event): bool
{
$sendMail = env('SEND_REGISTRATION_MAIL', true);
if (!$sendMail) {
return true;
}
// get the email address
$email = $event->user->email;
$address = route('index');
$ipAddress = $event->ipAddress;
// send email.
try {
Mail::send(
['emails.registered-html', 'emails.registered'], ['address' => $address, 'ip' => $ipAddress], function (Message $message) use ($email) {
$message->to($email, $email)->subject('Welcome to Firefly III! ');
}
);
} catch (Swift_TransportException $e) {
Log::error($e->getMessage());
}
return true;
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* UpdateJournalConnection.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\TransactionJournalUpdated;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\PiggyBankRepetition;
use FireflyIII\Models\TransactionJournal;
/**
* Class UpdateJournalConnection
*
* @package FireflyIII\Handlers\Events
*/
class UpdateJournalConnection
{
/**
* Handle the event.
*
* @param TransactionJournalUpdated $event
*
* @return bool
*/
public function handle(TransactionJournalUpdated $event):bool
{
$journal = $event->journal;
if (!$journal->isTransfer()) {
return true;
}
// get the event connected to this journal:
/** @var PiggyBankEvent $event */
$event = PiggyBankEvent::where('transaction_journal_id', $journal->id)->first();
if (is_null($event)) {
return false;
}
$piggyBank = $event->piggyBank()->first();
$repetition = null;
if ($piggyBank) {
/** @var PiggyBankRepetition $repetition */
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
}
if (is_null($repetition)) {
return false;
}
$amount = TransactionJournal::amount($journal);
$diff = bcsub($amount, $event->amount); // update current repetition
$repetition->currentamount = bcadd($repetition->currentamount, $diff);
$repetition->save();
$event->amount = $amount;
$event->save();
return true;
}
}

View File

@@ -0,0 +1,107 @@
<?php
/**
* UserConfirmation.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use Exception;
use FireflyIII\Events\ResendConfirmation;
use FireflyIII\Events\UserRegistration;
use FireflyIII\User;
use Illuminate\Mail\Message;
use Log;
use Mail;
use Preferences;
use Swift_TransportException;
/**
* Class UserConfirmation
*
* @package FireflyIII\Handlers\Events
*/
class UserConfirmation
{
/**
* Create the event listener.
*
*/
public function __construct()
{
//
}
/**
* @param ResendConfirmation $event
*
* @return bool
*/
public function resendConfirmation(ResendConfirmation $event): bool
{
$user = $event->user;
$ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress);
return true;
}
/**
* Handle the event.
*
* @param UserRegistration $event
*
* @return bool
*/
public function sendConfirmation(UserRegistration $event): bool
{
$user = $event->user;
$ipAddress = $event->ipAddress;
$this->doConfirm($user, $ipAddress);
return true;
}
/**
* @param User $user
* @param string $ipAddress
*/
private function doConfirm(User $user, string $ipAddress)
{
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
if ($confirmAccount === false) {
Preferences::setForUser($user, 'user_confirmed', true);
Preferences::setForUser($user, 'user_confirmed_last_mail', 0);
Preferences::mark();
return;
}
$email = $user->email;
$code = str_random(16);
$route = route('do_confirm_account', [$code]);
Preferences::setForUser($user, 'user_confirmed', false);
Preferences::setForUser($user, 'user_confirmed_last_mail', time());
Preferences::setForUser($user, 'user_confirmed_code', $code);
try {
Mail::send(
['emails.confirm-account-html', 'emails.confirm-account'], ['route' => $route, 'ip' => $ipAddress],
function (Message $message) use ($email) {
$message->to($email, $email)->subject('Please confirm your Firefly III account');
}
);
} catch (Swift_TransportException $e) {
Log::error($e->getMessage());
} catch (Exception $e) {
Log::error($e->getMessage());
}
return;
}
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* UserEventListener.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use Session;
/**
* Class UserEventListener
*
* @package FireflyIII\Handlers\Events
*/
class UserEventListener
{
/**
* Handle user logout events.
*
* @return bool
*/
public function onUserLogout(): bool
{
// dump stuff from the session:
Session::forget('twofactor-authenticated');
Session::forget('twofactor-authenticated-date');
return true;
}
}

View File

@@ -0,0 +1,62 @@
<?php
/**
* UserSaveIpAddress.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\UserIsConfirmed;
use FireflyIII\Events\UserRegistration;
use FireflyIII\User;
use Preferences;
/**
* Class UserSaveIpAddress
*
* @package FireflyIII\Handlers\Events
*/
class UserSaveIpAddress
{
/**
* Create the event listener.
*
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param UserRegistration $event
*
* @return bool
*/
public function saveFromRegistration(UserRegistration $event): bool
{
Preferences::setForUser($event->user, 'registration_ip_address', $event->ipAddress);
return true;
}
/**
* Handle the event.
*
* @param UserIsConfirmed $event
*
* @return bool
*/
public function saveFromConfirmation(UserIsConfirmed $event): bool
{
Preferences::setForUser($event->user, 'confirmation_ip_address', $event->ipAddress);
return true;
}
}

View File

@@ -0,0 +1,267 @@
<?php
/**
* AttachmentHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Attachments;
use Auth;
use Crypt;
use FireflyIII\Models\Attachment;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\MessageBag;
use Input;
use Log;
use Storage;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use TypeError;
/**
* Class AttachmentHelper
*
* @package FireflyIII\Helpers\Attachments
*/
class AttachmentHelper implements AttachmentHelperInterface
{
/** @var MessageBag */
public $errors;
/** @var MessageBag */
public $messages;
/** @var array */
protected $allowedMimes;
/** @var int */
protected $maxUploadSize;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
protected $uploadDisk;
/**
*
*/
public function __construct()
{
$this->maxUploadSize = config('firefly.maxUploadSize');
$this->allowedMimes = config('firefly.allowedMimes');
$this->errors = new MessageBag;
$this->messages = new MessageBag;
$this->uploadDisk = Storage::disk('upload');
}
/**
* @param Attachment $attachment
*
* @return string
*/
public function getAttachmentLocation(Attachment $attachment): string
{
$path = storage_path('upload') . DIRECTORY_SEPARATOR . 'at-' . $attachment->id . '.data';
return $path;
}
/**
* @return MessageBag
*/
public function getErrors(): MessageBag
{
return $this->errors;
}
/**
* @return MessageBag
*/
public function getMessages(): MessageBag
{
return $this->messages;
}
/**
* @param Model $model
*
* @return bool
*/
public function saveAttachmentsForModel(Model $model): bool
{
$files = $this->getFiles();
if (!is_null($files) && !is_array($files)) {
$this->processFile($files, $model);
}
if (is_array($files)) {
$this->processFiles($files, $model);
}
return true;
}
/**
* @param UploadedFile $file
* @param Model $model
*
* @return bool
*/
protected function hasFile(UploadedFile $file, Model $model): bool
{
$md5 = md5_file($file->getRealPath());
$name = $file->getClientOriginalName();
$class = get_class($model);
$count = Auth::user()->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
if ($count > 0) {
$msg = (string)trans('validation.file_already_attached', ['name' => $name]);
$this->errors->add('attachments', $msg);
return true;
}
return false;
}
/**
*
* @param UploadedFile $file
* @param Model $model
*
* @return Attachment
*/
protected function processFile(UploadedFile $file, Model $model): Attachment
{
$validation = $this->validateUpload($file, $model);
if ($validation === false) {
return new Attachment;
}
$attachment = new Attachment; // create Attachment object.
$attachment->user()->associate(Auth::user());
$attachment->attachable()->associate($model);
$attachment->md5 = md5_file($file->getRealPath());
$attachment->filename = $file->getClientOriginalName();
$attachment->mime = $file->getMimeType();
$attachment->size = $file->getSize();
$attachment->uploaded = 0;
$attachment->save();
$fileObject = $file->openFile('r');
$fileObject->rewind();
$content = $fileObject->fread($file->getSize());
$encrypted = Crypt::encrypt($content);
// store it:
$this->uploadDisk->put($attachment->fileName(), $encrypted);
$attachment->uploaded = 1; // update attachment
$attachment->save();
$name = e($file->getClientOriginalName()); // add message:
$msg = (string)trans('validation.file_attached', ['name' => $name]);
$this->messages->add('attachments', $msg);
// return it.
return $attachment;
}
/**
* @param UploadedFile $file
*
* @return bool
*/
protected function validMime(UploadedFile $file): bool
{
$mime = e($file->getMimeType());
$name = e($file->getClientOriginalName());
if (!in_array($mime, $this->allowedMimes)) {
$msg = (string)trans('validation.file_invalid_mime', ['name' => $name, 'mime' => $mime]);
$this->errors->add('attachments', $msg);
return false;
}
return true;
}
/**
* @param UploadedFile $file
*
* @return bool
*/
protected function validSize(UploadedFile $file): bool
{
$size = $file->getSize();
$name = e($file->getClientOriginalName());
if ($size > $this->maxUploadSize) {
$msg = (string)trans('validation.file_too_large', ['name' => $name]);
$this->errors->add('attachments', $msg);
return false;
}
return true;
}
/**
* @param UploadedFile $file
* @param Model $model
*
* @return bool
*/
protected function validateUpload(UploadedFile $file, Model $model): bool
{
if (!$this->validMime($file)) {
return false;
}
if (!$this->validSize($file)) {
return false;
}
if ($this->hasFile($file, $model)) {
return false;
}
return true;
}
/**
* @return array|null|UploadedFile
*/
private function getFiles()
{
$files = null;
try {
if (Input::hasFile('attachments')) {
$files = Input::file('attachments');
}
} catch (TypeError $e) {
// Log it, do nothing else.
Log::error($e->getMessage());
}
return $files;
}
/**
* @param array $files
*
* @return bool
*/
private function processFiles(array $files, Model $model): bool
{
foreach ($files as $entry) {
if (!is_null($entry)) {
$this->processFile($entry, $model);
}
}
return true;
}
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* AttachmentHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Attachments;
use FireflyIII\Models\Attachment;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\MessageBag;
/**
* Interface AttachmentHelperInterface
*
* @package FireflyIII\Helpers\Attachments
*/
interface AttachmentHelperInterface
{
/**
* @param Attachment $attachment
*
* @return string
*/
public function getAttachmentLocation(Attachment $attachment): string;
/**
* @return MessageBag
*/
public function getErrors(): MessageBag;
/**
* @return MessageBag
*/
public function getMessages(): MessageBag;
/**
* @param Model $model
*
* @return bool
*/
public function saveAttachmentsForModel(Model $model): bool;
}

View File

@@ -0,0 +1,105 @@
<?php
/**
* Account.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
* Class Account
*
* @package FireflyIII\Helpers\Collection
*/
class Account
{
/** @var Collection */
protected $accounts;
/** @var string */
protected $difference = '';
/** @var string */
protected $end = '';
/** @var string */
protected $start = '';
/**
* Account constructor.
*/
public function __construct()
{
$this->accounts = new Collection;
}
/**
* @return Collection
*/
public function getAccounts(): Collection
{
return $this->accounts;
}
/**
* @param Collection $accounts
*/
public function setAccounts(Collection $accounts)
{
$this->accounts = $accounts;
}
/**
* @return string
*/
public function getDifference(): string
{
return $this->difference;
}
/**
* @param string $difference
*/
public function setDifference(string $difference)
{
$this->difference = $difference;
}
/**
* @return string
*/
public function getEnd(): string
{
return $this->end;
}
/**
* @param string $end
*/
public function setEnd(string $end)
{
$this->end = $end;
}
/**
* @return string
*/
public function getStart(): string
{
return $this->start;
}
/**
* @param string $start
*/
public function setStart(string $start)
{
$this->start = $start;
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* Balance.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
*
* Class Balance
*
* @package FireflyIII\Helpers\Collection
*/
class Balance
{
/** @var BalanceHeader */
protected $balanceHeader;
/** @var Collection */
protected $balanceLines;
/**
*
*/
public function __construct()
{
$this->balanceLines = new Collection;
}
/**
* @param BalanceLine $line
*/
public function addBalanceLine(BalanceLine $line)
{
$this->balanceLines->push($line);
}
/**
* @return BalanceHeader
*/
public function getBalanceHeader(): BalanceHeader
{
return $this->balanceHeader ?? new BalanceHeader;
}
/**
* @param BalanceHeader $balanceHeader
*/
public function setBalanceHeader(BalanceHeader $balanceHeader)
{
$this->balanceHeader = $balanceHeader;
}
/**
* @return Collection
*/
public function getBalanceLines(): Collection
{
return $this->balanceLines;
}
/**
* @param Collection $balanceLines
*/
public function setBalanceLines(Collection $balanceLines)
{
$this->balanceLines = $balanceLines;
}
}

View File

@@ -0,0 +1,81 @@
<?php
/**
* BalanceEntry.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Account as AccountModel;
/**
*
* Class BalanceEntry
*
* @package FireflyIII\Helpers\Collection
*/
class BalanceEntry
{
/** @var AccountModel */
protected $account;
/** @var string */
protected $left = '0';
/** @var string */
protected $spent = '0';
/**
* @return AccountModel
*/
public function getAccount(): AccountModel
{
return $this->account;
}
/**
* @param AccountModel $account
*/
public function setAccount(AccountModel $account)
{
$this->account = $account;
}
/**
* @return string
*/
public function getLeft(): string
{
return $this->left;
}
/**
* @param string $left
*/
public function setLeft(string $left)
{
$this->left = $left;
}
/**
* @return string
*/
public function getSpent(): string
{
return $this->spent;
}
/**
* @param string $spent
*/
public function setSpent(string $spent)
{
$this->spent = $spent;
}
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* BalanceHeader.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Account as AccountModel;
use Illuminate\Support\Collection;
/**
*
* Class BalanceHeader
*
* @package FireflyIII\Helpers\Collection
*/
class BalanceHeader
{
/** @var Collection */
protected $accounts;
/**
*
*/
public function __construct()
{
$this->accounts = new Collection;
}
/**
* @param AccountModel $account
*/
public function addAccount(AccountModel $account)
{
$this->accounts->push($account);
}
/**
* @return Collection
*/
public function getAccounts(): Collection
{
return $this->accounts;
}
}

View File

@@ -0,0 +1,181 @@
<?php
/**
* BalanceLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Carbon\Carbon;
use FireflyIII\Models\Budget as BudgetModel;
use Illuminate\Support\Collection;
/**
*
* Class BalanceLine
*
* @package FireflyIII\Helpers\Collection
*/
class BalanceLine
{
const ROLE_DEFAULTROLE = 1;
const ROLE_TAGROLE = 2;
const ROLE_DIFFROLE = 3;
/** @var Collection */
protected $balanceEntries;
/** @var BudgetModel */
protected $budget;
/** @var Carbon */
protected $startDate;
/** @var Carbon */
protected $endDate;
/** @var int */
protected $role = self::ROLE_DEFAULTROLE;
/**
*
*/
public function __construct()
{
$this->balanceEntries = new Collection;
}
/**
* @param BalanceEntry $balanceEntry
*/
public function addBalanceEntry(BalanceEntry $balanceEntry)
{
$this->balanceEntries->push($balanceEntry);
}
/**
* @return Collection
*/
public function getBalanceEntries(): Collection
{
return $this->balanceEntries;
}
/**
* @param Collection $balanceEntries
*/
public function setBalanceEntries(Collection $balanceEntries)
{
$this->balanceEntries = $balanceEntries;
}
/**
* @return BudgetModel
*/
public function getBudget(): BudgetModel
{
return $this->budget ?? new BudgetModel;
}
/**
* @param BudgetModel $budget
*/
public function setBudget(BudgetModel $budget)
{
$this->budget = $budget;
}
/**
* @return int
*/
public function getRole(): int
{
return $this->role;
}
/**
* @param int $role
*/
public function setRole(int $role)
{
$this->role = $role;
}
/**
* @return string
*/
public function getTitle(): string
{
if ($this->getBudget() instanceof BudgetModel && !is_null($this->getBudget()->id)) {
return $this->getBudget()->name;
}
if ($this->getRole() == self::ROLE_DEFAULTROLE) {
return trans('firefly.no_budget');
}
if ($this->getRole() == self::ROLE_TAGROLE) {
return trans('firefly.coveredWithTags');
}
if ($this->getRole() == self::ROLE_DIFFROLE) {
return trans('firefly.leftUnbalanced');
}
return '';
}
/**
* @return Carbon
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* @param Carbon $startDate
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;
}
/**
* @return Carbon
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* @param Carbon $endDate
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
}
/**
* If a BalanceLine has a budget/repetition, each BalanceEntry in this BalanceLine
* should have a "spent" value, which is the amount of money that has been spent
* on the given budget/repetition. If you subtract all those amounts from the budget/repetition's
* total amount, this is returned:
*
* @return string
*/
public function leftOfRepetition(): string
{
$start = $this->budget->amount ?? '0';
/** @var BalanceEntry $balanceEntry */
foreach ($this->getBalanceEntries() as $balanceEntry) {
$start = bcadd($balanceEntry->getSpent(), $start);
}
return $start;
}
}

View File

@@ -0,0 +1,63 @@
<?php
/**
* Bill.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
* Class Bill
*
* @package FireflyIII\Helpers\Collection
*/
class Bill
{
/**
* @var Collection
*/
protected $bills;
/**
*
*/
public function __construct()
{
$this->bills = new Collection;
}
/**
* @param BillLine $bill
*/
public function addBill(BillLine $bill)
{
$this->bills->push($bill);
}
/**
* @return Collection
*/
public function getBills(): Collection
{
$set = $this->bills->sortBy(
function (BillLine $bill) {
$active = intval($bill->getBill()->active) == 0 ? 1 : 0;
$name = $bill->getBill()->name;
return $active . $name;
}
);
return $set;
}
}

View File

@@ -0,0 +1,152 @@
<?php
/**
* BillLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Bill as BillModel;
/**
*
* Class BillLine
*
* @package FireflyIII\Helpers\Collection
*/
class BillLine
{
/** @var bool */
protected $active;
/** @var string */
protected $amount;
/** @var BillModel */
protected $bill;
/** @var bool */
protected $hit;
/** @var string */
protected $max;
/** @var string */
protected $min;
/** @var int */
private $transactionJournalId;
/**
* @return string
*/
public function getAmount(): string
{
return $this->amount ?? '0';
}
/**
* @param string $amount
*/
public function setAmount(string $amount)
{
$this->amount = $amount;
}
/**
* @return BillModel
*/
public function getBill(): BillModel
{
return $this->bill;
}
/**
* @param BillModel $bill
*/
public function setBill(BillModel $bill)
{
$this->bill = $bill;
}
/**
* @return string
*/
public function getMax(): string
{
return $this->max;
}
/**
* @param string $max
*/
public function setMax(string $max)
{
$this->max = $max;
}
/**
* @return string
*/
public function getMin(): string
{
return $this->min;
}
/**
* @param string $min
*/
public function setMin(string $min)
{
$this->min = $min;
}
/**
* @return int
*/
public function getTransactionJournalId(): int
{
return $this->transactionJournalId ?? 0;
}
/**
* @param int $transactionJournalId
*/
public function setTransactionJournalId(int $transactionJournalId)
{
$this->transactionJournalId = $transactionJournalId;
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;
}
/**
* @param bool $active
*/
public function setActive(bool $active)
{
$this->active = $active;
}
/**
* @return bool
*/
public function isHit(): bool
{
return $this->hit;
}
/**
* @param bool $hit
*/
public function setHit(bool $hit)
{
$this->hit = $hit;
}
}

View File

@@ -0,0 +1,159 @@
<?php
/**
* Budget.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
*
* Class Budget
*
* @package FireflyIII\Helpers\Collection
*/
class Budget
{
/** @var Collection */
protected $budgetLines;
/** @var string */
protected $budgeted = '0';
/** @var string */
protected $left = '0';
/** @var string */
protected $overspent = '0';
/** @var string */
protected $spent = '0';
/**
*
*/
public function __construct()
{
$this->budgetLines = new Collection;
}
/**
* @param BudgetLine $budgetLine
*/
public function addBudgetLine(BudgetLine $budgetLine)
{
$this->budgetLines->push($budgetLine);
}
/**
* @param string $add
*/
public function addBudgeted(string $add)
{
$add = strval(round($add, 2));
$this->budgeted = bcadd($this->budgeted, $add);
}
/**
* @param string $add
*/
public function addLeft(string $add)
{
$add = strval(round($add, 2));
$this->left = bcadd($this->left, $add);
}
/**
* @param string $add
*/
public function addOverspent(string $add)
{
$add = strval(round($add, 2));
$this->overspent = bcadd($this->overspent, $add);
}
/**
* @param string $add
*/
public function addSpent(string $add)
{
$add = strval(round($add, 2));
$this->spent = bcadd($this->spent, $add);
}
/**
* @return \Illuminate\Support\Collection
*/
public function getBudgetLines(): Collection
{
return $this->budgetLines;
}
/**
* @return string
*/
public function getBudgeted(): string
{
return $this->budgeted;
}
/**
* @param string $budgeted
*/
public function setBudgeted(string $budgeted)
{
$this->budgeted = $budgeted;
}
/**
* @return string
*/
public function getLeft(): string
{
return $this->left;
}
/**
* @param string $left
*/
public function setLeft(string $left)
{
$this->left = $left;
}
/**
* @return string
*/
public function getOverspent(): string
{
return $this->overspent;
}
/**
* @param string $overspent
*/
public function setOverspent(string $overspent)
{
$this->overspent = strval(round($overspent, 2));
}
/**
* @return string
*/
public function getSpent(): string
{
return $this->spent;
}
/**
* @param string $spent
*/
public function setSpent(string $spent)
{
$this->spent = strval(round($spent, 2));
}
}

View File

@@ -0,0 +1,135 @@
<?php
/**
* BudgetLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Budget as BudgetModel;
use FireflyIII\Models\LimitRepetition;
/**
*
* Class BudgetLine
*
* @package FireflyIII\Helpers\Collection
*/
class BudgetLine
{
/** @var BudgetModel */
protected $budget;
/** @var string */
protected $budgeted = '0';
/** @var string */
protected $left = '0';
/** @var string */
protected $overspent = '0';
/** @var LimitRepetition */
protected $repetition;
/** @var string */
protected $spent = '0';
/**
* @return BudgetModel
*/
public function getBudget(): BudgetModel
{
return $this->budget ?? new BudgetModel;
}
/**
* @param BudgetModel $budget
*/
public function setBudget(BudgetModel $budget)
{
$this->budget = $budget;
}
/**
* @return string
*/
public function getBudgeted(): string
{
return $this->budgeted;
}
/**
* @param string $budgeted
*/
public function setBudgeted(string $budgeted)
{
$this->budgeted = $budgeted;
}
/**
* @return string
*/
public function getLeft(): string
{
return $this->left;
}
/**
* @param string $left
*/
public function setLeft(string $left)
{
$this->left = $left;
}
/**
* @return string
*/
public function getOverspent(): string
{
return $this->overspent;
}
/**
* @param string $overspent
*/
public function setOverspent(string $overspent)
{
$this->overspent = $overspent;
}
/**
* @return LimitRepetition
*/
public function getRepetition(): LimitRepetition
{
return $this->repetition ?? new LimitRepetition;
}
/**
* @param LimitRepetition $repetition
*/
public function setRepetition(LimitRepetition $repetition)
{
$this->repetition = $repetition;
}
/**
* @return string
*/
public function getSpent(): string
{
return $this->spent;
}
/**
* @param string $spent
*/
public function setSpent(string $spent)
{
$this->spent = $spent;
}
}

View File

@@ -0,0 +1,84 @@
<?php
/**
* Category.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Category as CategoryModel;
use Illuminate\Support\Collection;
/**
*
* Class Category
*
* @package FireflyIII\Helpers\Collection
*/
class Category
{
/** @var Collection */
protected $categories;
/** @var string */
protected $total = '0';
/**
*
*/
public function __construct()
{
$this->categories = new Collection;
}
/**
* @param CategoryModel $category
*/
public function addCategory(CategoryModel $category)
{
// spent is minus zero for an expense report:
if ($category->spent < 0) {
$this->categories->push($category);
$this->addTotal($category->spent);
}
}
/**
* @param string $add
*/
public function addTotal(string $add)
{
$add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
/**
* @return Collection
*/
public function getCategories(): Collection
{
$set = $this->categories->sortBy(
function (CategoryModel $category) {
return $category->spent;
}
);
return $set;
}
/**
* @return string
*/
public function getTotal(): string
{
return strval(round($this->total, 2));
}
}

View File

@@ -0,0 +1,109 @@
<?php
/**
* Expense.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
use stdClass;
/**
*
* Class Expense
*
* @package FireflyIII\Helpers\Collection
*/
class Expense
{
/** @var Collection */
protected $expenses;
/** @var string */
protected $total = '0';
/**
*
*/
public function __construct()
{
$this->expenses = new Collection;
}
/**
* @param TransactionJournal $entry
*/
public function addOrCreateExpense(TransactionJournal $entry)
{
// add each account individually:
$destinations = TransactionJournal::destinationTransactionList($entry);
foreach ($destinations as $transaction) {
$amount = strval($transaction->amount);
$account = $transaction->account;
if (bccomp('0', $amount) === -1) {
$amount = bcmul($amount, '-1');
}
$object = new stdClass;
$object->amount = $amount;
$object->name = $account->name;
$object->count = 1;
$object->id = $account->id;
// overrule some properties:
if ($this->expenses->has($account->id)) {
$object = $this->expenses->get($account->id);
$object->amount = bcadd($object->amount, $amount);
$object->count++;
}
$this->expenses->put($account->id, $object);
}
}
/**
* @param string $add
*/
public function addToTotal(string $add)
{
$add = strval(round($add, 2));
if (bccomp('0', $add) === -1) {
$add = bcmul($add, '-1');
}
// if amount is positive, the original transaction
// was a transfer. But since this is an expense report,
// that amount must be negative.
$this->total = bcadd($this->total, $add);
}
/**
* @return Collection
*/
public function getExpenses(): Collection
{
$set = $this->expenses->sortBy(
function (stdClass $object) {
return $object->amount;
}
);
return $set;
}
/**
* @return string
*/
public function getTotal(): string
{
return strval(round($this->total, 2));
}
}

View File

@@ -0,0 +1,101 @@
<?php
/**
* Income.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
use stdClass;
/**
*
* Class Income
*
* @package FireflyIII\Helpers\Collection
*/
class Income
{
/** @var Collection */
protected $incomes;
/** @var string */
protected $total = '0';
/**
*
*/
public function __construct()
{
$this->incomes = new Collection;
}
/**
* @param TransactionJournal $entry
*/
public function addOrCreateIncome(TransactionJournal $entry)
{
// add each account individually:
$sources = TransactionJournal::sourceTransactionList($entry);
foreach ($sources as $transaction) {
$amount = strval($transaction->amount);
$account = $transaction->account;
$amount = bcmul($amount, '-1');
$object = new stdClass;
$object->amount = $amount;
$object->name = $account->name;
$object->count = 1;
$object->id = $account->id;
// overrule some properties:
if ($this->incomes->has($account->id)) {
$object = $this->incomes->get($account->id);
$object->amount = bcadd($object->amount, $amount);
$object->count++;
}
$this->incomes->put($account->id, $object);
}
}
/**
* @param string $add
*/
public function addToTotal(string $add)
{
$add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
/**
* @return Collection
*/
public function getIncomes(): Collection
{
$set = $this->incomes->sortByDesc(
function (stdClass $object) {
return $object->amount;
}
);
return $set;
}
/**
* @return string
*/
public function getTotal(): string
{
return strval(round($this->total, 2));
}
}

View File

@@ -0,0 +1,385 @@
<?php
/**
* Importer.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Csv;
use Auth;
use FireflyIII\Events\TransactionJournalStored;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Csv\Converter\ConverterInterface;
use FireflyIII\Helpers\Csv\PostProcessing\PostProcessorInterface;
use FireflyIII\Helpers\Csv\Specifix\SpecifixInterface;
use FireflyIII\Models\Account;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
use Log;
/**
* Class Importer
*
* @package FireflyIII\Helpers\Csv
*/
class Importer
{
/** @var Data */
protected $data;
/** @var array */
protected $errors = [];
/** @var array */
protected $importData;
/** @var array */
protected $importRow;
/** @var int */
protected $imported = 0;
/** @var Collection */
protected $journals;
/** @var array */
protected $map;
/** @var array */
protected $mapped;
/** @var array */
protected $roles;
/** @var int */
protected $rows = 0;
/** @var array */
protected $specifix = [];
/**
* Used by CsvController.
*
* @return array
*/
public function getErrors(): array
{
return $this->errors;
}
/**
* Used by CsvController
*
* @return int
*/
public function getImported(): int
{
return $this->imported;
}
/**
* @return Collection
*/
public function getJournals(): Collection
{
return $this->journals;
}
/**
* Used by CsvController
*
* @return int
*/
public function getRows(): int
{
return $this->rows;
}
/**
* @return array
*/
public function getSpecifix(): array
{
return is_array($this->specifix) ? $this->specifix : [];
}
/**
* @throws FireflyException
*/
public function run()
{
set_time_limit(0);
$this->journals = new Collection;
$this->map = $this->data->getMap();
$this->roles = $this->data->getRoles();
$this->mapped = $this->data->getMapped();
$this->specifix = $this->data->getSpecifix();
foreach ($this->data->getReader() as $index => $row) {
if ($this->parseRow($index)) {
$this->rows++;
$result = $this->importRow($row);
if (!($result instanceof TransactionJournal)) {
Log::error('Caught error at row #' . $index . ': ' . $result);
$this->errors[$index] = $result;
} else {
$this->imported++;
$this->journals->push($result);
event(new TransactionJournalStored($result, 0));
}
}
}
}
/**
* @param Data $data
*/
public function setData(Data $data)
{
$this->data = $data;
}
/**
* @return TransactionJournal|string
*/
protected function createTransactionJournal()
{
$date = $this->importData['date'];
if (is_null($this->importData['date'])) {
$date = $this->importData['date-rent'];
}
$transactionType = $this->getTransactionType(); // defaults to deposit
$errors = new MessageBag;
$journal = TransactionJournal::create(
[
'user_id' => Auth::user()->id,
'transaction_type_id' => $transactionType->id,
'transaction_currency_id' => $this->importData['currency']->id,
'description' => $this->importData['description'],
'completed' => 0,
'date' => $date,
'bill_id' => $this->importData['bill-id'],
]
);
if ($journal->getErrors()->count() == 0) {
// first transaction
$accountId = $this->importData['asset-account-object']->id; // create first transaction:
$amount = $this->importData['amount'];
$transaction = Transaction::create(['transaction_journal_id' => $journal->id, 'account_id' => $accountId, 'amount' => $amount]);
$errors = $transaction->getErrors();
// second transaction
$accountId = $this->importData['opposing-account-object']->id; // create second transaction:
$amount = bcmul($this->importData['amount'], '-1');
$transaction = Transaction::create(['transaction_journal_id' => $journal->id, 'account_id' => $accountId, 'amount' => $amount]);
$errors = $transaction->getErrors()->merge($errors);
}
if ($errors->count() == 0) {
$journal->completed = 1;
$journal->save();
} else {
$text = join(',', $errors->all());
return $text;
}
$this->saveBudget($journal);
$this->saveCategory($journal);
$this->saveTags($journal);
// some debug info:
$journalId = $journal->id;
$type = $journal->transaction_type_type ?? $journal->transactionType->type;
/** @var Account $asset */
$asset = $this->importData['asset-account-object'];
/** @var Account $opposing */
$opposing = $this->importData['opposing-account-object'];
Log::info('Created journal #' . $journalId . ' of type ' . $type . '!');
Log::info('Asset account #' . $asset->id . ' lost/gained: ' . $this->importData['amount']);
Log::info($opposing->accountType->type . ' #' . $opposing->id . ' lost/gained: ' . bcmul($this->importData['amount'], '-1'));
return $journal;
}
/**
* @return TransactionType
*/
protected function getTransactionType()
{
$transactionType = TransactionType::where('type', TransactionType::DEPOSIT)->first();
if ($this->importData['amount'] < 0) {
$transactionType = TransactionType::where('type', TransactionType::WITHDRAWAL)->first();
}
if (in_array($this->importData['opposing-account-object']->accountType->type, ['Asset account', 'Default account'])) {
$transactionType = TransactionType::where('type', TransactionType::TRANSFER)->first();
}
return $transactionType;
}
/**
* @param array $row
*
* @throws FireflyException
* @return string|bool
*/
protected function importRow(array $row)
{
$data = $this->getFiller(); // These fields are necessary to create a new transaction journal. Some are optional
foreach ($row as $index => $value) {
$role = $this->roles[$index] ?? '_ignore';
$class = config('csv.roles.' . $role . '.converter');
$field = config('csv.roles.' . $role . '.field');
// here would be the place where preprocessors would fire.
/** @var ConverterInterface $converter */
$converter = app('FireflyIII\Helpers\Csv\Converter\\' . $class);
$converter->setData($data); // the complete array so far.
$converter->setField($field);
$converter->setIndex($index);
$converter->setMapped($this->mapped);
$converter->setValue($value);
$data[$field] = $converter->convert();
}
// move to class vars.
$this->importData = $data;
$this->importRow = $row;
unset($data, $row);
// post processing and validating.
$this->postProcess();
$result = $this->validateData();
if (!($result === true)) {
return $result; // return error.
}
$journal = $this->createTransactionJournal();
return $journal;
}
/**
* @param int $index
*
* @return bool
*/
protected function parseRow(int $index)
{
return (($this->data->hasHeaders() && $index >= 1) || !$this->data->hasHeaders());
}
/**
* Row denotes the original data.
*
* @return void
*/
protected function postProcess()
{
// do bank specific fixes (must be enabled but now all of them.
foreach ($this->getSpecifix() as $className) {
/** @var SpecifixInterface $specifix */
$specifix = app('FireflyIII\Helpers\Csv\Specifix\\' . $className);
if ($specifix->getProcessorType() == SpecifixInterface::POST_PROCESSOR) {
$specifix->setData($this->importData);
$specifix->setRow($this->importRow);
$this->importData = $specifix->fix();
}
}
$set = config('csv.post_processors');
foreach ($set as $className) {
/** @var PostProcessorInterface $postProcessor */
$postProcessor = app('FireflyIII\Helpers\Csv\PostProcessing\\' . $className);
$array = $this->importData ?? [];
$postProcessor->setData($array);
$this->importData = $postProcessor->process();
}
}
/**
* @param TransactionJournal $journal
*/
protected function saveBudget(TransactionJournal $journal)
{
// add budget:
if (!is_null($this->importData['budget'])) {
$journal->budgets()->save($this->importData['budget']);
}
}
/**
* @param TransactionJournal $journal
*/
protected function saveCategory(TransactionJournal $journal)
{
// add category:
if (!is_null($this->importData['category'])) {
$journal->categories()->save($this->importData['category']);
}
}
/**
* @param TransactionJournal $journal
*/
protected function saveTags(TransactionJournal $journal)
{
if (!is_null($this->importData['tags'])) {
foreach ($this->importData['tags'] as $tag) {
$journal->tags()->save($tag);
}
}
}
/**
*
* @return bool|string
*/
protected function validateData()
{
$date = $this->importData['date'] ?? null;
$rentDate = $this->importData['date-rent'] ?? null;
if (is_null($date) && is_null($rentDate)) {
return 'No date value for this row.';
}
if (is_null($this->importData['opposing-account-object'])) {
return 'Opposing account is null';
}
if (!($this->importData['asset-account-object'] instanceof Account)) {
return 'No asset account to import into.';
}
return true;
}
/**
* @return array
*/
private function getFiller()
{
$filler = [];
foreach (config('csv.roles') as $role) {
if (isset($role['field'])) {
$fieldName = $role['field'];
$filler[$fieldName] = null;
}
}
// some extra's:
$filler['bill-id'] = null;
$filler['opposing-account-object'] = null;
$filler['asset-account-object'] = null;
$filler['amount-modifier'] = '1';
return $filler;
}
}

View File

@@ -0,0 +1,85 @@
<?php
/**
* FiscalHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers;
use Carbon\Carbon;
use Preferences;
/**
* Class FiscalHelper
*
* @package FireflyIII\Helpers
*/
class FiscalHelper implements FiscalHelperInterface
{
/** @var bool */
protected $useCustomFiscalYear;
/**
* FiscalHelper constructor.
*
*
*/
public function __construct()
{
$this->useCustomFiscalYear = Preferences::get('customFiscalYear', false)->data;
}
/**
* @param Carbon $date
*
* @return Carbon date object
*/
public function endOfFiscalYear(Carbon $date): Carbon
{
// get start of fiscal year for passed date
$endDate = $this->startOfFiscalYear($date);
if ($this->useCustomFiscalYear === true) {
// add 1 year and sub 1 day
$endDate->addYear();
$endDate->subDay();
return $endDate;
}
$endDate->endOfYear();
return $endDate;
}
/**
* @param Carbon $date
*
* @return Carbon date object
*/
public function startOfFiscalYear(Carbon $date): Carbon
{
// get start mm-dd. Then create a start date in the year passed.
$startDate = clone $date;
if ($this->useCustomFiscalYear === true) {
$prefStartStr = Preferences::get('fiscalYearStart', '01-01')->data;
list($mth, $day) = explode('-', $prefStartStr);
$startDate->month(intval($mth))->day(intval($day));
// if start date is after passed date, sub 1 year.
if ($startDate > $date) {
$startDate->subYear();
}
return $startDate;
}
$startDate->startOfYear();
return $startDate;
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* FiscalHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers;
use Carbon\Carbon;
/**
* Interface FiscalHelperInterface
*
* @package FireflyIII\Helpers
*/
interface FiscalHelperInterface
{
/**
* This method produces a clone of the Carbon date object passed, checks preferences
* and calculates the last day of the fiscal year.
*
* @param Carbon $date
*
* @return Carbon date object
*/
public function endOfFiscalYear(Carbon $date): Carbon;
/**
* This method produces a clone of the Carbon date object passed, checks preferences
* and calculates the first day of the fiscal year.
*
* @param Carbon $date
*
* @return Carbon date object
*/
public function startOfFiscalYear(Carbon $date): Carbon;
}

108
app/Helpers/Help/Help.php Normal file
View File

@@ -0,0 +1,108 @@
<?php
/**
* Help.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Help;
use Cache;
use League\CommonMark\CommonMarkConverter;
use Requests;
use Route;
/**
* Class Help
*
* @package FireflyIII\Helpers\Help
*/
class Help implements HelpInterface
{
/**
*
* @param string $key
*
* @return string
*/
public function getFromCache(string $key): string
{
return Cache::get($key);
}
/**
* @param string $language
* @param string $route
*
* @return array
*/
public function getFromGithub(string $language, string $route): array
{
$uri = sprintf('https://raw.githubusercontent.com/JC5/firefly-iii-help/master/%s/%s.md', $language, $route);
$routeIndex = str_replace('.', '-', $route);
$title = trans('help.' . $routeIndex);
$content = [
'text' => '<p>' . strval(trans('firefly.route_has_no_help')) . '</p>',
'title' => $title,
];
$result = Requests::get($uri);
if ($result->status_code === 200) {
$content['text'] = $result->body;
}
if (strlen(trim($content['text'])) == 0) {
$content['text'] = '<p>' . strval(trans('firefly.route_has_no_help')) . '</p>';
}
$converter = new CommonMarkConverter();
$content['text'] = $converter->convertToHtml($content['text']);
return $content;
}
/**
*
* @param string $route
*
* @return bool
*/
public function hasRoute(string $route):bool
{
return Route::has($route);
}
/**
*
* @param string $route
*
* @return bool
*/
public function inCache(string $route):bool
{
return Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text');
}
/**
*
* @param string $route
* @param string $language
* @param array $content
*
* @internal param $title
*/
public function putInCache(string $route, string $language, array $content)
{
Cache::put('help.' . $route . '.text.' . $language, $content['text'], 10080); // a week.
Cache::put('help.' . $route . '.title.' . $language, $content['title'], 10080);
}
}

View File

@@ -0,0 +1,56 @@
<?php
/**
* HelpInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Help;
/**
* Interface HelpInterface
*
* @package FireflyIII\Helpers\Help
*/
interface HelpInterface
{
/**
* @param string $key
*
* @return string
*/
public function getFromCache(string $key): string;
/**
* @param string $language
* @param string $route
*
* @return array
*/
public function getFromGithub(string $language, string $route):array;
/**
* @param string $route
*
* @return bool
*/
public function hasRoute(string $route): bool;
/**
* @param string $route
*
* @return bool
*/
public function inCache(string $route): bool;
/**
* @param string $route
* @param string $language
* @param array $content
*/
public function putInCache(string $route, string $language, array $content);
}

View File

@@ -0,0 +1,142 @@
<?php
/**
* AccountReportHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use DB;
use FireflyIII\Helpers\Collection\Account as AccountCollection;
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
/**
* Class AccountReportHelper
*
* @package FireflyIII\Helpers\Report
*/
class AccountReportHelper implements AccountReportHelperInterface
{
/**
* @param Account $account
* @param Collection $startSet
* @param Collection $endSet
* @param Collection $backupSet
*
* @return Account
*/
public static function reportFilter(Account $account, Collection $startSet, Collection $endSet, Collection $backupSet)
{
// The balance for today always incorporates transactions made on today. So to get todays "start" balance, we sub one day.
$account->startBalance = '0';
$account->endBalance = '0';
$currentStart = $startSet->filter(
function (Account $entry) use ($account) {
return $account->id == $entry->id;
}
);
$currentBackup = $backupSet->filter( // grab entry from current backup as well:
function (Account $entry) use ($account) {
return $account->id == $entry->id;
}
);
// first try to set from backup
if (!is_null($currentBackup->first())) {
$account->startBalance = $currentBackup->first()->balance;
}
// overrule with data from start
if (!is_null($currentStart->first())) {
$account->startBalance = $currentStart->first()->balance;
}
$currentEnd = $endSet->filter(
function (Account $entry) use ($account) {
return $account->id == $entry->id;
}
);
if (!is_null($currentEnd->first())) {
$account->endBalance = $currentEnd->first()->balance;
}
return $account;
}
/**
* This method generates a full report for the given period on all
* given accounts.
*
* a special consideration for accounts that did exist on this exact day.
* we also grab the balance from today just in case, to see if that changes things.
* it's a fall back for users who (rightly so) start keeping score at the first of
* the month and find the first report lacking / broken.
*
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return AccountCollection
*/
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection
{
$startAmount = '0';
$endAmount = '0';
$diff = '0';
$ids = $accounts->pluck('id')->toArray();
$yesterday = clone $start;
$yesterday->subDay();
$startSet = $this->getSet($ids, $yesterday); // get balances for start.
$backupSet = $this->getSet($ids, $start);
$endSet = $this->getSet($ids, $end);
$accounts->each(
function (Account $account) use ($startSet, $endSet, $backupSet) {
return self::reportFilter($account, $startSet, $endSet, $backupSet);
}
);
// summarize:
foreach ($accounts as $account) {
$startAmount = bcadd($startAmount, $account->startBalance);
$endAmount = bcadd($endAmount, $account->endBalance);
$diff = bcadd($diff, bcsub($account->endBalance, $account->startBalance));
}
$object = new AccountCollection;
$object->setStart($startAmount);
$object->setEnd($endAmount);
$object->setDifference($diff);
$object->setAccounts($accounts);
return $object;
}
/**
* @param array $ids
* @param Carbon $date
*
* @return Collection
*/
private function getSet(array $ids, Carbon $date): Collection
{
return Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id')
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->whereIn('accounts.id', $ids)
->whereNull('transaction_journals.deleted_at')
->whereNull('transactions.deleted_at')
->where('transaction_journals.date', '<=', $date->format('Y-m-d'))
->groupBy('accounts.id')
->get(['accounts.id', DB::raw('SUM(`transactions`.`amount`) as `balance`')]);
}
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* AccountReportHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Account as AccountCollection;
use Illuminate\Support\Collection;
/**
* Interface AccountReportHelperInterface
*
* @package FireflyIII\Helpers\Report
*/
interface AccountReportHelperInterface
{
/**
* This method generates a full report for the given period on all
* given accounts
*
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return AccountCollection
*/
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection;
}

View File

@@ -0,0 +1,291 @@
<?php
/**
* BalanceReportHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Auth;
use Carbon\Carbon;
use DB;
use FireflyIII\Helpers\Collection\Balance;
use FireflyIII\Helpers\Collection\BalanceEntry;
use FireflyIII\Helpers\Collection\BalanceHeader;
use FireflyIII\Helpers\Collection\BalanceLine;
use FireflyIII\Models\Budget;
use FireflyIII\Models\LimitRepetition;
use FireflyIII\Models\Tag;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
/**
* Class BalanceReportHelper
*
* @package FireflyIII\Helpers\Report
*/
class BalanceReportHelper implements BalanceReportHelperInterface
{
/** @var BudgetRepositoryInterface */
protected $budgetRepository;
/**
* ReportHelper constructor.
*
*
* @param BudgetRepositoryInterface $budgetRepository
*/
public function __construct(BudgetRepositoryInterface $budgetRepository)
{
$this->budgetRepository = $budgetRepository;
}
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Balance
*/
public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance
{
$balance = new Balance;
$header = new BalanceHeader;
$limitRepetitions = $this->budgetRepository->getAllBudgetLimitRepetitions($start, $end);
foreach ($accounts as $account) {
$header->addAccount($account);
}
/** @var LimitRepetition $repetition */
foreach ($limitRepetitions as $repetition) {
$budget = $this->budgetRepository->find($repetition->budget_id);
$line = $this->createBalanceLine($budget, $repetition, $accounts);
$balance->addBalanceLine($line);
}
$noBudgetLine = $this->createNoBudgetLine($accounts, $start, $end);
$coveredByTagLine = $this->createTagsBalanceLine($accounts, $start, $end);
$leftUnbalancedLine = $this->createLeftUnbalancedLine($noBudgetLine, $coveredByTagLine);
$balance->addBalanceLine($noBudgetLine);
$balance->addBalanceLine($coveredByTagLine);
$balance->addBalanceLine($leftUnbalancedLine);
$balance->setBalanceHeader($header);
// remove budgets without expenses from balance lines:
$balance = $this->removeUnusedBudgets($balance);
return $balance;
}
/**
* This method collects all transfers that are part of a "balancing act" tag
* and groups the amounts of those transfers by their destination account.
*
* This is used to indicate which expenses, usually outside of budgets, have been
* corrected by transfers from a savings account.
*
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
private function allCoveredByBalancingActs(Collection $accounts, Carbon $start, Carbon $end): Collection
{
$ids = $accounts->pluck('id')->toArray();
$set = Auth::user()->tags()
->leftJoin('tag_transaction_journal', 'tag_transaction_journal.tag_id', '=', 'tags.id')
->leftJoin('transaction_journals', 'tag_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id')
->leftJoin(
'transactions AS t_source', function (JoinClause $join) {
$join->on('transaction_journals.id', '=', 't_source.transaction_journal_id')->where('t_source.amount', '<', 0);
}
)
->leftJoin(
'transactions AS t_destination', function (JoinClause $join) {
$join->on('transaction_journals.id', '=', 't_destination.transaction_journal_id')->where('t_destination.amount', '>', 0);
}
)
->where('tags.tagMode', 'balancingAct')
->where('transaction_types.type', TransactionType::TRANSFER)
->where('transaction_journals.date', '>=', $start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $end->format('Y-m-d'))
->whereNull('transaction_journals.deleted_at')
->whereIn('t_source.account_id', $ids)
->whereIn('t_destination.account_id', $ids)
->groupBy('t_destination.account_id')
->get(
[
't_destination.account_id',
DB::raw('SUM(`t_destination`.`amount`) as `sum`'),
]
);
return $set;
}
/**
* @param Budget $budget
* @param LimitRepetition $repetition
* @param Collection $accounts
*
* @return BalanceLine
*/
private function createBalanceLine(Budget $budget, LimitRepetition $repetition, Collection $accounts): BalanceLine
{
$line = new BalanceLine;
$budget->amount = $repetition->amount;
$line->setBudget($budget);
$line->setStartDate($repetition->startdate);
$line->setEndDate($repetition->enddate);
// loop accounts:
foreach ($accounts as $account) {
$balanceEntry = new BalanceEntry;
$balanceEntry->setAccount($account);
$spent = $this->budgetRepository->spentInPeriod(
new Collection([$budget]), new Collection([$account]), $repetition->startdate, $repetition->enddate
);
$balanceEntry->setSpent($spent);
$line->addBalanceEntry($balanceEntry);
}
return $line;
}
/**
* @param BalanceLine $noBudgetLine
* @param BalanceLine $coveredByTagLine
*
* @return BalanceLine
*/
private function createLeftUnbalancedLine(BalanceLine $noBudgetLine, BalanceLine $coveredByTagLine): BalanceLine
{
$line = new BalanceLine;
$line->setRole(BalanceLine::ROLE_DIFFROLE);
$noBudgetEntries = $noBudgetLine->getBalanceEntries();
$tagEntries = $coveredByTagLine->getBalanceEntries();
foreach ($noBudgetEntries as $entry) {
$account = $entry->getAccount();
$tagEntry = $tagEntries->filter(
function (BalanceEntry $current) use ($account) {
return $current->getAccount()->id === $account->id;
}
);
if ($tagEntry->first()) {
// found corresponding entry. As we should:
$newEntry = new BalanceEntry;
$newEntry->setAccount($account);
$spent = bcadd($tagEntry->first()->getLeft(), $entry->getSpent());
$newEntry->setSpent($spent);
$line->addBalanceEntry($newEntry);
}
}
return $line;
}
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return BalanceLine
*/
private function createNoBudgetLine(Collection $accounts, Carbon $start, Carbon $end): BalanceLine
{
$empty = new BalanceLine;
foreach ($accounts as $account) {
$spent = $this->budgetRepository->spentInPeriodWithoutBudget(new Collection([$account]), $start, $end);
// budget
$budgetEntry = new BalanceEntry;
$budgetEntry->setAccount($account);
$budgetEntry->setSpent($spent);
$empty->addBalanceEntry($budgetEntry);
}
return $empty;
}
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return BalanceLine
*/
private function createTagsBalanceLine(Collection $accounts, Carbon $start, Carbon $end): BalanceLine
{
$tags = new BalanceLine;
$tagsLeft = $this->allCoveredByBalancingActs($accounts, $start, $end);
$tags->setRole(BalanceLine::ROLE_TAGROLE);
foreach ($accounts as $account) {
$leftEntry = $tagsLeft->filter(
function (Tag $tag) use ($account) {
return $tag->account_id == $account->id;
}
);
$left = '0';
if (!is_null($leftEntry->first())) {
$left = $leftEntry->first()->sum;
}
// balanced by tags
$tagEntry = new BalanceEntry;
$tagEntry->setAccount($account);
$tagEntry->setLeft($left);
$tags->addBalanceEntry($tagEntry);
}
return $tags;
}
/**
* @param Balance $balance
*
* @return Balance
*/
private function removeUnusedBudgets(Balance $balance): Balance
{
$set = $balance->getBalanceLines();
$newSet = new Collection;
foreach ($set as $entry) {
if (!is_null($entry->getBudget()->id)) {
$sum = '0';
foreach ($entry->getBalanceEntries() as $balanceEntry) {
$sum = bcadd($sum, $balanceEntry->getSpent());
}
if (bccomp($sum, '0') === -1) {
$newSet->push($entry);
}
continue;
}
$newSet->push($entry);
}
$balance->setBalanceLines($newSet);
return $balance;
}
}

View File

@@ -0,0 +1,34 @@
<?php
/**
* BalanceReportHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Balance;
use Illuminate\Support\Collection;
/**
* Interface BalanceReportHelperInterface
*
* @package FireflyIII\Helpers\Report
*/
interface BalanceReportHelperInterface
{
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Balance
*/
public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance;
}

View File

@@ -0,0 +1,252 @@
<?php
/**
* BudgetReportHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Budget as BudgetCollection;
use FireflyIII\Helpers\Collection\BudgetLine;
use FireflyIII\Models\Budget;
use FireflyIII\Models\LimitRepetition;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
/**
* Class BudgetReportHelper
*
* @package FireflyIII\Helpers\Report
*/
class BudgetReportHelper implements BudgetReportHelperInterface
{
/** @var BudgetRepositoryInterface */
private $repository;
/**
* BudgetReportHelper constructor.
*
* @param BudgetRepositoryInterface $repository
*/
public function __construct(BudgetRepositoryInterface $repository)
{
$this->repository = $repository;
}
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Collection
*/
public function budgetYearOverview(Carbon $start, Carbon $end, Collection $accounts): Collection
{
// chart properties for cache:
$cache = new CacheProperties;
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty('budget-year');
$cache->addProperty($accounts->pluck('id')->toArray());
if ($cache->has()) {
return $cache->get();
}
$headers = [];
$current = clone $start;
$return = new Collection;
$set = $this->repository->getBudgets();
$budgets = [];
$spent = [];
while ($current < $end) {
$short = $current->format('m-Y');
$headers[$short] = $current->formatLocalized((string)trans('config.month'));
$current->addMonth();
}
/** @var Budget $budget */
foreach ($set as $budget) {
$id = $budget->id;
$budgets[$id] = $budget->name;
$spent[$id] = [];
$current = clone $start;
$sum = '0';
while ($current < $end) {
$currentEnd = clone $current;
$currentEnd->endOfMonth();
$format = $current->format('m-Y');
$budgetSpent = $this->repository->spentInPeriod(new Collection([$budget]), $accounts, $current, $currentEnd);
$spent[$id][$format] = $budgetSpent;
$sum = bcadd($sum, $budgetSpent);
$current->addMonth();
}
if (bccomp('0', $sum) === 0) {
// not spent anything.
unset($spent[$id]);
unset($budgets[$id]);
}
}
$return->put('headers', $headers);
$return->put('budgets', $budgets);
$return->put('spent', $spent);
$cache->store($return);
return $return;
}
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return BudgetCollection
*/
public function getBudgetReport(Carbon $start, Carbon $end, Collection $accounts): BudgetCollection
{
$object = new BudgetCollection;
$set = $this->repository->getBudgets();
/** @var Budget $budget */
foreach ($set as $budget) {
$repetitions = $budget->limitrepetitions()->before($end)->after($start)->get();
// no repetition(s) for this budget:
if ($repetitions->count() == 0) {
// spent for budget in time range:
$spent = $this->repository->spentInPeriod(new Collection([$budget]), $accounts, $start, $end);
if ($spent > 0) {
$budgetLine = new BudgetLine;
$budgetLine->setBudget($budget);
$budgetLine->setOverspent($spent);
$object->addOverspent($spent);
$object->addBudgetLine($budgetLine);
}
continue;
}
// one or more repetitions for budget:
/** @var LimitRepetition $repetition */
foreach ($repetitions as $repetition) {
$data = $this->calculateExpenses($budget, $repetition, $accounts);
$budgetLine = new BudgetLine;
$budgetLine->setBudget($budget);
$budgetLine->setRepetition($repetition);
$budgetLine->setLeft($data['left']);
$budgetLine->setSpent($data['expenses']);
$budgetLine->setOverspent($data['overspent']);
$budgetLine->setBudgeted($repetition->amount);
$object->addBudgeted($repetition->amount);
$object->addSpent($data['spent']);
$object->addLeft($data['left']);
$object->addOverspent($data['overspent']);
$object->addBudgetLine($budgetLine);
}
}
// stuff outside of budgets:
$noBudget = $this->repository->spentInPeriodWithoutBudget($accounts, $start, $end);
$budgetLine = new BudgetLine;
$budgetLine->setOverspent($noBudget);
$budgetLine->setSpent($noBudget);
$object->addOverspent($noBudget);
$object->addBudgetLine($budgetLine);
return $object;
}
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Collection
*/
public function getBudgetsWithExpenses(Carbon $start, Carbon $end, Collection $accounts): Collection
{
/** @var BudgetRepositoryInterface $repository */
$repository = app(BudgetRepositoryInterface::class);
$budgets = $repository->getActiveBudgets();
$set = new Collection;
/** @var Budget $budget */
foreach ($budgets as $budget) {
$total = $repository->spentInPeriod(new Collection([$budget]), $accounts, $start, $end);
if (bccomp($total, '0') === -1) {
$set->push($budget);
}
}
$set = $set->sortBy(
function (Budget $budget) {
return $budget->name;
}
);
return $set;
}
/**
* Take the array as returned by CategoryRepositoryInterface::spentPerDay and CategoryRepositoryInterface::earnedByDay
* and sum up everything in the array in the given range.
*
* @param Carbon $start
* @param Carbon $end
* @param array $array
*
* @return string
*/
protected function getSumOfRange(Carbon $start, Carbon $end, array $array)
{
$sum = '0';
$currentStart = clone $start; // to not mess with the original one
$currentEnd = clone $end; // to not mess with the original one
while ($currentStart <= $currentEnd) {
$date = $currentStart->format('Y-m-d');
if (isset($array[$date])) {
$sum = bcadd($sum, $array[$date]);
}
$currentStart->addDay();
}
return $sum;
}
/**
* @param Budget $budget
* @param LimitRepetition $repetition
* @param Collection $accounts
*
* @return array
*/
private function calculateExpenses(Budget $budget, LimitRepetition $repetition, Collection $accounts): array
{
$array = [];
$expenses = $this->repository->spentInPeriod(new Collection([$budget]), $accounts, $repetition->startdate, $repetition->enddate);
$array['left'] = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? bcadd($repetition->amount, $expenses) : '0';
$array['spent'] = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? $expenses : '0';
$array['overspent'] = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? '0' : bcadd($expenses, $repetition->amount);
$array['expenses'] = $expenses;
return $array;
}
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* BudgetReportHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Report;
use Carbon\Carbon;
use FireflyIII\Helpers\Collection\Budget as BudgetCollection;
use Illuminate\Support\Collection;
/**
* Interface BudgetReportHelperInterface
*
* @package FireflyIII\Helpers\Report
*/
interface BudgetReportHelperInterface
{
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Collection
*/
public function budgetYearOverview(Carbon $start, Carbon $end, Collection $accounts): Collection;
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return BudgetCollection
*/
public function getBudgetReport(Carbon $start, Carbon $end, Collection $accounts): BudgetCollection;
/**
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return Collection
*/
public function getBudgetsWithExpenses(Carbon $start, Carbon $end, Collection $accounts): Collection;
}

Some files were not shown because too many files have changed in this diff Show More