Compare commits

...

2189 Commits
3.5.1 ... 4.1.5

Author SHA1 Message Date
James Cole
a66990459e Merge branch 'release/4.1.5' 2016-11-01 18:45:25 +01:00
James Cole
fecbdc7fbf New version.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-11-01 18:44:26 +01:00
James Cole
0369ace5f7 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii: (28 commits)
  Approved. Step name: Proofread
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  New translations
  ...
2016-11-01 18:41:15 +01:00
James Cole
1657048181 Fixed bug #370 2016-11-01 18:40:35 +01:00
James Cole
b9bdaa7a56 Merge pull request #369 from JC5/l10n_develop
New Crowdin translations
2016-11-01 11:43:00 +01:00
James Cole
f28d07e17b Approved. Step name: Proofread 2016-11-01 11:40:36 +01:00
James Cole
8b8bf1debc New translations 2016-10-31 18:41:44 +01:00
James Cole
aff1c1e3ef New translations 2016-10-31 18:41:40 +01:00
James Cole
169bb2c9bb New translations 2016-10-31 18:41:29 +01:00
James Cole
fb1eafef43 New translations 2016-10-31 18:41:26 +01:00
James Cole
bfe26ceb39 New translations 2016-10-31 18:41:25 +01:00
James Cole
050f305e80 New translations 2016-10-31 18:41:24 +01:00
James Cole
63a6a4f823 New translations 2016-10-31 18:41:23 +01:00
James Cole
a3b167cab5 New translations 2016-10-31 18:41:23 +01:00
James Cole
48327948e2 New translations 2016-10-31 18:41:22 +01:00
James Cole
93856d4577 New translations 2016-10-31 18:41:21 +01:00
James Cole
7ff068aa95 New translations 2016-10-31 18:41:20 +01:00
James Cole
b2f00c869e New translations 2016-10-31 18:41:18 +01:00
James Cole
b717cab8f6 New translations 2016-10-31 18:41:17 +01:00
James Cole
adaff52707 New translations 2016-10-31 18:41:16 +01:00
James Cole
54050edcc6 New translations 2016-10-31 18:41:16 +01:00
James Cole
9acbb69a6a New translations 2016-10-31 18:41:15 +01:00
James Cole
a5e6de047a New translations 2016-10-31 18:41:14 +01:00
James Cole
3d8d35207b New translations 2016-10-31 18:41:13 +01:00
James Cole
0a95f59813 New translations 2016-10-31 18:41:10 +01:00
James Cole
43a3d28dbd New translations 2016-10-31 18:41:09 +01:00
James Cole
685cb7a505 Translated 2016-10-31 18:41:06 +01:00
James Cole
dd82466d07 Translated 2016-10-31 18:41:05 +01:00
James Cole
2cbe4a013e Translated 2016-10-31 18:41:04 +01:00
James Cole
fb85341844 Translated 2016-10-31 18:41:03 +01:00
James Cole
116b3ecdad Approved. Step name: Proofread 2016-10-31 18:40:58 +01:00
James Cole
af85fbf0a3 New translations 2016-10-31 18:40:50 +01:00
James Cole
1d250593c0 New translations 2016-10-31 18:40:45 +01:00
James Cole
ed33a054ad This update will make the help method fall back to the English content, if it is available. 2016-10-31 18:31:52 +01:00
James Cole
4e3e015912 Fix multi year account report [skip ci] 2016-10-30 20:13:49 +01:00
James Cole
7821c52842 Ajax some report parts. 2016-10-30 18:29:26 +01:00
James Cole
0a6f299ae6 Merge branch 'release/4.1.4' 2016-10-30 08:56:35 +01:00
James Cole
73f87e30c2 Changelog.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-30 08:52:09 +01:00
James Cole
838ece2c89 Merge pull request #368 from JC5/l10n_develop
New Crowdin translations
2016-10-30 07:32:23 +01:00
James Cole
d8b88ea2c0 New translations 2016-10-30 07:20:17 +01:00
James Cole
5908951b75 New translations 2016-10-30 07:20:17 +01:00
James Cole
0b41f4c4d2 New translations 2016-10-30 07:20:16 +01:00
James Cole
35439d4fbc New translations 2016-10-30 07:20:16 +01:00
James Cole
fdce40310f New translations 2016-10-30 07:20:15 +01:00
James Cole
6b4785ae32 New translations 2016-10-30 07:20:15 +01:00
James Cole
f74e8e9cb7 New translations 2016-10-30 07:20:13 +01:00
James Cole
5a4eb7e09e New translations 2016-10-30 07:20:12 +01:00
James Cole
3bc4df03cc New translations 2016-10-30 07:20:11 +01:00
James Cole
5d585132fb New translations 2016-10-30 07:20:11 +01:00
James Cole
eff4905883 New translations 2016-10-30 07:20:10 +01:00
James Cole
8923ac4fe3 New translations 2016-10-30 07:20:09 +01:00
James Cole
073535e5ed New translations 2016-10-30 07:20:09 +01:00
James Cole
d304b90ca6 New translations 2016-10-30 07:20:08 +01:00
James Cole
816c26e14e New translations 2016-10-30 07:20:07 +01:00
James Cole
b1244ffa01 New translations 2016-10-30 07:20:07 +01:00
James Cole
fc1342bff9 New translations 2016-10-30 07:20:06 +01:00
James Cole
d7b95194b5 New translations 2016-10-30 07:20:04 +01:00
James Cole
b58bdeccd2 New translations 2016-10-30 07:20:04 +01:00
James Cole
f260b9bdee New translations 2016-10-30 07:20:02 +01:00
James Cole
fb1bdc9ec5 New translations 2016-10-30 07:20:01 +01:00
James Cole
697eff48fc New translations 2016-10-30 07:20:00 +01:00
James Cole
c05019339a Approved. Step name: Proofread 2016-10-30 07:20:00 +01:00
James Cole
8438efaf41 Approved. Step name: Proofread 2016-10-30 07:19:59 +01:00
James Cole
81c019cc99 Translated 2016-10-30 07:19:59 +01:00
James Cole
c773fdc435 Approved. Step name: Proofread 2016-10-30 07:19:58 +01:00
James Cole
c1406f51f1 Approved. Step name: Proofread 2016-10-30 07:19:58 +01:00
James Cole
92affd3440 Approved. Step name: Proofread 2016-10-30 07:19:57 +01:00
James Cole
d3da0652ef Approved. Step name: Proofread 2016-10-30 07:19:57 +01:00
James Cole
e3fbbd6cf1 Translated 2016-10-30 07:19:56 +01:00
James Cole
fcff13470c Approved. Step name: Proofread 2016-10-30 07:19:56 +01:00
James Cole
e3061ee7e7 Approved. Step name: Proofread 2016-10-30 07:19:55 +01:00
James Cole
0ee305fc4a Approved. Step name: Proofread 2016-10-30 07:19:55 +01:00
James Cole
58b93fd0c4 Approved. Step name: Proofread 2016-10-30 07:19:53 +01:00
James Cole
b30217fa2d Approved. Step name: Proofread 2016-10-30 07:19:52 +01:00
James Cole
ae48eec3a2 Translated 2016-10-30 07:19:52 +01:00
James Cole
948233ba27 Translated 2016-10-30 07:19:52 +01:00
James Cole
c2db9b183a New translations 2016-10-30 07:19:51 +01:00
James Cole
6d2b88fa0b New translations 2016-10-30 07:19:51 +01:00
James Cole
1d5da825c5 New translations 2016-10-30 07:19:50 +01:00
James Cole
330c9b53d6 New translations 2016-10-30 07:19:50 +01:00
James Cole
751fe7d4fb New translations 2016-10-30 07:19:49 +01:00
James Cole
9df1fc6e5d New translations 2016-10-30 07:19:48 +01:00
James Cole
8d660f1701 New translations 2016-10-30 07:19:46 +01:00
James Cole
4d61d3c4aa New translations 2016-10-30 07:19:46 +01:00
James Cole
0457088c99 New translations 2016-10-30 07:19:45 +01:00
James Cole
8e575da74e New translations 2016-10-30 07:19:45 +01:00
James Cole
48ed28888e Translated 2016-10-30 07:19:43 +01:00
James Cole
4084b1124e Translated 2016-10-30 07:19:42 +01:00
James Cole
60ba607027 Translated 2016-10-30 07:19:42 +01:00
James Cole
3df2c11b4a Translated 2016-10-30 07:19:41 +01:00
James Cole
c93221923a Translated 2016-10-30 07:19:41 +01:00
James Cole
375317e932 New translations 2016-10-30 07:19:40 +01:00
James Cole
7ce527957a New translations 2016-10-30 07:19:40 +01:00
James Cole
6946521199 New translations 2016-10-30 07:19:39 +01:00
James Cole
18ee20e680 Update crowdin file [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-30 06:37:00 +01:00
James Cole
c53da15219 Update composer.lock in anticipation of new release.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-30 06:20:18 +01:00
James Cole
d4995e342f Fixed #330 2016-10-30 06:14:07 +01:00
James Cole
c9f14da294 Translations. 2016-10-29 17:30:55 +02:00
James Cole
e9c2446cba Debug log for #366 2016-10-29 16:16:10 +02:00
James Cole
35f179625c New queries for #366 2016-10-29 16:11:54 +02:00
James Cole
39749aa113 First code set for #330 2016-10-29 15:14:33 +02:00
James Cole
ba65e982fd Forgot to include model [skip ci] 2016-10-29 11:42:04 +02:00
James Cole
b50e5d7e59 Can also change destination in new rule. 2016-10-29 09:22:51 +02:00
James Cole
a3148dc172 Code for #321 2016-10-29 09:03:14 +02:00
James Cole
73f1491d2d Updates for translations. 2016-10-29 07:44:46 +02:00
James Cole
28eb54dc96 Initial split for report options. 2016-10-28 19:01:52 +02:00
James Cole
21fb426524 Make sure date is localised. 2016-10-28 18:16:30 +02:00
James Cole
d5710ca809 Update Crowdin configuration file 2016-10-28 14:06:41 +02:00
James Cole
0ba6cdda17 Merge pull request #364 from schoentoon/develop
Added dockerfile
2016-10-27 19:40:27 +02:00
James Cole
afdcfa8525 Tweak reports. 2016-10-26 19:45:10 +02:00
James Cole
5db4f8512b Tweak reports. 2016-10-26 19:37:19 +02:00
James Cole
dc0c1b73bc Better view for expenses. 2016-10-26 19:32:19 +02:00
James Cole
f999257095 New verify database routine. 2016-10-26 19:32:07 +02:00
James Cole
7182909e28 Keep the box [skip ci] 2016-10-26 16:54:52 +02:00
James Cole
fe3f015171 Add more stuff to ajax controllers, making report controller simpler. 2016-10-26 16:46:43 +02:00
Toon Schoenmakers
5bb668be63 Added dockerfile 2016-10-26 15:07:36 +02:00
James Cole
01de147900 Display message about common error. 2016-10-26 06:41:50 +02:00
James Cole
a7e5fcc806 Move some stuff over to AJAX thing. 2016-10-25 18:53:54 +02:00
James Cole
e2d187d74b Various small bug fixes. 2016-10-24 18:01:15 +02:00
James Cole
48b0620629 New help thing. 2016-10-23 17:33:53 +02:00
James Cole
19e9f382e4 Add some rounding to make forms more neat. 2016-10-23 16:56:18 +02:00
James Cole
446eaf6588 Some code cleanup [skip ci] 2016-10-23 14:58:39 +02:00
James Cole
78deb1420d Some fixes for bills. 2016-10-23 14:56:05 +02:00
James Cole
e092515dff Better export. 2016-10-23 12:55:07 +02:00
James Cole
81f6fef978 Add new line to files [skip ci] 2016-10-23 12:42:44 +02:00
James Cole
6a2f8fa9ee No use models directly. 2016-10-23 12:41:54 +02:00
James Cole
a79a8c8874 Various small upgrades. 2016-10-23 12:37:12 +02:00
James Cole
c39659b064 Remove a lot of references to user id. 2016-10-23 12:19:32 +02:00
James Cole
9a30fbd05a Move stuff to request classes for #339 2016-10-23 12:10:22 +02:00
James Cole
83f48418f6 Small updates [skip ci] 2016-10-23 09:57:04 +02:00
James Cole
bcd7b41c91 Simplified export. 2016-10-23 09:44:14 +02:00
James Cole
cefb7d12bc Merge branch 'release/4.1.3' 2016-10-22 22:45:27 +02:00
James Cole
3c0c15103e This fixes #361 2016-10-22 22:44:57 +02:00
James Cole
a8a8afc2be More for #339 2016-10-22 22:03:00 +02:00
James Cole
49e32abd3f Move some code for #339 2016-10-22 21:40:31 +02:00
James Cole
7977eefaca Merge branch 'release/4.1.2' 2016-10-22 20:52:54 +02:00
James Cole
f1fa6c3108 Fixed a bug in the store transaction routine. 2016-10-22 20:50:20 +02:00
James Cole
2fa0d55f39 Merge branch 'release/4.1.1' 2016-10-22 12:03:34 +02:00
James Cole
5bff509346 New translations.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 12:03:11 +02:00
James Cole
a147e9b74a Fix edit screen.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 11:53:34 +02:00
James Cole
0d87f7c4ca Better implementation of markdown.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 11:50:33 +02:00
James Cole
8c675615df Support markdown in notes.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 11:47:47 +02:00
James Cole
7edd1bff40 Merge branch 'release/4.1.0' 2016-10-22 10:21:15 +02:00
James Cole
3bfcb1f3ab New change log. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 10:20:25 +02:00
James Cole
7b6c63e6a8 New version number [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-10-22 10:15:50 +02:00
James Cole
5500e5b0aa Remove debug classes 2016-10-22 10:13:56 +02:00
James Cole
e4d249e73c Piggy bank supports notes (#350) 2016-10-22 10:13:49 +02:00
James Cole
091f6e918b Fix some reported issues. 2016-10-22 09:44:47 +02:00
James Cole
5d9b68c3e7 Various code cleanup [skip ci] 2016-10-22 09:39:31 +02:00
James Cole
12a6a61100 Various code cleanup [skip ci] 2016-10-22 09:33:03 +02:00
James Cole
7ce3b8d4ef Updated events, fixes #345 2016-10-22 09:31:27 +02:00
James Cole
3d9b855849 Force larval 5.3.18 2016-10-22 07:52:17 +02:00
James Cole
2346d2ec05 Fine tuning split edit screens. 2016-10-22 07:28:31 +02:00
James Cole
a4c081c8a5 Fix unset variable. [skip ci] 2016-10-21 22:01:42 +02:00
James Cole
316980efbd Fix unset variable. [skip ci] 2016-10-21 22:00:45 +02:00
James Cole
a05bc0eed0 Fix route [skip ci] 2016-10-21 21:57:10 +02:00
James Cole
4d1c271da6 Renamed a route [skip ci] 2016-10-21 21:54:57 +02:00
James Cole
0dd7ecbfbe Remove code no longer used. 2016-10-21 21:43:12 +02:00
James Cole
0dc188b083 Removed old code 2016-10-21 21:41:50 +02:00
James Cole
6a553f77f3 Large update to fix split journals. 2016-10-21 21:41:31 +02:00
James Cole
a74cef439b For simplicity, split controller. 2016-10-21 19:20:03 +02:00
James Cole
9a3cd27700 Many updates to get split transactions and normal transactions working side by side. 2016-10-21 19:06:22 +02:00
James Cole
801c7c0ab6 Remove unused function. 2016-10-21 13:22:45 +02:00
James Cole
a95a4e783a Fix and simplify bill repos 2016-10-21 13:20:51 +02:00
James Cole
af1ee9db93 This fixes bills unpaid. 2016-10-21 07:29:25 +02:00
James Cole
fcdb6fd2a7 Do loop instead of while loop [skip ci] 2016-10-21 06:41:33 +02:00
James Cole
97c0fb389d More logs [skip ci] 2016-10-21 06:38:00 +02:00
James Cole
a9c3992331 Back to old method [skip ci] 2016-10-21 06:33:56 +02:00
James Cole
a38e057fa7 Rewrote some methods to fix #341 2016-10-21 06:26:12 +02:00
James Cole
f83aaf77f1 Improve bill things for issue #341 2016-10-20 21:40:45 +02:00
James Cole
d92768ecbf This code fixes #349 2016-10-20 19:10:43 +02:00
James Cole
b9308cd74a Test flash messages. 2016-10-20 16:51:05 +02:00
James Cole
78b577bc9d Better ip info [skip ci] 2016-10-18 06:50:35 +02:00
James Cole
7d247897ed Should correctly show user info. [skip ci] 2016-10-18 06:47:48 +02:00
James Cole
5dcbdec491 Update composer file and update routine. [skip ci] 2016-10-15 18:52:21 +02:00
James Cole
9bf980431e Remove unused methods. 2016-10-15 14:07:51 +02:00
James Cole
da60bfbcff Better text [skip ci] 2016-10-15 14:05:56 +02:00
James Cole
92553cbc7e Add icon, missing translation [skip ci] 2016-10-15 12:41:45 +02:00
James Cole
8e48e53f17 Restucturing some code. 2016-10-15 12:39:34 +02:00
James Cole
2f9a4bb79a Better text 2016-10-15 12:39:11 +02:00
James Cole
ac968dd6cd Extended the user admin. 2016-10-15 07:11:53 +02:00
James Cole
6e4f2c0c8a Small script to upgrade transactions. 2016-10-15 06:19:21 +02:00
James Cole
d662c18ed7 Fix sorting in chart. [skip ci] 2016-10-14 20:07:15 +02:00
James Cole
e4ea234707 New revenue accounts chart. 2016-10-14 20:01:17 +02:00
James Cole
0b526c0168 New revenue chart 2016-10-14 19:59:10 +02:00
James Cole
2acde5c72a Option to show deposit accounts on the front page. 2016-10-14 19:52:30 +02:00
James Cole
ec8cf2c459 New preferences screen. 2016-10-14 19:48:19 +02:00
James Cole
3598780d54 This should at least catch #357 2016-10-14 19:18:00 +02:00
James Cole
35dd8ac6e6 Revert "This should at least catch #357"
This reverts commit 5ff7c7ffab.
2016-10-14 19:16:39 +02:00
James Cole
5ff7c7ffab This should at least catch #357 2016-10-14 19:16:28 +02:00
James Cole
399db47826 Merge branch 'release/4.0.2' 2016-10-14 17:15:47 +02:00
James Cole
148956a60d Some code reformatting. 2016-10-14 17:14:54 +02:00
James Cole
3670053a58 Some code reformatting [skip ci] 2016-10-14 17:14:28 +02:00
James Cole
e8e2b9704f New translations. 2016-10-14 17:14:04 +02:00
James Cole
fcdeebcc06 Some last minute updated texts. 2016-10-14 16:51:38 +02:00
James Cole
586ed82e88 New changelog. 2016-10-14 16:26:05 +02:00
James Cole
cc400d1e2e Merge pull request #356 from telyn/require-intl
Require PHP intl extension
2016-10-12 10:32:28 +02:00
Telyn
6edbfb27aa Add ext-intl to dependencies 2016-10-12 09:22:21 +01:00
James Cole
8fc9251b93 Fix name of language. [skip ci] 2016-10-10 19:08:09 +02:00
James Cole
10af888a97 Expand view [skip ci] 2016-10-10 13:27:35 +02:00
James Cole
89f2328846 Forgot include [skip ci] 2016-10-10 13:25:27 +02:00
James Cole
48e8cd20b4 Removed unused Twig methods. 2016-10-10 13:08:02 +02:00
James Cole
394ef23eda New local names [skip ci] 2016-10-10 08:27:08 +02:00
James Cole
62aa1eb487 Updated translations [skip ci] 2016-10-10 08:19:00 +02:00
James Cole
1500018ccc A new language arrives! [skip ci] 2016-10-10 08:13:27 +02:00
James Cole
23fad62d46 Completely removed account crud class. 2016-10-10 08:03:03 +02:00
James Cole
3cbf00734f Remove storeMeta 2016-10-10 07:53:25 +02:00
James Cole
1dc17dd59d Move getActiveAccountsByType 2016-10-10 07:53:12 +02:00
James Cole
f8935c92ea Unrelated code cleanup. 2016-10-10 07:49:55 +02:00
James Cole
de6f838413 Moved getAccountsByType 2016-10-10 07:49:39 +02:00
James Cole
e8a095e543 Moved getAccountsById 2016-10-10 07:25:27 +02:00
James Cole
717c1d080e Copied (not yet removed) findByName 2016-10-10 07:20:49 +02:00
James Cole
0ae9afd325 Move findByIban 2016-10-10 07:16:05 +02:00
James Cole
d1b56c2afa Moved findByAccountNumber 2016-10-10 07:14:01 +02:00
James Cole
8ef7c5ac33 Moved find() method to new class. 2016-10-10 07:12:39 +02:00
James Cole
7180a40cd8 Refactored some methods surrounding the opening balance of an account. 2016-10-10 07:01:14 +02:00
James Cole
71804af624 Updated some model code. 2016-10-10 06:50:24 +02:00
James Cole
85dc7f3643 Moved another method. 2016-10-10 06:49:50 +02:00
James Cole
a866d13b75 Forgot to add argument 2016-10-10 06:49:39 +02:00
James Cole
fcb5e4eabc Moved leftOnAccount() 2016-10-10 06:47:42 +02:00
James Cole
ade1cf9c19 Fixed wrong listing. 2016-10-10 06:40:50 +02:00
James Cole
0f1ec7d003 Removed double method. 2016-10-09 21:49:31 +02:00
James Cole
7e038afece Must be unsigned 2016-10-09 21:36:22 +02:00
James Cole
9bb8e182fa Forgot a translation 2016-10-09 21:36:15 +02:00
James Cole
e94ae126fd Refactored accountRepository::getJournals > accountTasker > getJournals 2016-10-09 21:36:03 +02:00
James Cole
5bb8c6a366 This should fix #355 2016-10-09 20:18:46 +02:00
James Cole
30844df5d4 Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii:
  Fixed issue causing all imported transactions to have unknown opposing account with ABN AMRO specific
2016-10-09 20:18:14 +02:00
James Cole
63e4a410a7 Merge pull request #354 from roberthorlings/bugfix/abn-amro-specific
Bugfix for issue with ABN AMRO specific
2016-10-09 20:00:48 +02:00
Robert Horlings
ee9a5d91e2 Merge branch 'develop' into bugfix/abn-amro-specific 2016-10-09 19:53:11 +02:00
Robert Horlings
171ab8a4c3 Fixed issue causing all imported transactions to have unknown opposing account with ABN AMRO specific 2016-10-09 17:19:00 +02:00
James Cole
96740aaac4 Extend transaction model for #351 2016-10-09 17:06:52 +02:00
James Cole
2017720096 Experimental new getJournals method. 2016-10-09 16:22:08 +02:00
James Cole
b77ea6d316 Add some phpdoc 2016-10-09 11:21:41 +02:00
James Cole
f5adb4047f Remove methods no longer used. 2016-10-09 10:59:28 +02:00
James Cole
b082858866 Removed unused blocks from the front page. Savings and piggy banks. 2016-10-09 10:58:54 +02:00
James Cole
a8a014189d Removed method that was already there under another name. 2016-10-09 10:57:06 +02:00
James Cole
39ea9e85a7 Various code cleanup and refactoring. Restored cache. 2016-10-09 10:53:37 +02:00
James Cole
a4d2ed74fc Make sure all journals are included. 2016-10-09 09:41:03 +02:00
James Cole
90f2e27f1f Refactoring income and expense reports. 2016-10-09 09:32:12 +02:00
James Cole
a3359ba47a Moved destroy() method from CRUD to Account repos. 2016-10-09 08:20:29 +02:00
James Cole
1d2d3523d6 Move CRUD method count() to account repository 2016-10-09 08:18:47 +02:00
James Cole
3f40751a1a Forgot to exclude a method. 2016-10-09 08:06:49 +02:00
James Cole
b5b55e862c Clean up code. 2016-10-09 07:59:14 +02:00
James Cole
c64771b76b Move some methods around, refactoring. 2016-10-09 07:58:27 +02:00
James Cole
ea7ee7ee9a Moved a report out of the controller. 2016-10-08 16:24:07 +02:00
James Cole
a1f797c4d1 Moved a method around. 2016-10-08 16:04:05 +02:00
James Cole
d0c92a2244 Clean up account report helper. 2016-10-08 15:59:58 +02:00
James Cole
6e90c033b1 Start of some remodelling. 2016-10-08 14:54:32 +02:00
James Cole
24f62b8fce Some minor refactoring. 2016-10-08 10:02:33 +02:00
James Cole
d43936155c Removed some unused code. 2016-10-07 16:33:17 +02:00
James Cole
39dab4fdd9 Remove unused class. 2016-10-07 12:28:14 +02:00
James Cole
c0fdf44ad2 Small cleaning up. 2016-10-07 11:40:03 +02:00
James Cole
4d91f7d23a This fixes #344 2016-10-07 09:40:50 +02:00
James Cole
49af6522a8 Some code cleanup. 2016-10-07 05:44:21 +02:00
James Cole
3c5f9487a8 Prep change log for next version [skip ci] 2016-10-07 05:43:47 +02:00
James Cole
f5cb87f5c3 Merge pull request #348 from SanderKleykens/feature/postgres-compatibility
PostgreSQL compatibility
2016-10-07 05:32:10 +02:00
Sander Kleykens
cf543613c9 Fix the CSV importer failing when using PostgreSQL
Add ordered column to the list of columns that are selected so PostgreSQL doesn't throw an error
2016-10-06 23:49:33 +02:00
Sander Kleykens
5c239c91db Convert raw XORs to a construct compatible with Laravel's query builder 2016-10-06 22:27:10 +02:00
James Cole
9920504232 Fixes #346 2016-10-06 05:26:38 +02:00
James Cole
5540697dbd Removed a method no longer necessary. 2016-10-05 16:09:37 +02:00
James Cole
b355c18e0c Some code cleanup and copyright cleanup. [skip ci] 2016-10-05 06:52:15 +02:00
James Cole
1e90485c5f Merge branch 'master' into develop
* master:
  added some comments
  removed some debug commands
  Better descriptions for ING accounts
2016-10-05 06:31:47 +02:00
James Cole
dc784c53b5 Fix for #343 2016-10-04 21:51:46 +02:00
James Cole
5a47391a64 Merge branch 'release/4.0.1' 2016-10-04 20:13:50 +02:00
James Cole
8a106bd16a Merge branch 'release/4.0.1' into develop 2016-10-04 20:13:50 +02:00
James Cole
a31ac79173 New version. 2016-10-04 20:13:40 +02:00
James Cole
0d0a604254 Changelog for 4.0.1 [skip ci] 2016-10-04 20:13:09 +02:00
James Cole
724d25f2c2 Merge branch 'develop'
* develop:
  Fixed some rare bugs.
  Extra clear button to reapply rules #307
  Fix trim when null [skip ci]
  Fixed a bug where incoming transactions would not be properly filtered in several reports.
  Removed for #334
  Fix #337 [skip ci]
  Fix #335
  Remove account extra text #336 [skip ci]
  Fixes bug #338
  Refer to correct page [skip ci]
  Catch unset row.
2016-10-04 20:08:35 +02:00
James Cole
8ed22d452d Merge pull request #342 from tomwerf/master
ING Import
2016-10-04 20:02:34 +02:00
Tom van der Werf
d7fef45a56 added some comments 2016-10-04 17:50:01 +00:00
Tom van der Werf
dc22802dec removed some debug commands 2016-10-04 17:30:49 +00:00
Tom van der Werf
ce5af7b1d9 Better descriptions for ING accounts 2016-10-03 17:08:24 +00:00
James Cole
0a147e5c9c Fixed some rare bugs. 2016-10-02 15:09:43 +02:00
James Cole
7d21255f7f Extra clear button to reapply rules #307 2016-10-02 08:14:11 +02:00
James Cole
13f952f182 Fix trim when null [skip ci] 2016-10-01 09:41:16 +02:00
James Cole
b494be228b Fixed a bug where incoming transactions would not be properly filtered in several reports. 2016-10-01 09:37:18 +02:00
James Cole
0fdaac53d0 Removed for #334 2016-10-01 08:49:33 +02:00
James Cole
e1b3a08878 Fix #337 [skip ci] 2016-10-01 08:49:02 +02:00
James Cole
dc893588b0 Fix #335 2016-10-01 08:48:13 +02:00
James Cole
b9fcc443ec Remove account extra text #336 [skip ci] 2016-10-01 08:45:14 +02:00
James Cole
d8586c8043 Fixes bug #338 2016-09-29 19:17:24 +02:00
James Cole
4252a3e53b Refer to correct page [skip ci] 2016-09-29 07:04:58 +02:00
James Cole
dbb5cdb9cf Catch unset row. 2016-09-29 07:02:47 +02:00
James Cole
9bdfecbfdc Merge branch 'release/4.0.0' 2016-09-26 18:37:33 +02:00
James Cole
3ec8a8c375 Merge branch 'release/4.0.0' into develop 2016-09-26 18:37:33 +02:00
James Cole
f85e4a24e5 New license information. 2016-09-26 18:37:20 +02:00
James Cole
0dda87c78e New license. 2016-09-26 18:34:31 +02:00
James Cole
2fc09ff9d7 Fix empty pop-ups in report. 2016-09-25 14:47:55 +02:00
James Cole
e4e0e21293 Smaller method. 2016-09-25 08:59:27 +02:00
James Cole
15089f0d7e Some issues fixed for scrutiniser. 2016-09-25 08:50:12 +02:00
James Cole
7232c1d7bb partial fix for #307 2016-09-25 08:46:57 +02:00
James Cole
9a53d8c21c Some array_keys fixes. 2016-09-25 08:46:42 +02:00
James Cole
0d198193db Some issues fixed for scrutiniser. 2016-09-25 08:36:35 +02:00
James Cole
45bc23b8af Some issues fixed for scrutiniser. 2016-09-25 08:32:53 +02:00
James Cole
3323c31765 Some issues fixed for scrutiniser. 2016-09-25 08:24:03 +02:00
James Cole
bb7c26b77c Some issues fixed for scrutiniser. 2016-09-25 08:20:17 +02:00
James Cole
9101d6a2c0 Add lines to configuration on wiki. [skip ci] 2016-09-24 19:32:00 +02:00
James Cole
ad2b254be0 Fix for issue #328. Turns out the import routine converts accounts back and forth instead of creating new entries. 2016-09-24 18:59:31 +02:00
James Cole
abc4f856ce Fix nullable fields. 2016-09-24 17:22:42 +02:00
James Cole
b3b66a8f92 Merge pull request #329 from niekvanderkooy/develop
Fix assignment of array variables
2016-09-24 17:04:32 +02:00
Niek van der Kooy
2f7cf9b916 Fix assignment of array variables 2016-09-24 17:01:41 +02:00
James Cole
b822e0c6e7 Upgrade stuff for 4.0.0 2016-09-24 15:30:08 +02:00
James Cole
6fef9ee72b #315 2016-09-24 10:58:48 +02:00
James Cole
ab6dd0a1ec #314 2016-09-24 10:55:13 +02:00
James Cole
9deef5ac92 #325 2016-09-24 10:53:39 +02:00
James Cole
577187babe Fix #324 [skip ci] 2016-09-24 10:52:13 +02:00
James Cole
577290e813 add strtolower [skip ci] 2016-09-24 09:14:47 +02:00
James Cole
f3b9798216 Fix some rule things. 2016-09-24 09:12:17 +02:00
James Cole
4dcaa96d16 Fix group error. I hope. 2016-09-24 08:59:29 +02:00
James Cole
0dcbf451d6 Add verify command to composer.json 2016-09-24 08:59:14 +02:00
James Cole
e87f6ca40e Fix some possible NULL values. 2016-09-24 08:55:01 +02:00
James Cole
1f34e33d8c Update composer, improve verify routine. 2016-09-23 22:31:01 +02:00
James Cole
258e87e127 Merge pull request #323 from Mortalife/master
Adding GBP to Seed
2016-09-22 07:58:21 +02:00
Matthew Peck
3ec8efcfc1 Adding GBP to Seed 2016-09-21 20:45:36 +01:00
James Cole
70ea227bd0 Add logging to processor #322 2016-09-21 21:01:10 +02:00
James Cole
27c832ed58 Logging for rule triggers #322 2016-09-21 20:58:12 +02:00
James Cole
a31b4ccf01 Basic logging for willMatchEverything #322 2016-09-21 20:30:09 +02:00
James Cole
d221ea68d0 Gave all rule actions some logging. #322 2016-09-21 20:12:04 +02:00
James Cole
dc9fe58536 Fix tags input width. 2016-09-21 19:23:50 +02:00
James Cole
f871e29bdb Quick fix for broken attachments. 2016-09-21 19:16:47 +02:00
James Cole
1357352276 Merge pull request #320 from Mortalife/master
Decimal place fix on import
2016-09-20 20:21:02 +02:00
James Cole
e169754693 Fix display bug for attachments 2016-09-20 17:23:12 +02:00
James Cole
1cfe4f40ba Fix display bug for attachments 2016-09-20 17:22:07 +02:00
James Cole
5545d1c1ba Fix display bug for attachments 2016-09-20 17:21:26 +02:00
James Cole
e5f7228fa9 Fix future query problems (current users not affected either way) [skip ci] 2016-09-20 09:32:58 +02:00
James Cole
11385494eb Fix for income entry. 2016-09-20 08:57:08 +02:00
James Cole
ae328de469 Fix bug in year report. 2016-09-20 08:26:42 +02:00
James Cole
0574a706c8 Error in decrypt error (yes) 2016-09-20 07:57:04 +02:00
Matthew Peck
70bb85a75b Cleanup 2016-09-20 00:00:11 +01:00
Matthew Peck
8cd901b57b Added support for multiple decimal places 2016-09-19 23:53:51 +01:00
James Cole
8b9818c48e This will fix #316 2016-09-18 20:00:13 +02:00
James Cole
a95099fa46 Update FF configuration. 2016-09-18 19:57:21 +02:00
James Cole
221e4b7fc0 Fix some migrations [skip ci] 2016-09-18 18:14:07 +02:00
James Cole
6cff3eb61e Fix some migrations [skip ci] 2016-09-18 17:52:31 +02:00
James Cole
e4fd97ae77 Some code fixes. [skip ci] 2016-09-17 09:52:28 +02:00
James Cole
5ca9099654 Some code fixes. 2016-09-17 09:50:40 +02:00
James Cole
6e33e26ddf Update copyright notices, update German language. 2016-09-17 07:57:32 +02:00
James Cole
04461a4ab8 Updated composer.lock [skip ci] 2016-09-17 07:22:39 +02:00
James Cole
a4b9bbff54 Update AdminLTE template. 2016-09-17 07:19:09 +02:00
James Cole
4ad4252a77 Extend exclude path. Trigger a new inspection. 2016-09-17 07:10:29 +02:00
James Cole
aac0c9ab98 Various layout updates and tiny upgrade fixes [skip ci] 2016-09-16 13:29:56 +02:00
James Cole
c123e1044a Expand config so people won't get errors here [skip ci] 2016-09-16 12:19:29 +02:00
James Cole
d25d0454fc Code clean up 2016-09-16 12:15:58 +02:00
James Cole
f38984398d Code clean up [skip ci] 2016-09-16 12:07:45 +02:00
James Cole
a07799cfa4 MySQL 5.7 compatible query fixing. [skip ci] 2016-09-16 11:16:31 +02:00
James Cole
7c52f297ee MySQL 5.7 compatible query fixing. [skip ci] 2016-09-16 11:06:21 +02:00
James Cole
50a3279b30 MySQL 5.7 compatible query fixing. [skip ci] 2016-09-16 11:04:24 +02:00
James Cole
0ea14eb987 MySQL 5.7 compatible grouping. [skip ci] 2016-09-16 11:01:35 +02:00
James Cole
cf1b98e569 MySQL 5.7 compatible grouping. 2016-09-16 10:55:26 +02:00
James Cole
63fb435002 Expand code. 2016-09-16 10:50:19 +02:00
James Cole
2f8263f53a Possible fix for reports [skip ci] 2016-09-16 09:36:08 +02:00
James Cole
fb649779d6 Do not need to sort. Fix MySQL 5.7 compatibility. 2016-09-16 09:31:40 +02:00
James Cole
bb58f605f7 Some new login / logout routes 2016-09-16 09:21:36 +02:00
James Cole
fccdf56c5d Fixed some query things. 2016-09-16 09:09:54 +02:00
James Cole
bd53410c71 Some changes in login routes for 5.3 2016-09-16 09:02:35 +02:00
James Cole
7d63f124c4 Fixing some login routes 2016-09-16 07:22:57 +02:00
James Cole
9ffc5d857c Fixed some db bugs. These will only pop up when developing. 2016-09-16 07:16:09 +02:00
James Cole
2f93784acd More code for 5.3 2016-09-16 07:05:34 +02:00
James Cole
d00fbe4eb3 More code for 5.3 2016-09-16 06:48:38 +02:00
James Cole
51d9f041ae Changes for login routes. 2016-09-16 06:43:13 +02:00
James Cole
b872ab8b86 New code and new routes for 5.3 2016-09-16 06:40:45 +02:00
James Cole
3d25fd79ca First set of upgrade to 5.3 stuff. 2016-09-16 06:19:40 +02:00
James Cole
3aad78e6ef Lots of updated libraries.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-15 19:14:55 +02:00
James Cole
7d5bb72b0c Fix for #312
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-15 19:14:22 +02:00
James Cole
46e5aae8bb Fix changelog. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-15 19:00:22 +02:00
James Cole
b9e2ee7af3 Merge branch 'release/3.10.4' 2016-09-14 20:40:52 +02:00
James Cole
c1a2892788 New changelog.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-14 20:40:12 +02:00
James Cole
2078183e0d Update version and composer file. 2016-09-14 20:37:12 +02:00
James Cole
fab1d53714 Simplified upgrade instructions. 2016-09-14 20:35:45 +02:00
James Cole
3fe831c7d8 Bit of code cleanup courtesy of PHPStorm. 2016-09-13 19:20:09 +02:00
James Cole
6958f71cfd @fuf discovered a bug where FF3 will fall back to the hard-coded system default currency and not the set default currency. See #307 2016-09-13 19:19:58 +02:00
James Cole
a7351f348d Fixed a bug mentioned by @vissert and added some logging for @sandermulders
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-12 18:43:10 +02:00
James Cole
5379e03447 Merge pull request #311 from sandermulders/fix/nullable-values
add migration that correctly sets nullable for description fields on rules and rule_groups
2016-09-12 16:52:14 +02:00
Sander Mulders
539058e32d Fix for #310: add migration that correctly sets nullable for description fields on rules and rule_groups 2016-09-12 14:24:01 +02:00
James Cole
11b6b5a63c Merge branch 'release/3.10.3' into develop 2016-09-11 08:17:42 +02:00
James Cole
1155096226 Merge branch 'release/3.10.3' 2016-09-11 08:17:41 +02:00
James Cole
2920dd356e Updated translations.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-11 08:17:35 +02:00
James Cole
9c3dac8170 Config for new version.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-11 08:13:22 +02:00
James Cole
49f9909b15 New changelog.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-11 08:13:14 +02:00
James Cole
e4fef6dfc3 Fixed an import bug where a new transaction validation rule would break storing of the transaction, while the import would not notice this error happening. The importer will now also correctly set a date on the "import tag" and will not tag an incomplete journal as already imported.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-11 08:08:01 +02:00
James Cole
2da087401e Extend audit report
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-10 18:37:16 +02:00
James Cole
629baf9de5 Added invoice date
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-10 18:36:52 +02:00
James Cole
29a930dae5 Updated translations.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 11:36:19 +02:00
James Cole
d920537dd2 Updated translations.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 11:29:19 +02:00
James Cole
106b04a5da Update composer.lock [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 11:19:50 +02:00
James Cole
176752e219 Code for optional fields #301
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 11:19:40 +02:00
James Cole
8d19f60091 Various translation updates.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 11:19:19 +02:00
James Cole
e937aa2f74 Fix a bug in piggy bank display [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-09 06:17:50 +02:00
James Cole
c3ccc4ccdf This should fix #308
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-08 21:10:24 +02:00
James Cole
6c5cd705c0 Some code for new optional fields, see #301
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-04 16:21:51 +02:00
James Cole
ce003f217b Removed unused "budget maximum" preference 2016-09-03 21:13:08 +02:00
James Cole
8c7ef49eb6 New code by @vissert that allows category edit (see #282)
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-03 05:01:48 +02:00
James Cole
29af4bd1b9 This fixes #303 2016-09-03 04:54:57 +02:00
James Cole
2ce5142b06 Small fix for #303
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-01 19:01:08 +02:00
James Cole
f3a8a25872 Fixed #303
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-09-01 18:31:39 +02:00
James Cole
598e97d028 Forgot to escape things, which causes havoc in the Dutch translation.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-31 18:50:46 +02:00
James Cole
fa110279de Merge branch 'release/3.10.2' 2016-08-29 19:32:49 +02:00
James Cole
8fdeaf73cc Update composer.lock [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-29 19:32:03 +02:00
James Cole
a7ffdf062a Update changelog. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-29 19:26:31 +02:00
James Cole
3bad92dd6d Upgrade instructions and new version.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-29 19:25:21 +02:00
James Cole
2e88024bca Close #290
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-29 19:21:40 +02:00
James Cole
ca2301959c Merge pull request #298 from Bonno/develop
Fixed wrong conversion to revenue account
2016-08-29 14:49:46 +02:00
Bonno Nachtegaal-Karels
3285fae7f0 Fixed wrong conversion to revenue account 2016-08-29 14:39:43 +02:00
James Cole
312079657b Include files from new import routine in export routine. 2016-08-28 07:05:42 +02:00
James Cole
18c183afd6 Remove form tags in favour of raw html.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 09:38:58 +02:00
James Cole
f424d9cf20 Update change log
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 04:37:04 +02:00
James Cole
5c3da9fd9e New language files.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 04:34:59 +02:00
James Cole
1f321fadd4 Removed some form-tags in favour of plain HTML
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 04:18:02 +02:00
James Cole
65f5d27b12 New pages for administration. More settings will be web-based.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 04:00:48 +02:00
James Cole
cdb591de7f Remove unnecessary setting.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 04:00:19 +02:00
James Cole
a0ea3882e1 Various code cleanup.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-27 03:50:35 +02:00
James Cole
a9444ac702 Code cleanup.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 09:30:52 +02:00
James Cole
d0c6afc3a9 Various code clean up. [skip ci] 2016-08-26 08:21:31 +02:00
James Cole
e7a0a5937c Extend git ignore. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:41:13 +02:00
James Cole
08992b5298 Extend test-import data set to contain some rules.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:38:00 +02:00
James Cole
6490a4240d Remove references to ImportResult. Add the application of user rules.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:37:47 +02:00
James Cole
43a7544dd7 Catch empty (null) descriptions. Which never happens.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:37:27 +02:00
James Cole
0fe70dae17 Referring to Auth::user will not work from the command line.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:37:09 +02:00
James Cole
7079e76886 Remove some commented code.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:36:33 +02:00
James Cole
0ec021c375 No need to grab journals we don't need.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:36:26 +02:00
James Cole
ff3396e286 Removed the ImportResult class because it was lame.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-26 07:36:13 +02:00
James Cole
78912903ce Change signature of importstorage. 2016-08-26 06:47:12 +02:00
James Cole
4c015e2d12 Re-arrange code. No changes. 2016-08-26 06:44:24 +02:00
James Cole
172634a55a Add some comments. 2016-08-26 06:43:38 +02:00
James Cole
58ca7d551a Rename import procedure method name 2016-08-26 06:43:23 +02:00
James Cole
fd8ed4c9aa Fixed a bug in strict typing.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-25 19:19:12 +02:00
James Cole
c03f5f5ff0 Merge branch 'release/3.10.1' 2016-08-25 11:20:39 +02:00
James Cole
6775fc58c8 Change log and updated config.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-25 11:20:13 +02:00
James Cole
9f250fc61b Renamed migration. 2016-08-25 11:16:17 +02:00
James Cole
94609f1419 Clean up some code. 2016-08-25 06:44:48 +02:00
James Cole
53402aa5e2 Update composer file. 2016-08-25 06:44:41 +02:00
James Cole
5aadb29905 Add some forgotten code to the mobile piggy bank controller things.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-24 20:06:45 +02:00
James Cole
d4f8c41d80 This should fix a bug in the verification routine.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-24 19:36:09 +02:00
James Cole
a2e14f8b8d Various code clean up.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-08-24 19:33:58 +02:00
James Cole
98c4ac955a Finetune user feedback during import and add a tag to collect transactions. 2016-08-14 11:31:09 +02:00
James Cole
70b63e1736 Better report for finished import. 2016-08-14 10:11:49 +02:00
James Cole
106665a468 Better reporting for double imported rows. See also #164 2016-08-14 09:49:04 +02:00
James Cole
da5e48d769 More language lines. Add a check for double lines. 2016-08-14 09:10:47 +02:00
James Cole
85f484e73c Divide by zero. 2016-08-14 09:10:08 +02:00
James Cole
d287ae97f8 Prep for translations in JS. 2016-08-14 08:34:59 +02:00
James Cole
117bb602dc Extend ImportObject with row hash. 2016-08-14 08:34:51 +02:00
James Cole
e440d55034 Finetune import status page. 2016-08-14 08:10:42 +02:00
James Cole
7f5b94fe43 Fixed a bug in the verify routine. 2016-08-13 23:31:42 +02:00
James Cole
c58eea6654 Fine-tuning the import routine. 2016-08-13 23:28:01 +02:00
James Cole
bbed5d0701 First version of a web-based import status thing. 2016-08-13 21:51:01 +02:00
James Cole
2775690fc8 Extend model to allow for more data during the import. 2016-08-13 18:53:16 +02:00
James Cole
1fd9f6e724 First user interface elements and routes for web import. 2016-08-13 16:38:58 +02:00
James Cole
3d63903128 Make sure import errors end up where the user can read them. 2016-08-13 16:29:24 +02:00
James Cole
ef876a165a Some better feedback in the import process. 2016-08-13 14:22:40 +02:00
James Cole
c4d6aaeef3 Extend scrutinizer config. 2016-08-12 16:06:27 +02:00
James Cole
37b735c2e3 Remove code climate config 2016-08-12 16:06:17 +02:00
James Cole
62d30c7b0e Fix migration (call to empty table name) 2016-08-12 16:06:11 +02:00
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
737d15fa0e Merge branch 'release/3.5.1' into develop 2015-08-23 07:43:02 +02:00
1072 changed files with 76755 additions and 30529 deletions

View File

@@ -1,25 +0,0 @@
# Save as .codeclimate.yml (note leading .) in project root directory
languages:
JavaScript: true
PHP: true
exclude_paths:
- "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 +0,0 @@
src_dir: .

41
.env.example Normal file → Executable file
View File

@@ -1,24 +1,47 @@
APP_ENV=production
APP_DEBUG=false
APP_FORCE_SSL=false
APP_FORCE_ROOT=
APP_KEY=SomeRandomStringOf32CharsExactly
APP_LOG_LEVEL=warning
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=localhost
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
COOKIE_PATH="/"
COOKIE_DOMAIN=
COOKIE_SECURE=false
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
SEND_REGISTRATION_MAIL=true
MUST_CONFIRM_ACCOUNT=false
SHOW_INCOMPLETE_TRANSLATIONS=false
EMAIL_SMTP=
EMAIL_DRIVER=smtp
EMAIL_USERNAME=
EMAIL_PASSWORD=
ANALYTICS_ID=
EMAIL_PRETEND=false
RUNCLEANUP=true
SITE_OWNER=mail@example.com
SENDGRID_USERNAME=
SENDGRID_PASSWORD=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=

View File

@@ -1,18 +0,0 @@
APP_ENV=testing
APP_DEBUG=true
APP_KEY=SomeRandomString
DB_CONNECTION=sqlite
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=array
SESSION_DRIVER=array
EMAIL_SMTP=
EMAIL_USERNAME=
EMAIL_PASSWORD=
ANALYTICS_ID=ABC
EMAIL_PRETEND=true

2
.gitattributes vendored Normal file → Executable file
View File

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

43
.gitignore vendored Normal file → Executable file
View File

@@ -1,36 +1,13 @@
/bootstrap/compiled.php
/node_modules
/public/storage
/vendor
composer.phar
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
tests/_output/*
/.idea
Homestead.json
Homestead.yaml
.env
clover.xml
node_modules/
addNewLines.php
.phpstorm.meta.php
.env.backup
_development
.env.local
tests/_output/*
tests/_output/*
result.html
test-import.sh
test-import-report.txt
public/google*.html

View File

@@ -1,22 +0,0 @@
{
"undef": true,
"unused": false,
"strict": true,
"browser": true,
"jquery": true,
"devel": true,
"globals": [
"language",
"token",
"currencyCode",
"$",
"token",
"accountID",
"billID",
"currentMonthName",
"previousMonthName",
"nextMonthName",
"everything",
"moment"
]
}

View File

@@ -1,3 +1,8 @@
# .scrutinizer.yml
tools:
external_code_coverage: false
filter:
excluded_paths:
- app/Support/Migration/*
- app/database/migrations/*
- database/migrations/*

View File

@@ -1,15 +0,0 @@
language: php
sudo: false
php:
- 5.5
- 5.6
install:
- composer update
- php artisan env
- mv -v .env.testing .env
script:
- phpunit

338
CHANGELOG.md Normal file
View File

@@ -0,0 +1,338 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [4.1.5] - 2016-11-01
### Changed
- Report parts are loaded using AJAX, making a lot of code more simple.
- Help content will fall back to English.
- Help content is translated through Crowdin.
### Fixed
- Issue #370
## [4.1.4] - 2016-10-30
### Added
- New Dockerfile thanks to @schoentoon
- Added changing the destination account as rule action.
- Added changing the source account as rule action.
- Can convert transactions into different types.
### Changed
- Changed the export routine to be more future-proof.
- Improved help routine.
- Integrated CrowdIn translations.
- Simplified reports
- Change error message to refer to solution.
### Fixed
- #367 thanks to @HungryFeline
- #366 thanks to @3mz3t
- #362 and #341 thanks to @bnw
- #355 thanks to @roberthorlings
## [4.1.3] - 2016-10-22
### Fixed
- Some event handlers called the wrong method.
## [4.1.2] - 2016-10-22
### Fixed
- A bug is fixed in the journal event handler that prevented Firefly III from actually storing journals.
## [4.1.1] - 2016-10-22
### Added
- Option to show deposit accounts on the front page.
- Script to upgrade split transactions
- Can now save notes on piggy banks.
- Extend user admin options.
- Run import jobs from the command line
### Changed
- New preferences screen layout.
### Deprecated
- ``firefly:import`` is now ``firefly:start-import``
### Removed
- Lots of old code
### Fixed
- #357, where non utf-8 files would break Firefly.
- Tab delimiter is not properly loaded from import configuration (@roberthorlings)
- System response to yearly bills
## [4.0.2] - 2016-10-14
### Added
- Added ``intl`` dependency to composer file to ease installation (thanks @telyn)
- Added support for Croatian.
### Changed
- Updated all copyright notices to refer to the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
- Fixed #344
- Fixed #346, thanks to @SanderKleykens
- #351
- Did some internal remodelling.
### Fixed
- PostgreSQL compatibility thanks to @SanderKleykens
- @RobertHorlings fixed a bug in the ABN Amro import specific.
## [4.0.1] - 2016-10-04
### Added
- New ING import specific by @tomwerf
- New Presidents Choice specific to fix #307
- Added some trimming (#335)
### Changed
- Initial release.
### Deprecated
- Initial release.
### Removed
- Initial release.
### Fixed
- Fixed a bug where incoming transactions would not be properly filtered in several reports.
- #334 by @cyberkov
- #337
- #336
- #338 found by @roberthorlings
### Security
- Initial release.
## [4.0.0] - 2015-09-26
### Added
- Upgraded to Laravel 5.3, most other libraries upgraded as well.
- Added GBP as currency, thanks to @Mortalife
### Changed
- Jump to version 4.0.0.
- Firefly III is now subject to a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/) license. Previous versions of this software are still MIT licensed.
### Fixed
- Support for specific decimal places, thanks to @Mortalife
- Various CSS fixes
- Various bugs, thanks to @fuf, @sandermulders and @vissert
- Various queries optimized for MySQL 5.7
## [3.10.4] - 2015-09-14
### Fixed
- Migration fix by @sandermulders
- Tricky import bug fix thanks to @vissert
- Currency preference will be correctly pulled from user settings, thanks to @fuf
- Simplified code for upgrade instructions.
## [3.10.3] - 2016-08-29
### Added
- More fields for mass-edit, thanks to @Vissert (#282)
- First start of German translation
### Changed
- More optional fields for transactions and the ability to filter them.
### Removed
- Preference for budget maximum.
### Fixed
- A bug in the translation routine broke the import.
- It was possible to destroy your Firefly installation by removing all currencies. Thanks @mondjef
- Translation bugs.
- Import bug.
### Security
- Firefly will not accept registrations beyond the first one, by default.
## [3.10.2] - 2016-08-29
### Added
- New Chinese translations. Set Firefly III to show incomplete translations to follow the progress. Want to translate Firefly III in Chinese, or in any other language? Then check out [the Crowdin project](https://crowdin.com/project/firefly-iii).
- Added more admin pages. They do nothing yet.
### Changed
- Import routine will now also apply user rules.
- Various code cleanup.
- Some small HTML changes.
### Fixed
- Bug in the mass edit routines.
- Firefly III over a proxy will now work (see [issue #290](https://github.com/JC5/firefly-iii/issues/290)), thanks @dfiel for reporting.
- Sneaky bug in the import routine, fixed by @Bonno
## [3.10.1] - 2016-08-25
### Added
- More feedback in the import procedure.
- Extended model for import job.
- Web bases import procedure.
### Changed
- Scrutinizer configuration
- Various code clean up.
### Removed
- Code climate YAML file.
### Fixed
- Fixed a bug where a migration would check an empty table name.
- Fixed various bugs in the import routine.
- Fixed various bugs in the piggy banks pages.
- Fixed a bug in the ``firefly:verify`` routine
## [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
### 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.
[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.

42
Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
FROM php:7-apache
RUN apt-get update -y && \
apt-get install -y --no-install-recommends libcurl4-openssl-dev \
zlib1g-dev \
libjpeg62-turbo-dev \
libpng12-dev \
libicu-dev \
libmcrypt-dev \
libedit-dev \
libtidy-dev \
libxml2-dev \
libsqlite3-dev \
libbz2-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install -j$(nproc) curl gd intl json mcrypt readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2
# Enable apache mod rewrite..
RUN a2enmod rewrite
# Setup the Composer installer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer && \
curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig && \
php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" && \
chmod +x /tmp/composer-setup.php && \
php /tmp/composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
rm -f /tmp/composer-setup.{php,sig}
ADD . /var/www/firefly-iii
RUN chown -R www-data:www-data /var/www/
ADD docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
USER www-data
WORKDIR /var/www/firefly-iii
RUN composer install --no-scripts --no-dev
USER root

7
LICENSE Normal file
View File

@@ -0,0 +1,7 @@
Copyright (C) 2016 thegrumpydictator@gmail.com
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
https://creativecommons.org/licenses/by-sa/4.0/
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.

124
README.md
View File

@@ -1,116 +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)
[![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Total Downloads](https://poser.pugx.org/grumpydictator/firefly-iii/downloads)](https://packagist.org/packages/grumpydictator/firefly-iii)
## A personal finances manager
[![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://scrutinizer-ci.com/g/JC5/firefly-iii/badges/build.png?b=master)](https://scrutinizer-ci.com/g/JC5/firefly-iii/build-status/master)
[![Screenshot](https://i.nder.be/hhfv03hp/400)](https://i.nder.be/hhfv03hp) [![Screenshot](https://i.nder.be/hhmwmqw9/400)](https://i.nder.be/hhmwmqw9)
## About
[![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 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.
_Firefly is a system you'll have install yourself on webhosting of your choosing._
"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.
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.
## Installation
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/).
## More about Firefly III
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.
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
To get to know Firefly, and to see if it fits you, check out these resources:
#### Some advantages of using Firefly
- The screenshots below on this very page.
- The featurelist below, also on this very page.
- The [full description](https://github.com/JC5/firefly-iii/wiki/full-description), which will tell you how Firefly works,
and the philosophy behind it.
- 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!
Firefly is pretty awesome. [You can read more about Firefly III, and its features, on the Github Pages](https://jc5.github.io/firefly-iii/).
#### About the name (should you care)
It's III, or 3, because [version 2](https://github.com/JC5/Firefly) and version 1 (not online) preceded it. It has been growing steadily ever since.
## Current features
- [A double-entry bookkeeping system](https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system);
- You can store, edit and remove [withdrawals, deposits and transfers](https://en.wikipedia.org/wiki/Financial_transaction). This allows you full financial management;
- You can manage different types of accounts;
- [Asset](https://en.wikipedia.org/wiki/Asset) accounts
- Shared [asset accounts](https://en.wikipedia.org/wiki/Asset) ([household accounts](https://en.wikipedia.org/wiki/Household))
- Saving accounts
- Credit cards
- It's possible to create, change and manage money using _[budgets](https://en.wikipedia.org/wiki/Envelope_system)_;
- Organize transactions using categories;
- Save towards a goal using [piggy banks](https://en.wikipedia.org/wiki/Piggy_bank);
- Predict and anticipate [bills](https://en.wikipedia.org/wiki/Invoice);
- View income / expense [reports](https://en.wikipedia.org/wiki/Financial_statement);
- Organize expenses using tags;
- Lots of help text in case you don't get it.
Everything is organised:
- 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.
## Screenshots
_Please note that everything in these screenshots is fictional and may not be realistic._
![Index](https://i.nder.be/c6hz06d3)
![Accounts](https://i.nder.be/gzxxyz6n)
![Budgets](https://i.nder.be/hhu3krqk)
![Reports 1](https://i.nder.be/cc3yspf6)
![Reports 2](https://i.nder.be/h6fp7xkb)
![Bills](https://i.nder.be/c30zkcpv)
![Piggy banks](https://i.nder.be/g20k0mdq)
## Running and installing
If you're still interested please read [the installation guide](https://github.com/JC5/firefly-iii/wiki/Installation),
[the upgrade guide](https://github.com/JC5/firefly-iii/wiki/Upgrade-instructions) (if applicable)
and the **[first use guide](https://github.com/JC5/firefly-iii/wiki/First-use)**.
If you want to try out Firefly III, you can do so on [this dedicated website](https://geld.nder.be/).
This site always runs the latest version of Firefly III. If you want to use it, please read the [privacy considerations](https://github.com/JC5/firefly-iii/wiki/Privacy-on-demo-site) for this demo-site. Accounts on the demo sites will stop working after one week.
## Credits
Firefly III uses the following libraries and tools:
* The AdminLTE template by [Almsaseed Studio](https://almsaeedstudio.com/)
* The [Google charts](https://developers.google.com/chart/) library.
* [Chart.js](http://www.chartjs.org/)
* [Bootstrap](http://getbootstrap.com/)
* [Laravel](http://laravel.com/)
* [Twig](http://twig.sensiolabs.org/)
* For development, some of the excellent tools made by [Barry van den Heuvel](https://github.com/barryvdh)
* [Bootstrap sortable](https://github.com/drvic10k/bootstrap-sortable) by [Matúš Brliť](https://github.com/drvic10k).
* [Date range picker](https://github.com/dangrossman/bootstrap-daterangepicker/) by [Dan Grossman](https://github.com/dangrossman)
* The [real favicon generator](http://realfavicongenerator.net/)
* Various other open source components (see [composer.json](https://github.com/JC5/firefly-iii/blob/master/composer.json))
## Current state
Firefly III is pretty much all grown up. Full test coverage (nerd alert!) is coming. Translations are a work in progress.
Questions, ideas, bugs or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!
If you like this tool, feel free to [donate me some beer money](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2ZMV952UUSCLU&lc=NL&item_name=Development%20of%20Firefly&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted).
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102/mini.png)](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102)
[![Code Climate](https://codeclimate.com/github/JC5/firefly-iii/badges/gpa.svg)](https://codeclimate.com/github/JC5/firefly-iii)
[![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii)
[![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
![GA](https://ga-beacon.appspot.com/UA-58172398-6/firefly-iii/readme)
If you want to contact me, please open an issue or [email me](mailto:thegrumpydictator@gmail.com).

View File

@@ -0,0 +1,63 @@
<?php
/**
* ConfigureLogging.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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
{
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Log\Writer $log
*
* @return void
*/
protected function configureDailyHandler(Application $app, Writer $log)
{
$config = $app->make('config');
$maxFiles = $config->get('app.log_max_files');
$log->useDailyFiles(
$app->storagePath() . '/logs/firefly-iii.log', is_null($maxFiles) ? 5 : $maxFiles,
$config->get('app.log_level', 'debug')
);
}
/**
* Configure the Monolog handlers for the application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Log\Writer $log
*
* @return void
*/
protected function configureSingleHandler(Application $app, Writer $log)
{
$log->useFiles(
$app->storagePath() . '/logs/firefly-iii.log',
$app->make('config')->get('app.log_level', 'debug')
);
}
}

View File

@@ -1,12 +0,0 @@
<?php namespace FireflyIII\Commands;
/**
* Class Command
*
* @codeCoverageIgnore
* @package FireflyIII\Commands
*/
abstract class Command
{
}

View File

@@ -0,0 +1,152 @@
<?php
/**
* CreateImport.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Artisan;
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Console\Command;
use Log;
/**
* Class CreateImport
*
* @package FireflyIII\Console\Commands
*/
class CreateImport extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Use this command to create a new import. Your user ID can be found on the /profile page.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:create-import {file} {configuration} {--user=1} {--type=csv} {--start}';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
// find the file
/** @var UserRepositoryInterface $userRepository */
$userRepository = app(UserRepositoryInterface::class);
$file = $this->argument('file');
$configuration = $this->argument('configuration');
$user = $userRepository->find(intval($this->option('user')));
$cwd = getcwd();
$type = strtolower($this->option('type'));
if (!$this->validArguments()) {
return;
}
// try to parse configuration data:
$configurationData = json_decode(file_get_contents($configuration));
if (is_null($configurationData)) {
$this->error(sprintf('Firefly III cannot read the contents of configuration file "%s" (working directory: "%s").', $configuration, $cwd));
return;
}
$this->info(sprintf('Going to create a job to import file: %s', $file));
$this->info(sprintf('Using configuration file: %s', $configuration));
$this->info(sprintf('Import into user: #%d (%s)', $user->id, $user->email));
$this->info(sprintf('Type of import: %s', $type));
/** @var ImportJobRepositoryInterface $jobRepository */
$jobRepository = app(ImportJobRepositoryInterface::class, [$user]);
$job = $jobRepository->create($type);
$this->line(sprintf('Created job "%s"...', $job->key));
// put the file in the proper place:
Artisan::call('firefly:encrypt', ['file' => $file, 'key' => $job->key]);
$this->line('Stored import data...');
// store the configuration in the job:
$job->configuration = $configurationData;
$job->status = 'settings_complete';
$job->save();
$this->line('Stored configuration...');
// if user wants to run it, do!
if ($this->option('start') === true) {
$this->line('The import will start in a moment. This process is not visible...');
Log::debug('Go for import!');
Artisan::call('firefly:start-import', ['key' => $job->key]);
$this->line('Done!');
}
return;
}
/**
* @return bool
*/
private function validArguments(): bool
{
// find the file
/** @var UserRepositoryInterface $userRepository */
$userRepository = app(UserRepositoryInterface::class);
$file = $this->argument('file');
$configuration = $this->argument('configuration');
$user = $userRepository->find(intval($this->option('user')));
$cwd = getcwd();
$validTypes = array_keys(config('firefly.import_formats'));
$type = strtolower($this->option('type'));
if (is_null($user->id)) {
$this->error(sprintf('There is no user with ID %d.', $this->option('user')));
return false;
}
if (!in_array($type, $validTypes)) {
$this->error(sprintf('Cannot import file of type "%s"', $type));
return false;
}
if (!file_exists($file)) {
$this->error(sprintf('Firefly III cannot find file "%s" (working directory: "%s").', $file, $cwd));
return false;
}
if (!file_exists($configuration)) {
$this->error(sprintf('Firefly III cannot find configuration file "%s" (working directory: "%s").', $configuration, $cwd));
return false;
}
return true;
}
}

View File

@@ -0,0 +1,68 @@
<?php
/**
* EncryptFile.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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.
*/
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,125 @@
<?php
/**
* Import.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use FireflyIII\Import\ImportProcedure;
use FireflyIII\Import\Logging\CommandHandler;
use FireflyIII\Models\ImportJob;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Log;
/**
* Class Import
*
* @package FireflyIII\Console\Commands
*/
class Import extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'This will start a new import.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:start-import {key}';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Log::debug('Start start-import command');
$jobKey = $this->argument('key');
$job = ImportJob::whereKey($jobKey)->first();
if (!$this->isValid($job)) {
Log::error('Job is not valid for some reason. Exit.');
return;
}
$this->line('Going to import job with key "' . $job->key . '" of type ' . $job->file_type);
$monolog = Log::getMonolog();
$handler = new CommandHandler($this);
$monolog->pushHandler($handler);
$result = ImportProcedure::runImport($job);
/**
* @var int $index
* @var TransactionJournal $journal
*/
foreach ($result as $index => $journal) {
if (!is_null($journal->id)) {
$this->line(sprintf('Line #%d has been imported as transaction #%d.', $index, $journal->id));
continue;
}
$this->error(sprintf('Could not store line #%d', $index));
}
$this->line('The import has completed.');
// get any errors from the importer:
$extendedStatus = $job->extended_status;
if (isset($extendedStatus['errors']) && count($extendedStatus['errors']) > 0) {
$this->line(sprintf('The following %d error(s) occured during the import:', count($extendedStatus['errors'])));
foreach ($extendedStatus['errors'] as $error) {
$this->error($error);
}
}
return;
}
/**
* @param ImportJob $job
*
* @return bool
*/
private function isValid(ImportJob $job): bool
{
if (is_null($job)) {
$this->error('This job does not seem to exist.');
return false;
}
if ($job->status != 'settings_complete') {
$this->error('This job is not ready to be imported.');
return false;
}
return true;
}
}

View File

@@ -0,0 +1,101 @@
<?php
/**
* ScanAttachments.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Crypt;
use FireflyIII\Models\Attachment;
use Illuminate\Console\Command;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Storage;
/**
* Class ScanAttachments
*
* @package FireflyIII\Console\Commands
*/
class ScanAttachments extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Rescan all attachments and re-set the MD5 hash and mime.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:scan-attachments';
/**
* Create a new command instance.
*
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*/
public function handle()
{
$attachments = Attachment::get();
$disk = Storage::disk('upload');
/** @var Attachment $attachment */
foreach ($attachments as $attachment) {
$fileName = $attachment->fileName();
// try to grab file content:
try {
$content = $disk->get($fileName);
} catch (FileNotFoundException $e) {
$this->error(sprintf('Could not find data for attachment #%d', $attachment->id));
continue;
}
// try to decrypt content.
try {
$decrypted = Crypt::decrypt($content);
} catch (DecryptException $e) {
$this->error(sprintf('Could not decrypt data of attachment #%d', $attachment->id));
continue;
}
// make temp file:
$tmpfname = tempnam(sys_get_temp_dir(), 'FireflyIII');
// store content in temp file:
file_put_contents($tmpfname, $decrypted);
// get md5 and mime
$md5 = md5_file($tmpfname);
$mime = mime_content_type($tmpfname);
// update attachment:
$attachment->md5 = $md5;
$attachment->mime = $mime;
$attachment->save();
$this->line(sprintf('Fixed attachment #%d', $attachment->id));
// find file:
}
}
}

View File

@@ -0,0 +1,121 @@
<?php
/**
* UpgradeDatabase.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use DB;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Log;
/**
* Class UpgradeDatabase
*
* @package FireflyIII\Console\Commands
*/
class UpgradeDatabase extends Command
{
/**
* The console command description.
*
* @var string
*/
protected $description = 'Will run various commands to update database records.';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'firefly:upgrade-database';
/**
* Create a new command instance.
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*/
public function handle()
{
$this->setTransactionIdentifier();
}
/**
* This is strangely complex, because the HAVING modifier is a no-no. And subqueries in Laravel are weird.
*/
private function setTransactionIdentifier()
{
$subQuery = TransactionJournal
::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->whereNull('transaction_journals.deleted_at')
->whereNull('transactions.deleted_at')
->groupBy(['transaction_journals.id'])
->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]);
$result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived'))
->mergeBindings($subQuery->getQuery())
->where('t_count', '>', 2)
->select(['id', 't_count']);
$journalIds = array_unique($result->pluck('id')->toArray());
foreach ($journalIds as $journalId) {
// grab all positive transactiosn from this journal that are not deleted.
// for each one, grab the negative opposing one which has 0 as an identifier and give it the same identifier.
$identifier = 0;
$processed = [];
$transactions = Transaction::where('transaction_journal_id', $journalId)->where('amount', '>', 0)->get();
/** @var Transaction $transaction */
foreach ($transactions as $transaction) {
// find opposing:
$amount = bcmul(strval($transaction->amount), '-1');
try {
/** @var Transaction $opposing */
$opposing = Transaction
::where('transaction_journal_id', $journalId)
->where('amount', $amount)->where('identifier', '=', 0)
->whereNotIn('id', $processed)
->first();
} catch (QueryException $e) {
Log::error($e->getMessage());
$this->error('Firefly III could not find the "identifier" field in the "transactions" table.');
$this->error('This field is required for Firefly III version ' . config('firefly.version') . ' to run.');
$this->error('Please run "php artisan migrate" to add this field to the table.');
$this->info('Then, run "php artisan firefly:upgrade-database" to try again.');
break 2;
}
if (!is_null($opposing)) {
// give both a new identifier:
$transaction->identifier = $identifier;
$transaction->save();
$opposing->identifier = $identifier;
$opposing->save();
$processed[] = $transaction->id;
$processed[] = $opposing->id;
$this->line(sprintf('Database upgrade for journal #%d, transactions #%d and #%d', $journalId, $transaction->id, $opposing->id));
}
$identifier++;
}
}
}
}

View File

@@ -0,0 +1,83 @@
<?php
/**
* UpgradeFireflyInstructions.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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.
*/
public function handle()
{
//
/** @var string $version */
$version = config('firefly.version');
$config = config('upgrade.text');
$text = null;
foreach (array_keys($config) as $compare) {
// if string starts with:
$len = strlen($compare);
if (substr($version, 0, $len) === $compare) {
$text = $config[$compare];
}
}
$this->line('+------------------------------------------------------------------------------+');
$this->line('');
if (is_null($text)) {
$this->line('Thank you for installing Firefly III, v' . $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,378 @@
<?php
/**
* VerifyDatabase.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console\Commands;
use Crypt;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\Budget;
use FireflyIII\Models\Category;
use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
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.
*/
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();
// transfers with budgets.
$this->reportTransfersBudgets();
// report on journals with the wrong types of accounts.
$this->reportIncorrectJournals();
}
/**
* 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', 'accounts.encrypted', 'accounts.name', 'accounts.user_id', 'users.email'])
->whereNull('transactions.account_id')
->get(
['accounts.id', 'accounts.encrypted', 'accounts.name', 'accounts.user_id', 'users.email']
);
/** @var stdClass $entry */
foreach ($set as $entry) {
$name = $entry->name;
$line = 'User #%d (%s) has account #%d ("%s") which has no transactions.';
$line = sprintf($line, $entry->user_id, $entry->email, $entry->id, $name);
$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', 'budgets.name', 'budgets.user_id', 'users.email'])
->whereNull('budget_limits.id')
->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 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 . '"'
);
}
}
private function reportIncorrectJournals()
{
$configuration = [
// a withdrawal can not have revenue account:
TransactionType::WITHDRAWAL => [AccountType::REVENUE],
// deposit cannot have an expense account:
TransactionType::DEPOSIT => [AccountType::EXPENSE],
// transfer cannot have either:
TransactionType::TRANSFER => [AccountType::EXPENSE, AccountType::REVENUE],
];
foreach ($configuration as $transactionType => $accountTypes) {
$set = TransactionJournal
::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
->leftJoin('account_types', 'account_types.id', 'accounts.account_type_id')
->leftJoin('users', 'users.id', '=', 'transaction_journals.user_id')
->where('transaction_types.type', $transactionType)
->whereIn('account_types.type', $accountTypes)
->whereNull('transaction_journals.deleted_at')
->get(['transaction_journals.id', 'transaction_journals.user_id', 'users.email', 'account_types.type as a_type', 'transaction_types.type']);
foreach ($set as $entry) {
$this->error(
sprintf(
'Transaction journal #%d (user #%d, %s) is of type "%s" but ' .
'is linked to a "%s". The transaction journal should be recreated.',
$entry->id,
$entry->user_id,
$entry->email,
$entry->type,
$entry->a_type
)
);
}
}
}
/**
* 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()
{
$set = TransactionJournal
::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->groupBy('transaction_journals.id')
->whereNull('transactions.transaction_journal_id')
->get(['transaction_journals.id']);
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 . '"'
);
}
}
/**
*
*/
private function reportTransfersBudgets()
{
$set = TransactionJournal
::distinct()
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id')
->where('transaction_types.type', TransactionType::TRANSFER)
->whereNotNull('budget_transaction_journal.budget_id')->get(['transaction_journals.id']);
/** @var TransactionJournal $entry */
foreach ($set as $entry) {
$this->error(
sprintf(
'Error: Transaction journal #%d is a transfer, but has a budget. Edit it without changing anything, so the budget will be removed.',
$entry->id
)
);
}
}
}

62
app/Console/Kernel.php Normal file → Executable file
View File

@@ -1,16 +1,53 @@
<?php namespace FireflyIII\Console;
<?php
/**
* Kernel.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Console;
use FireflyIII\Console\Commands\CreateImport;
use FireflyIII\Console\Commands\EncryptFile;
use FireflyIII\Console\Commands\Import;
use FireflyIII\Console\Commands\ScanAttachments;
use FireflyIII\Console\Commands\UpgradeDatabase;
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
use FireflyIII\Console\Commands\VerifyDatabase;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
/**
* Class Kernel
*
* @codeCoverageIgnore
* @package FireflyIII\Console
*/
class Kernel extends ConsoleKernel
{
/**
* The bootstrap classes for the application.
*
* Next upgrade verify these are the same.
*
* @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.
@@ -19,19 +56,34 @@ class Kernel extends ConsoleKernel
*/
protected $commands
= [
UpgradeFireflyInstructions::class,
VerifyDatabase::class,
Import::class,
CreateImport::class,
EncryptFile::class,
ScanAttachments::class,
UpgradeDatabase::class,
];
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @return void
*/
protected function schedule(Schedule $schedule)
{
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* ConfirmedUser.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class ConfirmedUser
*
* @package FireflyIII\Events
*/
class ConfirmedUser extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance. This event is triggered when a user confirms their new account.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -1,14 +1,23 @@
<?php namespace FireflyIII\Events;
<?php
/**
* Event.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
/**
* Class Event
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
abstract class Event
{
//
}

View File

@@ -1,34 +0,0 @@
<?php namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class JournalCreated
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalCreated extends Event
{
use SerializesModels;
public $journal;
public $piggyBankId;
/**
* Create a new event instance.
*
* @param TransactionJournal $journal
* @param $piggyBankId
*/
public function __construct(TransactionJournal $journal, $piggyBankId)
{
//
$this->journal = $journal;
$this->piggyBankId = $piggyBankId;
}
}

View File

@@ -1,25 +0,0 @@
<?php namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class JournalDeleted
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalDeleted extends Event
{
use SerializesModels;
/**
* Create a new event instance.
*
*/
public function __construct()
{
//
}
}

View File

@@ -1,30 +0,0 @@
<?php namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class JournalSaved
*
* @codeCoverageIgnore
* @package FireflyIII\Events
*/
class JournalSaved 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,42 @@
<?php
/**
* RegisteredUser.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class RegisteredUser
*
* @package FireflyIII\Events
*/
class RegisteredUser extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance. This event is triggered when a new user registers.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* ResentConfirmation.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\User;
use Illuminate\Queue\SerializesModels;
/**
* Class ResentConfirmation
*
* @package FireflyIII\Events
*/
class ResentConfirmation extends Event
{
use SerializesModels;
public $ipAddress;
public $user;
/**
* Create a new event instance. This event is triggered when a users wants a new confirmation.
*
* @param User $user
* @param string $ipAddress
*/
public function __construct(User $user, string $ipAddress)
{
$this->user = $user;
$this->ipAddress = $ipAddress;
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* StoredBudgetLimit.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 StoredBudgetLimit
*
* @package FireflyIII\Events
*/
class StoredBudgetLimit 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,46 @@
<?php
/**
* StoredTransactionJournal.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class StoredTransactionJournal
*
* @package FireflyIII\Events
*/
class StoredTransactionJournal 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,50 @@
<?php
/**
* UpdatedBudgetLimit.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 UpdatedBudgetLimit
*
* @package FireflyIII\Events
*/
class UpdatedBudgetLimit 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,42 @@
<?php
/**
* UpdatedTransactionJournal.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Events;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Queue\SerializesModels;
/**
* Class UpdatedTransactionJournal
*
* @package FireflyIII\Events
*/
class UpdatedTransactionJournal extends Event
{
use SerializesModels;
public $journal;
/**
* Create a new event instance.
*
* @param TransactionJournal $journal
*/
public function __construct(TransactionJournal $journal)
{
//
$this->journal = $journal;
}
}

View File

@@ -1,12 +1,21 @@
<?php
/**
* FireflyException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class FireflyException
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class FireflyException extends \Exception

94
app/Exceptions/Handler.php Normal file → Executable file
View File

@@ -1,18 +1,35 @@
<?php namespace FireflyIII\Exceptions;
<?php
/**
* Handler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
use ErrorException;
use Exception;
use FireflyIII\Jobs\MailError;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException as ValException;
use Symfony\Component\HttpKernel\Exception\HttpException;
/**
* Class Handler
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
@@ -20,40 +37,87 @@ class Handler extends ExceptionHandler
*/
protected $dontReport
= [
'Symfony\Component\HttpKernel\Exception\HttpException'
AuthenticationException::class,
AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
TokenMismatchException::class,
ValException::class,
];
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @SuppressWarnings(PHPMD.ShortVariable)
* @param \Exception $exception
*
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
public function render($request, Exception $exception)
{
if ($e instanceof HttpException) {
return $this->renderHttpException($e);
} else {
return parent::render($request, $e);
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.
* @SuppressWarnings(PHPMD.ShortVariable)
*
* @param \Exception $e
* @param Exception $exception
*
* @return void
*/
public function report(Exception $e)
public function report(Exception $exception)
{
parent::report($e);
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.
$ip = $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';
$job = new MailError($userData, env('SITE_OWNER', ''), $ip, $data);
dispatch($job);
}
parent::report($exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
*
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
}
}

View File

@@ -1,11 +1,21 @@
<?php
/**
* NotImplementedException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class NotImplementedException
*
* @codeCoverageIgnore
* @package FireflyIII\Exceptions
*/
class NotImplementedException extends \Exception

View File

@@ -1,10 +1,20 @@
<?php
/**
* ValidationException.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Exceptions;
/**
* Class ValidationExceptions
*
* @codeCoverageIgnore
* @package FireflyIII\Exception
*/
class ValidationException extends \Exception

View File

@@ -0,0 +1,132 @@
<?php
/**
* AttachmentCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use Carbon\Carbon;
use Crypt;
use FireflyIII\Models\Attachment;
use FireflyIII\Models\ExportJob;
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 Carbon */
private $end;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $exportDisk;
/** @var AttachmentRepositoryInterface */
private $repository;
/** @var Carbon */
private $start;
/** @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);
}
return true;
}
/**
* @param Carbon $start
* @param Carbon $end
*/
public function setDates(Carbon $start, Carbon $end)
{
$this->start = $start;
$this->end = $end;
}
/**
* @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->getEntries()->push($exportFile);
} 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->getBetween($this->start, $this->end);
return $attachments;
}
}

View File

@@ -0,0 +1,60 @@
<?php
/**
* BasicCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 $entries;
/**
* BasicCollector 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,41 @@
<?php
/**
* CollectorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 getEntries(): Collection;
/**
* @return bool
*/
public function run(): bool;
/**
* @param Collection $entries
*
*/
public function setEntries(Collection $entries);
}

View File

@@ -0,0 +1,348 @@
<?php
/**
* JournalCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
use Carbon\Carbon;
use Crypt;
use DB;
use FireflyIII\Models\Transaction;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
/**
* Class JournalCollector
*
* @package FireflyIII\Export\Collector
*/
class JournalCollector extends BasicCollector implements CollectorInterface
{
/** @var Collection */
private $accounts;
/** @var Carbon */
private $end;
/** @var Carbon */
private $start;
/** @var Collection */
private $workSet;
/**
* @return bool
*/
public function run(): bool
{
/*
* Instead of collecting journals we collect transactions for the given accounts.
* We left join the OPPOSING transaction AND some journal data.
* After that we complement this info with budgets, categories, etc.
*
* This is way more efficient and will also work on split journals.
*/
$this->getWorkSet();
/*
* Extract:
* possible budget ids for journals
* possible category ids journals
* possible budget ids for transactions
* possible category ids for transactions
*
* possible IBAN and account numbers?
*
*/
$journals = $this->extractJournalIds();
$transactions = $this->extractTransactionIds();
// extend work set with category data from journals:
$this->categoryDataForJournals($journals);
// extend work set with category cate from transactions (overrules journals):
$this->categoryDataForTransactions($transactions);
// same for budgets:
$this->budgetDataForJournals($journals);
$this->budgetDataForTransactions($transactions);
$this->setEntries($this->workSet);
return true;
}
/**
* @param Collection $accounts
*/
public function setAccounts(Collection $accounts)
{
$this->accounts = $accounts;
}
/**
* @param Carbon $start
* @param Carbon $end
*/
public function setDates(Carbon $start, Carbon $end)
{
$this->start = $start;
$this->end = $end;
}
/**
* @param array $journals
*
* @return bool
*/
private function budgetDataForJournals(array $journals): bool
{
$set = DB::table('budget_transaction_journal')
->leftJoin('budgets', 'budgets.id', '=', 'budget_transaction_journal.budget_id')
->whereIn('budget_transaction_journal.transaction_journal_id', $journals)
->get(
[
'budget_transaction_journal.budget_id',
'budget_transaction_journal.transaction_journal_id',
'budgets.name',
'budgets.encrypted',
]
);
$set->each(
function ($obj) {
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
}
);
$array = [];
foreach ($set as $obj) {
$array[$obj->transaction_journal_id] = ['id' => $obj->budget_id, 'name' => $obj->name];
}
$this->workSet->each(
function ($obj) use ($array) {
if (isset($array[$obj->transaction_journal_id])) {
$obj->budget_id = $array[$obj->transaction_journal_id]['id'];
$obj->budget_name = $array[$obj->transaction_journal_id]['name'];
}
}
);
return true;
}
/**
* @param array $transactions
*
* @return bool
*/
private function budgetDataForTransactions(array $transactions): bool
{
$set = DB::table('budget_transaction')
->leftJoin('budgets', 'budgets.id', '=', 'budget_transaction.budget_id')
->whereIn('budget_transaction.transaction_id', $transactions)
->get(
[
'budget_transaction.budget_id',
'budget_transaction.transaction_id',
'budgets.name',
'budgets.encrypted',
]
);
$set->each(
function ($obj) {
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
}
);
$array = [];
foreach ($set as $obj) {
$array[$obj->transaction_id] = ['id' => $obj->budget_id, 'name' => $obj->name];
}
$this->workSet->each(
function ($obj) use ($array) {
// first transaction
if (isset($array[$obj->id])) {
$obj->budget_id = $array[$obj->id]['id'];
$obj->budget_name = $array[$obj->id]['name'];
}
}
);
return true;
}
/**
* @param array $journals
*
* @return bool
*/
private function categoryDataForJournals(array $journals): bool
{
$set = DB::table('category_transaction_journal')
->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id')
->whereIn('category_transaction_journal.transaction_journal_id', $journals)
->get(
[
'category_transaction_journal.category_id',
'category_transaction_journal.transaction_journal_id',
'categories.name',
'categories.encrypted',
]
);
$set->each(
function ($obj) {
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
}
);
$array = [];
foreach ($set as $obj) {
$array[$obj->transaction_journal_id] = ['id' => $obj->category_id, 'name' => $obj->name];
}
$this->workSet->each(
function ($obj) use ($array) {
if (isset($array[$obj->transaction_journal_id])) {
$obj->category_id = $array[$obj->transaction_journal_id]['id'];
$obj->category_name = $array[$obj->transaction_journal_id]['name'];
}
}
);
return true;
}
/**
* @param array $transactions
*
* @return bool
*/
private function categoryDataForTransactions(array $transactions): bool
{
$set = DB::table('category_transaction')
->leftJoin('categories', 'categories.id', '=', 'category_transaction.category_id')
->whereIn('category_transaction.transaction_id', $transactions)
->get(
[
'category_transaction.category_id',
'category_transaction.transaction_id',
'categories.name',
'categories.encrypted',
]
);
$set->each(
function ($obj) {
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
}
);
$array = [];
foreach ($set as $obj) {
$array[$obj->transaction_id] = ['id' => $obj->category_id, 'name' => $obj->name];
}
$this->workSet->each(
function ($obj) use ($array) {
// first transaction
if (isset($array[$obj->id])) {
$obj->category_id = $array[$obj->id]['id'];
$obj->category_name = $array[$obj->id]['name'];
}
}
);
return true;
}
/**
* @return array
*/
private function extractJournalIds(): array
{
return $this->workSet->pluck('transaction_journal_id')->toArray();
}
/**
* @return array
*/
private function extractTransactionIds()
{
$set = $this->workSet->pluck('id')->toArray();
$opposing = $this->workSet->pluck('opposing_id')->toArray();
$complete = $set + $opposing;
return array_unique($complete);
}
/**
*
*/
private function getWorkSet()
{
$accountIds = $this->accounts->pluck('id')->toArray();
$this->workSet = Transaction
::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
->leftJoin(
'transactions AS opposing', function (JoinClause $join) {
$join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id')
->where('opposing.amount', '=', DB::raw('transactions.amount * -1'))
->where('transactions.identifier', '=', 'opposing.identifier');
}
)
->leftJoin('accounts', 'transactions.account_id', '=', 'accounts.id')
->leftJoin('accounts AS opposing_accounts', 'opposing.account_id', '=', 'opposing_accounts.id')
->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', 'transaction_types.id')
->leftJoin('transaction_currencies', 'transaction_journals.transaction_currency_id', '=', 'transaction_currencies.id')
->whereIn('transactions.account_id', $accountIds)
->where('transaction_journals.user_id', $this->job->user_id)
->where('transaction_journals.date', '>=', $this->start->format('Y-m-d'))
->where('transaction_journals.date', '<=', $this->end->format('Y-m-d'))
->where('transaction_journals.completed', 1)
->whereNull('transaction_journals.deleted_at')
->whereNull('transactions.deleted_at')
->whereNull('opposing.deleted_at')
->orderBy('transaction_journals.date', 'DESC')
->orderBy('transactions.identifier', 'ASC')
->get(
[
'transactions.id',
'transactions.amount',
'transactions.description',
'transactions.account_id',
'accounts.name as account_name',
'accounts.encrypted as account_name_encrypted',
'transactions.identifier',
'opposing.id as opposing_id',
'opposing.amount AS opposing_amount',
'opposing.description as opposing_description',
'opposing.account_id as opposing_account_id',
'opposing_accounts.name as opposing_account_name',
'opposing_accounts.encrypted as opposing_account_encrypted',
'opposing.identifier as opposing_identifier',
'transaction_journals.id as transaction_journal_id',
'transaction_journals.date',
'transaction_journals.description as journal_description',
'transaction_journals.encrypted as journal_encrypted',
'transaction_journals.transaction_type_id',
'transaction_types.type as transaction_type',
'transaction_journals.transaction_currency_id',
'transaction_currencies.code AS transaction_currency_code',
]
);
}
}

View File

@@ -0,0 +1,220 @@
<?php
/**
* UploadCollector.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Collector;
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 \Illuminate\Contracts\Filesystem\Filesystem */
private $exportDisk;
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
private $uploadDisk;
/** @var string */
private $vintageFormat;
/**
* AttachmentCollector constructor.
*
* @param ExportJob $job
*/
public function __construct(ExportJob $job)
{
parent::__construct($job);
Log::debug('Going to collect attachments', ['key' => $job->key]);
// make storage:
$this->uploadDisk = Storage::disk('upload');
$this->exportDisk = Storage::disk('export');
// file names associated with the old import routine.
$this->vintageFormat = sprintf('csv-upload-%d-', auth()->user()->id);
}
/**
* Is called from the outside to actually start the export.
*
* @return bool
*/
public function run(): bool
{
// collect old upload files (names beginning with "csv-upload".
$this->collectVintageUploads();
// then collect current upload files:
$this->collectModernUploads();
return true;
}
/**
* This method collects all the uploads that are uploaded using the new importer. So after the summer of 2016.
*
* @return bool
*/
private function collectModernUploads(): bool
{
$set = $this->job->user->importJobs()->where('status', 'import_complete')->get(['import_jobs.*']);
$keys = [];
if ($set->count() > 0) {
$keys = $set->pluck('key')->toArray();
}
foreach ($keys as $key) {
$this->processModernUpload($key);
}
return true;
}
/**
* This method collects all the uploads that are uploaded using the "old" importer. So from before the summer of 2016.
*
* @return bool
*/
private function collectVintageUploads():bool
{
// grab upload directory.
$files = $this->uploadDisk->files();
foreach ($files as $entry) {
$this->processVintageUpload($entry);
}
return true;
}
/**
* This method tells you when the vintage upload file was actually uploaded.
*
* @param string $entry
*
* @return string
*/
private function getVintageUploadDate(string $entry): string
{
// this is an original upload.
$parts = explode('-', str_replace(['.csv.encrypted', $this->vintageFormat], '', $entry));
$originalUpload = intval($parts[1]);
$date = date('Y-m-d \a\t H-i-s', $originalUpload);
return $date;
}
/**
* Tells you if a file name is a vintage upload.
*
* @param string $entry
*
* @return bool
*/
private function isVintageImport(string $entry): bool
{
$len = strlen($this->vintageFormat);
// file is part of the old import routine:
if (substr($entry, 0, $len) === $this->vintageFormat) {
return true;
}
return false;
}
/**
* @param string $key
*
* @return bool
*/
private function processModernUpload(string $key): bool
{
// find job associated with import file:
$job = $this->job->user->importJobs()->where('key', $key)->first();
if (is_null($job)) {
return false;
}
// find the file for this import:
$content = '';
try {
$content = Crypt::decrypt($this->uploadDisk->get(sprintf('%s.upload', $key)));
} catch (DecryptException $e) {
Log::error(sprintf('Could not decrypt old import file "%s". Skipped because: %s', $key, $e->getMessage()));
}
if (strlen($content) > 0) {
// add to export disk.
$date = $job->created_at->format('Y-m-d');
$file = sprintf('%s-Old %s import dated %s.%s', $this->job->key, strtoupper($job->file_type), $date, $job->file_type);
$this->exportDisk->put($file, $content);
$this->getEntries()->push($file);
}
return true;
}
/**
* If the file is a vintage upload, process it.
*
* @param string $entry
*
* @return bool
*/
private function processVintageUpload(string $entry): bool
{
if ($this->isVintageImport($entry)) {
$this->saveVintageImportFile($entry);
return true;
}
return false;
}
/**
* This will store the content of the old vintage upload somewhere.
*
* @param string $entry
*/
private function saveVintageImportFile(string $entry)
{
$content = '';
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) {
// add to export disk.
$date = $this->getVintageUploadDate($entry);
$file = $this->job->key . '-Old import dated ' . $date . '.csv';
$this->exportDisk->put($file, $content);
$this->getEntries()->push($file);
}
}
}

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

@@ -0,0 +1,110 @@
<?php
/**
* Entry.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Export\Entry;
use Crypt;
/**
* 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
{
// @formatter:off
public $journal_id;
public $date;
public $description;
public $currency_code;
public $amount;
public $transaction_type;
public $source_account_id;
public $source_account_name;
public $destination_account_id;
public $destination_account_name;
public $budget_id;
public $budget_name;
public $category_id;
public $category_name;
// @formatter:on
/**
* Entry constructor.
*/
private function __construct()
{
}
/**
* @param $object
*
* @return Entry
*/
public static function fromObject($object): Entry
{
$entry = new self;
// journal information:
$entry->journal_id = $object->transaction_journal_id;
$entry->description = $object->journal_encrypted === 1 ? Crypt::decrypt($object->journal_description) : $object->journal_description;
$entry->amount = round($object->amount, 2); // always positive
$entry->date = $object->date;
$entry->transaction_type = $object->transaction_type;
$entry->currency_code = $object->transaction_currency_code;
// source information:
$entry->source_account_id = $object->account_id;
$entry->source_account_name = $object->account_name_encrypted === 1 ? Crypt::decrypt($object->account_name) : $object->account_name;
// destination information
$entry->destination_account_id = $object->opposing_account_id;
$entry->destination_account_name = $object->opposing_account_encrypted === 1 ? Crypt::decrypt($object->opposing_account_name)
: $object->opposing_account_name;
// category and budget
$entry->category_id = $object->category_id ?? '';
$entry->category_name = $object->category_name ?? '';
$entry->budget_id = $object->budget_id ?? '';
$entry->budget_name = $object->budget_name ?? '';
// update description when transaction description is different:
if (!is_null($object->description) && $object->description != $entry->description) {
$entry->description = $entry->description . ' (' . $object->description . ')';
}
return $entry;
}
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* BasicExporter.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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,87 @@
<?php
/**
* CsvExporter.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 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 = [];
// get field names for header row:
$first = $this->getEntries()->first();
$headers = array_keys(get_object_vars($first));
$rows[] = $headers;
/** @var Entry $entry */
foreach ($this->getEntries() as $entry) {
$line = [];
foreach ($headers as $header) {
$line[] = $entry->$header;
}
$rows[] = $line;
}
$writer->insertAll($rows);
return true;
}
private function tempFile()
{
$this->fileName = $this->job->key . '-records.csv';
}
}

View File

@@ -0,0 +1,46 @@
<?php
/**
* ExporterInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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);
}

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

@@ -0,0 +1,196 @@
<?php
/**
* Processor.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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\JournalCollector;
use FireflyIII\Export\Collector\UploadCollector;
use FireflyIII\Export\Entry\Entry;
use FireflyIII\Models\ExportJob;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Collection;
use Log;
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 $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->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->setDates($this->settings['startDate'], $this->settings['endDate']);
$attachmentCollector->run();
$this->files = $this->files->merge($attachmentCollector->getEntries());
return true;
}
/**
* @return bool
*/
public function collectJournals(): bool
{
/** @var JournalCollector $collector */
$collector = app(JournalCollector::class, [$this->job]);
$collector->setDates($this->settings['startDate'], $this->settings['endDate']);
$collector->setAccounts($this->settings['accounts']);
$collector->run();
$this->journals = $collector->getEntries();
Log::debug(sprintf('Count %d journals in collectJournals() ', $this->journals->count()));
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->getEntries());
return true;
}
/**
* @return bool
*/
public function convertJournals(): bool
{
$count = 0;
foreach ($this->journals as $object) {
$this->exportEntries->push(Entry::fromObject($object));
$count++;
}
Log::debug(sprintf('Count %d entries in exportEntries (convertJournals)', $this->exportEntries->count()));
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

@@ -1,4 +1,15 @@
<?php
/**
* AccountChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Account;
@@ -7,12 +18,20 @@ use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
/**
* Interface AccountChartGenerator
* Interface AccountChartGeneratorInterface
*
* @package FireflyIII\Generator\Chart\Account
*/
interface AccountChartGenerator
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
@@ -21,7 +40,7 @@ interface AccountChartGenerator
*
* @return array
*/
public function all(Collection $accounts, Carbon $start, Carbon $end);
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array;
/**
* @param Collection $accounts
@@ -30,23 +49,14 @@ interface AccountChartGenerator
*
* @return array
*/
public function frontpage(Collection $accounts, Carbon $start, Carbon $end);
public function revenueAccounts(Collection $accounts, Carbon $start, Carbon $end): array;
/**
* @param Account $account
* @param Carbon $start
* @param Carbon $end
* @param array $labels
* @param array $dataSet
*
* @return array
*/
public function single(Account $account, Carbon $start, Carbon $end);
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end);
public function single(Account $account, array $labels, array $dataSet): array;
}

View File

@@ -1,37 +1,29 @@
<?php
/**
* ChartJsAccountChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Account;
use Carbon\Carbon;
use Config;
use FireflyIII\Models\Account;
use Illuminate\Support\Collection;
use Preferences;
use Steam;
/**
* Class ChartJsAccountChartGenerator
*
* @package FireflyIII\Generator\Chart\Account
*/
class ChartJsAccountChartGenerator implements AccountChartGenerator
class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
{
/**
* @codeCoverageIgnore
*
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function all(Collection $accounts, Carbon $start, Carbon $end)
{
return $this->frontpage($accounts, $start, $end);
}
/**
* @param Collection $accounts
* @param Carbon $start
@@ -39,36 +31,13 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
*
* @return array
*/
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end)
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array
{
$data = [
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.spent'),
'data' => []]]];
bcscale(2);
$start->subDay();
$ids = $this->getIdsFromCollection($accounts);
$startBalances = Steam::balancesById($ids, $start);
$endBalances = Steam::balancesById($ids, $end);
$accounts->each(
function (Account $account) use ($startBalances, $endBalances) {
$id = $account->id;
$startBalance = $this->isInArray($startBalances, $id);
$endBalance = $this->isInArray($endBalances, $id);
$diff = bcsub($endBalance, $startBalance);
$account->difference = round($diff, 2);
}
);
$accounts = $accounts->sortByDesc(
function (Account $account) {
return $account->difference;
}
);
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.spent'),
'data' => []]]];
foreach ($accounts as $account) {
if ($account->difference > 0) {
$data['labels'][] = $account->name;
@@ -80,20 +49,39 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
}
/**
* @param $array
* @param $entryId
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return string
* @return array
*/
protected function isInArray($array, $entryId)
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array
{
if (isset($array[$entryId])) {
return $array[$entryId];
// 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();
}
return '0';
}
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 Collection $accounts
@@ -102,93 +90,43 @@ class ChartJsAccountChartGenerator implements AccountChartGenerator
*
* @return array
*/
public function frontpage(Collection $accounts, Carbon $start, Carbon $end)
public function revenueAccounts(Collection $accounts, Carbon $start, Carbon $end): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
$current = clone $start;
while ($current <= $end) {
$data['labels'][] = $current->formatLocalized($format);
$current->addDay();
}
$data = [
'count' => 1,
'labels' => [], 'datasets' => [[
'label' => trans('firefly.earned'),
'data' => []]]];
foreach ($accounts as $account) {
$set = [
'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' => [],
];
$current = clone $start;
while ($current <= $end) {
$set['data'][] = Steam::balance($account, $current);
$current->addDay();
if ($account->difference > 0) {
$data['labels'][] = $account->name;
$data['datasets'][0]['data'][] = $account->difference;
}
$data['datasets'][] = $set;
}
$data['count'] = count($data['datasets']);
return $data;
}
/**
* @param Account $account
* @param Carbon $start
* @param Carbon $end
* @param array $labels
* @param array $dataSet
*
* @return array
*/
public function single(Account $account, Carbon $start, Carbon $end)
public function single(Account $account, array $labels, array $dataSet): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$data = [
'count' => 1,
'labels' => [],
'labels' => $labels,
'datasets' => [
[
'label' => $account->name,
'data' => []
]
'data' => $dataSet,
],
],
];
$current = clone $start;
while ($end >= $current) {
$data['labels'][] = $current->formatLocalized($format);
$data['datasets'][0]['data'][] = Steam::balance($account, $current);
$current->addDay();
}
return $data;
}
/**
* @param Collection $collection
*
* @return array
*/
protected function getIdsFromCollection(Collection $collection)
{
$ids = [];
foreach ($collection as $entry) {
$ids[] = $entry->id;
}
return array_unique($ids);
}
}

View File

@@ -1,32 +0,0 @@
<?php
namespace FireflyIII\Generator\Chart\Bill;
use FireflyIII\Models\Bill;
use Illuminate\Support\Collection;
/**
* Interface BillChartGenerator
*
* @package FireflyIII\Generator\Chart\Bill
*/
interface BillChartGenerator
{
/**
* @param Collection $paid
* @param Collection $unpaid
*
* @return array
*/
public function frontpage(Collection $paid, Collection $unpaid);
/**
* @param Bill $bill
* @param Collection $entries
*
* @return array
*/
public function single(Bill $bill, Collection $entries);
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* BillChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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

@@ -1,62 +1,48 @@
<?php
/**
* ChartJsBillChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Bill;
use Config;
use FireflyIII\Models\Bill;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Support\Collection;
use Preferences;
/**
* Class ChartJsBillChartGenerator
*
* @package FireflyIII\Generator\Chart\Bill
*/
class ChartJsBillChartGenerator implements BillChartGenerator
class ChartJsBillChartGenerator implements BillChartGeneratorInterface
{
/**
* @param Collection $paid
* @param Collection $unpaid
* @param string $paid
* @param string $unpaid
*
* @return array
*/
public function frontpage(Collection $paid, Collection $unpaid)
public function frontpage(string $paid, string $unpaid): array
{
$paidDescriptions = [];
$paidAmount = 0;
$unpaidDescriptions = [];
$unpaidAmount = 0;
bcscale(2);
/** @var TransactionJournal $entry */
foreach ($paid as $entry) { // loop paid and create single entry:
$paidDescriptions[] = $entry->description;
$paidAmount = bcadd($paidAmount, $entry->amount);
}
/** @var Bill $entry */
foreach ($unpaid as $entry) { // loop unpaid:
$description = $entry[0]->name . ' (' . $entry[1]->format('jS M Y') . ')';
$amount = bcdiv(bcadd($entry[0]->amount_max, $entry[0]->amount_min), 2);
$unpaidDescriptions[] = $description;
$unpaidAmount = bcadd($unpaidAmount, $amount);
unset($amount, $description);
}
$data = [
[
'value' => $unpaidAmount,
'color' => 'rgba(53, 124, 165,0.7)',
'highlight' => 'rgba(53, 124, 165,0.9)',
'label' => trans('firefly.unpaid'),
'datasets' => [
[
'data' => [round($unpaid, 2), round(bcmul($paid, '-1'), 2)],
'backgroundColor' => ['rgba(53, 124, 165,0.7)', 'rgba(0, 141, 76, 0.7)',],
],
],
[
'value' => $paidAmount,
'color' => 'rgba(0, 141, 76, 0.7)',
'highlight' => 'rgba(0, 141, 76, 0.9)',
'label' => trans('firefly.paid'),
]
'labels' => [strval(trans('firefly.unpaid')), strval(trans('firefly.paid'))],
];
return $data;
@@ -68,41 +54,34 @@ class ChartJsBillChartGenerator implements BillChartGenerator
*
* @return array
*/
public function single(Bill $bill, Collection $entries)
public function single(Bill $bill, Collection $entries): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$data = [
'count' => 3,
'labels' => [],
'datasets' => [],
];
// dataset: max amount
// dataset: min amount
// dataset: actual amount
$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);
$actualAmount[] = round($entry->amount, 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,
];

View File

@@ -1,43 +0,0 @@
<?php
namespace FireflyIII\Generator\Chart\Budget;
use Illuminate\Support\Collection;
/**
* Interface BudgetChartGenerator
*
* @package FireflyIII\Generator\Chart\Budget
*/
interface BudgetChartGenerator
{
/**
* @param Collection $entries
*
* @return array
*/
public function budget(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function budgetLimit(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries);
/**
* @param Collection $budgets
* @param Collection $entries
*
* @return array
*/
public function year(Collection $budgets, Collection $entries);
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* BudgetChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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

@@ -1,39 +1,45 @@
<?php
/**
* ChartJsBudgetChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Budget;
use Config;
use Illuminate\Support\Collection;
use Preferences;
use Navigation;
/**
* Class ChartJsBudgetChartGenerator
*
* @package FireflyIII\Generator\Chart\Budget
*/
class ChartJsBudgetChartGenerator implements BudgetChartGenerator
class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface
{
/**
*
* @param Collection $entries
* @param string $dateFormat
*
* @return array
*/
public function budget(Collection $entries, $dateFormat = 'month')
public function budgetLimit(Collection $entries, string $dateFormat = 'month_and_day'): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.' . $dateFormat . '.' . $language);
$data = [
$format = strval(trans('config.' . $dateFormat));
$data = [
'labels' => [],
'datasets' => [
[
'label' => 'Amount',
'data' => [],
]
],
],
];
@@ -50,44 +56,36 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
}
/**
* @codeCoverageIgnore
*
* @param Collection $entries
*
* @return array
*/
public function budgetLimit(Collection $entries)
public function frontpage(Collection $entries): array
{
return $this->budget($entries, 'monthAndDay');
}
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries)
{
$data = [
$data = [
'count' => 0,
'labels' => [],
'datasets' => [],
];
// dataset: left
// dataset: spent
// dataset: overspent
$left = [];
$spent = [];
$overspent = [];
foreach ($entries as $entry) {
if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) {
$data['labels'][] = $entry[0];
$left[] = round($entry[1], 2);
$spent[] = round($entry[2], 2);
$overspent[] = round($entry[3], 2);
$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,
@@ -96,14 +94,80 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
'label' => trans('firefly.spent'),
'data' => $spent,
];
$data['datasets'][] = [
'label' => trans('firefly.overspent'),
'data' => $overspent,
];
$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;
}
/**
@@ -112,11 +176,10 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
*
* @return array
*/
public function year(Collection $budgets, Collection $entries)
public function year(Collection $budgets, Collection $entries): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = (string)trans('config.month');
$data = [
'labels' => [],
@@ -126,6 +189,9 @@ class ChartJsBudgetChartGenerator implements BudgetChartGenerator
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 = [

View File

@@ -1,52 +0,0 @@
<?php
namespace FireflyIII\Generator\Chart\Category;
use Illuminate\Support\Collection;
/**
* Interface CategoryChartGenerator
*
* @package FireflyIII\Generator\Chart\Category
*/
interface CategoryChartGenerator
{
/**
* @param Collection $entries
*
* @return array
*/
public function all(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function frontpage(Collection $entries);
/**
* @param Collection $entries
*
* @return array
*/
public function month(Collection $entries);
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInYear(Collection $categories, Collection $entries);
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function earnedInYear(Collection $categories, Collection $entries);
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* CategoryChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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

@@ -1,10 +1,18 @@
<?php
/**
* ChartJsCategoryChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Category;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
@@ -12,104 +20,54 @@ use Preferences;
*
* @package FireflyIII\Generator\Chart\Category
*/
class ChartJsCategoryChartGenerator implements CategoryChartGenerator
class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
{
/**
* @param Collection $entries
* @param string $dateFormat
*
* @return array
*/
public function all(Collection $entries, $dateFormat = 'month')
public function all(Collection $entries): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.' . $dateFormat . '.' . $language);
$data = [
'count' => 2,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.spent'),
'data' => []
'data' => [],
],
[
'label' => trans('firefly.earned'),
'data' => []
]
'data' => [],
],
],
];
foreach ($entries as $entry) {
$data['labels'][] = $entry[0]->formatLocalized($format);
$amount = round($entry[1], 2);
if ($amount > 0) {
$data['datasets'][0]['data'][] = null;
$data['datasets'][1]['data'][] = $amount;
} else {
$data['datasets'][0]['data'][] = $amount * -1;
$data['datasets'][1]['data'][] = null;
}
$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 $entries
*
* @return array
*/
public function frontpage(Collection $entries)
{
$data = [
'count' => 1,
'labels' => [],
'datasets' => [
[
'label' => trans('firefly.spent'),
'data' => []
]
],
];
foreach ($entries as $entry) {
if ($entry['sum'] != 0) {
$data['labels'][] = $entry['name'];
$data['datasets'][0]['data'][] = round($entry['sum'], 2);
}
}
return $data;
}
/**
* @codeCoverageIgnore
*
* @param Collection $entries
*
* @return array
*/
public function month(Collection $entries)
{
return $this->all($entries, 'monthAndDay');
}
/**
* @param Collection $categories
* @param Collection $entries
*
* @return array
*/
public function spentInYear(Collection $categories, Collection $entries)
public function earnedInPeriod(Collection $categories, Collection $entries): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = (string)trans('config.month');
$data = [
'count' => 0,
@@ -132,18 +90,84 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator
}
/**
* @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 earnedInYear(Collection $categories, Collection $entries)
public function spentInPeriod(Collection $categories, Collection $entries): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = (string)trans('config.month');
$data = [
'count' => 0,

View File

@@ -1,11 +1,19 @@
<?php
/**
* ChartJsPiggyBankChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\PiggyBank;
use Carbon\Carbon;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
@@ -13,7 +21,7 @@ use Preferences;
*
* @package FireflyIII\Generator\Chart\PiggyBank
*/
class ChartJsPiggyBankChartGenerator implements PiggyBankChartGenerator
class ChartJsPiggyBankChartGenerator implements PiggyBankChartGeneratorInterface
{
/**
@@ -21,12 +29,11 @@ class ChartJsPiggyBankChartGenerator implements PiggyBankChartGenerator
*
* @return array
*/
public function history(Collection $set)
public function history(Collection $set): array
{
// language:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.monthAndDay.' . $language);
$format = (string)trans('config.month_and_day');
$data = [
'count' => 1,
@@ -34,15 +41,14 @@ class ChartJsPiggyBankChartGenerator implements PiggyBankChartGenerator
'datasets' => [
[
'label' => 'Diff',
'data' => []
]
'data' => [],
],
],
];
$sum = '0';
bcscale(2);
foreach ($set as $entry) {
$date = new Carbon($entry->date);
$sum = bcadd($sum, $entry->sum);
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);
}

View File

@@ -1,20 +0,0 @@
<?php
namespace FireflyIII\Generator\Chart\PiggyBank;
use Illuminate\Support\Collection;
/**
* Interface PiggyBankChartGenerator
*
* @package FireflyIII\Generator\Chart\PiggyBank
*/
interface PiggyBankChartGenerator
{
/**
* @param Collection $set
*
* @return array
*/
public function history(Collection $set);
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* PiggyBankChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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

@@ -1,29 +1,126 @@
<?php
/**
* ChartJsReportChartGenerator.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Generator\Chart\Report;
use Config;
use Illuminate\Support\Collection;
use Preferences;
/**
* Class ChartJsReportChartGenerator
*
* @package FireflyIII\Generator\Chart\Report
*/
class ChartJsReportChartGenerator implements ReportChartGenerator
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 yearInOut(Collection $entries)
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:
$language = Preferences::get('language', 'en')->data;
$format = Config::get('firefly.month.' . $language);
$format = (string)trans('config.month');
$data = [
'count' => 2,
@@ -31,12 +128,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
'data' => [],
],
],
];
@@ -56,7 +153,7 @@ class ChartJsReportChartGenerator implements ReportChartGenerator
*
* @return array
*/
public function yearInOutSummarized($income, $expense, $count)
public function yearInOutSummarized(string $income, string $expense, int $count): array
{
$data = [
@@ -65,12 +162,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator
'datasets' => [
[
'label' => trans('firefly.income'),
'data' => []
'data' => [],
],
[
'label' => trans('firefly.expenses'),
'data' => []
]
'data' => [],
],
],
];
$data['datasets'][0]['data'][] = round($income, 2);

View File

@@ -1,31 +0,0 @@
<?php
namespace FireflyIII\Generator\Chart\Report;
use Illuminate\Support\Collection;
/**
* Interface ReportChartGenerator
*
* @package FireflyIII\Generator\Chart\Report
*/
interface ReportChartGenerator
{
/**
* @param Collection $entries
*
* @return array
*/
public function yearInOut(Collection $entries);
/**
* @param string $income
* @param string $expense
* @param int $count
*
* @return array
*/
public function yearInOutSummarized($income, $expense, $count);
}

View File

@@ -0,0 +1,65 @@
<?php
/**
* ReportChartGeneratorInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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,110 @@
<?php
/**
* BudgetEventHandler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\StoredBudgetLimit;
use FireflyIII\Events\UpdatedBudgetLimit;
use FireflyIII\Models\LimitRepetition;
use Illuminate\Database\QueryException;
use Log;
/**
* Handles budget related events.
*
* Class BudgetEventHandler
*
* @package FireflyIII\Handlers\Events
*/
class BudgetEventHandler
{
/**
* This method creates a new budget limit repetition when a new budget limit has been created.
*
* @param StoredBudgetLimit $event
*
* @return bool
*/
public function storeRepetition(StoredBudgetLimit $event):bool
{
$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();
}
return true;
}
/**
* Updates, if present the budget limit repetition part of a budget limit.
*
* @param UpdatedBudgetLimit $event
*
* @return bool
*/
public function updateRepetition(UpdatedBudgetLimit $event): bool
{
$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();
}
return true;
}
}

View File

@@ -1,73 +0,0 @@
<?php namespace FireflyIII\Handlers\Events;
use Auth;
use FireflyIII\Events\JournalCreated;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\TransactionJournal;
/**
* Class ConnectJournalToPiggyBank
*
* @package FireflyIII\Handlers\Events
*/
class ConnectJournalToPiggyBank
{
/**
* Create the event handler.
*
* @codeCoverageIgnore
*
*/
public function __construct()
{
//
}
/**
* Handle the event when journal is saved.
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
* @param JournalCreated $event
*
* @return boolean
*/
public function handle(JournalCreated $event)
{
/** @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 false;
}
// update piggy bank rep for date of transaction journal.
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
if (is_null($repetition)) {
return false;
}
bcscale(2);
$amount = $journal->actual_amount;
// if piggy account matches source account, the amount is positive
if ($piggyBank->account_id == $journal->source_account->id) {
$amount = $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

@@ -1,52 +0,0 @@
<?php namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\JournalSaved;
use Log;
/**
* Class RescanJournal
*
* @codeCoverageIgnore
* @package FireflyIII\Handlers\Events
*/
class RescanJournal
{
/**
* Create the event handler.
*
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param JournalSaved $event
*
* @return void
*/
public function handle(JournalSaved $event)
{
$journal = $event->journal;
Log::debug('Triggered saved event for journal #' . $journal->id . ' (' . $journal->description . ')');
/** @var \FireflyIII\Repositories\Bill\BillRepositoryInterface $repository */
$repository = app('FireflyIII\Repositories\Bill\BillRepositoryInterface');
$list = $journal->user->bills()->where('active', 1)->where('automatch', 1)->get();
Log::debug('Found ' . $list->count() . ' bills to check.');
/** @var \FireflyIII\Models\Bill $bill */
foreach ($list as $bill) {
Log::debug('Now calling bill #' . $bill->id . ' (' . $bill->name . ')');
$repository->scan($bill, $journal);
}
Log::debug('Done!');
}
}

View File

@@ -0,0 +1,124 @@
<?php
/**
* StoredJournalEventHandler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\StoredTransactionJournal;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Rules\Processor;
use FireflyIII\Support\Events\BillScanner;
/**
* Class StoredJournalEventHandler
*
* @package FireflyIII\Handlers\Events
*/
class StoredJournalEventHandler
{
/**
* This method connects a new transfer to a piggy bank.
*
* @param StoredTransactionJournal $event
*
* @return bool
*/
public function connectToPiggyBank(StoredTransactionJournal $event): bool
{
/** @var TransactionJournal $journal */
$journal = $event->journal;
$piggyBankId = $event->piggyBankId;
/** @var PiggyBank $piggyBank */
$piggyBank = $journal->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;
}
/**
* This method grabs all the users rules and processes them.
*
* @param StoredTransactionJournal $event
*
* @return bool
*/
public function processRules(StoredTransactionJournal $event): bool
{
// get all the user's rule groups, with the rules, order by 'order'.
$journal = $event->journal;
$groups = $journal->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($journal);
if ($rule->stop_processing) {
return true;
}
}
}
return true;
}
/**
* This method calls a special bill scanner that will check if the stored journal is part of a bill.
*
* @param StoredTransactionJournal $event
*
* @return bool
*/
public function scanBills(StoredTransactionJournal $event): bool
{
$journal = $event->journal;
BillScanner::scan($journal);
return true;
}
}

View File

@@ -1,65 +0,0 @@
<?php namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\JournalSaved;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\PiggyBankRepetition;
/**
* Class UpdateJournalConnection
*
* @codeCoverageIgnore
* @package FireflyIII\Handlers\Events
*/
class UpdateJournalConnection
{
/**
* Create the event handler.
*
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param JournalSaved $event
*
* @return void
*/
public function handle(JournalSaved $event)
{
$journal = $event->journal;
// get the event connected to this journal:
/** @var PiggyBankEvent $event */
$event = PiggyBankEvent::where('transaction_journal_id', $journal->id)->first();
if (is_null($event)) {
return;
}
$piggyBank = $event->piggyBank()->first();
$repetition = null;
if ($piggyBank) {
/** @var PiggyBankRepetition $repetition */
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
}
if (is_null($repetition)) {
return;
}
bcscale(2);
$amount = $journal->amount;
$diff = bcsub($amount, $event->amount); // update current repetition
$repetition->currentamount = bcadd($repetition->currentamount, $diff);
$repetition->save();
$event->amount = $amount;
$event->save();
}
}

View File

@@ -0,0 +1,128 @@
<?php
/**
* UpdatedJournalEventHandler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use FireflyIII\Events\UpdatedTransactionJournal;
use FireflyIII\Models\PiggyBankEvent;
use FireflyIII\Models\PiggyBankRepetition;
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Rules\Processor;
use FireflyIII\Support\Events\BillScanner;
/**
* Class UpdatedJournalEventHandler
*
* @package FireflyIII\Handlers\Events
*/
class UpdatedJournalEventHandler
{
/**
* This method will try to reconnect a journal to a piggy bank, updating the piggy bank repetition.
*
* @param UpdatedTransactionJournal $event
*
* @return bool
*/
public function connectToPiggyBank(UpdatedTransactionJournal $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 (!is_null($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;
}
/**
* This method will check all the rules when a journal is updated.
*
* @param UpdatedTransactionJournal $event
*
* @return bool
*/
public function processRules(UpdatedTransactionJournal $event):bool
{
// get all the user's rule groups, with the rules, order by 'order'.
$journal = $event->journal;
$groups = $journal->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($journal);
if ($rule->stop_processing) {
break;
}
}
}
return true;
}
/**
* This method calls a special bill scanner that will check if the updated journal is part of a bill.
*
* @param UpdatedTransactionJournal $event
*
* @return bool
*/
public function scanBills(UpdatedTransactionJournal $event): bool
{
$journal = $event->journal;
BillScanner::scan($journal);
return true;
}
}

View File

@@ -0,0 +1,225 @@
<?php
/**
* UserEventHandler.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Handlers\Events;
use Exception;
use FireflyIII\Events\ConfirmedUser;
use FireflyIII\Events\RegisteredUser;
use FireflyIII\Events\ResentConfirmation;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Mail\Message;
use Log;
use Mail;
use Preferences;
use Session;
use Swift_TransportException;
/**
* Class UserEventHandler
*
* This class responds to any events that have anything to do with the User object.
*
* The method name reflects what is being done. This is in the present tense.
*
*
* @package FireflyIII\Handlers\Events
*/
class UserEventHandler
{
/**
* This method will bestow upon a user the "owner" role if he is the first user in the system.
*
* @param RegisteredUser $event
*
* @return bool
*/
public function attachUserRole(RegisteredUser $event): bool
{
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
// first user ever?
if ($repository->count() === 1) {
$repository->attachRole($event->user, 'owner');
}
return true;
}
/**
* Handle user logout events.
*
* @return bool
*/
public function logoutUser(): bool
{
// dump stuff from the session:
Session::forget('twofactor-authenticated');
Session::forget('twofactor-authenticated-date');
return true;
}
/**
* This method will send a newly registered user a confirmation message, urging him or her to activate their account.
*
* @param RegisteredUser $event
*
* @return bool
*/
public function sendConfirmationMessage(RegisteredUser $event): bool
{
$user = $event->user;
$ipAddress = $event->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 true;
}
$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 true;
}
/**
* If the user has somehow lost his or her confirmation message, this event will send it to the user again.
*
* At the moment, this method is exactly the same as the ::sendConfirmationMessage method, but that will change.
*
* @param ResentConfirmation $event
*
* @return bool
*/
function sendConfirmationMessageAgain(ResentConfirmation $event): bool
{
$user = $event->user;
$ipAddress = $event->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 true;
}
$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 true;
}
/**
* This method will send the user a registration mail, welcoming him or her to Firefly III.
* This message is only sent when the configuration of Firefly III says so.
*
* @param RegisteredUser $event
*
* @return bool
*/
public function sendRegistrationMail(RegisteredUser $event)
{
$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;
}
/**
* When the user is confirmed, this method stores the IP address of the user
* as a preference. Since this preference cannot be edited, it is effectively hidden
* from the user yet stored conveniently.
*
* @param ConfirmedUser $event
*
* @return bool
*/
public function storeConfirmationIpAddress(ConfirmedUser $event): bool
{
Preferences::setForUser($event->user, 'confirmation_ip_address', $event->ipAddress);
return true;
}
/**
* This message stores the users IP address on registration, in much the same
* fashion as the previous method.
*
* @param RegisteredUser $event
*
* @return bool
*/
public function storeRegistrationIpAddress(RegisteredUser $event): bool
{
Preferences::setForUser($event->user, 'registration_ip_address', $event->ipAddress);
return true;
}
}

View File

@@ -1,15 +1,26 @@
<?php
/**
* AttachmentHelper.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Attachments;
use Auth;
use Config;
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
@@ -19,24 +30,28 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class AttachmentHelper implements AttachmentHelperInterface
{
/** @var int */
protected $maxUploadSize;
/** @var array */
protected $allowedMimes;
/** @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::get('firefly.maxUploadSize');
$this->allowedMimes = Config::get('firefly.allowedMimes');
$this->maxUploadSize = config('firefly.maxUploadSize');
$this->allowedMimes = config('firefly.allowedMimes');
$this->errors = new MessageBag;
$this->messages = new MessageBag;
$this->uploadDisk = Storage::disk('upload');
}
/**
@@ -44,30 +59,44 @@ class AttachmentHelper implements AttachmentHelperInterface
*
* @return string
*/
public function getAttachmentLocation(Attachment $attachment)
public function getAttachmentLocation(Attachment $attachment): string
{
$path = storage_path('upload') . DIRECTORY_SEPARATOR . 'at-' . $attachment->id . '.data';
$path = sprintf('%s%sat-%d.data', storage_path('upload'), DIRECTORY_SEPARATOR, intval($attachment->id));
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)
public function saveAttachmentsForModel(Model $model): bool
{
$files = Input::file('attachments');
$files = $this->getFiles();
if (!is_null($files) && !is_array($files)) {
$this->processFile($files, $model);
}
if (is_array($files)) {
foreach ($files as $entry) {
if (!is_null($entry)) {
$this->processFile($entry, $model);
}
}
} else {
$this->processFile($files, $model);
$this->processFiles($files, $model);
}
return true;
@@ -79,15 +108,15 @@ class AttachmentHelper implements AttachmentHelperInterface
*
* @return bool
*/
protected function hasFile(UploadedFile $file, Model $model)
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();
$count = auth()->user()->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
if ($count > 0) {
$msg = trans('validation.file_already_attached', ['name' => $name]);
$msg = (string)trans('validation.file_already_attached', ['name' => $name]);
$this->errors->add('attachments', $msg);
return true;
@@ -96,13 +125,97 @@ class AttachmentHelper implements AttachmentHelperInterface
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)
protected function validateUpload(UploadedFile $file, Model $model): bool
{
if (!$this->validMime($file)) {
return false;
@@ -118,105 +231,40 @@ class AttachmentHelper implements AttachmentHelperInterface
}
/**
* @param UploadedFile $file
* @param Model $model
*
* @return bool|Attachment
* @return array|null|UploadedFile
*/
protected function processFile(UploadedFile $file, Model $model)
private function getFiles()
{
$validation = $this->validateUpload($file, $model);
if ($validation === false) {
return false;
$files = null;
try {
if (Input::hasFile('attachments')) {
$files = Input::file('attachments');
}
} catch (TypeError $e) {
// Log it, do nothing else.
Log::error($e->getMessage());
}
$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();
$path = $file->getRealPath(); // encrypt and move file to storage.
$content = file_get_contents($path);
$encrypted = Crypt::encrypt($content);
// store it:
$upload = $this->getAttachmentLocation($attachment);
if (is_writable(dirname($upload))) {
file_put_contents($upload, $encrypted);
}
$attachment->uploaded = 1; // update attachment
$attachment->save();
$name = e($file->getClientOriginalName()); // add message:
$msg = trans('validation.file_attached', ['name' => $name]);
$this->messages->add('attachments', $msg);
// return it.
return $attachment;
return $files;
}
/**
* @param UploadedFile $file
* @param array $files
*
* @param Model $model
*
* @return bool
*/
protected function validMime(UploadedFile $file)
private function processFiles(array $files, Model $model): bool
{
$mime = e($file->getMimeType());
$name = e($file->getClientOriginalName());
if (!in_array($mime, $this->allowedMimes)) {
$msg = trans('validation.file_invalid_mime', ['name' => $name, 'mime' => $mime]);
$this->errors->add('attachments', $msg);
return false;
foreach ($files as $entry) {
if (!is_null($entry)) {
$this->processFile($entry, $model);
}
}
return true;
}
/**
* @param UploadedFile $file
*
* @return bool
*/
protected function validSize(UploadedFile $file)
{
$size = $file->getSize();
$name = e($file->getClientOriginalName());
if ($size > $this->maxUploadSize) {
$msg = trans('validation.file_too_large', ['name' => $name]);
$this->errors->add('attachments', $msg);
return false;
}
return true;
}
/**
* @return MessageBag
*/
public function getErrors()
{
return $this->errors;
}
/**
* @return MessageBag
*/
public function getMessages()
{
return $this->messages;
}
}

View File

@@ -1,5 +1,15 @@
<?php
/**
* AttachmentHelperInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Attachments;
use FireflyIII\Models\Attachment;
@@ -14,28 +24,28 @@ use Illuminate\Support\MessageBag;
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);
/**
* @return MessageBag
*/
public function getErrors();
/**
* @return MessageBag
*/
public function getMessages();
/**
* @param Attachment $attachment
*
* @return mixed
*/
public function getAttachmentLocation(Attachment $attachment);
public function saveAttachmentsForModel(Model $model): bool;
}

View File

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

View File

@@ -1,11 +1,20 @@
<?php
/**
* Balance.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
* @codeCoverageIgnore
*
* Class Balance
*
@@ -39,26 +48,34 @@ class Balance
/**
* @return BalanceHeader
*/
public function getBalanceHeader()
public function getBalanceHeader(): BalanceHeader
{
return $this->balanceHeader;
return $this->balanceHeader ?? new BalanceHeader;
}
/**
* @param BalanceHeader $balanceHeader
*/
public function setBalanceHeader($balanceHeader)
public function setBalanceHeader(BalanceHeader $balanceHeader)
{
$this->balanceHeader = $balanceHeader;
}
/**
* @return \Illuminate\Support\Collection
* @return Collection
*/
public function getBalanceLines()
public function getBalanceLines(): Collection
{
return $this->balanceLines;
}
/**
* @param Collection $balanceLines
*/
public function setBalanceLines(Collection $balanceLines)
{
$this->balanceLines = $balanceLines;
}
}

View File

@@ -1,11 +1,20 @@
<?php
/**
* BalanceEntry.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Account as AccountModel;
/**
* @codeCoverageIgnore
*
* Class BalanceEntry
*
@@ -17,15 +26,15 @@ class BalanceEntry
/** @var AccountModel */
protected $account;
/** @var float */
protected $left = 0.0;
/** @var float */
protected $spent = 0.0;
/** @var string */
protected $left = '0';
/** @var string */
protected $spent = '0';
/**
* @return AccountModel
*/
public function getAccount()
public function getAccount(): AccountModel
{
return $this->account;
}
@@ -33,39 +42,39 @@ class BalanceEntry
/**
* @param AccountModel $account
*/
public function setAccount($account)
public function setAccount(AccountModel $account)
{
$this->account = $account;
}
/**
* @return float
* @return string
*/
public function getLeft()
public function getLeft(): string
{
return $this->left;
}
/**
* @param float $left
* @param string $left
*/
public function setLeft($left)
public function setLeft(string $left)
{
$this->left = $left;
}
/**
* @return float
* @return string
*/
public function getSpent()
public function getSpent(): string
{
return $this->spent;
}
/**
* @param float $spent
* @param string $spent
*/
public function setSpent($spent)
public function setSpent(string $spent)
{
$this->spent = $spent;
}

View File

@@ -1,12 +1,21 @@
<?php
/**
* BalanceHeader.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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;
/**
* @codeCoverageIgnore
*
* Class BalanceHeader
*
@@ -37,7 +46,7 @@ class BalanceHeader
/**
* @return Collection
*/
public function getAccounts()
public function getAccounts(): Collection
{
return $this->accounts;
}

View File

@@ -1,13 +1,22 @@
<?php
/**
* BalanceLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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 FireflyIII\Models\LimitRepetition;
use Illuminate\Support\Collection;
/**
* @codeCoverageIgnore
*
* Class BalanceLine
*
@@ -25,11 +34,12 @@ class BalanceLine
/** @var BudgetModel */
protected $budget;
/** @var LimitRepetition */
protected $repetition;
/** @var Carbon */
protected $endDate;
/** @var int */
protected $role = self::ROLE_DEFAULTROLE;
/** @var Carbon */
protected $startDate;
/**
*
@@ -37,6 +47,7 @@ class BalanceLine
public function __construct()
{
$this->balanceEntries = new Collection;
}
/**
@@ -47,16 +58,96 @@ class BalanceLine
$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 Carbon
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* @param Carbon $endDate
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
}
/**
* @return int
*/
public function getRole(): int
{
return $this->role;
}
/**
* @param int $role
*/
public function setRole(int $role)
{
$this->role = $role;
}
/**
* @return Carbon
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* @param Carbon $startDate
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;
}
/**
* @return string
*/
public function getTitle()
public function getTitle(): string
{
if ($this->getBudget() instanceof BudgetModel) {
if ($this->getBudget() instanceof BudgetModel && !is_null($this->getBudget()->id)) {
return $this->getBudget()->name;
}
if ($this->getRole() == self::ROLE_DEFAULTROLE) {
return trans('firefly.noBudget');
return trans('firefly.no_budget');
}
if ($this->getRole() == self::ROLE_TAGROLE) {
return trans('firefly.coveredWithTags');
@@ -68,106 +159,22 @@ class BalanceLine
return '';
}
/**
* @return BudgetModel
*/
public function getBudget()
{
return $this->budget;
}
/**
* @param BudgetModel $budget
*/
public function setBudget($budget)
{
$this->budget = $budget;
}
/**
* @return int
*/
public function getRole()
{
return $this->role;
}
/**
* @param int $role
*/
public function setRole($role)
{
$this->role = $role;
}
/**
* 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 float
* @return string
*/
public function leftOfRepetition()
public function leftOfRepetition(): string
{
$start = $this->getRepetition() ? $this->getRepetition()->amount : 0;
$start = $this->budget->amount ?? '0';
/** @var BalanceEntry $balanceEntry */
foreach ($this->getBalanceEntries() as $balanceEntry) {
$start += $balanceEntry->getSpent();
$start = bcadd($balanceEntry->getSpent(), $start);
}
return $start;
}
/**
* @return LimitRepetition
*/
public function getRepetition()
{
return $this->repetition;
}
/**
* @param LimitRepetition $repetition
*/
public function setRepetition($repetition)
{
$this->repetition = $repetition;
}
/**
* @return Collection
*/
public function getBalanceEntries()
{
return $this->balanceEntries;
}
/**
* @param Collection $balanceEntries
*/
public function setBalanceEntries($balanceEntries)
{
$this->balanceEntries = $balanceEntries;
}
/**
* If the BalanceEntries for a BalanceLine have a "left" value, the amount
* of money left in the entire BalanceLine is returned here:
*
* @return float
*/
public function sumOfLeft()
{
$sum = '0';
bcscale(2);
/** @var BalanceEntry $balanceEntry */
foreach ($this->getBalanceEntries() as $balanceEntry) {
$sum = bcadd($sum, $balanceEntry->getLeft());
}
return $sum;
}
}

View File

@@ -1,12 +1,21 @@
<?php
/**
* Bill.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
* @codeCoverageIgnore
* Class Bill
*
* @package FireflyIII\Helpers\Collection
@@ -38,7 +47,7 @@ class Bill
/**
* @return Collection
*/
public function getBills()
public function getBills(): Collection
{
$set = $this->bills->sortBy(
function (BillLine $bill) {

View File

@@ -1,11 +1,20 @@
<?php
/**
* BillLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Bill as BillModel;
/**
* @codeCoverageIgnore
*
* Class BillLine
*
@@ -27,18 +36,21 @@ class BillLine
/** @var string */
protected $min;
/** @var int */
private $transactionJournalId;
/**
* @return string
*/
public function getAmount()
public function getAmount(): string
{
return $this->amount;
return $this->amount ?? '0';
}
/**
* @param string $amount
*/
public function setAmount($amount)
public function setAmount(string $amount)
{
$this->amount = $amount;
}
@@ -46,7 +58,7 @@ class BillLine
/**
* @return BillModel
*/
public function getBill()
public function getBill(): BillModel
{
return $this->bill;
}
@@ -54,7 +66,7 @@ class BillLine
/**
* @param BillModel $bill
*/
public function setBill($bill)
public function setBill(BillModel $bill)
{
$this->bill = $bill;
}
@@ -62,7 +74,7 @@ class BillLine
/**
* @return string
*/
public function getMax()
public function getMax(): string
{
return $this->max;
}
@@ -70,7 +82,7 @@ class BillLine
/**
* @param string $max
*/
public function setMax($max)
public function setMax(string $max)
{
$this->max = $max;
}
@@ -78,7 +90,7 @@ class BillLine
/**
* @return string
*/
public function getMin()
public function getMin(): string
{
return $this->min;
}
@@ -86,42 +98,57 @@ class BillLine
/**
* @param string $min
*/
public function setMin($min)
public function setMin(string $min)
{
$this->min = $min;
}
/**
* @return boolean
* @return int
*/
public function isActive()
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 boolean $active
* @param bool $active
*/
public function setActive($active)
public function setActive(bool $active)
{
$this->active = $active;
}
/**
* @return boolean
* @return bool
*/
public function isHit()
public function isHit(): bool
{
return $this->hit;
}
/**
* @param boolean $hit
* @param bool $hit
*/
public function setHit($hit)
public function setHit(bool $hit)
{
$this->hit = $hit;
}
}

View File

@@ -1,11 +1,20 @@
<?php
/**
* Budget.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use Illuminate\Support\Collection;
/**
* @codeCoverageIgnore
*
* Class Budget
*
@@ -34,56 +43,72 @@ class Budget
/**
* @param BudgetLine $budgetLine
*
* @return Budget
*/
public function addBudgetLine(BudgetLine $budgetLine)
public function addBudgetLine(BudgetLine $budgetLine): Budget
{
$this->budgetLines->push($budgetLine);
return $this;
}
/**
* @param float $add
* @param string $add
*
* @return Budget
*/
public function addBudgeted($add)
public function addBudgeted(string $add): Budget
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->budgeted = bcadd($this->budgeted, $add);
return $this;
}
/**
* @param float $add
* @param string $add
*
* @return Budget
*/
public function addLeft($add)
public function addLeft(string $add): Budget
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->left = bcadd($this->left, $add);
return $this;
}
/**
* @param float $add
* @param string $add
*
* @return Budget
*/
public function addOverspent($add)
public function addOverspent(string $add): Budget
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->overspent = bcadd($this->overspent, $add);
return $this;
}
/**
* @param float $add
* @param string $add
*
* @return Budget
*/
public function addSpent($add)
public function addSpent(string $add): Budget
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->spent = bcadd($this->spent, $add);
return $this;
}
/**
* @return \Illuminate\Support\Collection
*/
public function getBudgetLines()
public function getBudgetLines(): Collection
{
return $this->budgetLines;
}
@@ -91,65 +116,81 @@ class Budget
/**
* @return string
*/
public function getBudgeted()
public function getBudgeted(): string
{
return $this->budgeted;
}
/**
* @param string $budgeted
*
* @return Budget
*/
public function setBudgeted($budgeted)
public function setBudgeted(string $budgeted): Budget
{
$this->budgeted = $budgeted;
return $this;
}
/**
* @return string
*/
public function getLeft()
public function getLeft(): string
{
return $this->left;
}
/**
* @param string $left
*
* @return Budget
*/
public function setLeft($left)
public function setLeft(string $left): Budget
{
$this->left = $left;
return $this;
}
/**
* @return string
*/
public function getOverspent()
public function getOverspent(): string
{
return $this->overspent;
}
/**
* @param string $overspent
*
* @return Budget
*/
public function setOverspent($overspent)
public function setOverspent(string $overspent): Budget
{
$this->overspent = strval(round($overspent, 2));
return $this;
}
/**
* @return string
*/
public function getSpent()
public function getSpent(): string
{
return $this->spent;
}
/**
* @param string $spent
*
* @return Budget
*/
public function setSpent($spent)
public function setSpent(string $spent): Budget
{
$this->spent = strval(round($spent, 2));
return $this;
}

View File

@@ -1,12 +1,21 @@
<?php
/**
* BudgetLine.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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;
/**
* @codeCoverageIgnore
*
* Class BudgetLine
*
@@ -17,111 +26,135 @@ class BudgetLine
/** @var BudgetModel */
protected $budget;
/** @var float */
protected $budgeted = 0;
/** @var float */
protected $left = 0;
/** @var float */
protected $overspent = 0;
/** @var string */
protected $budgeted = '0';
/** @var string */
protected $left = '0';
/** @var string */
protected $overspent = '0';
/** @var LimitRepetition */
protected $repetition;
/** @var float */
protected $spent = 0;
/** @var string */
protected $spent = '0';
/**
* @return BudgetModel
*/
public function getBudget()
public function getBudget(): BudgetModel
{
return $this->budget;
return $this->budget ?? new BudgetModel;
}
/**
* @param BudgetModel $budget
*
* @return BudgetLine
*/
public function setBudget($budget)
public function setBudget(BudgetModel $budget): BudgetLine
{
$this->budget = $budget;
return $this;
}
/**
* @return float
* @return string
*/
public function getBudgeted()
public function getBudgeted(): string
{
return $this->budgeted;
}
/**
* @param float $budgeted
* @param string $budgeted
*
* @return BudgetLine
*/
public function setBudgeted($budgeted)
public function setBudgeted(string $budgeted): BudgetLine
{
$this->budgeted = $budgeted;
return $this;
}
/**
* @return float
* @return string
*/
public function getLeft()
public function getLeft(): string
{
return $this->left;
}
/**
* @param float $left
* @param string $left
*
* @return BudgetLine
*/
public function setLeft($left)
public function setLeft(string $left): BudgetLine
{
$this->left = $left;
return $this;
}
/**
* @return float
* @return string
*/
public function getOverspent()
public function getOverspent(): string
{
return $this->overspent;
}
/**
* @param float $overspent
* @param string $overspent
*
* @return BudgetLine
*/
public function setOverspent($overspent)
public function setOverspent(string $overspent): BudgetLine
{
$this->overspent = $overspent;
return $this;
}
/**
* @return LimitRepetition
*/
public function getRepetition()
public function getRepetition(): LimitRepetition
{
return $this->repetition;
return $this->repetition ?? new LimitRepetition;
}
/**
* @param LimitRepetition $repetition
*
* @return BudgetLine
*/
public function setRepetition($repetition)
public function setRepetition(LimitRepetition $repetition): BudgetLine
{
$this->repetition = $repetition;
return $this;
}
/**
* @return float
* @return string
*/
public function getSpent()
public function getSpent(): string
{
return $this->spent;
}
/**
* @param float $spent
* @param string $spent
*
* @return BudgetLine
*/
public function setSpent($spent)
public function setSpent(string $spent): BudgetLine
{
$this->spent = $spent;
return $this;
}

View File

@@ -1,5 +1,15 @@
<?php
/**
* Category.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Category as CategoryModel;
@@ -7,7 +17,6 @@ use Illuminate\Support\Collection;
/**
* @codeCoverageIgnore
*
* Class Category
*
@@ -37,25 +46,25 @@ class Category
// spent is minus zero for an expense report:
if ($category->spent < 0) {
$this->categories->push($category);
$this->addTotal($category->spent);
}
}
/**
* @param float $add
* @param string $add
*/
public function addTotal($add)
public function addTotal(string $add)
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
/**
* @return Collection
*/
public function getCategories()
public function getCategories(): Collection
{
$set = $this->categories->sortByDesc(
$set = $this->categories->sortBy(
function (CategoryModel $category) {
return $category->spent;
}
@@ -68,7 +77,7 @@ class Category
/**
* @return string
*/
public function getTotal()
public function getTotal(): string
{
return strval(round($this->total, 2));
}

View File

@@ -1,13 +1,21 @@
<?php
/**
* Expense.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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;
/**
* @codeCoverageIgnore
*
* Class Expense
*
@@ -29,44 +37,36 @@ class Expense
}
/**
* @param TransactionJournal $entry
* @param stdClass $entry
*/
public function addOrCreateExpense(TransactionJournal $entry)
public function addOrCreateExpense(stdClass $entry)
{
$accountId = $entry->account_id;
if (!$this->expenses->has($accountId)) {
$newObject = new stdClass;
$newObject->amount = strval(round($entry->amount, 2));
$newObject->name = $entry->name;
$newObject->count = 1;
$newObject->id = $accountId;
$this->expenses->put($accountId, $newObject);
} else {
bcscale(2);
$existing = $this->expenses->get($accountId);
$existing->amount = bcadd($existing->amount, $entry->amount);
$existing->count++;
$this->expenses->put($accountId, $existing);
}
$this->expenses->put($entry->id, $entry);
}
/**
* @param $add
* @param string $add
*/
public function addToTotal($add)
public function addToTotal(string $add)
{
$add = strval(round($add, 2));
bcscale(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()
public function getExpenses(): Collection
{
$set = $this->expenses->sortByDesc(
$set = $this->expenses->sortBy(
function (stdClass $object) {
return $object->amount;
}
@@ -78,7 +78,7 @@ class Expense
/**
* @return string
*/
public function getTotal()
public function getTotal(): string
{
return strval(round($this->total, 2));
}

View File

@@ -1,13 +1,21 @@
<?php
/**
* Income.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International 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;
/**
* @codeCoverageIgnore
*
* Class Income
*
@@ -19,7 +27,7 @@ class Income
/** @var Collection */
protected $incomes;
/** @var string */
protected $total;
protected $total = '0';
/**
*
@@ -30,42 +38,27 @@ class Income
}
/**
* @param TransactionJournal $entry
* @param stdClass $entry
*/
public function addOrCreateIncome(TransactionJournal $entry)
public function addOrCreateIncome(stdClass $entry)
{
$this->incomes->put($entry->id, $entry);
$accountId = $entry->account_id;
if (!$this->incomes->has($accountId)) {
$newObject = new stdClass;
$newObject->amount = strval(round($entry->amount, 2));
$newObject->name = $entry->name;
$newObject->count = 1;
$newObject->id = $accountId;
$this->incomes->put($accountId, $newObject);
} else {
bcscale(2);
$existing = $this->incomes->get($accountId);
$existing->amount = bcadd($existing->amount, $entry->amount);
$existing->count++;
$this->incomes->put($accountId, $existing);
}
}
/**
* @param $add
* @param string $add
*/
public function addToTotal($add)
public function addToTotal(string $add)
{
$add = strval(round($add, 2));
bcscale(2);
$add = strval(round($add, 2));
$this->total = bcadd($this->total, $add);
}
/**
* @return Collection
*/
public function getIncomes()
public function getIncomes(): Collection
{
$set = $this->incomes->sortByDesc(
function (stdClass $object) {
@@ -79,7 +72,7 @@ class Income
/**
* @return string
*/
public function getTotal()
public function getTotal(): string
{
return strval(round($this->total, 2));
}

View File

@@ -1,38 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Account;
use Log;
/**
* Class AccountId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class AccountId extends BasicConverter implements ConverterInterface
{
/**
* @return Account
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
/** @var Account $account */
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
} else {
/** @var Account $account */
$account = Auth::user()->accounts()->find($this->value);
if (!is_null($account)) {
Log::debug('Found ' . $account->accountType->type . ' named "******" with ID: ' . $this->value . ' (not mapped) ');
}
}
return $account;
}
}

View File

@@ -1,26 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use FireflyIII\Models\Account;
/**
* Class Amount
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class Amount extends BasicConverter implements ConverterInterface
{
/**
* @return Account|null
*/
public function convert()
{
if (is_numeric($this->value)) {
return $this->value;
}
return 0;
}
}

View File

@@ -1,68 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
/**
* Class AssetAccountIban
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class AssetAccountIban extends BasicConverter implements ConverterInterface
{
/**
* @return Account|null
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
return $account;
}
if (strlen($this->value) > 0) {
// find or create new account:
$account = $this->findAccount();
$accountType = AccountType::where('type', 'Asset account')->first();
if (is_null($account)) {
// create it if doesn't exist.
$account = Account::firstOrCreateEncrypted(
[
'name' => $this->value,
'iban' => $this->value,
'user_id' => Auth::user()->id,
'account_type_id' => $accountType->id,
'active' => 1,
]
);
}
return $account;
}
return null;
}
/**
* @return Account|null
*/
protected function findAccount()
{
$set = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
/** @var Account $entry */
foreach ($set as $entry) {
if ($entry->iban == $this->value) {
return $entry;
}
}
return null;
}
}

View File

@@ -1,51 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
/**
* Class AssetAccountName
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class AssetAccountName extends BasicConverter implements ConverterInterface
{
/**
* @return Account|null
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
return $account;
}
// find or create new account:
$accountType = AccountType::where('type', 'Asset account')->first();
$set = Auth::user()->accounts()->accountTypeIn(['Asset account', 'Default account'])->get();
/** @var Account $entry */
foreach ($set as $entry) {
if ($entry->name == $this->value) {
return $entry;
}
}
// create it if doesnt exist.
$account = Account::firstOrCreateEncrypted(
[
'name' => $this->value,
'iban' => '',
'user_id' => Auth::user()->id,
'account_type_id' => $accountType->id,
'active' => 1,
]
);
return $account;
}
}

View File

@@ -1,122 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
/**
* Class BasicConverter
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class BasicConverter
{
/** @var array */
protected $data;
/** @var string */
protected $field;
/** @var int */
protected $index;
/** @var array */
protected $mapped;
/** @var string */
protected $role;
/** @var string */
protected $value;
/**
* @return array
*/
public function getData()
{
return $this->data;
}
/**
* @param array $data
*/
public function setData(array $data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getField()
{
return $this->field;
}
/**
* @param string $field
*/
public function setField($field)
{
$this->field = $field;
}
/**
* @return int
*/
public function getIndex()
{
return $this->index;
}
/**
* @param int $index
*/
public function setIndex($index)
{
$this->index = $index;
}
/**
* @return array
*/
public function getMapped()
{
return $this->mapped;
}
/**
* @param array $mapped
*/
public function setMapped($mapped)
{
$this->mapped = $mapped;
}
/**
* @return string
*/
public function getRole()
{
return $this->role;
}
/**
* @param string $role
*/
public function setRole($role)
{
$this->role = $role;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* @param string $value
*/
public function setValue($value)
{
$this->value = $value;
}
}

View File

@@ -1,30 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Bill;
/**
* Class BillId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class BillId extends BasicConverter implements ConverterInterface
{
/**
* @return Bill
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$bill = Auth::user()->bills()->find($this->mapped[$this->index][$this->value]);
} else {
$bill = Auth::user()->bills()->find($this->value);
}
return $bill;
}
}

View File

@@ -1,38 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Bill;
/**
* Class BillName
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class BillName extends BasicConverter implements ConverterInterface
{
/**
* @return Bill
*/
public function convert()
{
$bill = null;
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$bill = Auth::user()->bills()->find($this->mapped[$this->index][$this->value]);
} else {
$bills = Auth::user()->bills()->get();
/** @var Bill $bill */
foreach ($bills as $bill) {
if ($bill->name == $this->value) {
return $bill;
}
}
}
return $bill;
}
}

View File

@@ -1,29 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Budget;
/**
* Class AccountId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class BudgetId extends BasicConverter implements ConverterInterface
{
/**
* @return Budget
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]);
} else {
$budget = Auth::user()->budgets()->find($this->value);
}
return $budget;
}
}

View File

@@ -1,35 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Budget;
/**
* Class BudgetName
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class BudgetName extends BasicConverter implements ConverterInterface
{
/**
* @return Budget
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$budget = Auth::user()->budgets()->find($this->mapped[$this->index][$this->value]);
} else {
$budget = Budget::firstOrCreateEncrypted(
[
'name' => $this->value,
'user_id' => Auth::user()->id,
'active' => true,
]
);
}
return $budget;
}
}

View File

@@ -1,29 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Category;
/**
* Class CategoryId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class CategoryId extends BasicConverter implements ConverterInterface
{
/**
* @return Category
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]);
} else {
$category = Auth::user()->categories()->find($this->value);
}
return $category;
}
}

View File

@@ -1,34 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use Auth;
use FireflyIII\Models\Category;
/**
* Class CategoryName
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class CategoryName extends BasicConverter implements ConverterInterface
{
/**
* @return Category
*/
public function convert()
{
// is mapped? Then it's easy!
if (isset($this->mapped[$this->index][$this->value])) {
$category = Auth::user()->categories()->find($this->mapped[$this->index][$this->value]);
} else {
$category = Category::firstOrCreateEncrypted(
[
'name' => $this->value,
'user_id' => Auth::user()->id
]
);
}
return $category;
}
}

View File

@@ -1,49 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
/**
* Interface ConverterInterface
*
* @package FireflyIII\Helpers\Csv\Converter
*/
interface ConverterInterface
{
/**
* @return mixed
*/
public function convert();
/**
* @param array $data
*/
public function setData(array $data);
/**
* @param string $field
*
*/
public function setField($field);
/**
* @param int $index
*/
public function setIndex($index);
/**
* @param array $mapped
*/
public function setMapped($mapped);
/**
* @param string $role
*/
public function setRole($role);
/**
* @param string $value
*/
public function setValue($value);
}

View File

@@ -1,28 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use FireflyIII\Models\TransactionCurrency;
/**
* Class CurrencyCode
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class CurrencyCode extends BasicConverter implements ConverterInterface
{
/**
* @return mixed|static
*/
public function convert()
{
if (isset($this->mapped[$this->index][$this->value])) {
$currency = TransactionCurrency::find($this->mapped[$this->index][$this->value]);
} else {
$currency = TransactionCurrency::whereCode($this->value)->first();
}
return $currency;
}
}

View File

@@ -1,28 +0,0 @@
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use FireflyIII\Models\TransactionCurrency;
/**
* Class CurrencyId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class CurrencyId extends BasicConverter implements ConverterInterface
{
/**
* @return mixed|static
*/
public function convert()
{
if (isset($this->mapped[$this->index][$this->value])) {
$currency = TransactionCurrency::find($this->mapped[$this->index][$this->value]);
} else {
$currency = TransactionCurrency::find($this->value);
}
return $currency;
}
}

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