mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-08-16 19:04:36 +00:00
Compare commits
2824 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b7429a358f | ||
|
cf8b4e2f76 | ||
|
059764cd23 | ||
|
c205eee6fd | ||
|
7b22099608 | ||
|
b56b42d6fb | ||
|
ef6ef57e67 | ||
|
47d3cf1d45 | ||
|
9cfac9a884 | ||
|
dc172476e1 | ||
|
6fc7763380 | ||
|
ce45f21dba | ||
|
2de713c946 | ||
|
3d1dfe20b3 | ||
|
0404735ccb | ||
|
83f200f5a2 | ||
|
a29eb9b993 | ||
|
c939be97fb | ||
|
f31e62a532 | ||
|
34c195159e | ||
|
322fef2db1 | ||
|
7aa2565e89 | ||
|
8f3572f2d3 | ||
|
fb165ef28b | ||
|
a26acf4a25 | ||
|
645400e17f | ||
|
ccad52b80f | ||
|
f6303deaa4 | ||
|
d3a3083b85 | ||
|
99452056ec | ||
|
fca21bab4d | ||
|
9c58b77f01 | ||
|
b5c5f67fcc | ||
|
0f17423465 | ||
|
f093e29bd1 | ||
|
fe9b8e834d | ||
|
64f273120e | ||
|
31c1dd466b | ||
|
99b369bf45 | ||
|
e2a1535c44 | ||
|
3dfa88020e | ||
|
a220094941 | ||
|
ababdacf89 | ||
|
114dd5fc2a | ||
|
c058629172 | ||
|
79d7f577e4 | ||
|
631bafc6ab | ||
|
be58da539e | ||
|
a508ac9dda | ||
|
538fd2cef0 | ||
|
42557446a1 | ||
|
b9586481fc | ||
|
a0434e3271 | ||
|
15a5bcc21a | ||
|
edb838045b | ||
|
41a2e657b1 | ||
|
18b80a69c2 | ||
|
ce80fb39e8 | ||
|
2f19ff314b | ||
|
a0fd4b505a | ||
|
919aa70251 | ||
|
1aea4045a3 | ||
|
4cded0bf57 | ||
|
cd0585c7c4 | ||
|
8281279452 | ||
|
8f1bf846fe | ||
|
c26bf557d0 | ||
|
499b92cdd1 | ||
|
3dce5e162f | ||
|
f9de65c035 | ||
|
6f95e9a3cb | ||
|
ce09da084c | ||
|
5d50f92dd3 | ||
|
d054e085d6 | ||
|
59cdfa6fe6 | ||
|
ee0e9011b2 | ||
|
654ebe0c48 | ||
|
a40859c0bb | ||
|
74e3f6dee5 | ||
|
e553bfb204 | ||
|
96caace068 | ||
|
5310ccebbe | ||
|
ccd55257cd | ||
|
583687f3a7 | ||
|
e06dc86bf7 | ||
|
8828aa0621 | ||
|
e472e105f2 | ||
|
6ad10f1772 | ||
|
fcf7d98834 | ||
|
90ad06c65c | ||
|
888e9beb4c | ||
|
69b338ca85 | ||
|
0c009445d4 | ||
|
c5fb734e42 | ||
|
d2c8475504 | ||
|
f38d99653f | ||
|
cdce43d226 | ||
|
89ab0a7e97 | ||
|
c7250bfcba | ||
|
4a9b693da8 | ||
|
fff35aa820 | ||
|
a9a542d68f | ||
|
35ff3f0cbf | ||
|
abf92b6df3 | ||
|
8517fc9f24 | ||
|
21b473108f | ||
|
d4367f73a2 | ||
|
7ff46c3cd6 | ||
|
4a88e241b5 | ||
|
8da0317b19 | ||
|
297c2e244d | ||
|
a51d752a35 | ||
|
7800b0a7f5 | ||
|
5ce4104644 | ||
|
b4f1bbf793 | ||
|
ca33bea6b7 | ||
|
42d20ff693 | ||
|
22a14416ad | ||
|
98bd9bdaa0 | ||
|
13bac92a24 | ||
|
d9eb14d6e5 | ||
|
6ec0471e8b | ||
|
8008311d9c | ||
|
fcf16051a2 | ||
|
3a236456cd | ||
|
2606d77c62 | ||
|
3d2f33c120 | ||
|
4f14969464 | ||
|
7234f011ec | ||
|
5b949d6e00 | ||
|
2fd476ada8 | ||
|
2e7703bc97 | ||
|
9b69a6addd | ||
|
500243b0b3 | ||
|
3ef84dc1fc | ||
|
b04d68d087 | ||
|
715c381eb2 | ||
|
ca32ae4561 | ||
|
6b277c5e67 | ||
|
1ac64fd0b3 | ||
|
f2c1dd41d0 | ||
|
869360f26c | ||
|
dbdc334931 | ||
|
b317d1a171 | ||
|
b00c7b0ce3 | ||
|
a61eafeac2 | ||
|
5978b1c421 | ||
|
9f16799453 | ||
|
74fe0ee4e4 | ||
|
e8880232b3 | ||
|
556e9f1df7 | ||
|
beb301e781 | ||
|
056c809754 | ||
|
fa47eac9ff | ||
|
bf4a7846dd | ||
|
b0cc6dd714 | ||
|
d6e2d8e4a2 | ||
|
bbfc962727 | ||
|
8ddb357e5a | ||
|
560c10898f | ||
|
04f5214bb7 | ||
|
4c35d52234 | ||
|
01be5e3e23 | ||
|
46dc4102e0 | ||
|
cf31049c51 | ||
|
c624c4342f | ||
|
701d7baca8 | ||
|
8e45959483 | ||
|
6858d67897 | ||
|
9b23cbd2c2 | ||
|
ec1bb300e2 | ||
|
69a8cad47b | ||
|
bcaca0eca3 | ||
|
a1f79e58db | ||
|
2cc5fdcf62 | ||
|
dd1b4e21f5 | ||
|
91eb052c22 | ||
|
ecefcfabc0 | ||
|
8e42e71528 | ||
|
a2275ae111 | ||
|
3976803d8f | ||
|
7921fc74fd | ||
|
1732acfee2 | ||
|
3a4fc65712 | ||
|
9ce9caba02 | ||
|
07f4995c8f | ||
|
8200c7248a | ||
|
bd9f1d5398 | ||
|
ce0ca23d79 | ||
|
35863c8d3a | ||
|
dad73ce9df | ||
|
f716692591 | ||
|
6387114a18 | ||
|
55ab39ca55 | ||
|
28a4f724d5 | ||
|
f2d06bcea1 | ||
|
4d1771614a | ||
|
61efabb3b5 | ||
|
b00458c2b9 | ||
|
594f9822c7 | ||
|
9b3131b95e | ||
|
d7ad32a8cc | ||
|
59127e4029 | ||
|
7edf70a77b | ||
|
3fd90a37fb | ||
|
356ec276bc | ||
|
ad8d945c1d | ||
|
a3bf30a77b | ||
|
3f829a3114 | ||
|
537b4ae003 | ||
|
08b4c9ea5c | ||
|
6b00f5a97d | ||
|
d259df9a47 | ||
|
aeaebd082f | ||
|
0c9c0f2032 | ||
|
155801ab2b | ||
|
deeeb06488 | ||
|
28fd719ce3 | ||
|
317075aa6d | ||
|
eaf2efc510 | ||
|
88555bbea2 | ||
|
a4d7bf4ebe | ||
|
50e5c21735 | ||
|
2ddacf48d4 | ||
|
cd66d2c7b0 | ||
|
2e7c26c539 | ||
|
f0f47530bf | ||
|
e7be4e3e49 | ||
|
7a7ce7fcea | ||
|
bd104a7ea8 | ||
|
31d6789ff0 | ||
|
bdcb7372a5 | ||
|
b8df2226ae | ||
|
106bae5c97 | ||
|
651297fa0b | ||
|
1b2873fc5f | ||
|
f82a2b3bc5 | ||
|
4cb616ebeb | ||
|
1bcc975d7b | ||
|
98fd5b8858 | ||
|
6f08482aaf | ||
|
f7d06b9759 | ||
|
a178fed0c6 | ||
|
ff342f6789 | ||
|
b1c2f8faa1 | ||
|
6f59e79b28 | ||
|
6c22bad77a | ||
|
1cf0125d1b | ||
|
49211482b0 | ||
|
b3aecec11d | ||
|
7cb86d0254 | ||
|
0ba9389ca2 | ||
|
1902787104 | ||
|
b3e32db073 | ||
|
01d53bdb85 | ||
|
51acc34a80 | ||
|
694447e66c | ||
|
05b7a610ef | ||
|
1e799402ee | ||
|
5f9c61c4b4 | ||
|
12b6791e8b | ||
|
8024ad123e | ||
|
2bd2f5a5aa | ||
|
37d79b2a1c | ||
|
cd057045e6 | ||
|
ddfbd69e8b | ||
|
28fa1264b7 | ||
|
a6c3189833 | ||
|
0d2fe08dc9 | ||
|
8cfe25bfac | ||
|
f9e2a677d9 | ||
|
2ef1c54417 | ||
|
f9c3c0c8ae | ||
|
44a15551ba | ||
|
732e181312 | ||
|
919187f7fd | ||
|
7840a5ea49 | ||
|
3a33ac1455 | ||
|
2eb7d8ba91 | ||
|
7ec5cce2c8 | ||
|
8fdc6c11e1 | ||
|
1a110de597 | ||
|
317aa591c3 | ||
|
0d44f82c86 | ||
|
9cac61dc33 | ||
|
52481a6e8b | ||
|
b3e18f4e56 | ||
|
aa25ac774e | ||
|
af7da586aa | ||
|
b671da900a | ||
|
d8bb83e8c4 | ||
|
bc3d64a2ff | ||
|
70e72c246d | ||
|
7c8c82edd7 | ||
|
5dc556f0af | ||
|
c8c69f1a66 | ||
|
985019e117 | ||
|
b9620b3a21 | ||
|
e7bb4a8ec6 | ||
|
bb5f935d7a | ||
|
17dad27610 | ||
|
ee960d76c7 | ||
|
dfb595193a | ||
|
0a91a40c1b | ||
|
12f4305691 | ||
|
dd865b0dfb | ||
|
7cbfa9fcd4 | ||
|
28d880a7c4 | ||
|
e83d45fce5 | ||
|
693ff3cc66 | ||
|
706b095f95 | ||
|
8e2e96d513 | ||
|
28bce44f69 | ||
|
53d88dfd50 | ||
|
42daf7ed32 | ||
|
e5402ea7c1 | ||
|
05e8d6b578 | ||
|
505f340917 | ||
|
46856c9394 | ||
|
c63a2ad39d | ||
|
68a7078614 | ||
|
2e15f1e2a3 | ||
|
a790838222 | ||
|
cd14360d62 | ||
|
74c94a60a6 | ||
|
56cbc7683e | ||
|
bf778d2fca | ||
|
6e5bca8306 | ||
|
7e8fea6ed3 | ||
|
43ff3e11ed | ||
|
f1750e3c35 | ||
|
8b1fe26c84 | ||
|
6ab09a3603 | ||
|
df45298c1f | ||
|
4a64dce737 | ||
|
27ad428b5e | ||
|
2da33bae43 | ||
|
3dab683a45 | ||
|
d08fa37ccf | ||
|
4cd7976f63 | ||
|
569e8b6180 | ||
|
9a443bd08e | ||
|
efb37ae709 | ||
|
4658ef9918 | ||
|
2b6a1c9cb1 | ||
|
c4606b1854 | ||
|
d47b946d00 | ||
|
a886e8087d | ||
|
d473455680 | ||
|
40245ef43b | ||
|
aa057d6a57 | ||
|
5c03e64f46 | ||
|
1d4d156749 | ||
|
4fc6da1fa1 | ||
|
9fac48fcea | ||
|
ff4fdd3740 | ||
|
da1cce035a | ||
|
49292bbb2d | ||
|
3e502db772 | ||
|
426351bb54 | ||
|
4d6e244100 | ||
|
71253b23d5 | ||
|
076ff7c7ba | ||
|
94b6c7975a | ||
|
0b08010221 | ||
|
bc67113d77 | ||
|
5974bdcc2a | ||
|
f9696287a4 | ||
|
807dede90a | ||
|
1f2b37b70e | ||
|
7288ba0fd7 | ||
|
f48c17cf88 | ||
|
fba9cc3739 | ||
|
e04388a230 | ||
|
fbe3be169d | ||
|
4e4ae0fca0 | ||
|
2f278c8618 | ||
|
905ae3437b | ||
|
7679721007 | ||
|
9f29a2e04f | ||
|
ff5bf0c6e5 | ||
|
0eb8c2b7ba | ||
|
deb140e3bc | ||
|
9a1710eb27 | ||
|
e478238d77 | ||
|
c9c9410908 | ||
|
42372cabd5 | ||
|
ab9c991530 | ||
|
9429d84cf8 | ||
|
b22774a599 | ||
|
ca3b0a2ab1 | ||
|
62f76d08ad | ||
|
92bff24d43 | ||
|
eddd3e508f | ||
|
649eb65bb1 | ||
|
8fb3348a7c | ||
|
6c2df1a783 | ||
|
55afc98108 | ||
|
b875eb31d2 | ||
|
060b031272 | ||
|
95c4c4a238 | ||
|
4424e48926 | ||
|
b8c7876454 | ||
|
8256f60340 | ||
|
1d0cb45e4c | ||
|
d1a184e3f2 | ||
|
aa38b31015 | ||
|
466067bd95 | ||
|
c9b56efaaa | ||
|
e56920edee | ||
|
0e0c475c83 | ||
|
241190c4da | ||
|
69d0c31ae5 | ||
|
c3993fd943 | ||
|
8a3b7d7c1a | ||
|
87f14617cc | ||
|
9f24f765ea | ||
|
48c802e5cc | ||
|
388d141d82 | ||
|
7fa93e97db | ||
|
030d241130 | ||
|
bac392d331 | ||
|
1542d5e386 | ||
|
f1b6b3386a | ||
|
7d05999ced | ||
|
d477feb930 | ||
|
9465a6d2b5 | ||
|
c3f78b698d | ||
|
a4e699f781 | ||
|
cd871e5aad | ||
|
c9b215684c | ||
|
82a4c706b0 | ||
|
082e6f5e99 | ||
|
b90c7c09b6 | ||
|
1ee72a6ce5 | ||
|
f72a8c5c06 | ||
|
ba5db2c15f | ||
|
f5b89ca783 | ||
|
4ef840e210 | ||
|
e2d0ee125f | ||
|
8e1dbc03d9 | ||
|
9c0893fa8c | ||
|
0dfb97c5f7 | ||
|
cb52af28e7 | ||
|
4b4384b1a8 | ||
|
62483e748b | ||
|
9b10984d81 | ||
|
c5e283a13e | ||
|
df918e8529 | ||
|
aa1193a9eb | ||
|
8f7f263a48 | ||
|
0bad227548 | ||
|
78bcd3e1bb | ||
|
554640c345 | ||
|
baecc256f6 | ||
|
10a2a4cf5b | ||
|
c5dc073d49 | ||
|
d48e4c66b2 | ||
|
d357142075 | ||
|
af17381e04 | ||
|
2e7d339d7e | ||
|
c6cddad13c | ||
|
54bd54b521 | ||
|
8cbbb970e1 | ||
|
fbbf7f75c3 | ||
|
5a23b95352 | ||
|
6f9675b6d6 | ||
|
bb8ce30552 | ||
|
581e2ad431 | ||
|
45deb493ba | ||
|
4531d0ee32 | ||
|
a26e8a5f83 | ||
|
be74fbd677 | ||
|
ee8c83bbd8 | ||
|
dbd32abdd1 | ||
|
f300287814 | ||
|
dd361bb9ad | ||
|
744205cb6e | ||
|
86c22c9fdd | ||
|
d7a66f6782 | ||
|
902f310eb0 | ||
|
3bb107e192 | ||
|
78f8b1454d | ||
|
70ba9a4db5 | ||
|
93d9c44585 | ||
|
f0bb462f1c | ||
|
151e8e8f17 | ||
|
23f474b003 | ||
|
15104de84c | ||
|
55e4875662 | ||
|
5c3165efa2 | ||
|
3690a53dc9 | ||
|
fb119cc208 | ||
|
7343304284 | ||
|
c1ecc62ac1 | ||
|
bd40615f8e | ||
|
0df8d096f0 | ||
|
749dd1e8e3 | ||
|
ade6558769 | ||
|
6303b172b1 | ||
|
636ae193a7 | ||
|
aff8493204 | ||
|
8f2d4494d5 | ||
|
7a2bb4eb96 | ||
|
4916c06797 | ||
|
a818ab0942 | ||
|
9aa89393c0 | ||
|
216b304fe1 | ||
|
cf8a687b4d | ||
|
d1d6ba4114 | ||
|
a5ac713310 | ||
|
6fa8c33672 | ||
|
dd2b019d3c | ||
|
3a12ad192f | ||
|
d669b75352 | ||
|
746d50d459 | ||
|
f741552d91 | ||
|
c38e4b86b4 | ||
|
b044d85e90 | ||
|
24d111f026 | ||
|
f50058e3c2 | ||
|
ce9445168c | ||
|
27b8b4b35a | ||
|
9ccb67db8a | ||
|
3d82afd4e6 | ||
|
5f9cb61160 | ||
|
7f54b70c24 | ||
|
a156dce281 | ||
|
c0b0e58720 | ||
|
170ffbae04 | ||
|
6755ec7eb0 | ||
|
c8bc9a096a | ||
|
dc7f5a562b | ||
|
3b5b51578d | ||
|
41188a1bd6 | ||
|
d9bafe34eb | ||
|
43dbba5378 | ||
|
168ed5ac56 | ||
|
e5b4a55d8e | ||
|
167c057e8a | ||
|
71bf054ab1 | ||
|
111fcd77c4 | ||
|
287c1c4ffa | ||
|
3d69dc786d | ||
|
57a3f20c13 | ||
|
eab2c57594 | ||
|
b019962f34 | ||
|
5c59c819b6 | ||
|
93b97b8d72 | ||
|
f1f922031a | ||
|
390cace775 | ||
|
28fdad9426 | ||
|
9155c13e08 | ||
|
e8776d44c5 | ||
|
5ee8d04800 | ||
|
eb31934fb7 | ||
|
000f86d318 | ||
|
d9b3ebc82f | ||
|
91b3ca047a | ||
|
08131e42af | ||
|
a013553a6c | ||
|
7b2fe8eb4a | ||
|
610f782054 | ||
|
94700f4064 | ||
|
0f12ebb31c | ||
|
00a8a9ac0e | ||
|
92616c6ae3 | ||
|
97db618cd8 | ||
|
2832d308f1 | ||
|
a7ecdf715f | ||
|
935dc3ff9f | ||
|
99d14e8cbe | ||
|
664fde2344 | ||
|
27c45eface | ||
|
f83bc3c8b3 | ||
|
0d5efb8d27 | ||
|
bf9c1c1875 | ||
|
049d866f62 | ||
|
d672f0c2ad | ||
|
7b040e8583 | ||
|
e1cf285272 | ||
|
53f7f13362 | ||
|
f710677cdc | ||
|
b5fbc8b632 | ||
|
1fdc0a196c | ||
|
559f429f5e | ||
|
ae4b198d3d | ||
|
e088ecbbad | ||
|
f6b7bd5b44 | ||
|
f5a21f64c0 | ||
|
f5cbed7c0c | ||
|
59fff8928b | ||
|
8743b49a17 | ||
|
19dc91937e | ||
|
4846cb7b14 | ||
|
54e0ac816b | ||
|
9ce960b3d7 | ||
|
cc9d1c4bfd | ||
|
d211555beb | ||
|
9350557d10 | ||
|
ea6c54cad0 | ||
|
81287602d7 | ||
|
441ba79ec7 | ||
|
c9e4a09da6 | ||
|
c84f4e2bc0 | ||
|
6938f8ab89 | ||
|
4fdd2c851f | ||
|
78b56712fc | ||
|
6dcdb0f9a0 | ||
|
cfab837b96 | ||
|
b8461cdeb6 | ||
|
e07d65ef6b | ||
|
80cbc35c89 | ||
|
2faf84780f | ||
|
ebdb1a8836 | ||
|
2dfa51652a | ||
|
1cf1ea230f | ||
|
86e127ebff | ||
|
a313265785 | ||
|
37693ad08d | ||
|
e8180d252b | ||
|
9957c95c68 | ||
|
3354d53a48 | ||
|
ddaa53b940 | ||
|
c2e04a11bf | ||
|
00d059b8df | ||
|
f3fff6f1c5 | ||
|
9360eb6a70 | ||
|
26fb03e6c8 | ||
|
eed3d021d9 | ||
|
48728e8418 | ||
|
f39f25760a | ||
|
10ea60daaf | ||
|
f2fa5e140b | ||
|
be5ff35b13 | ||
|
bd5d73d1e6 | ||
|
cc712b0c75 | ||
|
a5ac84e1b9 | ||
|
cbe1f762ca | ||
|
e6db49c20c | ||
|
4909fcc8b4 | ||
|
68cdfd00b0 | ||
|
323c16ebe1 | ||
|
c20a38b7b0 | ||
|
20993342a2 | ||
|
1b3198c143 | ||
|
173d0290ea | ||
|
ae4cd8da12 | ||
|
a494398332 | ||
|
c82bdd1f5a | ||
|
e6ac3ccfad | ||
|
b13b58a2b2 | ||
|
2b6790f83f | ||
|
fe30850568 | ||
|
493c71b89e | ||
|
deaebc373c | ||
|
e834489206 | ||
|
1b316e462e | ||
|
7bf75128a8 | ||
|
3857e8d49f | ||
|
b16149b842 | ||
|
32ed8a4d8d | ||
|
f949d2476b | ||
|
0620830b10 | ||
|
7ee25693aa | ||
|
7cb86add64 | ||
|
fbc9720f7a | ||
|
ffdd37ddd5 | ||
|
51062bc80b | ||
|
31533b5ef8 | ||
|
3649b595df | ||
|
83b7c9aa32 | ||
|
4e3c59a2da | ||
|
dcbfe90cf7 | ||
|
f69be86c74 | ||
|
820722f44e | ||
|
2ff806dedc | ||
|
a755badd5f | ||
|
4df1e5393b | ||
|
8c55bd179f | ||
|
ccfc5ece66 | ||
|
6c12f1bc86 | ||
|
88839e9610 | ||
|
4f6a733238 | ||
|
dc9083a764 | ||
|
6f231b840b | ||
|
61a703e605 | ||
|
8e0e9734a5 | ||
|
2afb455bac | ||
|
01792f91e2 | ||
|
651dff0750 | ||
|
9cbfbd41dc | ||
|
168d6f403c | ||
|
41f200e630 | ||
|
0809cfdc6d | ||
|
466d739da8 | ||
|
daf65cb387 | ||
|
2605f60983 | ||
|
fcf6cdb134 | ||
|
209258b507 | ||
|
f80bc214f9 | ||
|
f76990bb9b | ||
|
eef68c9b31 | ||
|
006c2ae186 | ||
|
8b66ff6afe | ||
|
4cc6d57e6e | ||
|
af1c6b22bb | ||
|
5958990ed5 | ||
|
cd4cbdc197 | ||
|
1f538be16e | ||
|
9703439a4c | ||
|
42203ba872 | ||
|
cd60b852a1 | ||
|
5b1d9e1a0d | ||
|
e02657a7c7 | ||
|
c352eb0c74 | ||
|
81b9d5da09 | ||
|
b9b0413510 | ||
|
97770da619 | ||
|
521623797e | ||
|
15d3414443 | ||
|
245f06c93a | ||
|
33899f0e2f | ||
|
4697fbdeef | ||
|
06174d6afb | ||
|
b2bb16c1e0 | ||
|
27aae279e6 | ||
|
e9ee93beb7 | ||
|
20941dedd3 | ||
|
5ac88623ed | ||
|
768508dd4b | ||
|
668633e764 | ||
|
3dbb1f034d | ||
|
1270e5d15c | ||
|
afec8480fb | ||
|
8720511046 | ||
|
a7a00ecf40 | ||
|
88bbafd3e8 | ||
|
ae3258b449 | ||
|
cf4d7cfeef | ||
|
46ee2a0568 | ||
|
ce250c85fc | ||
|
1087b9f5df | ||
|
0dc74d9d14 | ||
|
98b272383f | ||
|
e722daafd0 | ||
|
670ab059d1 | ||
|
09f826ceba | ||
|
df5e3c9be9 | ||
|
31c336b3b1 | ||
|
b3a419b2f3 | ||
|
11f63fa6ce | ||
|
4b35059140 | ||
|
7836feba63 | ||
|
1e54366f1f | ||
|
d039bb0e03 | ||
|
166d32f073 | ||
|
321890992e | ||
|
d644403d8a | ||
|
44e76f9518 | ||
|
f9703eca4c | ||
|
48551e8bf5 | ||
|
74b538805b | ||
|
35f493beff | ||
|
06d11c9133 | ||
|
da7eb615db | ||
|
5da5024ad3 | ||
|
c1346d4c86 | ||
|
c38a4a15ff | ||
|
bdec94ead6 | ||
|
69bebf202f | ||
|
38895afea6 | ||
|
70ed4188b6 | ||
|
d889094863 | ||
|
c96eb8753e | ||
|
5a7607f6c6 | ||
|
71bb88529a | ||
|
b26164a168 | ||
|
19444551e4 | ||
|
e0b2a6e627 | ||
|
2973765866 | ||
|
2a08a25064 | ||
|
a55e291908 | ||
|
2003d37a9a | ||
|
29145bf6cf | ||
|
caa1ff120a | ||
|
ef4e964c94 | ||
|
1f263f60a7 | ||
|
5fc7cafcbe | ||
|
397c4926eb | ||
|
a14544398b | ||
|
d439dceac1 | ||
|
af29b31ea8 | ||
|
b311ef70bc | ||
|
9f9d744406 | ||
|
e094871bc9 | ||
|
dfc95cee45 | ||
|
fdca234721 | ||
|
cf5cc626d7 | ||
|
358d9aac7d | ||
|
681bc580c4 | ||
|
4a2768f8d1 | ||
|
05f8773fa0 | ||
|
5e5fdfdd51 | ||
|
5e744390c0 | ||
|
cb5fa401cb | ||
|
2980860377 | ||
|
9ff0b282f3 | ||
|
4bc1c032bd | ||
|
9fcb00f10b | ||
|
723e461559 | ||
|
9b24e6d448 | ||
|
e622774775 | ||
|
84ce9bc94b | ||
|
a3a1bc30b1 | ||
|
b4c9a7698e | ||
|
8b2d7fc32f | ||
|
90e66cbd94 | ||
|
fd9a7080ea | ||
|
c0fad106f0 | ||
|
78c8243184 | ||
|
780abecd53 | ||
|
ea6896816d | ||
|
95a456860a | ||
|
b1b2fda155 | ||
|
5847f534c3 | ||
|
e8e8163fa7 | ||
|
6a21d82dcf | ||
|
d6b47656bc | ||
|
8c37ef3a95 | ||
|
35deed1d10 | ||
|
ba32a665f1 | ||
|
bbd19be554 | ||
|
c360cc6db6 | ||
|
7e4b9af315 | ||
|
9b03e6b124 | ||
|
013e16e15f | ||
|
180ec52798 | ||
|
c7b47b4453 | ||
|
4b00db7662 | ||
|
78a7b995d2 | ||
|
f7c50a123a | ||
|
9617d17aca | ||
|
d9884ddf73 | ||
|
8157f0a958 | ||
|
b7580a5f83 | ||
|
66703b30b3 | ||
|
53677e3c64 | ||
|
feef6a1756 | ||
|
5f299b895b | ||
|
4e1bb5fbac | ||
|
47ccc513ad | ||
|
cce1a01936 | ||
|
6f2b1a6a76 | ||
|
8526907f50 | ||
|
bc192a8e54 | ||
|
9ff6f8fc52 | ||
|
6573bd6b4b | ||
|
9dc3f614af | ||
|
3888b8cceb | ||
|
294df4a2b3 | ||
|
265dd37212 | ||
|
eb7c79ad27 | ||
|
de111c7100 | ||
|
e892c9a824 | ||
|
5eb0e18cae | ||
|
27cabb398e | ||
|
64dbb14241 | ||
|
bb4e2be9eb | ||
|
7d1de0da17 | ||
|
bf16c9a42b | ||
|
1a7b1ce499 | ||
|
efc9bc71a7 | ||
|
fc5b315af0 | ||
|
7a4a78628d | ||
|
d16fb30a62 | ||
|
2d177e660e | ||
|
2f131dc170 | ||
|
94810e371a | ||
|
59731878f6 | ||
|
54ede8aa18 | ||
|
b415b6b043 | ||
|
70c922cdc5 | ||
|
068fc32cb2 | ||
|
3dcdacc3b8 | ||
|
a6594358d8 | ||
|
f98921da46 | ||
|
25747fbcf2 | ||
|
aac5c2b13c | ||
|
cc810a5b6f | ||
|
1b3592d959 | ||
|
d75614e9a7 | ||
|
08703e282f | ||
|
2904baf44e | ||
|
f99e46bf75 | ||
|
9f87890ead | ||
|
638184cf66 | ||
|
03babfe75c | ||
|
238ed3c788 | ||
|
6a9d931ba3 | ||
|
a3d2a9e00b | ||
|
39b88e8207 | ||
|
449c6dfde5 | ||
|
7cc47ca0b1 | ||
|
95f4a83f41 | ||
|
35154dc7a3 | ||
|
0fd0d7d080 | ||
|
658265c938 | ||
|
38fe9e7e1c | ||
|
77056dcf8d | ||
|
026683a8e1 | ||
|
6ab6dd6ac3 | ||
|
83de3482ce | ||
|
919a35aed3 | ||
|
ad3defb071 | ||
|
9c929ecd1b | ||
|
f79c9f7cf1 | ||
|
8e75c345d9 | ||
|
44886d9aad | ||
|
c2d444347d | ||
|
5cb497596d | ||
|
1857469d2f | ||
|
ea71b4843d | ||
|
97727e2e3d | ||
|
f81e7da8bb | ||
|
8e827bf83b | ||
|
9e1fa284ca | ||
|
3bf800be6e | ||
|
635b9f9dba | ||
|
52a0d7cf7b | ||
|
a34516932b | ||
|
929a2a30a2 | ||
|
ffa88eeb08 | ||
|
51b45b4ed4 | ||
|
f263844793 | ||
|
18c46df9aa | ||
|
15846e157b | ||
|
bc59f2db0d | ||
|
cd2be8c1a4 | ||
|
f958115c50 | ||
|
e7d677bfb6 | ||
|
3e80ffc52b | ||
|
d0c7a5c076 | ||
|
f3f4e6b354 | ||
|
5a45b25614 | ||
|
0b5ee1edfc | ||
|
da3dc599f9 | ||
|
f013b435ab | ||
|
5f6975a113 | ||
|
c5dee29e4b | ||
|
633ee02f13 | ||
|
6b750c909a | ||
|
5f8b6640a9 | ||
|
dd42d8437c | ||
|
67a178591d | ||
|
f5e5659c1f | ||
|
8b0f0fb615 | ||
|
209116e766 | ||
|
79392ab656 | ||
|
3ca1207231 | ||
|
cec1b147f2 | ||
|
46cfcfa3e7 | ||
|
b833e8dfa2 | ||
|
77b843efd8 | ||
|
db72ad7c60 | ||
|
eadc630fcb | ||
|
170c1793cc | ||
|
9f7c6c2d0c | ||
|
72d054c55c | ||
|
524edfe7c2 | ||
|
c25c5623d2 | ||
|
4f38b77ef6 | ||
|
5862803434 | ||
|
5b3beded39 | ||
|
c61fb7a598 | ||
|
33d9148029 | ||
|
63969f5a33 | ||
|
edde18aeef | ||
|
657116d361 | ||
|
e16269daa8 | ||
|
c07591ff5c | ||
|
75a478ad54 | ||
|
8dae8b1a7f | ||
|
15fd8cf486 | ||
|
55333156ac | ||
|
8cdcba3231 | ||
|
8bab9e84e2 | ||
|
2faae83912 | ||
|
5a61a11a61 | ||
|
a6d71988f2 | ||
|
7069e242ae | ||
|
56ee830558 | ||
|
6dd12729e6 | ||
|
14a48303cb | ||
|
72cf6c9c0f | ||
|
144ee6b8ca | ||
|
8967d86da6 | ||
|
18c6edbb5d | ||
|
53de3c4717 | ||
|
ad577e4e81 | ||
|
44811a3e7c | ||
|
1ab3f05b3a | ||
|
5e76488ae7 | ||
|
32771fe7e1 | ||
|
9b40cc6881 | ||
|
2e35260bbb | ||
|
a067704277 | ||
|
de281818ac | ||
|
c49bfad38d | ||
|
c1ba591b26 | ||
|
719af38a61 | ||
|
ac61dfae6b | ||
|
813fb679a7 | ||
|
e7562781f7 | ||
|
56d36b7f53 | ||
|
53b3f7f821 | ||
|
08a53156bd | ||
|
8985cd6309 | ||
|
3833da7410 | ||
|
4210cd10db | ||
|
a7bd1c6892 | ||
|
52b0111afa | ||
|
7921d128e4 | ||
|
d7e838701a | ||
|
289bcb22aa | ||
|
3fe57b7983 | ||
|
32e92c2a16 | ||
|
1b3d208540 | ||
|
6a8bf0aa62 | ||
|
56715556ed | ||
|
838330b909 | ||
|
69553b138b | ||
|
36d7a02994 | ||
|
301528e2d2 | ||
|
0303b45707 | ||
|
ba722e8ed5 | ||
|
289e5a5442 | ||
|
fdad96e2bc | ||
|
af994e4dae | ||
|
006d68e279 | ||
|
29dc122ad3 | ||
|
cf4a8c6204 | ||
|
3c73fe92bf | ||
|
6637590797 | ||
|
b8bab11acd | ||
|
a2f600feac | ||
|
80dd62ef0a | ||
|
827b1c9cd8 | ||
|
2e4fcf803d | ||
|
d00d95fc6f | ||
|
3e3ab9bd25 | ||
|
6eecc7722d | ||
|
ada4aaf69a | ||
|
93244c1f78 | ||
|
be056cea6b | ||
|
659ca8be14 | ||
|
ea9af8366d | ||
|
80edd47d36 | ||
|
d7746b3649 | ||
|
c4c4fbc34c | ||
|
59f57c96e9 | ||
|
a2f852fecf | ||
|
ad114ed329 | ||
|
c4c3d0f07f | ||
|
6cf8102de5 | ||
|
e7e4aa2218 | ||
|
6d84f4b6c1 | ||
|
ce3e9ffd11 | ||
|
3ada260e0e | ||
|
8fdd0cb795 | ||
|
913e05a2e6 | ||
|
fa1f703ef6 | ||
|
4004c53e1b | ||
|
4838670649 | ||
|
a985e09282 | ||
|
9bd1503cb4 | ||
|
a2ccbf7844 | ||
|
61bbe8a905 | ||
|
59bc5d22d1 | ||
|
1423d5b314 | ||
|
152d0eb1d0 | ||
|
6426d1df06 | ||
|
9284eb3fe9 | ||
|
afdae8bc1e | ||
|
2a7085e593 | ||
|
2408fb3ed4 | ||
|
8316afb176 | ||
|
e59fd098a3 | ||
|
e044199693 | ||
|
8f8e29fc22 | ||
|
8de5384158 | ||
|
216c659335 | ||
|
041ca8a5d3 | ||
|
fe4f1b306d | ||
|
a0972d99fb | ||
|
e332bfef7c | ||
|
cba5e226d8 | ||
|
5aff0c4943 | ||
|
cb49c00f4d | ||
|
e26d797d57 | ||
|
938581527e | ||
|
c38ae09735 | ||
|
28c3cfe084 | ||
|
4a2823bcba | ||
|
18eba02026 | ||
|
d4690ce580 | ||
|
a785c450b1 | ||
|
7480dc4a19 | ||
|
ad01891a67 | ||
|
67fe35d564 | ||
|
7f19b6957a | ||
|
0a54caf202 | ||
|
4b4c1c7f8f | ||
|
d071f3947e | ||
|
b3d99cd210 | ||
|
90e696f82c | ||
|
958fcd1cfa | ||
|
8f57c7dcb3 | ||
|
77262f52a4 | ||
|
16bfbc8a12 | ||
|
1fd375b875 | ||
|
46131ad39d | ||
|
0b5c5b2ae9 | ||
|
55be174037 | ||
|
a17b7025f1 | ||
|
170cf7fd77 | ||
|
23cdb4d326 | ||
|
cbbe529572 | ||
|
0b382426e9 | ||
|
1cbbf9baa4 | ||
|
8d41ff7b79 | ||
|
e3b6057bf8 | ||
|
66a4042cad | ||
|
56c08d8302 | ||
|
d4e759754d | ||
|
a96e171cbf | ||
|
bd4a8c8397 | ||
|
04f71b3b43 | ||
|
d124de51db | ||
|
d87d12a0f5 | ||
|
f2b08346d0 | ||
|
d3682a6727 | ||
|
371bbd9508 | ||
|
a8a28f442f | ||
|
65ddd8a736 | ||
|
8bb27de233 | ||
|
37e2f097ba | ||
|
1966d87ce6 | ||
|
7b8c86e1e3 | ||
|
de634da513 | ||
|
96836e2d6c | ||
|
8a9d576f61 | ||
|
791d12fbb4 | ||
|
d1329be2fa | ||
|
3ed6561702 | ||
|
7a0587f433 | ||
|
0fe682bfe6 | ||
|
0f685e8789 | ||
|
420771c233 | ||
|
5e3e9271ca | ||
|
1e603c0833 | ||
|
03e1673e92 | ||
|
9f992f003d | ||
|
f50244a41f | ||
|
8b9607f9b5 | ||
|
af107ad5e8 | ||
|
8926d62165 | ||
|
45344ee347 | ||
|
baf9ebab15 | ||
|
b7dab817f2 | ||
|
fb2fa54480 | ||
|
2c966a1234 | ||
|
143ea69c0d | ||
|
8a02ead013 | ||
|
930d5ab941 | ||
|
e54a56d3a8 | ||
|
f5216c0d85 | ||
|
ebc77540b9 | ||
|
28d2583c10 | ||
|
b0988a7b00 | ||
|
2c4920db2d | ||
|
8321663815 | ||
|
ac0280d460 | ||
|
ba6f4268f0 | ||
|
0bd18f94ac | ||
|
66fb63661f | ||
|
d9b16beb0a | ||
|
6a01a9bdfd | ||
|
b81b34a706 | ||
|
3750a00b5f | ||
|
05ddcc169d | ||
|
f571a5f1bd | ||
|
48b786adea | ||
|
d691fa9b4d | ||
|
da50f9e419 | ||
|
103de5e18a | ||
|
dac6efd98b | ||
|
46aa7f81b2 | ||
|
0683c7cd67 | ||
|
50d7aa7b6a | ||
|
b781215d0a | ||
|
866bc2f3bd | ||
|
49d4705014 | ||
|
9163fcfccb | ||
|
7e10641461 | ||
|
cdc0e3cfd8 | ||
|
466e81d56a | ||
|
5953f691d1 | ||
|
e2790ca6c1 | ||
|
66dbd48b76 | ||
|
73cfbbd2ba | ||
|
38bc38bf26 | ||
|
e12d13c838 | ||
|
fcc3af6136 | ||
|
491298e1cb | ||
|
72b5895217 | ||
|
0a8f4017bd | ||
|
cb985f5897 | ||
|
968ec0853f | ||
|
0bde72d3df | ||
|
45293fbd42 | ||
|
72997065f0 | ||
|
a838dc163d | ||
|
3d15a4ca6d | ||
|
51c7d4fb1b | ||
|
fa586dba7e | ||
|
8ad40389f2 | ||
|
b3333cc2d3 | ||
|
3699a7ba9a | ||
|
204e521ba4 | ||
|
c9bab3e5c3 | ||
|
3d00e20238 | ||
|
c3958ed3c4 | ||
|
e5b88be5fa | ||
|
425552988a | ||
|
a81dd8abe5 | ||
|
bac8154a5b | ||
|
737d15fa0e | ||
|
5f2317af7f | ||
|
2bd1f783e5 | ||
|
d6c0c9f963 | ||
|
21b6ad7a41 | ||
|
a65d609fdc | ||
|
04e676b936 | ||
|
be8eaaffdf | ||
|
28c753523f | ||
|
7fbd0b2ffc | ||
|
7ffb48a87a | ||
|
d485270e1f | ||
|
5fd688b266 | ||
|
3716668e0c | ||
|
ae7fd18c34 | ||
|
4f59b1d32f | ||
|
90cb3279df | ||
|
cf0c7ef6b2 | ||
|
47c23781d9 | ||
|
e258c050f7 | ||
|
57801b2f34 | ||
|
710e9c9423 | ||
|
deefef83bd | ||
|
51e30aed66 | ||
|
8d109a3cfe | ||
|
3424e019b5 | ||
|
c6b4bceb67 | ||
|
afb4155015 | ||
|
8d99baf38a | ||
|
b91cb60328 | ||
|
c0d62237fc | ||
|
223ea80860 | ||
|
5a77bef494 | ||
|
80c0efe821 | ||
|
8044d89557 | ||
|
4f0ed97410 | ||
|
af7952f204 | ||
|
d8dcae856b | ||
|
7296796ed9 | ||
|
a2c2bb4948 | ||
|
72ebfdc20e | ||
|
16b95ea78a | ||
|
c04f08dfd8 | ||
|
a30793e818 | ||
|
e39e1eaf21 | ||
|
ab22d2cbaa | ||
|
96ddbe7227 | ||
|
4d09235aef | ||
|
136b8975e3 | ||
|
e21b1eca17 | ||
|
244b90b1d4 | ||
|
b318f3f940 | ||
|
e211c9812e | ||
|
eef28d96f4 | ||
|
c8227e09ee | ||
|
3e05fd91d9 | ||
|
450baba56a | ||
|
17a8c4918c | ||
|
0e2419d61a | ||
|
79b1a2ca6d | ||
|
2213c68155 | ||
|
2492b1fa96 | ||
|
6c6598dac5 | ||
|
a137112e66 | ||
|
8642ae8180 | ||
|
894c4dc5a7 | ||
|
d96063ea6e | ||
|
c3dc193f3e | ||
|
3c2952009e | ||
|
f4ade470df | ||
|
2e33b43389 | ||
|
92799699bc | ||
|
7ab0508167 | ||
|
3c65c28936 | ||
|
43892da07e | ||
|
7c436920a4 | ||
|
89d565e63b | ||
|
150b6fe5b6 | ||
|
0e77574c26 | ||
|
df23863443 | ||
|
581bf11b21 | ||
|
d602d4b429 | ||
|
d1d4a52934 | ||
|
375d113769 | ||
|
9b83974bff | ||
|
3c68c99bd5 | ||
|
ec4b37c596 | ||
|
ba9601d21c | ||
|
50c13fd469 | ||
|
7af072b8fc | ||
|
faa128d41e | ||
|
868fe46932 | ||
|
e9e4307ce5 | ||
|
774d4844a9 | ||
|
586c53e670 | ||
|
68e073fbff | ||
|
8101dc37b1 | ||
|
63f16c458d | ||
|
821e007e95 | ||
|
1656a2f11a | ||
|
4dbc135dce | ||
|
fc886f6bc1 | ||
|
f93e480466 | ||
|
fe807e23f8 | ||
|
ecf61c31f1 | ||
|
4feff18af5 | ||
|
a07c52e0d8 | ||
|
7bb07d7f55 | ||
|
f12dfc8a14 | ||
|
be030f15c4 | ||
|
f5fb6c063b | ||
|
fb722f06b9 | ||
|
c0ea19e15e | ||
|
cdeb1ad87c | ||
|
0dbe4e94fa | ||
|
b5e2e8aa1d | ||
|
9502010248 | ||
|
fea0557b47 | ||
|
ed4fcc9011 | ||
|
ed12ea7cfb | ||
|
73e526645e | ||
|
72aeafb2b5 | ||
|
cc1af60cb4 | ||
|
359fab315f | ||
|
6a9574bab9 | ||
|
83d6158483 | ||
|
63ef89b6cc | ||
|
b0beab4cd3 | ||
|
a34782575f | ||
|
142bdc9430 | ||
|
14b79cb0a4 | ||
|
ce5beeaf2c | ||
|
31114a2ca5 | ||
|
32528094ad | ||
|
0a2a01c44c | ||
|
c1888dc3ac | ||
|
4d76afbe01 | ||
|
76d7a97f93 | ||
|
8b1366b20a | ||
|
e0f9685578 | ||
|
5235657954 | ||
|
a15fbc8094 | ||
|
546f1d9c50 | ||
|
74231f552a | ||
|
b250a10e3c | ||
|
a9f1b31dd6 | ||
|
7fe393acaf | ||
|
04faba4db5 | ||
|
91bba40c20 | ||
|
79e39f7de8 | ||
|
9c09353559 | ||
|
50752a5bfe | ||
|
d59879db7d | ||
|
aab125da27 | ||
|
74fc731f96 | ||
|
bd0050fec2 | ||
|
aa5e313b92 | ||
|
e89d613b7e | ||
|
8757929ead | ||
|
e0a9b19802 | ||
|
308da6dc6e | ||
|
b6960fb0e5 | ||
|
137208c3fd | ||
|
d7a9a62a1d | ||
|
075315bdaa | ||
|
3948fcd614 | ||
|
8e61e129ab | ||
|
20cffd0502 | ||
|
5df09dab09 | ||
|
7446b911e5 | ||
|
f15267c1ab | ||
|
9c9fc2b5dc | ||
|
28f601b54b | ||
|
18b8a05014 | ||
|
910c995ed8 | ||
|
498468aa2c | ||
|
637aebcb34 | ||
|
9afd5cb277 | ||
|
bc525e7272 | ||
|
a80180780d | ||
|
0d73086c37 | ||
|
02ae39238d | ||
|
43d6b51d42 | ||
|
84566310de | ||
|
6a6ec9fbe4 | ||
|
84a7f825d7 | ||
|
0372c1aaf1 | ||
|
c9fff197f7 | ||
|
6900392e43 | ||
|
c00bcd78cc | ||
|
b2b82124e6 | ||
|
3de57c668f | ||
|
43669648ce | ||
|
3b73b416d5 | ||
|
5153591c8f | ||
|
3172bc90da | ||
|
76a1b2cd51 | ||
|
bdf7eee72f | ||
|
2d4b148b2c | ||
|
d67db74ca2 | ||
|
516725456f | ||
|
001d72a484 | ||
|
c555e28988 | ||
|
af13d1943f | ||
|
52df2edc8f | ||
|
cd08484a13 | ||
|
f38d38f139 | ||
|
93b6c68938 | ||
|
a4cc25175a | ||
|
3fb14b4708 | ||
|
6bdb6db330 | ||
|
d05c165ace | ||
|
ab53cdb896 | ||
|
c1f142af78 | ||
|
6e261abb73 | ||
|
39af9e4414 | ||
|
5b50abb2c7 | ||
|
13bda0a264 | ||
|
1658c666ab | ||
|
170aebfe54 | ||
|
c4ef379d0e | ||
|
18b038d8ff | ||
|
12ee5da872 | ||
|
601f9f86bb | ||
|
d7329a5915 | ||
|
9e7b730002 | ||
|
2d59d845bc | ||
|
c2645894e0 | ||
|
3751106317 | ||
|
60bb639351 | ||
|
74c50930bd | ||
|
9105104303 | ||
|
540dde135e | ||
|
f8936210cf | ||
|
1dc6d8de40 | ||
|
1069db3c13 | ||
|
65122f0144 | ||
|
d2c018f7da | ||
|
46493c2af6 | ||
|
c303e03f76 | ||
|
d8b65f62e7 | ||
|
854368a8f3 | ||
|
7653a34aea | ||
|
ee50b58e00 | ||
|
1eb60ab100 | ||
|
4a20eef351 | ||
|
26c9b2c353 | ||
|
16374bce9b | ||
|
86011d4ea2 | ||
|
fcb8b02da9 | ||
|
571165c2bb | ||
|
c842113610 | ||
|
974a8b3b70 | ||
|
2e20c99ada | ||
|
aa88ff6f2c | ||
|
5e6aa63d03 | ||
|
ad6700c114 | ||
|
f08c6efb00 | ||
|
cc807ec132 | ||
|
24e7c68243 | ||
|
ab25edd37a | ||
|
be47fde6c2 | ||
|
1ffa8c5e72 | ||
|
d855ccb8a7 | ||
|
d88919474b | ||
|
e139664301 | ||
|
5adf5f6e3f | ||
|
aef2075c8e | ||
|
922b2962a3 | ||
|
b4a401700e | ||
|
e9601bb9c1 | ||
|
58af3dc6ea | ||
|
074295df61 | ||
|
ec349b31c7 | ||
|
5ae236e016 | ||
|
d7c5897aba | ||
|
5252e7efe7 | ||
|
fc7d65629a | ||
|
f28fdf8252 | ||
|
5d07c4a949 | ||
|
fdd9eaab4b | ||
|
e0d863a46f | ||
|
3aacb6f5f3 | ||
|
428e331b3e | ||
|
847e05e9a7 | ||
|
087eb5dbe6 | ||
|
f15932b2ac | ||
|
d3a4c3795d | ||
|
b15d55e1d9 | ||
|
4f5889cc5b | ||
|
bf2a104a4e | ||
|
0c6dd5cd16 | ||
|
5efb06a7aa | ||
|
b13acef272 | ||
|
cfa67d6c0f | ||
|
e70444f19a | ||
|
0258982e60 | ||
|
70eed5cb5e | ||
|
a650fa51f7 | ||
|
cb205580d8 | ||
|
f9329aac00 | ||
|
745f4a7523 | ||
|
60254dafd7 | ||
|
a8d60388ba | ||
|
83ec60254c | ||
|
c15c45f765 | ||
|
cbe52b5089 | ||
|
e4e2921f3e | ||
|
4673170531 | ||
|
2c2ed26c38 | ||
|
94be5244fe | ||
|
f137a08493 | ||
|
48624d0a34 | ||
|
4cceb3ddaa | ||
|
f728395603 | ||
|
3e82d43807 | ||
|
2194c4e0a9 | ||
|
c581080f3f | ||
|
f6b1ec27e5 | ||
|
368b183230 | ||
|
9028ad36ad | ||
|
6cc041cd39 | ||
|
63ff01e78d | ||
|
9e5484937e | ||
|
b8ed489b14 | ||
|
765152d04b | ||
|
14934367d8 | ||
|
04164500c8 | ||
|
5160f2c298 | ||
|
124c9303b9 | ||
|
cd27f0ad69 | ||
|
a7555bcce3 | ||
|
6b5c4fd3f4 | ||
|
cc55e2acee | ||
|
1511f75a80 | ||
|
f01bbefc1f | ||
|
1d1eb5ffa8 | ||
|
a465cb2191 | ||
|
42d13e02ef | ||
|
d00786c43f | ||
|
4b47f99829 | ||
|
35aaf40003 | ||
|
cc5b4a1e02 | ||
|
7079521e8c | ||
|
b5025560a5 | ||
|
3f4bdd7f0e | ||
|
e94bb9b549 | ||
|
1ddaacbef5 | ||
|
e8b40518e0 | ||
|
0f88cbb41b | ||
|
780d137b76 | ||
|
ad8a9717d1 | ||
|
9d6ea6b2f6 | ||
|
7559383089 | ||
|
f84381c927 | ||
|
cb0122a43f | ||
|
6776b20989 | ||
|
e98d556022 | ||
|
5bf18b69d7 | ||
|
ea17f045a7 | ||
|
526f565ea7 | ||
|
4aff9d6e73 | ||
|
bf516d4d21 | ||
|
ae92e409d9 | ||
|
4d017dc8a9 | ||
|
707f4e2965 | ||
|
1c3bffdc50 | ||
|
e54ddcb8b0 | ||
|
ddefb0debc | ||
|
92d8dde90d | ||
|
1bb0508ddf | ||
|
a280a326b9 | ||
|
683e9b7c2c | ||
|
a44e5da421 | ||
|
8cd2c90ad7 | ||
|
5e57a390a2 | ||
|
620848272e | ||
|
1e86794416 | ||
|
e36717259b | ||
|
75b9238b90 | ||
|
ce5b20027e | ||
|
0de1242c83 | ||
|
8bd445ab19 | ||
|
fdef0de163 | ||
|
b1b03a4325 | ||
|
0587d96474 | ||
|
c2241567e4 | ||
|
7ac24ba418 | ||
|
c933ffec66 | ||
|
e587d934b1 | ||
|
f354e90656 | ||
|
1b0bc7ec6e | ||
|
ee1acb9c00 | ||
|
06862a2812 | ||
|
5fa87e18db | ||
|
77989e2720 | ||
|
3a1102fa4e | ||
|
8a9974ce53 | ||
|
4be8f1ca03 | ||
|
1ec2970ee3 | ||
|
81b3a22606 | ||
|
f81a475cc9 | ||
|
d7ee03d4f9 | ||
|
c1c06410c2 | ||
|
657d16bb60 | ||
|
e65a4c1010 | ||
|
e23d3f5661 | ||
|
e13611f7af | ||
|
596cd09489 | ||
|
0be5b27d34 | ||
|
a27471ae55 | ||
|
e27e3622a8 | ||
|
e95273b72b | ||
|
583d4f3249 | ||
|
d6967c4516 | ||
|
40b3097374 | ||
|
1a1f127993 | ||
|
a0f34a7ce1 | ||
|
db020db34b | ||
|
681167bc1b | ||
|
40e49ffc37 | ||
|
834b1afb38 | ||
|
62d5a1da87 | ||
|
8d8308e557 | ||
|
e1aa63487a | ||
|
b7fbe110d4 | ||
|
58859eb35a | ||
|
4b7e1ae1c6 | ||
|
3a06a6ac07 | ||
|
db0f269dc8 | ||
|
3cabe6ca5a | ||
|
d483005219 | ||
|
fea9bc4e7e | ||
|
d579992c98 | ||
|
ad1c61d959 | ||
|
bb1da31830 | ||
|
a50949e554 | ||
|
14dce8a10b | ||
|
1240c8f685 | ||
|
cc7c2e952c | ||
|
409ec2e086 | ||
|
a7f6848e53 | ||
|
4b0b79199d | ||
|
d1d6c48d9b | ||
|
21631780bb | ||
|
b935e32340 | ||
|
72dd064932 | ||
|
2e75446665 | ||
|
be17e4481e | ||
|
616c849b1f | ||
|
71947c097f | ||
|
546787802d | ||
|
294d0e388a | ||
|
193a1b0325 | ||
|
12743217a2 | ||
|
b252b9da66 | ||
|
cdef9c3c7e | ||
|
71dcebb744 | ||
|
25f248c60a | ||
|
d5cbc17831 | ||
|
7a10217511 | ||
|
7559efab77 | ||
|
8254efbd03 | ||
|
4ae24225a5 | ||
|
67d9154563 | ||
|
ad0319c188 | ||
|
eb650ea3ec | ||
|
7eba33e805 | ||
|
e1cb9d387e | ||
|
2ace7c3ca0 | ||
|
58014f0592 | ||
|
1d4938bb09 | ||
|
bbf4007c3e | ||
|
4d5124fb4c | ||
|
14a7cd05b1 | ||
|
946be80eef | ||
|
9ad8b1a980 | ||
|
f733216fcb | ||
|
ffc6139e21 | ||
|
571cac6644 | ||
|
2738ac5a5c | ||
|
7dfde51b84 | ||
|
2d2f18e538 | ||
|
3af0dd2e3b | ||
|
349e077802 | ||
|
812aae358f | ||
|
c3c59d0627 | ||
|
89518b412d | ||
|
f43b026162 | ||
|
b806c70f52 | ||
|
10bff3c0b8 | ||
|
65c12fd0b2 | ||
|
50f71c4130 | ||
|
8e401a53dc | ||
|
64a289a47c | ||
|
8f2c37061b | ||
|
39f2de6b90 | ||
|
855ba8d4f3 | ||
|
74f098e718 | ||
|
56c8a84691 | ||
|
8bbf319032 | ||
|
afbca4ae65 | ||
|
0ef6d2f91a | ||
|
fbe4435599 | ||
|
34be565dd1 | ||
|
af838e4ed1 | ||
|
60fe8ce011 | ||
|
8ece341467 | ||
|
dfa6bdbcb8 | ||
|
fb2481ebaa | ||
|
4874c116cf | ||
|
e19c44efbd | ||
|
4b687b9bdc | ||
|
6af79ef601 | ||
|
352b996ad2 | ||
|
4a93bb35f8 | ||
|
8e1f493daf | ||
|
59ee153375 | ||
|
60f7f1fc16 | ||
|
b7433683d8 | ||
|
42799b9273 | ||
|
860a0f790e | ||
|
8daccbfbb4 | ||
|
285b77dcb7 | ||
|
6e48827d3f | ||
|
f0c20cc706 | ||
|
8916c0a3de | ||
|
7193a77840 | ||
|
61930b5b51 | ||
|
11a494cacf | ||
|
17f9bf0339 | ||
|
3d9755ca8c | ||
|
b5cf2d03e6 | ||
|
e3b35b8f35 | ||
|
1c1fe672bd | ||
|
6c71f68ed8 | ||
|
8f2f912cdf | ||
|
bf6ea16acb | ||
|
288546c2b9 | ||
|
724db6c34c | ||
|
067c451c1d | ||
|
11e3696191 | ||
|
41e20664de | ||
|
d8de90d6f3 | ||
|
b01e8299d3 | ||
|
1ec11e3e2e | ||
|
422f429725 | ||
|
5c55fa5fbb | ||
|
80d845fdf2 | ||
|
601fe68346 | ||
|
9e050fb059 | ||
|
99d4adf5e6 | ||
|
85f8d1e8e9 | ||
|
8334d3d99f | ||
|
cff08d19eb | ||
|
2d86390bc1 | ||
|
7a20835571 | ||
|
ff3c9676b5 | ||
|
055f97dab1 | ||
|
8a867e71a1 | ||
|
b8275b4734 | ||
|
36b951b146 | ||
|
c5a5f17643 | ||
|
16b909c4df | ||
|
92b7648e03 | ||
|
ca46ebe3b2 | ||
|
676e48254a | ||
|
b15b55227d | ||
|
3c3b723913 | ||
|
f05002c729 | ||
|
1c2cbd5b40 | ||
|
54c6ca9f45 | ||
|
c10efbb170 | ||
|
a496ad5814 | ||
|
50cf7f6a3b | ||
|
f946f10afd | ||
|
eecb4db34c | ||
|
1f865d3ea4 | ||
|
623bb4b350 | ||
|
dc8ad673a6 | ||
|
4914ad821e | ||
|
f099cbadc3 | ||
|
42cda384c8 | ||
|
23c91b9990 | ||
|
ff0379182e | ||
|
e08a23948f | ||
|
bd56de6d36 | ||
|
42970aea80 | ||
|
003a05ee8d | ||
|
ffb11b01a6 | ||
|
e426f5d5da | ||
|
6989f61e1b | ||
|
0e6677ccb3 | ||
|
8f104d555a | ||
|
b1d3158db1 | ||
|
7645005d5a | ||
|
411f77fd29 | ||
|
568ab26db1 | ||
|
29652108f0 | ||
|
f07e4dc711 | ||
|
8a2ac457c2 | ||
|
9e54eecfaa | ||
|
95ef691077 | ||
|
7a0ad5a587 | ||
|
42b49d0e4b | ||
|
9217c2f003 | ||
|
fbdf66998d | ||
|
deda9d3c54 | ||
|
a5d78f20ae | ||
|
5ed09e3f38 | ||
|
3e9774cd66 | ||
|
54387c8fdf | ||
|
7eec949a13 | ||
|
4113c4ff40 | ||
|
1bf0968bfe | ||
|
374b90fb00 | ||
|
064e60e9d5 | ||
|
b637455970 | ||
|
68158937d1 | ||
|
adb1356b7a | ||
|
d880ccb8e0 | ||
|
050fb1d1ef | ||
|
6580752bde | ||
|
c9df265c9b | ||
|
098e5bc162 | ||
|
4b2dcc74d4 | ||
|
a9254c5c9a | ||
|
7ce57e6ccb | ||
|
0fcb32a66f | ||
|
9946535f01 | ||
|
2b17396d6b | ||
|
b01d5bc237 | ||
|
b123860304 | ||
|
033f5b67db | ||
|
6280448dfb | ||
|
01cd3333e4 | ||
|
63050907b9 | ||
|
beedf7d780 | ||
|
6b8194261f | ||
|
dbb1c4d534 | ||
|
e6263f9ff5 | ||
|
6ca119c4db | ||
|
c483a1ab3a | ||
|
2e7edd033c | ||
|
c576902501 | ||
|
66c2951594 | ||
|
b812881cdb | ||
|
cdeac2c6db | ||
|
bca2ddd529 | ||
|
e7285c6499 | ||
|
bdff275672 | ||
|
bec58a1ee6 | ||
|
f64616748c | ||
|
512ce15973 | ||
|
ed8b301574 | ||
|
d22a6c019c | ||
|
a0cb1b9d9e | ||
|
a5294c62ea | ||
|
e155d3311c | ||
|
0a372b0daf | ||
|
69143399d1 | ||
|
3270d3bf96 | ||
|
3896a66122 | ||
|
b94781aef1 | ||
|
bed1adc367 | ||
|
ae54497efa | ||
|
06b747c221 | ||
|
f159beee0d | ||
|
49d7dea086 | ||
|
3e65733dc5 | ||
|
cc375d58bb | ||
|
911c7c662a | ||
|
aae003be33 | ||
|
aede03d8b2 | ||
|
f0f5ada7de | ||
|
58365121a3 | ||
|
d5a154d2e6 | ||
|
b20f369aef | ||
|
abb8aa0b29 | ||
|
5368a0f1d7 | ||
|
d3897eece7 | ||
|
a82b829da9 | ||
|
9f5058e81a | ||
|
5b19263720 | ||
|
9d5a0db0d9 | ||
|
4bd8a7014f | ||
|
353e96d951 | ||
|
149a6f92b0 | ||
|
d66426c137 | ||
|
4fc9966392 | ||
|
417766f0db | ||
|
de9ac97887 | ||
|
6be42f112a | ||
|
3895ae63c7 | ||
|
607d416d54 | ||
|
038693dc86 | ||
|
cc9be13544 | ||
|
9c1474087f | ||
|
831de2bcf4 | ||
|
eb687333bb | ||
|
5cc7966d54 | ||
|
d1a34e7a6f | ||
|
d63d791717 | ||
|
015570c741 | ||
|
8400ebc9c6 | ||
|
9f99e7c0af | ||
|
392c1fc399 | ||
|
d3cea7a89c | ||
|
1dcf7407e6 | ||
|
d543c033a3 | ||
|
aaa186be5e | ||
|
2054b5b3dd | ||
|
98ae5b0ca0 | ||
|
36c8171d0f | ||
|
3603eb94cc | ||
|
0e068d4ccf | ||
|
199f348ff4 | ||
|
b22655fb7c | ||
|
06cc9618ba | ||
|
b9019c8c7f | ||
|
77e133e67c | ||
|
571e7df807 | ||
|
22f4d2979a | ||
|
e46e366694 | ||
|
7b4bc23815 | ||
|
9ca79f767c | ||
|
274dba7408 | ||
|
31708ca29e | ||
|
671b025588 | ||
|
a7956e4856 | ||
|
355862025a | ||
|
a2a39ee0f8 | ||
|
ec8e39c16f | ||
|
88f714999e | ||
|
c0c2aa3be0 | ||
|
822044820e | ||
|
6ffc182142 | ||
|
3d54a78573 | ||
|
8ddf7d953a | ||
|
8b9e9ad103 | ||
|
5737224c40 | ||
|
ec9aacbcae | ||
|
9395454997 | ||
|
66198a8d98 | ||
|
96ed9a4256 | ||
|
10e54b2263 | ||
|
cf00922ad2 | ||
|
84e8e007a5 | ||
|
d07b2e773b | ||
|
506ef7b0b9 | ||
|
2cd5dae8e2 | ||
|
a1cd49c111 | ||
|
aca2973aef | ||
|
0a7a691c95 | ||
|
72906a7afd | ||
|
d1a4a83570 | ||
|
e0396b29e8 | ||
|
536833cfe0 | ||
|
317b02d1b9 | ||
|
75e279ea0d | ||
|
dc2ad21f4c | ||
|
484d49aae1 | ||
|
ca39438ad4 | ||
|
49a65ebff4 | ||
|
befdc05084 | ||
|
1fbffe761b | ||
|
36aad379ff | ||
|
540cfa072e | ||
|
3b049c15cc | ||
|
3e93ed0a17 | ||
|
d7d9358136 | ||
|
5cf0939ff9 | ||
|
8dc6f91d3c | ||
|
a3a25db230 | ||
|
c06f18c815 | ||
|
6802f04036 | ||
|
beeccdf345 | ||
|
58241ed39d | ||
|
31128020f0 | ||
|
6c48afc37b | ||
|
7a2f169dfc | ||
|
ed910b99a7 | ||
|
54195c0826 | ||
|
cefbbcd1df | ||
|
cc01592085 | ||
|
5a98a5252d | ||
|
184e8b1132 | ||
|
2b6b896c2e | ||
|
96d06b7a93 | ||
|
f54f1611b5 | ||
|
69ad757e8b | ||
|
e0beb796ad | ||
|
f331e7d820 | ||
|
cbb62d3d78 | ||
|
c85bc59c1d | ||
|
8081eeb007 | ||
|
56f91bd10d | ||
|
8e20b78731 | ||
|
23a09b7081 | ||
|
67fdd27499 | ||
|
e1941daedd | ||
|
f28bc568a4 | ||
|
f24cfe39aa | ||
|
59d2bf3f79 | ||
|
3176e54614 | ||
|
eb090f7265 | ||
|
6d3a9bfd18 | ||
|
76f08b7acb | ||
|
1ff99346aa | ||
|
369695ab32 | ||
|
7e23dd1d66 | ||
|
0205d3fc5c | ||
|
4660cf2ad5 | ||
|
e26d08d674 | ||
|
0932bf2797 | ||
|
f560fc6d76 | ||
|
aa6209af00 | ||
|
4a51176193 | ||
|
bb84f7a434 | ||
|
48168b1ef0 | ||
|
8281c7c83e | ||
|
a07c1e3c71 | ||
|
0766bb31fe | ||
|
ff4472c1a5 | ||
|
17424740e5 | ||
|
dad0b2fcd3 | ||
|
c48dbf030f | ||
|
617808d603 | ||
|
845149deee | ||
|
1a9e009327 | ||
|
ae90815708 | ||
|
1c460343b7 | ||
|
26079622f9 | ||
|
06c6d6096f | ||
|
c8183aea51 | ||
|
7531134ad2 | ||
|
cd0c6439c2 | ||
|
c918c93f51 | ||
|
97d3bd68ed | ||
|
75f1e034ae | ||
|
8e72f218f1 | ||
|
d643e05c5a | ||
|
fea44834d0 | ||
|
195a2d7523 | ||
|
b2fd346ef8 | ||
|
1ff8b62cb7 | ||
|
c7ae15a41a | ||
|
efe6f59f79 | ||
|
8e31d0491d | ||
|
73d4a10351 | ||
|
81d9d4dbc7 | ||
|
184ec13f99 | ||
|
dee0422eff | ||
|
81a2975f1a | ||
|
5cd2ef4a5e | ||
|
466c2a68c2 | ||
|
0fb9fba531 | ||
|
356dd2c6cd | ||
|
32c4661233 | ||
|
a245b504ec | ||
|
a2f5fbdfd3 | ||
|
04be26adc5 | ||
|
be0adb7cf2 | ||
|
84fd92bf5a | ||
|
ee4e061739 | ||
|
4a2b01cd9a | ||
|
efdd6460fb | ||
|
803827e05c | ||
|
a41d5e9ab3 | ||
|
e94333f877 | ||
|
6dbb80d687 | ||
|
31a1031624 | ||
|
f8e9ce0d52 | ||
|
11baa968cd | ||
|
3e5e5b376f | ||
|
bda18f296d | ||
|
287d110c84 | ||
|
c98275e73a | ||
|
aa573cc951 | ||
|
883d3d86e3 | ||
|
fb047bd5f4 | ||
|
66a04d8365 | ||
|
a0e501f9fd | ||
|
8b40d3346d | ||
|
eddf5cd250 | ||
|
ee5c534ca3 | ||
|
fd4e77ae0f | ||
|
b747c50aa3 | ||
|
deebdd86a6 | ||
|
b2db79cc10 | ||
|
bbab370b1e | ||
|
db4adf399d | ||
|
0683c87e52 | ||
|
3f62b647fc | ||
|
2562a5b30d | ||
|
e232f2e223 | ||
|
21644ff4dd | ||
|
be96a4fce5 | ||
|
a1cabcbed3 | ||
|
ce933b1f06 | ||
|
51ae130922 | ||
|
da1bc18a47 | ||
|
e7165a526b | ||
|
6081cc399f | ||
|
7c5c24e15d | ||
|
e3e55b4347 | ||
|
40d8e7d1ad | ||
|
59e23b89f2 | ||
|
cc33af8193 | ||
|
0e1e7eb2a9 | ||
|
52a28a7758 | ||
|
3f752d6832 | ||
|
fe714e9989 | ||
|
0d3213a379 | ||
|
44056629e8 | ||
|
54125c05d3 | ||
|
7d32e50f25 | ||
|
4af9ff49a0 | ||
|
23faef845c | ||
|
41dad4091a | ||
|
daf859b977 | ||
|
f47ba6c977 | ||
|
4b9b207d92 | ||
|
875cbf66af | ||
|
412d6d4fd7 | ||
|
91c6deeb1f | ||
|
6d1978fd9a | ||
|
52d23b6ef5 | ||
|
0656ccbdd9 | ||
|
e774ebd0a3 | ||
|
edbda32a84 | ||
|
721fa04e3c | ||
|
9fd8d8915d | ||
|
7a9f5ebdd1 | ||
|
a3423f0321 | ||
|
c37e9a4467 | ||
|
6157d82a0b | ||
|
38b27fec92 | ||
|
c43439bb68 | ||
|
8d9561d7a5 | ||
|
2a72cce3b7 | ||
|
d3bbb6fb1f | ||
|
7b6723e9a2 | ||
|
1ee741460d | ||
|
967b0b493b | ||
|
b53aaf7dde | ||
|
714c13bdbf | ||
|
651a4fd3cc | ||
|
505aee22bb | ||
|
ca3d59dc33 | ||
|
13890e32a1 | ||
|
df8976eabe | ||
|
3e01daa172 | ||
|
f6999f355b | ||
|
5c06b45eb1 | ||
|
1802bb967a | ||
|
d8d92f147f | ||
|
4a95bdd8ba | ||
|
db5d94d956 | ||
|
06f2e34bb5 | ||
|
2ef7a01945 | ||
|
d3f642551d | ||
|
490997157e | ||
|
2432af7883 | ||
|
7abeece3f0 | ||
|
3851652821 | ||
|
1d67d2250a | ||
|
37f40d8637 | ||
|
0224d1d59b | ||
|
587b94153d | ||
|
5124ce0302 | ||
|
950c4045b0 | ||
|
9c8ba66873 | ||
|
25d1d1be1b | ||
|
339c352505 | ||
|
c587081fe4 | ||
|
8f9b1b866b | ||
|
ff5ecf6182 | ||
|
05670cf393 | ||
|
f10f5d30bf | ||
|
0d336727e8 | ||
|
bf354275b3 | ||
|
1932bf277a | ||
|
192db4bb6e | ||
|
701efb943d | ||
|
b2674971f1 | ||
|
c907cb4cf1 | ||
|
bb1462b4d9 | ||
|
1035f0e139 | ||
|
8475757716 | ||
|
20ffd8d61b | ||
|
8601428c4c | ||
|
59998573ee | ||
|
293cd72001 | ||
|
22ab9ebb2f | ||
|
9136e592d3 | ||
|
ed8e392616 | ||
|
e57ce6e644 | ||
|
8204e46086 | ||
|
9e365d9f80 | ||
|
6b40a933e9 | ||
|
8520a5002f | ||
|
b38ed06f6e | ||
|
48427b1143 | ||
|
5d505f4ed0 | ||
|
0c02a08954 | ||
|
0221bd0f80 | ||
|
28216cbcb5 | ||
|
3e08a8cd6b | ||
|
67fafdeef7 | ||
|
cc82505b66 | ||
|
fd5f075f63 | ||
|
a115960411 | ||
|
e9fa4ca816 | ||
|
75d92bc7f0 | ||
|
74aa6e911e | ||
|
9d000c1898 | ||
|
b2254875b2 | ||
|
78d04230d5 | ||
|
1c04477393 | ||
|
2a9679c94e | ||
|
6009f8ecde | ||
|
35cdbec70a | ||
|
0faef542c1 | ||
|
8b085af6a1 | ||
|
e3b11a9eb2 | ||
|
72fc88f3c6 | ||
|
a5b759f268 | ||
|
6a9ffae25d | ||
|
64c031c7fe | ||
|
720926c50d | ||
|
36ec974284 | ||
|
cff77c39e2 | ||
|
056a0a1736 | ||
|
f301da83c6 | ||
|
5362231efa | ||
|
4bb14cad73 | ||
|
7f5188f5a4 | ||
|
a80b7aac6c | ||
|
83f32478fa | ||
|
7578ec6801 | ||
|
e14a32f76f | ||
|
58faa189ac | ||
|
9b4f87d44a | ||
|
7830a64170 | ||
|
8f0fa02107 | ||
|
e000fb5d80 | ||
|
566fadad15 | ||
|
cf23858c10 | ||
|
216a223617 | ||
|
638f38d823 | ||
|
98ee70f04e | ||
|
b365db5a4b | ||
|
02e55496df | ||
|
e11e53913a | ||
|
f8a5fb4225 | ||
|
3a49450461 | ||
|
3c375fb955 | ||
|
011fea2cc6 | ||
|
a079eec2cb | ||
|
776b37f4ea | ||
|
a4d8bbe3da | ||
|
72166743fa | ||
|
c4312c0b11 | ||
|
38ba645415 | ||
|
ac12a47071 | ||
|
bea321939e | ||
|
210f84b6ea | ||
|
d4c642741f | ||
|
e6b1b58379 | ||
|
8d982c1a90 | ||
|
be10e836dc | ||
|
9be05e7e17 | ||
|
bd96b2819f | ||
|
f601af3da0 | ||
|
70a01c082b | ||
|
bcf066ead7 | ||
|
24dd3578ed | ||
|
d5c39d54d8 | ||
|
6e3f6abc67 | ||
|
463201df2c | ||
|
a7501c396f | ||
|
4c8bc49a7e | ||
|
f254674f88 | ||
|
a97c267378 | ||
|
eaa947894b | ||
|
fb3a26510b | ||
|
bfe8b14e49 | ||
|
afb47eb742 | ||
|
ba97f96288 | ||
|
ecbafb8f4b | ||
|
12d3800d67 | ||
|
d586b82372 | ||
|
ba9877c9b4 | ||
|
907933f3df | ||
|
2e91d21a88 | ||
|
dca395a018 | ||
|
625070a5b9 | ||
|
f875c7cbf5 | ||
|
eed88fc103 | ||
|
6fc54d1d27 | ||
|
0ef52bf909 | ||
|
95e34af6ef | ||
|
650b99ead2 | ||
|
57941a19de | ||
|
6157db0b6a | ||
|
c9358acf5d | ||
|
ed29eb8a5d | ||
|
bcf7452312 | ||
|
b9000519e4 | ||
|
2694297466 | ||
|
53ff5c1490 | ||
|
32a036b076 | ||
|
aae2ab2693 | ||
|
4ef23e28a3 | ||
|
38beb7f8d2 | ||
|
0129a66906 | ||
|
45bced7b34 | ||
|
7f5a55dffb | ||
|
80289df6d3 | ||
|
2115c3ced8 | ||
|
1c2d0e6618 | ||
|
ea4f7f79ce | ||
|
b17f8ac311 | ||
|
6870d13b72 | ||
|
81fa304fd2 | ||
|
a663ddb0d9 | ||
|
f7969afc22 | ||
|
52ce4cd313 | ||
|
247175881f | ||
|
fcf5009338 | ||
|
12542d8f63 | ||
|
e94194e28b | ||
|
115499f3b2 | ||
|
12af05b94f | ||
|
88b83d8164 | ||
|
fcc22c692a | ||
|
a876e8005c | ||
|
2288e3705a | ||
|
e8b58154e0 | ||
|
4393475af3 | ||
|
3fc560597c | ||
|
9f9af0b693 | ||
|
a83fe2caea | ||
|
30c5376217 | ||
|
6dddd6629d | ||
|
f80de12cb5 | ||
|
544ffca3a5 | ||
|
e0730c7b39 | ||
|
3d59d141c4 | ||
|
ccddc2623d | ||
|
fcc47b58b4 | ||
|
f67ac2e25e | ||
|
26127c9ccf | ||
|
d624efa799 | ||
|
ed3d40a4e0 | ||
|
6e90ce5496 | ||
|
ab851b1be4 | ||
|
340de53825 | ||
|
a867b60af0 | ||
|
26eafb0bd2 | ||
|
0dbe44764b | ||
|
2159df6802 | ||
|
23389b9f17 | ||
|
6d3e3b894a | ||
|
55340aefa3 | ||
|
94bc751e41 | ||
|
89259c11e2 | ||
|
6bbaf1523c | ||
|
fa3f18b60f | ||
|
3dc794002f | ||
|
f50b133f2e | ||
|
1d6f6d28c9 | ||
|
c913de3c8b | ||
|
bbc7b54a38 | ||
|
05fa1b40d1 | ||
|
6a88c8634d | ||
|
8ae1efa230 | ||
|
ab8df4c8ab | ||
|
c259a46ed3 | ||
|
5dc0677599 | ||
|
7ed662ecc2 | ||
|
4361cc69d4 | ||
|
461cbcbc28 | ||
|
09ae6c488b | ||
|
271a0ade26 | ||
|
4b076d227a | ||
|
3c4e7158a1 | ||
|
0b16765f37 | ||
|
20c2ff3443 | ||
|
96f2e598f4 | ||
|
7374f0f9dd | ||
|
ccc44a74a0 | ||
|
66cd63a68d | ||
|
decf7e5485 | ||
|
063c8025aa | ||
|
2fa7d2bd56 | ||
|
e55e7bce74 | ||
|
f572445a65 | ||
|
8b4f656d90 | ||
|
6c1e093ebd | ||
|
6dd1b4537a | ||
|
39ca9bea72 | ||
|
999103277e | ||
|
3cc57ab89c | ||
|
4e830079de | ||
|
ea7231e9fe | ||
|
ddfaca6d0c | ||
|
3b11bd0593 | ||
|
3f89057528 | ||
|
2f1073712f | ||
|
678e504c48 | ||
|
e69545fd95 | ||
|
a7ed025cd6 | ||
|
3d8e1f2484 | ||
|
c38c9608da | ||
|
2396b75e3c | ||
|
e5c19b7562 | ||
|
114788567d | ||
|
17ae4b7d2a | ||
|
12d652bd0e | ||
|
ff1bed97b8 | ||
|
56490f0e84 | ||
|
0b028a8923 | ||
|
43ac541cb8 | ||
|
5218443678 | ||
|
d9028ed9b7 | ||
|
9b9bd11ebb | ||
|
07011ec5f7 | ||
|
c3990ac32f | ||
|
081ff3ff55 | ||
|
93996ada96 | ||
|
a60671d4c1 | ||
|
3f716cc369 | ||
|
9f23cffd1b | ||
|
07c416cfbf | ||
|
389fcc1c8d | ||
|
fa07811375 | ||
|
fc91a50979 | ||
|
f9c518f321 | ||
|
015b439f0d | ||
|
0675622508 | ||
|
e9969bdd5f | ||
|
1139f950ed | ||
|
284732c7a6 | ||
|
0cb0720d8b | ||
|
8ad1ede0c5 | ||
|
a349aac8a4 | ||
|
83b169c6ef | ||
|
49c37baac5 | ||
|
8d62088576 | ||
|
f5437a17f8 | ||
|
92af4e5c96 | ||
|
0619adb0cd | ||
|
65a5107854 | ||
|
0fcc1e252b | ||
|
4b7f817475 | ||
|
0439599971 | ||
|
fa344d5308 | ||
|
f0316f09ed | ||
|
b1af6bab28 | ||
|
ad2aebb54d | ||
|
23fc652092 | ||
|
f0a5756f25 | ||
|
14c7ad201a | ||
|
08ca3c89d3 | ||
|
edda470bf8 | ||
|
7183d72e5c | ||
|
5e38ebfce5 | ||
|
56e36847a5 | ||
|
6dba916d02 | ||
|
fd57086ffd | ||
|
d98d366eea | ||
|
b261b0b447 | ||
|
c6042a9053 | ||
|
ae1245abec | ||
|
e26d2376fc | ||
|
bb36ad64a7 | ||
|
262d4f92d4 | ||
|
675530458c | ||
|
19e34b460f | ||
|
dddb8cdbc0 | ||
|
0d0df5f143 | ||
|
d1cf683f57 | ||
|
d099c33e5b | ||
|
21fb41545b | ||
|
4c56814785 | ||
|
cffe05e22b | ||
|
4237850299 | ||
|
b5fc36a8e1 | ||
|
4586c1ef52 | ||
|
2722f0b749 | ||
|
d6cf7c4872 | ||
|
3aedfed432 | ||
|
edeaf13259 | ||
|
c1290c4e9b | ||
|
b2c1527b17 | ||
|
a4a65ea56e | ||
|
ccf0e1875e | ||
|
9c009aceaf | ||
|
da4b1c7276 | ||
|
add098d5c0 | ||
|
aca096548c | ||
|
75aa3abcae | ||
|
e685d262cc | ||
|
d2599d6ef9 | ||
|
cd5223d98d | ||
|
7b68d9047d | ||
|
9a7ea06d66 | ||
|
c69ef34ac9 | ||
|
021999d05f | ||
|
6054430a5e | ||
|
8f578ed95a | ||
|
fc5c339e27 | ||
|
defad3d820 | ||
|
c0f96aa948 | ||
|
f2eae2fc98 | ||
|
0e4f786978 | ||
|
d36b2318fd | ||
|
d83b508bbc | ||
|
5b9c2cdc13 | ||
|
49066c282a | ||
|
3e28c0c00a | ||
|
220d689f69 | ||
|
5a0a28a04c | ||
|
b44e69e09b | ||
|
fcbe10f5ec | ||
|
182fe170fd | ||
|
184e9bdaf6 | ||
|
0096f50cde | ||
|
460f14deca | ||
|
910ad45bee | ||
|
74e319855d | ||
|
9af0fb4cd5 | ||
|
185f5cce29 | ||
|
aca1174566 | ||
|
e791f7fde2 | ||
|
7bba7fcf66 | ||
|
1d78f98ec8 | ||
|
7ed2e03654 | ||
|
549e0f3477 | ||
|
7785ec0222 | ||
|
ca504965f9 | ||
|
3841259779 | ||
|
169d1065cc | ||
|
e864f5507a | ||
|
434b4ded4a | ||
|
3d01669cea | ||
|
1499b2cd40 | ||
|
6b54ef8398 | ||
|
07ad43f7a2 | ||
|
72e72c60c2 | ||
|
f9a242d33e | ||
|
b0f43eaa07 | ||
|
b02046b884 | ||
|
864c931ee9 | ||
|
5cd8da6d91 | ||
|
4a4671c2ae | ||
|
8de142cd9a | ||
|
1a42bec51c | ||
|
577e38759e | ||
|
9cdf43a2c9 | ||
|
62d43c2cb2 | ||
|
2dc67d1674 | ||
|
fb1c78c657 | ||
|
37e58ac13a | ||
|
de715c14be | ||
|
c4d8a0da05 | ||
|
1b54b14671 | ||
|
a92efbc55f | ||
|
1bd02529e0 | ||
|
bc16298b6e | ||
|
804a97cad7 | ||
|
ab52bdec15 | ||
|
ddc3e82c14 | ||
|
57691471bb | ||
|
c502dd445b | ||
|
ed475b1b9c | ||
|
df165a817c | ||
|
d16015d625 | ||
|
a4b3bf3ef4 | ||
|
6b006853e6 | ||
|
6001180e29 | ||
|
662fbed1d0 | ||
|
19c7e08c5d | ||
|
72f04aaedc | ||
|
2998382969 | ||
|
37fe79944f | ||
|
536735519a | ||
|
6b0a711395 | ||
|
13d3d40376 | ||
|
6873336aca | ||
|
c2d2eb53e8 | ||
|
210d597a48 | ||
|
e41ede0a6b | ||
|
4a8b17ac7c | ||
|
1f5f515d72 | ||
|
1e6242b89f | ||
|
dde09f9f89 | ||
|
916d85c3fe | ||
|
b243ed93aa | ||
|
70d28bbf6e | ||
|
3c76da7132 | ||
|
3254565c09 | ||
|
cd0033791f | ||
|
2427ee44a5 | ||
|
ff0e617b2a | ||
|
e6cfe040b5 | ||
|
94e2f9b6dc | ||
|
512b81ad93 | ||
|
fc0e76f431 | ||
|
9da69358e2 | ||
|
aa246b0b2b | ||
|
6ed649bc8a | ||
|
725f5b7110 | ||
|
5a890c5c3a | ||
|
7752329b94 | ||
|
5f48f13890 | ||
|
a734e04561 | ||
|
5aa1db293f | ||
|
f89aee37f5 | ||
|
538018fed1 | ||
|
a2327c50ec | ||
|
c2711023e2 | ||
|
cac30f0b4c | ||
|
4bb17019a4 | ||
|
ba2a40bdf3 | ||
|
f3460cca49 | ||
|
64ce53ac30 | ||
|
a43238360c | ||
|
b2cbadf5d8 | ||
|
81640ba06d | ||
|
9327430484 | ||
|
a24c90eae8 | ||
|
1d3987ece6 | ||
|
83f5b5e293 | ||
|
f231263085 | ||
|
4ad67a87f1 | ||
|
b766d93d9a | ||
|
0905ceb1d5 | ||
|
2fbf837354 | ||
|
4bd79c880c | ||
|
4af041e015 | ||
|
8dc3e3ec93 | ||
|
f4b68d26d6 | ||
|
1887977b92 | ||
|
8eb84acf4f | ||
|
1b685da3e3 | ||
|
406b658801 | ||
|
bba1ee1264 | ||
|
02b6191d47 | ||
|
c5a3de09cd | ||
|
0afe2a680e | ||
|
03e0510c4f | ||
|
1068dcb8a4 | ||
|
10a93df653 | ||
|
79ff67852f | ||
|
a36cab969f | ||
|
45447646fa | ||
|
8a0f76ab68 | ||
|
037135e764 | ||
|
21e89c3b64 | ||
|
bd11ec69fa | ||
|
9e2b34bc12 | ||
|
0faebc290f | ||
|
fc0ef4b79d | ||
|
027b954b50 | ||
|
33c830a432 | ||
|
a7887f1e25 | ||
|
fa7a59572a | ||
|
d9c2df5b0d | ||
|
a854b2c17e | ||
|
7d4006b205 | ||
|
86ecca6011 | ||
|
0ea5cf2caa | ||
|
a950e02e9b | ||
|
9eec6641dd | ||
|
18f46676fd | ||
|
9735ef6d41 | ||
|
d3e8ceee00 | ||
|
144e329eca | ||
|
21d5420b2a | ||
|
3011b5074d | ||
|
83190572c7 | ||
|
9cf9e5f865 | ||
|
5bdef7f1c7 | ||
|
ba285a2d2d | ||
|
0dff371e62 | ||
|
ce4a2a5851 | ||
|
2c978dc89a | ||
|
4b8b819109 | ||
|
c230b3a806 | ||
|
df08b9c5c6 | ||
|
eca65376a3 | ||
|
88e3705636 | ||
|
5476509ef5 | ||
|
0bd6636453 | ||
|
105894e00d | ||
|
230a319510 | ||
|
ae16a2b14f | ||
|
da0c0742bf | ||
|
61d60a9048 | ||
|
3e28e9a016 | ||
|
423f9fefa9 | ||
|
5707dc7579 | ||
|
3be1cdb249 | ||
|
426d3d948c | ||
|
9a3aed8038 | ||
|
fb58bf1bf5 | ||
|
a6dbd912c6 | ||
|
65ce277a20 | ||
|
0b2d423c87 | ||
|
da056092fb | ||
|
45aa85d690 | ||
|
5c35fee0c2 | ||
|
24bdc319dd | ||
|
f1dcc41e42 | ||
|
550f301ba2 | ||
|
d9bf4d1c0d | ||
|
c3c1a6eb22 | ||
|
2c4454418e | ||
|
e44de572f5 | ||
|
f27919f91b | ||
|
ba9968bde0 | ||
|
05ea8216ff | ||
|
fa1695672a | ||
|
ac6f98fc47 | ||
|
1a1f89f555 | ||
|
6c3262e176 | ||
|
b4bdb48f1e | ||
|
823afe877b | ||
|
cb8e082414 | ||
|
98c1fcc68f | ||
|
8c439a2852 | ||
|
50c6109be7 | ||
|
6e362663b5 | ||
|
74c9feb53f | ||
|
402e8588cf | ||
|
778a42bcc0 | ||
|
584f7ced84 | ||
|
8e892e7ea5 | ||
|
3386c8b455 | ||
|
6fa73ee28d | ||
|
8ec8042045 | ||
|
cddc123539 | ||
|
4c2938c5cd | ||
|
6d03ddadcc | ||
|
64311da4b4 | ||
|
0cbb50ae9d | ||
|
7e96054dc2 | ||
|
578298580e | ||
|
ee5afaa6bc | ||
|
15b023d116 | ||
|
1ef96c0b4d | ||
|
8c3ae40de1 | ||
|
94fcfacec4 | ||
|
ba7c01c6bc | ||
|
9f92e1b7bd | ||
|
1f0e692ee2 | ||
|
0acd75a24f | ||
|
eedf27f8a5 | ||
|
b451e207e2 | ||
|
c0c37eec7b | ||
|
89363ecfa3 | ||
|
593e799ca1 | ||
|
8fc055cad9 | ||
|
75f86462e2 | ||
|
40892ccfa7 | ||
|
87fbf9c1a5 | ||
|
4944b233b6 | ||
|
9f23462c42 | ||
|
84a24f0333 | ||
|
7a885bfc3c | ||
|
3ba0cf1454 | ||
|
2d67a3159d | ||
|
290f25f1a0 | ||
|
1659904f81 | ||
|
230bd6e40a | ||
|
ce27e97b92 | ||
|
18c1223c7b | ||
|
8ef659f5de | ||
|
037452e525 | ||
|
e3482011d5 | ||
|
62748fa255 | ||
|
7a9df05f6b | ||
|
335279e728 | ||
|
0332104738 |
50
.codeclimate.yml
Normal file
50
.codeclimate.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
engines:
|
||||
csslint:
|
||||
enabled: true
|
||||
duplication:
|
||||
enabled: true
|
||||
config:
|
||||
languages:
|
||||
- ruby
|
||||
- javascript
|
||||
- python
|
||||
- php
|
||||
eslint:
|
||||
enabled: true
|
||||
fixme:
|
||||
enabled: true
|
||||
phpmd:
|
||||
enabled: true
|
||||
ratings:
|
||||
paths:
|
||||
- "**.css"
|
||||
- "**.inc"
|
||||
- "**.js"
|
||||
- "**.jsx"
|
||||
- "**.module"
|
||||
- "**.php"
|
||||
- "**.py"
|
||||
- "**.rb"
|
||||
exclude_paths:
|
||||
- gulpfile.js
|
||||
- public/packages/maximebf/php-debugbar/debugbar.js
|
||||
- public/packages/maximebf/php-debugbar/widgets.js
|
||||
- public/packages/maximebf/php-debugbar/openhandler.js
|
||||
- public/packages/maximebf/php-debugbar/widgets/sqlqueries/widget.js
|
||||
- public/js/bootstrap3-typeahead.min.js
|
||||
- public/js/bootstrap-sortable.js
|
||||
- public/js/bootstrap-tagsinput.min.js
|
||||
- public/js/bootstrap-tagsinput.min.js.map
|
||||
- public/js/daterangepicker.js
|
||||
- public/js/jquery-2.1.3.min.js
|
||||
- public/js/jquery-2.1.3.min.js.map
|
||||
- public/js/jquery-ui.min.js
|
||||
- public/js/metisMenu.js
|
||||
- public/js/moment.min.js
|
||||
- public/js/sb-admin-2.js
|
||||
- public/bootstrap/*
|
||||
- resources/lang/*
|
||||
- tests/*
|
||||
- database/*
|
||||
- storage/*
|
@@ -1,3 +1 @@
|
||||
src_dir: .
|
||||
coverage_clover: tests/_output/coverage.xml
|
||||
json_path: tests/_output/coveralls-upload.json
|
2
.csslintrc
Normal file
2
.csslintrc
Normal file
@@ -0,0 +1,2 @@
|
||||
--exclude-exts=.min.css
|
||||
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
|
37
.env.example
Executable file
37
.env.example
Executable file
@@ -0,0 +1,37 @@
|
||||
APP_ENV=production
|
||||
APP_DEBUG=false
|
||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
DEFAULT_CURRENCY=EUR
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_FROM=enter_your_email_here
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||
|
||||
ANALYTICS_ID=
|
||||
RUNCLEANUP=true
|
||||
SITE_OWNER=mail@example.com
|
||||
|
||||
BLOCKED_DOMAINS=
|
37
.env.testing
Executable file
37
.env.testing
Executable file
@@ -0,0 +1,37 @@
|
||||
APP_ENV=testing
|
||||
APP_DEBUG=true
|
||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=homestead
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=array
|
||||
SESSION_DRIVER=array
|
||||
QUEUE_DRIVER=array
|
||||
|
||||
DEFAULT_CURRENCY=EUR
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=log
|
||||
MAIL_HOST=mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_FROM=your_address_here@example.com
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||
|
||||
ANALYTICS_ID=abcde
|
||||
RUNCLEANUP=false
|
||||
SITE_OWNER=your_address_here@example.com
|
||||
|
||||
BLOCKED_DOMAINS=
|
1
.eslintignore
Normal file
1
.eslintignore
Normal file
@@ -0,0 +1 @@
|
||||
**/*{.,-}min.js
|
213
.eslintrc
Normal file
213
.eslintrc
Normal file
@@ -0,0 +1,213 @@
|
||||
ecmaFeatures:
|
||||
modules: true
|
||||
jsx: true
|
||||
|
||||
env:
|
||||
amd: true
|
||||
browser: true
|
||||
es6: true
|
||||
jquery: true
|
||||
node: true
|
||||
|
||||
# http://eslint.org/docs/rules/
|
||||
rules:
|
||||
# Possible Errors
|
||||
comma-dangle: [2, never]
|
||||
no-cond-assign: 2
|
||||
no-console: 0
|
||||
no-constant-condition: 2
|
||||
no-control-regex: 2
|
||||
no-debugger: 2
|
||||
no-dupe-args: 2
|
||||
no-dupe-keys: 2
|
||||
no-duplicate-case: 2
|
||||
no-empty: 2
|
||||
no-empty-character-class: 2
|
||||
no-ex-assign: 2
|
||||
no-extra-boolean-cast: 2
|
||||
no-extra-parens: 0
|
||||
no-extra-semi: 2
|
||||
no-func-assign: 2
|
||||
no-inner-declarations: [2, functions]
|
||||
no-invalid-regexp: 2
|
||||
no-irregular-whitespace: 2
|
||||
no-negated-in-lhs: 2
|
||||
no-obj-calls: 2
|
||||
no-regex-spaces: 2
|
||||
no-sparse-arrays: 2
|
||||
no-unexpected-multiline: 2
|
||||
no-unreachable: 2
|
||||
use-isnan: 2
|
||||
valid-jsdoc: 0
|
||||
valid-typeof: 2
|
||||
|
||||
# Best Practices
|
||||
accessor-pairs: 2
|
||||
block-scoped-var: 0
|
||||
complexity: [2, 6]
|
||||
consistent-return: 0
|
||||
curly: 0
|
||||
default-case: 0
|
||||
dot-location: 0
|
||||
dot-notation: 0
|
||||
eqeqeq: 2
|
||||
guard-for-in: 2
|
||||
no-alert: 2
|
||||
no-caller: 2
|
||||
no-case-declarations: 2
|
||||
no-div-regex: 2
|
||||
no-else-return: 0
|
||||
no-empty-label: 2
|
||||
no-empty-pattern: 2
|
||||
no-eq-null: 2
|
||||
no-eval: 2
|
||||
no-extend-native: 2
|
||||
no-extra-bind: 2
|
||||
no-fallthrough: 2
|
||||
no-floating-decimal: 0
|
||||
no-implicit-coercion: 0
|
||||
no-implied-eval: 2
|
||||
no-invalid-this: 0
|
||||
no-iterator: 2
|
||||
no-labels: 0
|
||||
no-lone-blocks: 2
|
||||
no-loop-func: 2
|
||||
no-magic-number: 0
|
||||
no-multi-spaces: 0
|
||||
no-multi-str: 0
|
||||
no-native-reassign: 2
|
||||
no-new-func: 2
|
||||
no-new-wrappers: 2
|
||||
no-new: 2
|
||||
no-octal-escape: 2
|
||||
no-octal: 2
|
||||
no-proto: 2
|
||||
no-redeclare: 2
|
||||
no-return-assign: 2
|
||||
no-script-url: 2
|
||||
no-self-compare: 2
|
||||
no-sequences: 0
|
||||
no-throw-literal: 0
|
||||
no-unused-expressions: 2
|
||||
no-useless-call: 2
|
||||
no-useless-concat: 2
|
||||
no-void: 2
|
||||
no-warning-comments: 0
|
||||
no-with: 2
|
||||
radix: 2
|
||||
vars-on-top: 0
|
||||
wrap-iife: 2
|
||||
yoda: 0
|
||||
|
||||
# Strict
|
||||
strict: 0
|
||||
|
||||
# Variables
|
||||
init-declarations: 0
|
||||
no-catch-shadow: 2
|
||||
no-delete-var: 2
|
||||
no-label-var: 2
|
||||
no-shadow-restricted-names: 2
|
||||
no-shadow: 0
|
||||
no-undef-init: 2
|
||||
no-undef: 0
|
||||
no-undefined: 0
|
||||
no-unused-vars: 0
|
||||
no-use-before-define: 0
|
||||
|
||||
# Node.js and CommonJS
|
||||
callback-return: 2
|
||||
global-require: 2
|
||||
handle-callback-err: 2
|
||||
no-mixed-requires: 0
|
||||
no-new-require: 0
|
||||
no-path-concat: 2
|
||||
no-process-exit: 2
|
||||
no-restricted-modules: 0
|
||||
no-sync: 0
|
||||
|
||||
# Stylistic Issues
|
||||
array-bracket-spacing: 0
|
||||
block-spacing: 0
|
||||
brace-style: 0
|
||||
camelcase: 0
|
||||
comma-spacing: 0
|
||||
comma-style: 0
|
||||
computed-property-spacing: 0
|
||||
consistent-this: 0
|
||||
eol-last: 0
|
||||
func-names: 0
|
||||
func-style: 0
|
||||
id-length: 0
|
||||
id-match: 0
|
||||
indent: 0
|
||||
jsx-quotes: 0
|
||||
key-spacing: 0
|
||||
linebreak-style: 0
|
||||
lines-around-comment: 0
|
||||
max-depth: 0
|
||||
max-len: 0
|
||||
max-nested-callbacks: 0
|
||||
max-params: 0
|
||||
max-statements: [2, 30]
|
||||
new-cap: 0
|
||||
new-parens: 0
|
||||
newline-after-var: 0
|
||||
no-array-constructor: 0
|
||||
no-bitwise: 0
|
||||
no-continue: 0
|
||||
no-inline-comments: 0
|
||||
no-lonely-if: 0
|
||||
no-mixed-spaces-and-tabs: 0
|
||||
no-multiple-empty-lines: 0
|
||||
no-negated-condition: 0
|
||||
no-nested-ternary: 0
|
||||
no-new-object: 0
|
||||
no-plusplus: 0
|
||||
no-restricted-syntax: 0
|
||||
no-spaced-func: 0
|
||||
no-ternary: 0
|
||||
no-trailing-spaces: 0
|
||||
no-underscore-dangle: 0
|
||||
no-unneeded-ternary: 0
|
||||
object-curly-spacing: 0
|
||||
one-var: 0
|
||||
operator-assignment: 0
|
||||
operator-linebreak: 0
|
||||
padded-blocks: 0
|
||||
quote-props: 0
|
||||
quotes: 0
|
||||
require-jsdoc: 0
|
||||
semi-spacing: 0
|
||||
semi: 0
|
||||
sort-vars: 0
|
||||
space-after-keywords: 0
|
||||
space-before-blocks: 0
|
||||
space-before-function-paren: 0
|
||||
space-before-keywords: 0
|
||||
space-in-parens: 0
|
||||
space-infix-ops: 0
|
||||
space-return-throw-case: 0
|
||||
space-unary-ops: 0
|
||||
spaced-comment: 0
|
||||
wrap-regex: 0
|
||||
|
||||
# ECMAScript 6
|
||||
arrow-body-style: 0
|
||||
arrow-parens: 0
|
||||
arrow-spacing: 0
|
||||
constructor-super: 0
|
||||
generator-star-spacing: 0
|
||||
no-arrow-condition: 0
|
||||
no-class-assign: 0
|
||||
no-const-assign: 0
|
||||
no-dupe-class-members: 0
|
||||
no-this-before-super: 0
|
||||
no-var: 0
|
||||
object-shorthand: 0
|
||||
prefer-arrow-callback: 0
|
||||
prefer-const: 0
|
||||
prefer-reflect: 0
|
||||
prefer-spread: 0
|
||||
prefer-template: 0
|
||||
require-yield: 0
|
2
.gitattributes
vendored
Normal file → Executable file
2
.gitattributes
vendored
Normal file → Executable file
@@ -1 +1,3 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.less linguist-vendored
|
||||
|
29
.gitignore
vendored
29
.gitignore
vendored
@@ -1,25 +1,6 @@
|
||||
/bootstrap/compiled.php
|
||||
/vendor
|
||||
composer.phar
|
||||
.env.*.php
|
||||
.env.php
|
||||
.DS_Store
|
||||
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
|
||||
/node_modules
|
||||
.env
|
||||
|
||||
storage/
|
||||
.env.local
|
||||
|
22
.jshintrc
Normal file
22
.jshintrc
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"undef": true,
|
||||
"unused": false,
|
||||
"strict": true,
|
||||
"browser": true,
|
||||
"jquery": true,
|
||||
"devel": true,
|
||||
"globals": [
|
||||
"language",
|
||||
"token",
|
||||
"currencyCode",
|
||||
"$",
|
||||
"token",
|
||||
"accountID",
|
||||
"billID",
|
||||
"currentMonthName",
|
||||
"previousMonthName",
|
||||
"nextMonthName",
|
||||
"everything",
|
||||
"moment"
|
||||
]
|
||||
}
|
6
.scrutinizer.yml
Normal file
6
.scrutinizer.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
# .scrutinizer.yml
|
||||
tools:
|
||||
external_code_coverage: false
|
||||
filter:
|
||||
excluded_paths:
|
||||
- app/Support/Migration/*
|
26
.travis.yml
26
.travis.yml
@@ -1,16 +1,22 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7
|
||||
|
||||
install:
|
||||
- composer install
|
||||
- phpenv config-rm xdebug.ini
|
||||
- composer selfupdate
|
||||
- rm composer.lock
|
||||
- composer update --no-scripts
|
||||
- php artisan clear-compiled
|
||||
- php artisan optimize
|
||||
- php artisan env
|
||||
- mv -v .env.testing .env
|
||||
- php artisan env
|
||||
- touch storage/upload/at-1.data
|
||||
- touch storage/upload/at-2.data
|
||||
- touch storage/database/testing.db
|
||||
- php artisan migrate --seed
|
||||
|
||||
script:
|
||||
- ./tests/_data/db.sh
|
||||
- php vendor/bin/codecept build
|
||||
- php vendor/bin/codecept run --coverage --coverage-xml
|
||||
|
||||
after_script:
|
||||
- php vendor/bin/coveralls
|
||||
- phpunit
|
||||
|
47
CHANGELOG.md
Normal file
47
CHANGELOG.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
- No unreleased changes yet.
|
||||
|
||||
## [3.8.0] - 2016-03-20
|
||||
### Added
|
||||
- Two factor authentication, thanks to the excellent work of [zjean](https://github.com/zjean).
|
||||
- A new chart showing your net worth in year and multi-year reports.
|
||||
- You can now see if your current or future rules actually match any transactions, thanks to the excellent work of @roberthorlings.
|
||||
- New date fields for transactions. They are not used yet in reports or anything, but they can be filled in.
|
||||
- New routine to export your data.
|
||||
- Firefly III will mail the site owner when blocked users try to login, or when blocked domains are used in registrations.
|
||||
|
||||
|
||||
### Changed
|
||||
- Firefly III now requires PHP 7.0 minimum.
|
||||
|
||||
|
||||
### Fixed
|
||||
- HTML fixes, thanks to [roberthorlings](https://github.com/roberthorlings) and [zjean](https://github.com/zjean)..
|
||||
- A bug fix in the ABN Amro importer, thanks to [roberthorlings](https://github.com/roberthorlings)
|
||||
- It was not possible to change the opening balance, once it had been set. Thanks to [xnyhps](https://github.com/xnyhps) and [marcoveeneman](https://github.com/marcoveeneman) for spotting this.
|
||||
- Various other bug fixes.
|
||||
|
||||
|
||||
|
||||
## [3.4.2] - 2015-05-25
|
||||
### Added
|
||||
- Initial release.
|
||||
|
||||
### Changed
|
||||
- Initial release.
|
||||
|
||||
### Deprecated
|
||||
- Initial release.
|
||||
|
||||
### Removed
|
||||
- Initial release.
|
||||
|
||||
### Fixed
|
||||
- Initial release.
|
||||
|
||||
### Security
|
||||
- Initial release.
|
7
LICENSE
Normal file
7
LICENSE
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (C) 2016 Sander Dorigo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
83
README.md
83
README.md
@@ -1,73 +1,26 @@
|
||||
Firefly III
|
||||
===========
|
||||
# Firefly III
|
||||
|
||||
[](https://travis-ci.org/JC5/firefly-iii)
|
||||
[](http://stillmaintained.com/JC5/firefly-iii)
|
||||
[](https://coveralls.io/r/JC5/firefly-iii?branch=master)
|
||||
[](https://secure.php.net/downloads.php#v7.0.4)
|
||||
[](https://packagist.org/packages/grumpydictator/firefly-iii)
|
||||
[](https://scrutinizer-ci.com/g/JC5/firefly-iii/?branch=master)
|
||||
[](https://scrutinizer-ci.com/g/JC5/firefly-iii/build-status/master)
|
||||
[](https://insight.sensiolabs.com/projects/d44c7012-5f50-41ad-add8-8445330e4102)
|
||||
[](https://codeclimate.com/github/JC5/firefly-iii)
|
||||
|
||||
[](https://packagist.org/packages/grumpydictator/firefly-iii)
|
||||
[](https://packagist.org/packages/grumpydictator/firefly-iii)
|
||||
[](https://packagist.org/packages/grumpydictator/firefly-iii)
|
||||
[](https://packagist.org/packages/grumpydictator/firefly-iii)
|
||||
## About
|
||||
|
||||
Firefly II is a tool to help you manage your finances. Please read the full description [in the wiki](https://github.com/JC5/firefly-iii/wiki/full-description).
|
||||
"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 Mark III is a new version of Firefly built upon best practices and lessons learned
|
||||
from building [Firefly](https://github.com/JC5/Firefly). It's Mark III since the original Firefly never made it outside of my
|
||||
laptop and [Firefly II](https://github.com/JC5/Firefly) is live.
|
||||
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.
|
||||
|
||||
## Current features
|
||||
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
|
||||
|
||||
- [A double-entry bookkeeping system](http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system);
|
||||
- You can store, edit and remove withdrawals, deposits and transfers. This allows you full financial management;
|
||||
- It's possible to create, change and manage money using _budgets_;
|
||||
- Organize transactions using categories;
|
||||
- Save towards a goal using piggy banks;
|
||||
- Predict and anticipate large expenses using "repeated expenses" (ie. yearly taxes);
|
||||
- Predict and anticipate bills using "recurring transactions" (rent for example);
|
||||
- View basic income / expense reports.
|
||||
- Lots of help text in case you don't get it;
|
||||
#### Some advantages of using Firefly
|
||||
|
||||
Everything is organised:
|
||||
- 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", it’s just somebody else’s 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!
|
||||
|
||||
- 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.
|
||||
|
||||
## Changes
|
||||
|
||||
Firefly III will feature, but does not feature yet:
|
||||
|
||||
- Financial reporting showing you how well you are doing;
|
||||
- More control over other resources outside of personal finance
|
||||
- Accounts shared with a partner (household accounts)
|
||||
- Debts
|
||||
- Credit cards
|
||||
- More test-coverage;
|
||||
- Firefly will be able to split transactions; a single purchase can be split in multiple entries, for more fine-grained control.
|
||||
- Firefly will be able to join transactions.
|
||||
- Any other features I might not have thought of.
|
||||
|
||||
Some stuff has been removed:
|
||||
|
||||
- The nesting of budgets, categories and beneficiaries is removed because it was pretty pointless.
|
||||
- Firefly will not encrypt the content of the (MySQL) tables. Old versions of Firefly had this capability but it sucks when searching, sorting and organizing entries.
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Current state
|
||||
I have the basics up and running. Test coverage is currently coming, slowly.
|
||||
|
||||
Although I have not checked extensively, some forms and views have CSRF vulnerabilities. This is because not all
|
||||
views escape all characters by default. Will be fixed.
|
||||
|
||||
Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!
|
||||
Firefly is pretty awesome. [You can read more about Firefly III, and its features, on the Github Pages](https://jc5.github.io/firefly-iii/).
|
||||
|
27
_development/codesniffer/ruleset.xml
Normal file
27
_development/codesniffer/ruleset.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="JamesStandard">
|
||||
<rule ref="Zend">
|
||||
<exclude name="Zend.NamingConventions.ValidVariableName" />
|
||||
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace" />
|
||||
<!--<exclude name="PEAR.Whitespace.ScopeIndent"/>-->
|
||||
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace"/>
|
||||
<exclude name="Generic.Formatting.MultipleStatementAlignment.Incorrect" />
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature" />
|
||||
|
||||
</rule>
|
||||
<!--
|
||||
Here we change two messages from the same sniff. Note how the
|
||||
codes are slightly different because the sniff developer has
|
||||
defined both a MaxExceeded message and a TooLong message. In the
|
||||
case of this sniff, one is used for warnings and one is used
|
||||
for errors.
|
||||
-->
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="lineLimit" value="160"/>
|
||||
<property name="absoluteLineLimit" value="160"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
|
||||
</ruleset>
|
322
_development/codestyle.xml
Normal file
322
_development/codestyle.xml
Normal file
@@ -0,0 +1,322 @@
|
||||
<code_scheme name="Use This One">
|
||||
<option name="RIGHT_MARGIN" value="160" />
|
||||
<CoffeeScriptCodeStyleSettings>
|
||||
<option name="SPACE_BEFORE_PROPERTY_COLON" value="true" />
|
||||
</CoffeeScriptCodeStyleSettings>
|
||||
<JSCodeStyleSettings>
|
||||
<option name="ALIGN_MULTILINE_VAR_DECLARATION" value="true" />
|
||||
</JSCodeStyleSettings>
|
||||
<PHPCodeStyleSettings>
|
||||
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
|
||||
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
|
||||
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
|
||||
<option name="ALIGN_ASSIGNMENTS" value="true" />
|
||||
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
|
||||
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
|
||||
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
|
||||
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
|
||||
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
|
||||
<option name="LOWER_CASE_NULL_CONST" value="true" />
|
||||
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
|
||||
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
|
||||
<option name="ALIGN_CLASS_CONSTANTS" value="true" />
|
||||
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
|
||||
</PHPCodeStyleSettings>
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
<codeStyleSettings language="CoffeeScript">
|
||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="PHP">
|
||||
<option name="RIGHT_MARGIN" value="160" />
|
||||
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
||||
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
|
||||
<option name="ALIGN_MULTILINE_EXTENDS_LIST" value="true" />
|
||||
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
|
||||
<option name="ALIGN_GROUP_FIELD_DECLARATIONS" value="true" />
|
||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
||||
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="EXTENDS_LIST_WRAP" value="1" />
|
||||
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
|
||||
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
|
||||
<option name="TERNARY_OPERATION_WRAP" value="1" />
|
||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
||||
<option name="FOR_STATEMENT_WRAP" value="1" />
|
||||
<option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
|
||||
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
|
||||
<option name="ASSIGNMENT_WRAP" value="1" />
|
||||
<option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="3" />
|
||||
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
||||
<option name="WHILE_BRACE_FORCE" value="3" />
|
||||
<option name="FOR_BRACE_FORCE" value="3" />
|
||||
<arrangement>
|
||||
<tokens>
|
||||
<token id="modifiers" name="modifiers">
|
||||
<rules>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<PUBLIC>true</PUBLIC>
|
||||
<STATIC>true</STATIC>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<PROTECTED>true</PROTECTED>
|
||||
<STATIC>true</STATIC>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<PRIVATE>true</PRIVATE>
|
||||
<STATIC>true</STATIC>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<PUBLIC>true</PUBLIC>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<PROTECTED>true</PROTECTED>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<PRIVATE>true</PRIVATE>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</rules>
|
||||
</token>
|
||||
<token id="visibility" name="visibility">
|
||||
<rules>
|
||||
<rule>
|
||||
<match>
|
||||
<PUBLIC>true</PUBLIC>
|
||||
</match>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<PROTECTED>true</PROTECTED>
|
||||
</match>
|
||||
</rule>
|
||||
<rule>
|
||||
<match>
|
||||
<PRIVATE>true</PRIVATE>
|
||||
</match>
|
||||
</rule>
|
||||
</rules>
|
||||
</token>
|
||||
</tokens>
|
||||
<groups>
|
||||
<group>
|
||||
<type>GETTERS_AND_SETTERS</type>
|
||||
<order>KEEP</order>
|
||||
</group>
|
||||
</groups>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<CONST />
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PUBLIC />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PROTECTED />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PRIVATE />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PUBLIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PROTECTED />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<FIELD />
|
||||
<PRIVATE />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<CONSTRUCTOR />
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PUBLIC />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PROTECTED />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PRIVATE />
|
||||
<STATIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PUBLIC />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PROTECTED />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<METHOD />
|
||||
<PRIVATE />
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<TRAIT />
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<INTERFACE />
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<CLASS />
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
36
_development/phpmd/phpmd.xml
Normal file
36
_development/phpmd/phpmd.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="pcsg-generated-ruleset"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||
<description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/
|
||||
</description>
|
||||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="reportLevel" value="5"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/NPathComplexity">
|
||||
<properties>
|
||||
<property name="minimum" value="128"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
|
||||
<properties>
|
||||
<property name="minimum" value="40"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
|
||||
<properties>
|
||||
<property name="minimum" value="5"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Import rule set and exclude rules -->
|
||||
<rule ref="rulesets/controversial.xml">
|
||||
<exclude name="CamelCasePropertyName" />
|
||||
</rule>
|
||||
|
||||
|
||||
</ruleset>
|
1
_development/readme.txt
Normal file
1
_development/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
These are some of the files I use for code formatting, PHPMD and PHPCS.
|
68
app/Console/Commands/UpgradeFireflyInstructions.php
Normal file
68
app/Console/Commands/UpgradeFireflyInstructions.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Config;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
/**
|
||||
* Class UpgradeFireflyInstructions
|
||||
*
|
||||
* @package FireflyIII\Console\Commands
|
||||
*/
|
||||
class UpgradeFireflyInstructions extends Command
|
||||
{
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'firefly:upgrade-instructions';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
$version = Config::get('firefly.version');
|
||||
$config = Config::get('upgrade.text');
|
||||
$text = $config[$version] ?? null;
|
||||
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
$this->line('');
|
||||
|
||||
if (is_null($text)) {
|
||||
$this->line('Thank you for installing Firefly III, v' . $version);
|
||||
$this->line('If you are upgrading from a previous version,');
|
||||
$this->info('there are no extra upgrade instructions.');
|
||||
$this->line('Firefly III should be ready for use.');
|
||||
} else {
|
||||
$this->line('Thank you for installing Firefly III, v' . $version);
|
||||
$this->line('If you are upgrading from a previous version,');
|
||||
$this->line('please follow these upgrade instructions carefully:');
|
||||
$this->info(wordwrap($text));
|
||||
}
|
||||
|
||||
$this->line('');
|
||||
$this->line('+------------------------------------------------------------------------------+');
|
||||
}
|
||||
}
|
47
app/Console/Kernel.php
Normal file
47
app/Console/Kernel.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Kernel.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Console;
|
||||
|
||||
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
/**
|
||||
* Class Kernel
|
||||
*
|
||||
* @package FireflyIII\Console
|
||||
*/
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands
|
||||
= [
|
||||
UpgradeFireflyInstructions::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameters)
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
}
|
||||
}
|
13
app/Events/Event.php
Normal file
13
app/Events/Event.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Events;
|
||||
|
||||
/**
|
||||
* Class Event
|
||||
*
|
||||
* @package FireflyIII\Events
|
||||
*/
|
||||
abstract class Event
|
||||
{
|
||||
//
|
||||
}
|
44
app/Events/TransactionJournalStored.php
Normal file
44
app/Events/TransactionJournalStored.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* TransactionJournalStored.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalStored
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Events
|
||||
*/
|
||||
class TransactionJournalStored extends Event
|
||||
{
|
||||
|
||||
use SerializesModels;
|
||||
|
||||
public $journal;
|
||||
public $piggyBankId;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
* @param int $piggyBankId
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal, int $piggyBankId)
|
||||
{
|
||||
//
|
||||
$this->journal = $journal;
|
||||
$this->piggyBankId = $piggyBankId;
|
||||
|
||||
}
|
||||
|
||||
}
|
33
app/Events/TransactionJournalUpdated.php
Normal file
33
app/Events/TransactionJournalUpdated.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Events;
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class TransactionJournalUpdated
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Events
|
||||
*/
|
||||
class TransactionJournalUpdated extends Event
|
||||
{
|
||||
|
||||
use SerializesModels;
|
||||
|
||||
public $journal;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal)
|
||||
{
|
||||
//
|
||||
$this->journal = $journal;
|
||||
}
|
||||
|
||||
}
|
15
app/Exceptions/FireflyException.php
Normal file
15
app/Exceptions/FireflyException.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Exceptions;
|
||||
|
||||
|
||||
/**
|
||||
* Class FireflyException
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Exceptions
|
||||
*/
|
||||
class FireflyException extends \Exception
|
||||
{
|
||||
|
||||
}
|
89
app/Exceptions/Handler.php
Normal file
89
app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Exceptions;
|
||||
|
||||
use Auth;
|
||||
use ErrorException;
|
||||
use Exception;
|
||||
use FireflyIII\Jobs\MailError;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Request;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
/**
|
||||
* Class Handler
|
||||
*
|
||||
* @package FireflyIII\Exceptions
|
||||
*/
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* A list of the exception types that should not be reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport
|
||||
= [
|
||||
AuthorizationException::class,
|
||||
HttpException::class,
|
||||
ModelNotFoundException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $exception
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
{
|
||||
if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
|
||||
|
||||
$isDebug = env('APP_DEBUG', false);
|
||||
|
||||
return response()->view('errors.FireflyException', ['exception' => $exception, 'debug' => $isDebug], 500);
|
||||
}
|
||||
|
||||
return parent::render($request, $exception);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param Exception $exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
{
|
||||
|
||||
if ($exception instanceof FireflyException || $exception instanceof ErrorException) {
|
||||
|
||||
$user = Auth::check() ? Auth::user() : new User;
|
||||
|
||||
$data = [
|
||||
'class' => get_class($exception),
|
||||
'errorMessage' => $exception->getMessage(),
|
||||
'time' => date('r'),
|
||||
'stackTrace' => $exception->getTraceAsString(),
|
||||
'file' => $exception->getFile(),
|
||||
'line' => $exception->getLine(),
|
||||
'code' => $exception->getCode(),
|
||||
];
|
||||
|
||||
// create job that will mail.
|
||||
$job = new MailError($user, env('SITE_OWNER'), Request::ip(), $data);
|
||||
dispatch($job);
|
||||
}
|
||||
|
||||
parent::report($exception);
|
||||
}
|
||||
}
|
15
app/Exceptions/NotImplementedException.php
Normal file
15
app/Exceptions/NotImplementedException.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Exceptions;
|
||||
|
||||
|
||||
/**
|
||||
* Class NotImplementedException
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Exceptions
|
||||
*/
|
||||
class NotImplementedException extends \Exception
|
||||
{
|
||||
|
||||
}
|
14
app/Exceptions/ValidationException.php
Normal file
14
app/Exceptions/ValidationException.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Exceptions;
|
||||
|
||||
/**
|
||||
* Class ValidationExceptions
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Exception
|
||||
*/
|
||||
class ValidationException extends \Exception
|
||||
{
|
||||
|
||||
}
|
148
app/Export/Collector/AttachmentCollector.php
Normal file
148
app/Export/Collector/AttachmentCollector.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* AttachmentCollector.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Collector;
|
||||
|
||||
use Amount;
|
||||
use Crypt;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class AttachmentCollector
|
||||
*
|
||||
* @package FireflyIII\Export\Collector
|
||||
*/
|
||||
class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $explanationString = '';
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
private $exportDisk;
|
||||
/** @var AttachmentRepositoryInterface */
|
||||
private $repository;
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
private $uploadDisk;
|
||||
|
||||
/**
|
||||
* AttachmentCollector constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
$this->repository = app('FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface');
|
||||
// make storage:
|
||||
$this->uploadDisk = Storage::disk('upload');
|
||||
$this->exportDisk = Storage::disk('export');
|
||||
|
||||
parent::__construct($job);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// grab all the users attachments:
|
||||
$attachments = $this->getAttachments();
|
||||
|
||||
/** @var Attachment $attachment */
|
||||
foreach ($attachments as $attachment) {
|
||||
$this->exportAttachment($attachment);
|
||||
}
|
||||
|
||||
// put the explanation string in a file and attach it as well.
|
||||
$file = $this->job->key . '-Source of all your attachments explained.txt';
|
||||
$this->exportDisk->put($file, $this->explanationString);
|
||||
Log::debug('Also put explanation file "' . $file . '" in the zip.');
|
||||
$this->getFiles()->push($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*/
|
||||
private function explain(Attachment $attachment)
|
||||
{
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $attachment->attachable;
|
||||
$args = [
|
||||
'attachment_name' => $attachment->filename,
|
||||
'attachment_id' => $attachment->id,
|
||||
'type' => strtolower($journal->transactionType->type),
|
||||
'description' => $journal->description,
|
||||
'journal_id' => $journal->id,
|
||||
'date' => $journal->date->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'amount' => Amount::formatJournal($journal, false),
|
||||
];
|
||||
$string = trans('firefly.attachment_explanation', $args) . "\n";
|
||||
$this->explanationString .= $string;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function exportAttachment(Attachment $attachment): bool
|
||||
{
|
||||
$file = $attachment->fileName();
|
||||
Log::debug('Original file is at "' . $file . '".');
|
||||
if ($this->uploadDisk->exists($file)) {
|
||||
try {
|
||||
$decrypted = Crypt::decrypt($this->uploadDisk->get($file));
|
||||
$exportFile = $this->exportFileName($attachment);
|
||||
$this->exportDisk->put($exportFile, $decrypted);
|
||||
$this->getFiles()->push($exportFile);
|
||||
Log::debug('Stored file content in new file "' . $exportFile . '", which will be in the final zip file.');
|
||||
|
||||
// explain:
|
||||
$this->explain($attachment);
|
||||
} catch (DecryptException $e) {
|
||||
Log::error('Catchable error: could not decrypt attachment #' . $attachment->id . ' because: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the new file name for the export file.
|
||||
*
|
||||
* @param $attachment
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function exportFileName($attachment): string
|
||||
{
|
||||
|
||||
return sprintf('%s-Attachment nr. %s - %s', $this->job->key, strval($attachment->id), $attachment->filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
private function getAttachments(): Collection
|
||||
{
|
||||
$attachments = $this->repository->get();
|
||||
|
||||
Log::debug('Found ' . $attachments->count() . ' attachments.');
|
||||
|
||||
return $attachments;
|
||||
}
|
||||
}
|
57
app/Export/Collector/BasicCollector.php
Normal file
57
app/Export/Collector/BasicCollector.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* BasicCollector.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Collector;
|
||||
|
||||
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class BasicCollector
|
||||
*
|
||||
* @package FireflyIII\Export\Collector
|
||||
*/
|
||||
class BasicCollector
|
||||
{
|
||||
/** @var ExportJob */
|
||||
protected $job;
|
||||
/** @var Collection */
|
||||
private $files;
|
||||
|
||||
/**
|
||||
* BasicCollector constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
$this->files = new Collection;
|
||||
$this->job = $job;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $files
|
||||
*/
|
||||
public function setFiles(Collection $files)
|
||||
{
|
||||
$this->files = $files;
|
||||
}
|
||||
|
||||
|
||||
}
|
38
app/Export/Collector/CollectorInterface.php
Normal file
38
app/Export/Collector/CollectorInterface.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* CollectorInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Collector;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface CollectorInterface
|
||||
*
|
||||
* @package FireflyIII\Export\Collector
|
||||
*/
|
||||
interface CollectorInterface
|
||||
{
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFiles();
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function run();
|
||||
|
||||
/**
|
||||
* @param Collection $files
|
||||
*
|
||||
*/
|
||||
public function setFiles(Collection $files);
|
||||
|
||||
}
|
119
app/Export/Collector/UploadCollector.php
Normal file
119
app/Export/Collector/UploadCollector.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* UploadCollector.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Collector;
|
||||
|
||||
use Auth;
|
||||
use Crypt;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class UploadCollector
|
||||
*
|
||||
* @package FireflyIII\Export\Collector
|
||||
*/
|
||||
class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $expected;
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
private $exportDisk;
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
private $uploadDisk;
|
||||
|
||||
/**
|
||||
* AttachmentCollector constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
parent::__construct($job);
|
||||
|
||||
// make storage:
|
||||
$this->uploadDisk = Storage::disk('upload');
|
||||
$this->exportDisk = Storage::disk('export');
|
||||
$this->expected = 'csv-upload-' . Auth::user()->id . '-';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// grab upload directory.
|
||||
$files = $this->uploadDisk->files();
|
||||
Log::debug('Found ' . count($files) . ' files in the upload directory.');
|
||||
|
||||
foreach ($files as $entry) {
|
||||
$this->processOldUpload($entry);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $entry
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getOriginalUploadDate(string $entry): string
|
||||
{
|
||||
// this is an original upload.
|
||||
$parts = explode('-', str_replace(['.csv.encrypted', $this->expected], '', $entry));
|
||||
$originalUpload = intval($parts[1]);
|
||||
$date = date('Y-m-d \a\t H-i-s', $originalUpload);
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $entry
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isValidFile(string $entry): bool
|
||||
{
|
||||
$len = strlen($this->expected);
|
||||
if (substr($entry, 0, $len) === $this->expected) {
|
||||
Log::debug($entry . ' is part of this users original uploads.');
|
||||
|
||||
return true;
|
||||
}
|
||||
Log::debug($entry . ' is not part of this users original uploads.');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $entry
|
||||
*/
|
||||
private function processOldUpload(string $entry)
|
||||
{
|
||||
$content = '';
|
||||
|
||||
if ($this->isValidFile($entry)) {
|
||||
try {
|
||||
$content = Crypt::decrypt($this->uploadDisk->get($entry));
|
||||
} catch (DecryptException $e) {
|
||||
Log::error('Could not decrypt old CSV import file ' . $entry . '. Skipped because ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
if (strlen($content) > 0) {
|
||||
// continue with file:
|
||||
$date = $this->getOriginalUploadDate($entry);
|
||||
$file = $this->job->key . '-Old CSV import dated ' . $date . '.csv';
|
||||
Log::debug('Will put "' . $file . '" in the zip file.');
|
||||
$this->exportDisk->put($file, $content);
|
||||
$this->getFiles()->push($file);
|
||||
}
|
||||
}
|
||||
}
|
67
app/Export/ConfigurationFile.php
Normal file
67
app/Export/ConfigurationFile.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* ConfigurationFile.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export;
|
||||
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use Log;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class ConfigurationFile
|
||||
*
|
||||
* @package FireflyIII\Export
|
||||
*/
|
||||
class ConfigurationFile
|
||||
{
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
private $exportDisk;
|
||||
/** @var ExportJob */
|
||||
private $job;
|
||||
|
||||
/**
|
||||
* ConfigurationFile constructor.
|
||||
*
|
||||
* @param ExportJob $job
|
||||
*/
|
||||
public function __construct(ExportJob $job)
|
||||
{
|
||||
$this->job = $job;
|
||||
$this->exportDisk = Storage::disk('export');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function make()
|
||||
{
|
||||
$fields = array_keys(get_class_vars(Entry::class));
|
||||
$types = Entry::getTypes();
|
||||
|
||||
$configuration = [
|
||||
'date-format' => 'Y-m-d', // unfortunately, this is hard-coded.
|
||||
'has-headers' => true,
|
||||
'map' => [], // we could build a map if necessary for easy re-import.
|
||||
'roles' => [],
|
||||
'mapped' => [],
|
||||
'specifix' => [],
|
||||
];
|
||||
foreach ($fields as $field) {
|
||||
$configuration['roles'][] = $types[$field];
|
||||
}
|
||||
$file = $this->job->key . '-configuration.json';
|
||||
Log::debug('Created JSON config file.');
|
||||
Log::debug('Will put "' . $file . '" in the ZIP file.');
|
||||
$this->exportDisk->put($file, json_encode($configuration, JSON_PRETTY_PRINT));
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
}
|
460
app/Export/Entry.php
Normal file
460
app/Export/Entry.php
Normal file
@@ -0,0 +1,460 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* Entry.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export;
|
||||
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* - 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
|
||||
*/
|
||||
class Entry
|
||||
{
|
||||
/** @var string */
|
||||
public $amount;
|
||||
/** @var int */
|
||||
public $billId;
|
||||
/** @var string */
|
||||
public $billName;
|
||||
/** @var int */
|
||||
public $budgetId;
|
||||
/** @var string */
|
||||
public $budgetName;
|
||||
/** @var int */
|
||||
public $categoryId;
|
||||
/** @var string */
|
||||
public $categoryName;
|
||||
/** @var string */
|
||||
public $date;
|
||||
/** @var string */
|
||||
public $description;
|
||||
/** @var string */
|
||||
public $fromAccountIban;
|
||||
/** @var int */
|
||||
public $fromAccountId;
|
||||
/** @var string */
|
||||
public $fromAccountName;
|
||||
public $fromAccountNumber;
|
||||
/** @var string */
|
||||
public $fromAccountType;
|
||||
/** @var string */
|
||||
public $toAccountIban;
|
||||
/** @var int */
|
||||
public $toAccountId;
|
||||
/** @var string */
|
||||
public $toAccountName;
|
||||
public $toAccountNumber;
|
||||
/** @var string */
|
||||
public $toAccountType;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return Entry
|
||||
*/
|
||||
public static function fromJournal(TransactionJournal $journal)
|
||||
{
|
||||
|
||||
$entry = new self;
|
||||
$entry->setDescription($journal->description);
|
||||
$entry->setDate($journal->date->format('Y-m-d'));
|
||||
$entry->setAmount(TransactionJournal::amount($journal));
|
||||
|
||||
/** @var Budget $budget */
|
||||
$budget = $journal->budgets->first();
|
||||
if (!is_null($budget)) {
|
||||
$entry->setBudgetId($budget->id);
|
||||
$entry->setBudgetName($budget->name);
|
||||
}
|
||||
|
||||
/** @var Category $category */
|
||||
$category = $journal->categories->first();
|
||||
if (!is_null($category)) {
|
||||
$entry->setCategoryId($category->id);
|
||||
$entry->setCategoryName($category->name);
|
||||
}
|
||||
|
||||
if (!is_null($journal->bill_id)) {
|
||||
$entry->setBillId($journal->bill_id);
|
||||
$entry->setBillName($journal->bill->name);
|
||||
}
|
||||
|
||||
/** @var Account $sourceAccount */
|
||||
$sourceAccount = TransactionJournal::sourceAccount($journal);
|
||||
$entry->setFromAccountId($sourceAccount->id);
|
||||
$entry->setFromAccountName($sourceAccount->name);
|
||||
$entry->setFromAccountIban($sourceAccount->iban);
|
||||
$entry->setFromAccountType($sourceAccount->accountType->type);
|
||||
$entry->setFromAccountNumber($sourceAccount->getMeta('accountNumber'));
|
||||
|
||||
|
||||
/** @var Account $destination */
|
||||
$destination = TransactionJournal::destinationAccount($journal);
|
||||
$entry->setToAccountId($destination->id);
|
||||
$entry->setToAccountName($destination->name);
|
||||
$entry->setToAccountIban($destination->iban);
|
||||
$entry->setToAccountType($destination->accountType->type);
|
||||
$entry->setToAccountNumber($destination->getMeta('accountNumber'));
|
||||
|
||||
return $entry;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getTypes(): array
|
||||
{
|
||||
// key = field name (see top of class)
|
||||
// value = field type (see csv.php under 'roles')
|
||||
return [
|
||||
'amount' => 'amount',
|
||||
'date' => 'date-transaction',
|
||||
'description' => 'description',
|
||||
'billId' => 'bill-id',
|
||||
'billName' => 'bill-name',
|
||||
'budgetId' => 'budget-id',
|
||||
'budgetName' => 'budget-name',
|
||||
'categoryId' => 'category-id',
|
||||
'categoryName' => 'category-name',
|
||||
'fromAccountId' => 'account-id',
|
||||
'fromAccountName' => 'account-name',
|
||||
'fromAccountIban' => 'account-iban',
|
||||
'fromAccountType' => '_ignore', // no, Firefly cannot import what it exports. I know :D
|
||||
'toAccountId' => 'opposing-id',
|
||||
'toAccountName' => 'opposing-name',
|
||||
'toAccountIban' => 'opposing-iban',
|
||||
'toAccountType' => '_ignore',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAmount(): string
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $amount
|
||||
*/
|
||||
public function setAmount(string $amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBillId()
|
||||
{
|
||||
return $this->billId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $billId
|
||||
*/
|
||||
public function setBillId($billId)
|
||||
{
|
||||
$this->billId = $billId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBillName()
|
||||
{
|
||||
return $this->billName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $billName
|
||||
*/
|
||||
public function setBillName($billName)
|
||||
{
|
||||
$this->billName = $billName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBudgetId()
|
||||
{
|
||||
return $this->budgetId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $budgetId
|
||||
*/
|
||||
public function setBudgetId($budgetId)
|
||||
{
|
||||
$this->budgetId = $budgetId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBudgetName()
|
||||
{
|
||||
return $this->budgetName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $budgetName
|
||||
*/
|
||||
public function setBudgetName($budgetName)
|
||||
{
|
||||
$this->budgetName = $budgetName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getCategoryId()
|
||||
{
|
||||
return $this->categoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $categoryId
|
||||
*/
|
||||
public function setCategoryId($categoryId)
|
||||
{
|
||||
$this->categoryId = $categoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCategoryName()
|
||||
{
|
||||
return $this->categoryName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $categoryName
|
||||
*/
|
||||
public function setCategoryName($categoryName)
|
||||
{
|
||||
$this->categoryName = $categoryName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $date
|
||||
*/
|
||||
public function setDate(string $date)
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
*/
|
||||
public function setDescription(string $description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFromAccountIban()
|
||||
{
|
||||
return $this->fromAccountIban;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fromAccountIban
|
||||
*/
|
||||
public function setFromAccountIban($fromAccountIban)
|
||||
{
|
||||
$this->fromAccountIban = $fromAccountIban;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getFromAccountId()
|
||||
{
|
||||
return $this->fromAccountId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $fromAccountId
|
||||
*/
|
||||
public function setFromAccountId($fromAccountId)
|
||||
{
|
||||
$this->fromAccountId = $fromAccountId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFromAccountName()
|
||||
{
|
||||
return $this->fromAccountName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fromAccountName
|
||||
*/
|
||||
public function setFromAccountName($fromAccountName)
|
||||
{
|
||||
$this->fromAccountName = $fromAccountName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFromAccountNumber()
|
||||
{
|
||||
return $this->fromAccountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $fromAccountNumber
|
||||
*/
|
||||
public function setFromAccountNumber($fromAccountNumber)
|
||||
{
|
||||
$this->fromAccountNumber = $fromAccountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFromAccountType()
|
||||
{
|
||||
return $this->fromAccountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fromAccountType
|
||||
*/
|
||||
public function setFromAccountType($fromAccountType)
|
||||
{
|
||||
$this->fromAccountType = $fromAccountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getToAccountIban()
|
||||
{
|
||||
return $this->toAccountIban;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $toAccountIban
|
||||
*/
|
||||
public function setToAccountIban($toAccountIban)
|
||||
{
|
||||
$this->toAccountIban = $toAccountIban;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getToAccountId()
|
||||
{
|
||||
return $this->toAccountId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $toAccountId
|
||||
*/
|
||||
public function setToAccountId($toAccountId)
|
||||
{
|
||||
$this->toAccountId = $toAccountId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getToAccountName()
|
||||
{
|
||||
return $this->toAccountName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $toAccountName
|
||||
*/
|
||||
public function setToAccountName($toAccountName)
|
||||
{
|
||||
$this->toAccountName = $toAccountName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getToAccountNumber()
|
||||
{
|
||||
return $this->toAccountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $toAccountNumber
|
||||
*/
|
||||
public function setToAccountNumber($toAccountNumber)
|
||||
{
|
||||
$this->toAccountNumber = $toAccountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getToAccountType()
|
||||
{
|
||||
return $this->toAccountType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $toAccountType
|
||||
*/
|
||||
public function setToAccountType($toAccountType)
|
||||
{
|
||||
$this->toAccountType = $toAccountType;
|
||||
}
|
||||
|
||||
|
||||
}
|
56
app/Export/Exporter/BasicExporter.php
Normal file
56
app/Export/Exporter/BasicExporter.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* BasicExporter.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
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()
|
||||
{
|
||||
return $this->entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*/
|
||||
public function setEntries(Collection $entries)
|
||||
{
|
||||
$this->entries = $entries;
|
||||
}
|
||||
|
||||
|
||||
}
|
81
app/Export/Exporter/CsvExporter.php
Normal file
81
app/Export/Exporter/CsvExporter.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* CsvExporter.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
|
||||
use FireflyIII\Export\Entry;
|
||||
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()
|
||||
{
|
||||
return $this->fileName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// create temporary file:
|
||||
$this->tempFile();
|
||||
|
||||
// necessary for CSV writer:
|
||||
$fullPath = storage_path('export') . DIRECTORY_SEPARATOR . $this->fileName;
|
||||
|
||||
// create CSV writer:
|
||||
$writer = Writer::createFromPath(new SplFileObject($fullPath, 'a+'), 'w');
|
||||
|
||||
// all rows:
|
||||
$rows = [];
|
||||
|
||||
// add header:
|
||||
$first = $this->getEntries()->first();
|
||||
$rows[] = array_keys(get_object_vars($first));
|
||||
|
||||
// then the rest:
|
||||
/** @var Entry $entry */
|
||||
foreach ($this->getEntries() as $entry) {
|
||||
$rows[] = array_values(get_object_vars($entry));
|
||||
|
||||
}
|
||||
$writer->insertAll($rows);
|
||||
}
|
||||
|
||||
private function tempFile()
|
||||
{
|
||||
$this->fileName = $this->job->key . '-records.csv';
|
||||
}
|
||||
}
|
43
app/Export/Exporter/ExporterInterface.php
Normal file
43
app/Export/Exporter/ExporterInterface.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* ExporterInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface ExporterInterface
|
||||
*
|
||||
* @package FireflyIII\Export\Exporter
|
||||
*/
|
||||
interface ExporterInterface
|
||||
{
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getEntries();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFileName();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function run();
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
*/
|
||||
public function setEntries(Collection $entries);
|
||||
|
||||
}
|
182
app/Export/Processor.php
Normal file
182
app/Export/Processor.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* Processor.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Export;
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\ExportJob;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
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 $includeConfig;
|
||||
/** @var bool */
|
||||
public $includeOldUploads;
|
||||
/** @var ExportJob */
|
||||
public $job;
|
||||
/** @var array */
|
||||
public $settings;
|
||||
/** @var \FireflyIII\Export\ConfigurationFile */
|
||||
private $configurationMaker;
|
||||
/** @var Collection */
|
||||
private $exportEntries;
|
||||
/** @var Collection */
|
||||
private $files;
|
||||
/** @var Collection */
|
||||
private $journals;
|
||||
|
||||
/**
|
||||
* Processor constructor.
|
||||
*
|
||||
* @param array $settings
|
||||
*/
|
||||
public function __construct(array $settings)
|
||||
{
|
||||
// save settings
|
||||
$this->settings = $settings;
|
||||
$this->accounts = $settings['accounts'];
|
||||
$this->exportFormat = $settings['exportFormat'];
|
||||
$this->includeAttachments = $settings['includeAttachments'];
|
||||
$this->includeConfig = $settings['includeConfig'];
|
||||
$this->includeOldUploads = $settings['includeOldUploads'];
|
||||
$this->job = $settings['job'];
|
||||
$this->journals = new Collection;
|
||||
$this->exportEntries = new Collection;
|
||||
$this->files = new Collection;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function collectAttachments()
|
||||
{
|
||||
$attachmentCollector = app('FireflyIII\Export\Collector\AttachmentCollector', [$this->job]);
|
||||
$attachmentCollector->run();
|
||||
$this->files = $this->files->merge($attachmentCollector->getFiles());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function collectJournals()
|
||||
{
|
||||
$args = [$this->accounts, Auth::user(), $this->settings['startDate'], $this->settings['endDate']];
|
||||
$journalCollector = app('FireflyIII\Repositories\Journal\JournalCollector', $args);
|
||||
$this->journals = $journalCollector->collect();
|
||||
Log::debug(
|
||||
'Collected ' .
|
||||
$this->journals->count() . ' journals (between ' .
|
||||
$this->settings['startDate']->format('Y-m-d') . ' and ' .
|
||||
$this->settings['endDate']->format('Y-m-d')
|
||||
. ').'
|
||||
);
|
||||
}
|
||||
|
||||
public function collectOldUploads()
|
||||
{
|
||||
$uploadCollector = app('FireflyIII\Export\Collector\UploadCollector', [$this->job]);
|
||||
$uploadCollector->run();
|
||||
|
||||
$this->files = $this->files->merge($uploadCollector->getFiles());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function convertJournals()
|
||||
{
|
||||
$count = 0;
|
||||
/** @var TransactionJournal $journal */
|
||||
foreach ($this->journals as $journal) {
|
||||
$this->exportEntries->push(Entry::fromJournal($journal));
|
||||
$count++;
|
||||
}
|
||||
Log::debug('Converted ' . $count . ' journals to "Entry" objects.');
|
||||
}
|
||||
|
||||
public function createConfigFile()
|
||||
{
|
||||
$this->configurationMaker = app('FireflyIII\Export\ConfigurationFile', [$this->job]);
|
||||
$this->files->push($this->configurationMaker->make());
|
||||
}
|
||||
|
||||
public function createZipFile()
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
$file = $this->job->key . '.zip';
|
||||
$fullPath = storage_path('export') . '/' . $file;
|
||||
Log::debug('Will create zip file at ' . $fullPath);
|
||||
|
||||
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);
|
||||
$result = $zip->addFromString($zipFileName, $disk->get($entry));
|
||||
if (!$result) {
|
||||
Log::error('Could not add "' . $entry . '" into zip file as "' . $zipFileName . '".');
|
||||
}
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
|
||||
// delete the files:
|
||||
foreach ($this->getFiles() as $file) {
|
||||
Log::debug('Will now delete file "' . $file . '".');
|
||||
$disk->delete($file);
|
||||
}
|
||||
Log::debug('Done!');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function exportJournals()
|
||||
{
|
||||
$exporterClass = Config::get('firefly.export_formats.' . $this->exportFormat);
|
||||
$exporter = app($exporterClass, [$this->job]);
|
||||
Log::debug('Going to export ' . $this->exportEntries->count() . ' export entries into ' . $this->exportFormat . ' format.');
|
||||
$exporter->setEntries($this->exportEntries);
|
||||
$exporter->run();
|
||||
$this->files->push($exporter->getFileName());
|
||||
Log::debug('Added "' . $exporter->getFileName() . '" to the list of files to include in the zip.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getFiles()
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* AccountChartGeneratorInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Generator\Chart\Account;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface AccountChartGeneratorInterface
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Account
|
||||
*/
|
||||
interface AccountChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array;
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function single(Account $account, Carbon $start, Carbon $end): array;
|
||||
}
|
180
app/Generator/Chart/Account/ChartJsAccountChartGenerator.php
Normal file
180
app/Generator/Chart/Account/ChartJsAccountChartGenerator.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\Account;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use Illuminate\Support\Collection;
|
||||
use Steam;
|
||||
|
||||
/**
|
||||
* Class ChartJsAccountChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Account
|
||||
*/
|
||||
class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function expenseAccounts(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => [], 'datasets' => [[
|
||||
'label' => trans('firefly.spent'),
|
||||
'data' => []]]];
|
||||
|
||||
$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;
|
||||
}
|
||||
);
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
if ($account->difference > 0) {
|
||||
$data['labels'][] = $account->name;
|
||||
$data['datasets'][0]['data'][] = $account->difference;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month_and_day');
|
||||
$data = ['count' => 0, 'labels' => [], 'datasets' => [],];
|
||||
$current = clone $start;
|
||||
while ($current <= $end) {
|
||||
$data['labels'][] = $current->formatLocalized($format);
|
||||
$current->addDay();
|
||||
}
|
||||
|
||||
foreach ($accounts as $account) {
|
||||
$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;
|
||||
$range = Steam::balanceInRange($account, $start, clone $end);
|
||||
$previous = round(array_values($range)[0], 2);
|
||||
while ($current <= $end) {
|
||||
$format = $current->format('Y-m-d');
|
||||
$balance = isset($range[$format]) ? round($range[$format], 2) : $previous;
|
||||
|
||||
$set['data'][] = $balance;
|
||||
$previous = $balance;
|
||||
$current->addDay();
|
||||
}
|
||||
$data['datasets'][] = $set;
|
||||
}
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function single(Account $account, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month_and_day');
|
||||
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => $account->name,
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
$range = Steam::balanceInRange($account, $start, $end);
|
||||
$current = clone $start;
|
||||
$previous = array_values($range)[0];
|
||||
|
||||
while ($end >= $current) {
|
||||
$theDate = $current->format('Y-m-d');
|
||||
$balance = $range[$theDate] ?? $previous;
|
||||
|
||||
$data['labels'][] = $current->formatLocalized($format);
|
||||
$data['datasets'][0]['data'][] = $balance;
|
||||
$previous = $balance;
|
||||
$current->addDay();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $collection
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getIdsFromCollection(Collection $collection): array
|
||||
{
|
||||
$ids = [];
|
||||
foreach ($collection as $entry) {
|
||||
$ids[] = $entry->id;
|
||||
}
|
||||
|
||||
return array_unique($ids);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $array
|
||||
* @param $entryId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function isInArray($array, $entryId): string
|
||||
{
|
||||
if (isset($array[$entryId])) {
|
||||
return $array[$entryId];
|
||||
}
|
||||
|
||||
return '0';
|
||||
}
|
||||
}
|
41
app/Generator/Chart/Bill/BillChartGeneratorInterface.php
Normal file
41
app/Generator/Chart/Bill/BillChartGeneratorInterface.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* BillChartGeneratorInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
}
|
96
app/Generator/Chart/Bill/ChartJsBillChartGenerator.php
Normal file
96
app/Generator/Chart/Bill/ChartJsBillChartGenerator.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* ChartJsBillChartGenerator.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Generator\Chart\Bill;
|
||||
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class ChartJsBillChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Bill
|
||||
*/
|
||||
class ChartJsBillChartGenerator implements BillChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param string $paid
|
||||
* @param string $unpaid
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(string $paid, string $unpaid): array
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'value' => round($unpaid, 2),
|
||||
'color' => 'rgba(53, 124, 165,0.7)',
|
||||
'highlight' => 'rgba(53, 124, 165,0.9)',
|
||||
'label' => trans('firefly.unpaid'),
|
||||
],
|
||||
[
|
||||
'value' => round(bcmul($paid, '-1'), 2), // paid is negative, must be positive.
|
||||
'color' => 'rgba(0, 141, 76, 0.7)',
|
||||
'highlight' => 'rgba(0, 141, 76, 0.9)',
|
||||
'label' => trans('firefly.paid'),
|
||||
],
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Bill $bill
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function single(Bill $bill, Collection $entries): array
|
||||
{
|
||||
$format = (string)trans('config.month');
|
||||
$data = [
|
||||
'count' => 3,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
$minAmount = [];
|
||||
$maxAmount = [];
|
||||
$actualAmount = [];
|
||||
/** @var TransactionJournal $entry */
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = $entry->date->formatLocalized($format);
|
||||
$minAmount[] = round($bill->amount_min, 2);
|
||||
$maxAmount[] = round($bill->amount_max, 2);
|
||||
/*
|
||||
* journalAmount has been collected in BillRepository::getJournals
|
||||
*/
|
||||
$actualAmount[] = round(TransactionJournal::amountPositive($entry), 2);
|
||||
}
|
||||
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.minAmount'),
|
||||
'data' => $minAmount,
|
||||
];
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.billEntry'),
|
||||
'data' => $actualAmount,
|
||||
];
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.maxAmount'),
|
||||
'data' => $maxAmount,
|
||||
];
|
||||
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
58
app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php
Normal file
58
app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* BudgetChartGeneratorInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Generator\Chart\Budget;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Interface BudgetChartGeneratorInterface
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Budget
|
||||
*/
|
||||
interface BudgetChartGeneratorInterface
|
||||
{
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function budget(Collection $entries): array;
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function budgetLimit(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 $budgets
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function year(Collection $budgets, Collection $entries): array;
|
||||
|
||||
}
|
177
app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php
Normal file
177
app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\Budget;
|
||||
|
||||
|
||||
use Config;
|
||||
use Illuminate\Support\Collection;
|
||||
use Preferences;
|
||||
|
||||
/**
|
||||
* Class ChartJsBudgetChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Budget
|
||||
*/
|
||||
class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
* @param string $dateFormat
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function budget(Collection $entries, $dateFormat = 'month'): array
|
||||
{
|
||||
// language:
|
||||
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
|
||||
$format = Config::get('firefly.' . $dateFormat . '.' . $language);
|
||||
|
||||
$data = [
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => 'Amount',
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
/** @var array $entry */
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = $entry[0]->formatLocalized($format);
|
||||
$data['datasets'][0]['data'][] = $entry[1];
|
||||
|
||||
}
|
||||
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function budgetLimit(Collection $entries): array
|
||||
{
|
||||
return $this->budget($entries, 'monthAndDay');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(Collection $entries): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
$left = [];
|
||||
$spent = [];
|
||||
$overspent = [];
|
||||
$filtered = $entries->filter(
|
||||
function ($entry) {
|
||||
return ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0);
|
||||
}
|
||||
);
|
||||
foreach ($filtered as $entry) {
|
||||
$data['labels'][] = $entry[0];
|
||||
$left[] = round($entry[1], 2);
|
||||
$spent[] = round(bcmul($entry[2], '-1'), 2); // spent is coming in negative, must be positive
|
||||
$overspent[] = round(bcmul($entry[3], '-1'), 2); // same
|
||||
}
|
||||
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.left'),
|
||||
'data' => $left,
|
||||
];
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.spent'),
|
||||
'data' => $spent,
|
||||
];
|
||||
$data['datasets'][] = [
|
||||
'label' => trans('firefly.overspent'),
|
||||
'data' => $overspent,
|
||||
];
|
||||
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
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 $budgets
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function year(Collection $budgets, Collection $entries): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month');
|
||||
|
||||
$data = [
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
|
||||
foreach ($budgets as $budget) {
|
||||
$data['labels'][] = $budget->name;
|
||||
}
|
||||
/** @var array $entry */
|
||||
foreach ($entries as $entry) {
|
||||
$array = [
|
||||
'label' => $entry[0]->formatLocalized($format),
|
||||
'data' => [],
|
||||
];
|
||||
array_shift($entry);
|
||||
$array['data'] = $entry;
|
||||
$data['datasets'][] = $array;
|
||||
|
||||
}
|
||||
$data['count'] = count($data['datasets']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* CategoryChartGeneratorInterface.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
195
app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php
Normal file
195
app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\Category;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
/**
|
||||
* Class ChartJsCategoryChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Category
|
||||
*/
|
||||
class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function all(Collection $entries): array
|
||||
{
|
||||
|
||||
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.spent'),
|
||||
'data' => [],
|
||||
],
|
||||
[
|
||||
'label' => trans('firefly.earned'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = $entry[1];
|
||||
$spent = $entry[2];
|
||||
$earned = $entry[3];
|
||||
|
||||
$data['datasets'][0]['data'][] = bccomp($spent, '0') === 0 ? null : bcmul($spent, '-1');
|
||||
$data['datasets'][1]['data'][] = bccomp($earned, '0') === 0 ? null : $earned;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $categories
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function earnedInPeriod(Collection $categories, Collection $entries): array
|
||||
{
|
||||
|
||||
// language:
|
||||
$format = (string)trans('config.month');
|
||||
|
||||
$data = [
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$data['labels'][] = $category->name;
|
||||
}
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$date = $entry[0]->formatLocalized($format);
|
||||
array_shift($entry);
|
||||
$data['count']++;
|
||||
$data['datasets'][] = ['label' => $date, 'data' => $entry];
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function frontpage(Collection $entries): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.spent'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
foreach ($entries as $entry) {
|
||||
if ($entry->spent != 0) {
|
||||
$data['labels'][] = $entry->name;
|
||||
$data['datasets'][0]['data'][] = round(bcmul($entry->spent, '-1'), 2);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function multiYear(Collection $entries): array
|
||||
{
|
||||
// dataset:
|
||||
$data = [
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
// get labels from one of the categories (assuming there's at least one):
|
||||
$first = $entries->first();
|
||||
$keys = array_keys($first['spent']);
|
||||
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'];
|
||||
$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;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function period(Collection $entries): array
|
||||
{
|
||||
return $this->all($entries);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $categories
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function spentInPeriod(Collection $categories, Collection $entries): array
|
||||
{
|
||||
|
||||
// language:
|
||||
$format = (string)trans('config.month');
|
||||
|
||||
$data = [
|
||||
'count' => 0,
|
||||
'labels' => [],
|
||||
'datasets' => [],
|
||||
];
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$data['labels'][] = $category->name;
|
||||
}
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$date = $entry[0]->formatLocalized($format);
|
||||
array_shift($entry);
|
||||
$data['count']++;
|
||||
$data['datasets'][] = ['label' => $date, 'data' => $entry];
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\PiggyBank;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
/**
|
||||
* Class ChartJsPiggyBankChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\PiggyBank
|
||||
*/
|
||||
class ChartJsPiggyBankChartGenerator implements PiggyBankChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $set
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function history(Collection $set): array
|
||||
{
|
||||
|
||||
// language:
|
||||
$format = (string)trans('config.month_and_day');
|
||||
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => 'Diff',
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
$sum = '0';
|
||||
foreach ($set as $entry) {
|
||||
$date = new Carbon($entry->date);
|
||||
$sum = bcadd($sum, $entry->sum);
|
||||
$data['labels'][] = $date->formatLocalized($format);
|
||||
$data['datasets'][0]['data'][] = round($sum, 2);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* PiggyBankChartGenerator.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
170
app/Generator/Chart/Report/ChartJsReportChartGenerator.php
Normal file
170
app/Generator/Chart/Report/ChartJsReportChartGenerator.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Generator\Chart\Report;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class ChartJsReportChartGenerator
|
||||
*
|
||||
* @package FireflyIII\Generator\Chart\Report
|
||||
*/
|
||||
class ChartJsReportChartGenerator implements ReportChartGeneratorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Same as above but other translations.
|
||||
*
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function multiYearInOut(Collection $entries): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.income'),
|
||||
'data' => [],
|
||||
],
|
||||
[
|
||||
'label' => trans('firefly.expenses'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = $entry[0]->formatLocalized('%Y');
|
||||
$data['datasets'][0]['data'][] = round($entry[1], 2);
|
||||
$data['datasets'][1]['data'][] = round($entry[2], 2);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $income
|
||||
* @param string $expense
|
||||
* @param int $count
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function multiYearInOutSummarized(string $income, string $expense, int $count): array
|
||||
{
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [trans('firefly.sum_of_years'), trans('firefly.average_of_years')],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.income'),
|
||||
'data' => [],
|
||||
],
|
||||
[
|
||||
'label' => trans('firefly.expenses'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
$data['datasets'][0]['data'][] = round($income, 2);
|
||||
$data['datasets'][1]['data'][] = round($expense, 2);
|
||||
$data['datasets'][0]['data'][] = round(($income / $count), 2);
|
||||
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function netWorth(Collection $entries) : array
|
||||
{
|
||||
$format = (string)trans('config.month_and_day');
|
||||
$data = [
|
||||
'count' => 1,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.net-worth'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = trim($entry['date']->formatLocalized($format));
|
||||
$data['datasets'][0]['data'][] = round($entry['net-worth'], 2);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $entries
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function yearInOut(Collection $entries): array
|
||||
{
|
||||
// language:
|
||||
$format = (string)trans('config.month');
|
||||
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.income'),
|
||||
'data' => [],
|
||||
],
|
||||
[
|
||||
'label' => trans('firefly.expenses'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
$data['labels'][] = $entry[0]->formatLocalized($format);
|
||||
$data['datasets'][0]['data'][] = round($entry[1], 2);
|
||||
$data['datasets'][1]['data'][] = round($entry[2], 2);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $income
|
||||
* @param string $expense
|
||||
* @param int $count
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function yearInOutSummarized(string $income, string $expense, int $count): array
|
||||
{
|
||||
|
||||
$data = [
|
||||
'count' => 2,
|
||||
'labels' => [trans('firefly.sum_of_year'), trans('firefly.average_of_year')],
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => trans('firefly.income'),
|
||||
'data' => [],
|
||||
],
|
||||
[
|
||||
'label' => trans('firefly.expenses'),
|
||||
'data' => [],
|
||||
],
|
||||
],
|
||||
];
|
||||
$data['datasets'][0]['data'][] = round($income, 2);
|
||||
$data['datasets'][1]['data'][] = round($expense, 2);
|
||||
$data['datasets'][0]['data'][] = round(($income / $count), 2);
|
||||
$data['datasets'][1]['data'][] = round(($expense / $count), 2);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
62
app/Generator/Chart/Report/ReportChartGeneratorInterface.php
Normal file
62
app/Generator/Chart/Report/ReportChartGeneratorInterface.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* ReportChartGenerator.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
}
|
62
app/Handlers/Events/ConnectJournalToPiggyBank.php
Normal file
62
app/Handlers/Events/ConnectJournalToPiggyBank.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Events\TransactionJournalStored;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Models\PiggyBankEvent;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
|
||||
/**
|
||||
* Class ConnectJournalToPiggyBank
|
||||
*
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class ConnectJournalToPiggyBank
|
||||
{
|
||||
|
||||
/**
|
||||
* Connect a new transaction journal to any related piggy banks.
|
||||
*
|
||||
* @param TransactionJournalStored $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalStored $event): bool
|
||||
{
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $event->journal;
|
||||
$piggyBankId = $event->piggyBankId;
|
||||
|
||||
/** @var PiggyBank $piggyBank */
|
||||
$piggyBank = Auth::user()->piggybanks()->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
|
||||
|
||||
if (is_null($piggyBank)) {
|
||||
return true;
|
||||
}
|
||||
// update piggy bank rep for date of transaction journal.
|
||||
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
||||
if (is_null($repetition)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$amount = TransactionJournal::amountPositive($journal);
|
||||
// if piggy account matches source account, the amount is positive
|
||||
if ($piggyBank->account_id == TransactionJournal::sourceAccount($journal)->id) {
|
||||
$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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
69
app/Handlers/Events/FireRulesForStore.php
Normal file
69
app/Handlers/Events/FireRulesForStore.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* FireRulesForStore.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
|
||||
use FireflyIII\Events\TransactionJournalStored;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Rules\Processor;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class FireRulesForStore
|
||||
*
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class FireRulesForStore
|
||||
{
|
||||
|
||||
/**
|
||||
* Connect a new transaction journal to any related piggy banks.
|
||||
*
|
||||
* @param TransactionJournalStored $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalStored $event): bool
|
||||
{
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
$groups = $user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
|
||||
//
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
Log::debug('Now processing group "' . $group->title . '".');
|
||||
$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) {
|
||||
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
$processor = Processor::make($rule);
|
||||
$processor->handleTransactionJournal($event->journal);
|
||||
|
||||
if ($rule->stop_processing) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
68
app/Handlers/Events/FireRulesForUpdate.php
Normal file
68
app/Handlers/Events/FireRulesForUpdate.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* FireRulesForUpdate.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Events\TransactionJournalUpdated;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Rules\Processor;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class FireRulesForUpdate
|
||||
*
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class FireRulesForUpdate
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param TransactionJournalUpdated $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalUpdated $event): bool
|
||||
{
|
||||
// get all the user's rule groups, with the rules, order by 'order'.
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
$groups = $user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
|
||||
//
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
Log::debug('Now processing group "' . $group->title . '".');
|
||||
$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) {
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
|
||||
Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')');
|
||||
$processor = Processor::make($rule);
|
||||
$processor->handleTransactionJournal($event->journal);
|
||||
|
||||
if ($rule->stop_processing) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
40
app/Handlers/Events/ScanForBillsAfterStore.php
Normal file
40
app/Handlers/Events/ScanForBillsAfterStore.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* RescanJournalAfterStore.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use FireflyIII\Events\TransactionJournalStored;
|
||||
use FireflyIII\Support\Events\BillScanner;
|
||||
|
||||
/**
|
||||
* Class RescanJournal
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class ScanForBillsAfterStore
|
||||
{
|
||||
|
||||
/**
|
||||
* Scan a transaction journal for possible links to bills, right after storing.
|
||||
*
|
||||
* @param TransactionJournalStored $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalStored $event): bool
|
||||
{
|
||||
$journal = $event->journal;
|
||||
BillScanner::scan($journal);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
39
app/Handlers/Events/ScanForBillsAfterUpdate.php
Normal file
39
app/Handlers/Events/ScanForBillsAfterUpdate.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
/**
|
||||
* ScanForBillsAfterUpdate.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use FireflyIII\Events\TransactionJournalUpdated;
|
||||
use FireflyIII\Support\Events\BillScanner;
|
||||
|
||||
/**
|
||||
* Class RescanJournal
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class ScanForBillsAfterUpdate
|
||||
{
|
||||
/**
|
||||
* Scan a transaction journal for possibly related bills after it has been updated.
|
||||
*
|
||||
* @param TransactionJournalUpdated $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalUpdated $event): bool
|
||||
{
|
||||
$journal = $event->journal;
|
||||
BillScanner::scan($journal);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
60
app/Handlers/Events/UpdateJournalConnection.php
Normal file
60
app/Handlers/Events/UpdateJournalConnection.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use FireflyIII\Events\TransactionJournalUpdated;
|
||||
use FireflyIII\Models\PiggyBankEvent;
|
||||
use FireflyIII\Models\PiggyBankRepetition;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
|
||||
/**
|
||||
* Class UpdateJournalConnection
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class UpdateJournalConnection
|
||||
{
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param TransactionJournalUpdated $event
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function handle(TransactionJournalUpdated $event):bool
|
||||
{
|
||||
$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 false;
|
||||
}
|
||||
$piggyBank = $event->piggyBank()->first();
|
||||
$repetition = null;
|
||||
if ($piggyBank) {
|
||||
/** @var PiggyBankRepetition $repetition */
|
||||
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
||||
}
|
||||
|
||||
if (is_null($repetition)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$amount = TransactionJournal::amount($journal);
|
||||
$diff = bcsub($amount, $event->amount); // update current repetition
|
||||
|
||||
$repetition->currentamount = bcadd($repetition->currentamount, $diff);
|
||||
$repetition->save();
|
||||
|
||||
|
||||
$event->amount = $amount;
|
||||
$event->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
32
app/Handlers/Events/UserEventListener.php
Normal file
32
app/Handlers/Events/UserEventListener.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* UserEventListener.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Session;
|
||||
|
||||
/**
|
||||
* Class UserEventListener
|
||||
*
|
||||
* @package FireflyIII\Handlers\Events
|
||||
*/
|
||||
class UserEventListener
|
||||
{
|
||||
/**
|
||||
* Handle user logout events.
|
||||
*/
|
||||
public function onUserLogout($event)
|
||||
{
|
||||
// dump stuff from the session:
|
||||
Session::forget('twofactor-authenticated');
|
||||
Session::forget('twofactor-authenticated-date');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
238
app/Helpers/Attachments/AttachmentHelper.php
Normal file
238
app/Helpers/Attachments/AttachmentHelper.php
Normal file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
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
|
||||
*
|
||||
* @package FireflyIII\Helpers\Attachments
|
||||
*/
|
||||
class AttachmentHelper implements AttachmentHelperInterface
|
||||
{
|
||||
|
||||
/** @var MessageBag */
|
||||
public $errors;
|
||||
/** @var MessageBag */
|
||||
public $messages;
|
||||
/** @var array */
|
||||
protected $allowedMimes;
|
||||
/** @var int */
|
||||
protected $maxUploadSize;
|
||||
|
||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||
protected $uploadDisk;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->maxUploadSize = Config::get('firefly.maxUploadSize');
|
||||
$this->allowedMimes = Config::get('firefly.allowedMimes');
|
||||
$this->errors = new MessageBag;
|
||||
$this->messages = new MessageBag;
|
||||
$this->uploadDisk = Storage::disk('upload');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAttachmentLocation(Attachment $attachment): string
|
||||
{
|
||||
$path = storage_path('upload') . DIRECTORY_SEPARATOR . 'at-' . $attachment->id . '.data';
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MessageBag
|
||||
*/
|
||||
public function getErrors(): MessageBag
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MessageBag
|
||||
*/
|
||||
public function getMessages(): MessageBag
|
||||
{
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model): bool
|
||||
{
|
||||
$files = null;
|
||||
try {
|
||||
if (Input::hasFile('attachments')) {
|
||||
$files = Input::file('attachments');
|
||||
}
|
||||
} catch (TypeError $e) {
|
||||
// Log it, do nothing else.
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $entry) {
|
||||
if (!is_null($entry)) {
|
||||
$this->processFile($entry, $model);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!is_null($files)) {
|
||||
$this->processFile($files, $model);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UploadedFile $file
|
||||
* @param Model $model
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasFile(UploadedFile $file, Model $model): bool
|
||||
{
|
||||
$md5 = md5_file($file->getRealPath());
|
||||
$name = $file->getClientOriginalName();
|
||||
$class = get_class($model);
|
||||
$count = Auth::user()->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
|
||||
|
||||
if ($count > 0) {
|
||||
$msg = (string)trans('validation.file_already_attached', ['name' => $name]);
|
||||
$this->errors->add('attachments', $msg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param UploadedFile $file
|
||||
* @param Model $model
|
||||
*
|
||||
* @return Attachment
|
||||
*/
|
||||
protected function processFile(UploadedFile $file, Model $model): Attachment
|
||||
{
|
||||
$validation = $this->validateUpload($file, $model);
|
||||
if ($validation === false) {
|
||||
return new Attachment;
|
||||
}
|
||||
|
||||
$attachment = new Attachment; // create Attachment object.
|
||||
$attachment->user()->associate(Auth::user());
|
||||
$attachment->attachable()->associate($model);
|
||||
$attachment->md5 = md5_file($file->getRealPath());
|
||||
$attachment->filename = $file->getClientOriginalName();
|
||||
$attachment->mime = $file->getMimeType();
|
||||
$attachment->size = $file->getSize();
|
||||
$attachment->uploaded = 0;
|
||||
$attachment->save();
|
||||
|
||||
$fileObject = $file->openFile('r');
|
||||
$fileObject->rewind();
|
||||
$content = $fileObject->fread($file->getSize());
|
||||
$encrypted = Crypt::encrypt($content);
|
||||
|
||||
// store it:
|
||||
$this->uploadDisk->put($attachment->fileName(), $encrypted);
|
||||
|
||||
$attachment->uploaded = 1; // update attachment
|
||||
$attachment->save();
|
||||
|
||||
$name = e($file->getClientOriginalName()); // add message:
|
||||
$msg = (string)trans('validation.file_attached', ['name' => $name]);
|
||||
$this->messages->add('attachments', $msg);
|
||||
|
||||
// return it.
|
||||
return $attachment;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UploadedFile $file
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function validMime(UploadedFile $file): bool
|
||||
{
|
||||
$mime = e($file->getMimeType());
|
||||
$name = e($file->getClientOriginalName());
|
||||
|
||||
if (!in_array($mime, $this->allowedMimes)) {
|
||||
$msg = (string)trans('validation.file_invalid_mime', ['name' => $name, 'mime' => $mime]);
|
||||
$this->errors->add('attachments', $msg);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UploadedFile $file
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function validSize(UploadedFile $file): bool
|
||||
{
|
||||
$size = $file->getSize();
|
||||
$name = e($file->getClientOriginalName());
|
||||
if ($size > $this->maxUploadSize) {
|
||||
$msg = (string)trans('validation.file_too_large', ['name' => $name]);
|
||||
$this->errors->add('attachments', $msg);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UploadedFile $file
|
||||
* @param Model $model
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function validateUpload(UploadedFile $file, Model $model): bool
|
||||
{
|
||||
if (!$this->validMime($file)) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->validSize($file)) {
|
||||
return false;
|
||||
}
|
||||
if ($this->hasFile($file, $model)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
41
app/Helpers/Attachments/AttachmentHelperInterface.php
Normal file
41
app/Helpers/Attachments/AttachmentHelperInterface.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Attachments;
|
||||
|
||||
use FireflyIII\Models\Attachment;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
/**
|
||||
* Interface AttachmentHelperInterface
|
||||
*
|
||||
* @package FireflyIII\Helpers\Attachments
|
||||
*/
|
||||
interface AttachmentHelperInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAttachmentLocation(Attachment $attachment): string;
|
||||
|
||||
/**
|
||||
* @return MessageBag
|
||||
*/
|
||||
public function getErrors(): MessageBag;
|
||||
|
||||
/**
|
||||
* @return MessageBag
|
||||
*/
|
||||
public function getMessages(): MessageBag;
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model): bool;
|
||||
|
||||
}
|
98
app/Helpers/Collection/Account.php
Normal file
98
app/Helpers/Collection/Account.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class Account
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Account
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
protected $accounts;
|
||||
/** @var string */
|
||||
protected $difference = '';
|
||||
/** @var string */
|
||||
protected $end = '';
|
||||
/** @var string */
|
||||
protected $start = '';
|
||||
|
||||
/**
|
||||
* Account constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->accounts = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAccounts(): Collection
|
||||
{
|
||||
return $this->accounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
*/
|
||||
public function setAccounts(Collection $accounts)
|
||||
{
|
||||
$this->accounts = $accounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDifference(): string
|
||||
{
|
||||
return $this->difference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $difference
|
||||
*/
|
||||
public function setDifference(string $difference)
|
||||
{
|
||||
$this->difference = $difference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEnd(): string
|
||||
{
|
||||
return $this->end;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $end
|
||||
*/
|
||||
public function setEnd(string $end)
|
||||
{
|
||||
$this->end = $end;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStart(): string
|
||||
{
|
||||
return $this->start;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $start
|
||||
*/
|
||||
public function setStart(string $start)
|
||||
{
|
||||
$this->start = $start;
|
||||
}
|
||||
|
||||
|
||||
}
|
64
app/Helpers/Collection/Balance.php
Normal file
64
app/Helpers/Collection/Balance.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class Balance
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Balance
|
||||
{
|
||||
|
||||
/** @var BalanceHeader */
|
||||
protected $balanceHeader;
|
||||
|
||||
/** @var Collection */
|
||||
protected $balanceLines;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->balanceLines = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BalanceLine $line
|
||||
*/
|
||||
public function addBalanceLine(BalanceLine $line)
|
||||
{
|
||||
$this->balanceLines->push($line);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BalanceHeader
|
||||
*/
|
||||
public function getBalanceHeader(): BalanceHeader
|
||||
{
|
||||
return $this->balanceHeader ?? new BalanceHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BalanceHeader $balanceHeader
|
||||
*/
|
||||
public function setBalanceHeader(BalanceHeader $balanceHeader)
|
||||
{
|
||||
$this->balanceHeader = $balanceHeader;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getBalanceLines(): Collection
|
||||
{
|
||||
return $this->balanceLines;
|
||||
}
|
||||
|
||||
|
||||
}
|
74
app/Helpers/Collection/BalanceEntry.php
Normal file
74
app/Helpers/Collection/BalanceEntry.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Account as AccountModel;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class BalanceEntry
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class BalanceEntry
|
||||
{
|
||||
|
||||
|
||||
/** @var AccountModel */
|
||||
protected $account;
|
||||
/** @var string */
|
||||
protected $left = '0';
|
||||
/** @var string */
|
||||
protected $spent = '0';
|
||||
|
||||
/**
|
||||
* @return AccountModel
|
||||
*/
|
||||
public function getAccount(): AccountModel
|
||||
{
|
||||
return $this->account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AccountModel $account
|
||||
*/
|
||||
public function setAccount(AccountModel $account)
|
||||
{
|
||||
$this->account = $account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLeft(): string
|
||||
{
|
||||
return $this->left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $left
|
||||
*/
|
||||
public function setLeft(string $left)
|
||||
{
|
||||
$this->left = $left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSpent(): string
|
||||
{
|
||||
return $this->spent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $spent
|
||||
*/
|
||||
public function setSpent(string $spent)
|
||||
{
|
||||
$this->spent = $spent;
|
||||
}
|
||||
|
||||
|
||||
}
|
46
app/Helpers/Collection/BalanceHeader.php
Normal file
46
app/Helpers/Collection/BalanceHeader.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Account as AccountModel;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class BalanceHeader
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class BalanceHeader
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
protected $accounts;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->accounts = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AccountModel $account
|
||||
*/
|
||||
public function addAccount(AccountModel $account)
|
||||
{
|
||||
$this->accounts->push($account);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAccounts(): Collection
|
||||
{
|
||||
return $this->accounts;
|
||||
}
|
||||
|
||||
|
||||
}
|
135
app/Helpers/Collection/BalanceLine.php
Normal file
135
app/Helpers/Collection/BalanceLine.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Budget as BudgetModel;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class BalanceLine
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class BalanceLine
|
||||
{
|
||||
|
||||
const ROLE_DEFAULTROLE = 1;
|
||||
const ROLE_TAGROLE = 2;
|
||||
const ROLE_DIFFROLE = 3;
|
||||
|
||||
/** @var Collection */
|
||||
protected $balanceEntries;
|
||||
|
||||
/** @var BudgetModel */
|
||||
protected $budget;
|
||||
|
||||
/** @var int */
|
||||
protected $role = self::ROLE_DEFAULTROLE;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->balanceEntries = new Collection;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BalanceEntry $balanceEntry
|
||||
*/
|
||||
public function addBalanceEntry(BalanceEntry $balanceEntry)
|
||||
{
|
||||
$this->balanceEntries->push($balanceEntry);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getBalanceEntries(): Collection
|
||||
{
|
||||
return $this->balanceEntries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $balanceEntries
|
||||
*/
|
||||
public function setBalanceEntries(Collection $balanceEntries)
|
||||
{
|
||||
$this->balanceEntries = $balanceEntries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BudgetModel
|
||||
*/
|
||||
public function getBudget(): BudgetModel
|
||||
{
|
||||
return $this->budget ?? new BudgetModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetModel $budget
|
||||
*/
|
||||
public function setBudget(BudgetModel $budget)
|
||||
{
|
||||
$this->budget = $budget;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRole(): int
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $role
|
||||
*/
|
||||
public function setRole(int $role)
|
||||
{
|
||||
$this->role = $role;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
if ($this->getBudget() instanceof BudgetModel && !is_null($this->getBudget()->id)) {
|
||||
return $this->getBudget()->name;
|
||||
}
|
||||
if ($this->getRole() == self::ROLE_DEFAULTROLE) {
|
||||
return trans('firefly.noBudget');
|
||||
}
|
||||
if ($this->getRole() == self::ROLE_TAGROLE) {
|
||||
return trans('firefly.coveredWithTags');
|
||||
}
|
||||
if ($this->getRole() == self::ROLE_DIFFROLE) {
|
||||
return trans('firefly.leftUnbalanced');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* If a BalanceLine has a budget/repetition, each BalanceEntry in this BalanceLine
|
||||
* should have a "spent" value, which is the amount of money that has been spent
|
||||
* on the given budget/repetition. If you subtract all those amounts from the budget/repetition's
|
||||
* total amount, this is returned:
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function leftOfRepetition(): string
|
||||
{
|
||||
$start = $this->budget->amount ?? '0';
|
||||
/** @var BalanceEntry $balanceEntry */
|
||||
foreach ($this->getBalanceEntries() as $balanceEntry) {
|
||||
$start = bcadd($balanceEntry->getSpent(), $start);
|
||||
}
|
||||
|
||||
return $start;
|
||||
}
|
||||
}
|
56
app/Helpers/Collection/Bill.php
Normal file
56
app/Helpers/Collection/Bill.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class Bill
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Bill
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*/
|
||||
protected $bills;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->bills = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BillLine $bill
|
||||
*/
|
||||
public function addBill(BillLine $bill)
|
||||
{
|
||||
$this->bills->push($bill);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getBills(): Collection
|
||||
{
|
||||
$set = $this->bills->sortBy(
|
||||
function (BillLine $bill) {
|
||||
$active = intval($bill->getBill()->active) == 0 ? 1 : 0;
|
||||
$name = $bill->getBill()->name;
|
||||
|
||||
return $active . $name;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
}
|
146
app/Helpers/Collection/BillLine.php
Normal file
146
app/Helpers/Collection/BillLine.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Bill as BillModel;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class BillLine
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class BillLine
|
||||
{
|
||||
|
||||
/** @var bool */
|
||||
protected $active;
|
||||
/** @var string */
|
||||
protected $amount;
|
||||
/** @var BillModel */
|
||||
protected $bill;
|
||||
/** @var bool */
|
||||
protected $hit;
|
||||
/** @var string */
|
||||
protected $max;
|
||||
/** @var string */
|
||||
protected $min;
|
||||
|
||||
/** @var int */
|
||||
private $transactionJournalId;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAmount(): string
|
||||
{
|
||||
return $this->amount ?? '0';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $amount
|
||||
*/
|
||||
public function setAmount(string $amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BillModel
|
||||
*/
|
||||
public function getBill(): BillModel
|
||||
{
|
||||
return $this->bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BillModel $bill
|
||||
*/
|
||||
public function setBill(BillModel $bill)
|
||||
{
|
||||
$this->bill = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMax(): string
|
||||
{
|
||||
return $this->max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $max
|
||||
*/
|
||||
public function setMax(string $max)
|
||||
{
|
||||
$this->max = $max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMin(): string
|
||||
{
|
||||
return $this->min;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $min
|
||||
*/
|
||||
public function setMin(string $min)
|
||||
{
|
||||
$this->min = $min;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTransactionJournalId(): int
|
||||
{
|
||||
return $this->transactionJournalId ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $transactionJournalId
|
||||
*/
|
||||
public function setTransactionJournalId(int $transactionJournalId)
|
||||
{
|
||||
$this->transactionJournalId = $transactionJournalId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $active
|
||||
*/
|
||||
public function setActive(bool $active)
|
||||
{
|
||||
$this->active = $active;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isHit(): bool
|
||||
{
|
||||
return $this->hit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $hit
|
||||
*/
|
||||
public function setHit(bool $hit)
|
||||
{
|
||||
$this->hit = $hit;
|
||||
}
|
||||
|
||||
|
||||
}
|
152
app/Helpers/Collection/Budget.php
Normal file
152
app/Helpers/Collection/Budget.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class Budget
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Budget
|
||||
{
|
||||
/** @var Collection */
|
||||
protected $budgetLines;
|
||||
/** @var string */
|
||||
protected $budgeted = '0';
|
||||
/** @var string */
|
||||
protected $left = '0';
|
||||
/** @var string */
|
||||
protected $overspent = '0';
|
||||
/** @var string */
|
||||
protected $spent = '0';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->budgetLines = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetLine $budgetLine
|
||||
*/
|
||||
public function addBudgetLine(BudgetLine $budgetLine)
|
||||
{
|
||||
$this->budgetLines->push($budgetLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addBudgeted(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->budgeted = bcadd($this->budgeted, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addLeft(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->left = bcadd($this->left, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addOverspent(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->overspent = bcadd($this->overspent, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addSpent(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->spent = bcadd($this->spent, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getBudgetLines(): Collection
|
||||
{
|
||||
return $this->budgetLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBudgeted(): string
|
||||
{
|
||||
return $this->budgeted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $budgeted
|
||||
*/
|
||||
public function setBudgeted(string $budgeted)
|
||||
{
|
||||
$this->budgeted = $budgeted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLeft(): string
|
||||
{
|
||||
return $this->left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $left
|
||||
*/
|
||||
public function setLeft(string $left)
|
||||
{
|
||||
$this->left = $left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getOverspent(): string
|
||||
{
|
||||
return $this->overspent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $overspent
|
||||
*/
|
||||
public function setOverspent(string $overspent)
|
||||
{
|
||||
$this->overspent = strval(round($overspent, 2));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSpent(): string
|
||||
{
|
||||
return $this->spent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $spent
|
||||
*/
|
||||
public function setSpent(string $spent)
|
||||
{
|
||||
$this->spent = strval(round($spent, 2));
|
||||
}
|
||||
|
||||
|
||||
}
|
128
app/Helpers/Collection/BudgetLine.php
Normal file
128
app/Helpers/Collection/BudgetLine.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Budget as BudgetModel;
|
||||
use FireflyIII\Models\LimitRepetition;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class BudgetLine
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class BudgetLine
|
||||
{
|
||||
|
||||
/** @var BudgetModel */
|
||||
protected $budget;
|
||||
/** @var string */
|
||||
protected $budgeted = '0';
|
||||
/** @var string */
|
||||
protected $left = '0';
|
||||
/** @var string */
|
||||
protected $overspent = '0';
|
||||
/** @var LimitRepetition */
|
||||
protected $repetition;
|
||||
/** @var string */
|
||||
protected $spent = '0';
|
||||
|
||||
/**
|
||||
* @return BudgetModel
|
||||
*/
|
||||
public function getBudget(): BudgetModel
|
||||
{
|
||||
return $this->budget ?? new BudgetModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetModel $budget
|
||||
*/
|
||||
public function setBudget(BudgetModel $budget)
|
||||
{
|
||||
$this->budget = $budget;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBudgeted(): string
|
||||
{
|
||||
return $this->budgeted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $budgeted
|
||||
*/
|
||||
public function setBudgeted(string $budgeted)
|
||||
{
|
||||
$this->budgeted = $budgeted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLeft(): string
|
||||
{
|
||||
return $this->left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $left
|
||||
*/
|
||||
public function setLeft(string $left)
|
||||
{
|
||||
$this->left = $left;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getOverspent(): string
|
||||
{
|
||||
return $this->overspent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $overspent
|
||||
*/
|
||||
public function setOverspent(string $overspent)
|
||||
{
|
||||
$this->overspent = $overspent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return LimitRepetition
|
||||
*/
|
||||
public function getRepetition(): LimitRepetition
|
||||
{
|
||||
return $this->repetition ?? new LimitRepetition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param LimitRepetition $repetition
|
||||
*/
|
||||
public function setRepetition(LimitRepetition $repetition)
|
||||
{
|
||||
$this->repetition = $repetition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSpent(): string
|
||||
{
|
||||
return $this->spent;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $spent
|
||||
*/
|
||||
public function setSpent(string $spent)
|
||||
{
|
||||
$this->spent = $spent;
|
||||
}
|
||||
|
||||
|
||||
}
|
77
app/Helpers/Collection/Category.php
Normal file
77
app/Helpers/Collection/Category.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use FireflyIII\Models\Category as CategoryModel;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class Category
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Category
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
protected $categories;
|
||||
/** @var string */
|
||||
protected $total = '0';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->categories = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CategoryModel $category
|
||||
*/
|
||||
public function addCategory(CategoryModel $category)
|
||||
{
|
||||
// spent is minus zero for an expense report:
|
||||
if ($category->spent < 0) {
|
||||
$this->categories->push($category);
|
||||
$this->addTotal($category->spent);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addTotal(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getCategories(): Collection
|
||||
{
|
||||
$set = $this->categories->sortBy(
|
||||
function (CategoryModel $category) {
|
||||
return $category->spent;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTotal(): string
|
||||
{
|
||||
return strval(round($this->total, 2));
|
||||
}
|
||||
|
||||
|
||||
}
|
99
app/Helpers/Collection/Expense.php
Normal file
99
app/Helpers/Collection/Expense.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use Crypt;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class Expense
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Expense
|
||||
{
|
||||
/** @var Collection */
|
||||
protected $expenses;
|
||||
/** @var string */
|
||||
protected $total = '0';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->expenses = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $entry
|
||||
*/
|
||||
public function addOrCreateExpense(TransactionJournal $entry)
|
||||
{
|
||||
|
||||
$accountId = $entry->account_id;
|
||||
$amount = strval(round($entry->journalAmount, 2));
|
||||
if (bccomp('0', $amount) === -1) {
|
||||
$amount = bcmul($amount, '-1');
|
||||
}
|
||||
|
||||
if (!$this->expenses->has($accountId)) {
|
||||
$newObject = new stdClass;
|
||||
$newObject->amount = $amount;
|
||||
$newObject->name = Crypt::decrypt($entry->account_name);
|
||||
$newObject->count = 1;
|
||||
$newObject->id = $accountId;
|
||||
$this->expenses->put($accountId, $newObject);
|
||||
} else {
|
||||
$existing = $this->expenses->get($accountId);
|
||||
$existing->amount = bcadd($existing->amount, $amount);
|
||||
$existing->count++;
|
||||
$this->expenses->put($accountId, $existing);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addToTotal(string $add)
|
||||
{
|
||||
|
||||
|
||||
$add = strval(round($add, 2));
|
||||
if (bccomp('0', $add) === -1) {
|
||||
$add = bcmul($add, '-1');
|
||||
}
|
||||
|
||||
// if amount is positive, the original transaction
|
||||
// was a transfer. But since this is an expense report,
|
||||
// that amount must be negative.
|
||||
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getExpenses(): Collection
|
||||
{
|
||||
$set = $this->expenses->sortBy(
|
||||
function (stdClass $object) {
|
||||
return $object->amount;
|
||||
}
|
||||
);
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTotal(): string
|
||||
{
|
||||
return strval(round($this->total, 2));
|
||||
}
|
||||
}
|
87
app/Helpers/Collection/Income.php
Normal file
87
app/Helpers/Collection/Income.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Collection;
|
||||
|
||||
use Crypt;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Support\Collection;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* Class Income
|
||||
*
|
||||
* @package FireflyIII\Helpers\Collection
|
||||
*/
|
||||
class Income
|
||||
{
|
||||
|
||||
/** @var Collection */
|
||||
protected $incomes;
|
||||
/** @var string */
|
||||
protected $total = '0';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->incomes = new Collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $entry
|
||||
*/
|
||||
public function addOrCreateIncome(TransactionJournal $entry)
|
||||
{
|
||||
|
||||
$accountId = $entry->account_id;
|
||||
if (!$this->incomes->has($accountId)) {
|
||||
$newObject = new stdClass;
|
||||
$newObject->amount = strval(round($entry->journalAmount, 2));
|
||||
$newObject->name = Crypt::decrypt($entry->account_name);
|
||||
$newObject->count = 1;
|
||||
$newObject->id = $accountId;
|
||||
$this->incomes->put($accountId, $newObject);
|
||||
} else {
|
||||
$existing = $this->incomes->get($accountId);
|
||||
$existing->amount = bcadd($existing->amount, $entry->journalAmount);
|
||||
$existing->count++;
|
||||
$this->incomes->put($accountId, $existing);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $add
|
||||
*/
|
||||
public function addToTotal(string $add)
|
||||
{
|
||||
$add = strval(round($add, 2));
|
||||
$this->total = bcadd($this->total, $add);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getIncomes(): Collection
|
||||
{
|
||||
$set = $this->incomes->sortByDesc(
|
||||
function (stdClass $object) {
|
||||
return $object->amount;
|
||||
}
|
||||
);
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTotal(): string
|
||||
{
|
||||
return strval(round($this->total, 2));
|
||||
}
|
||||
|
||||
|
||||
}
|
42
app/Helpers/Csv/Converter/AccountId.php
Normal file
42
app/Helpers/Csv/Converter/AccountId.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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(): Account
|
||||
{
|
||||
// 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) ');
|
||||
} else {
|
||||
// new account to prevent TypeErrors.
|
||||
$account = new Account;
|
||||
}
|
||||
}
|
||||
|
||||
return $account;
|
||||
}
|
||||
}
|
24
app/Helpers/Csv/Converter/Amount.php
Normal file
24
app/Helpers/Csv/Converter/Amount.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
/**
|
||||
* Class Amount
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class Amount extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function convert(): string
|
||||
{
|
||||
if (is_numeric($this->value)) {
|
||||
return strval($this->value);
|
||||
}
|
||||
|
||||
return '0';
|
||||
}
|
||||
}
|
28
app/Helpers/Csv/Converter/AmountComma.php
Normal file
28
app/Helpers/Csv/Converter/AmountComma.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
/**
|
||||
* Class AmountComma
|
||||
*
|
||||
* Parses the input as the amount with a comma as decimal separator
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class AmountComma extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return float|int
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
$value = str_replace(',', '.', strval($this->value));
|
||||
|
||||
if (is_numeric($value)) {
|
||||
return strval($value);
|
||||
}
|
||||
|
||||
return '0';
|
||||
}
|
||||
}
|
78
app/Helpers/Csv/Converter/AssetAccountIban.php
Normal file
78
app/Helpers/Csv/Converter/AssetAccountIban.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
/**
|
||||
* Class AssetAccountIban
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class AssetAccountIban extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return Account
|
||||
*/
|
||||
public function convert(): Account
|
||||
{
|
||||
|
||||
// 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();
|
||||
|
||||
if (is_null($account->id)) {
|
||||
// create it if doesn't exist.
|
||||
|
||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$accountData = [
|
||||
'name' => $this->value,
|
||||
'accountType' => 'asset',
|
||||
'virtualBalance' => 0,
|
||||
'virtualBalanceCurrency' => 1, // hard coded.
|
||||
'active' => true,
|
||||
'user' => Auth::user()->id,
|
||||
'iban' => null,
|
||||
'accountNumber' => $this->value,
|
||||
'accountRole' => null,
|
||||
'openingBalance' => 0,
|
||||
'openingBalanceDate' => new Carbon,
|
||||
'openingBalanceCurrency' => 1, // hard coded.
|
||||
|
||||
];
|
||||
|
||||
$account = $repository->store($accountData);
|
||||
}
|
||||
|
||||
return $account;
|
||||
}
|
||||
|
||||
return new Account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Account
|
||||
*/
|
||||
protected function findAccount(): Account
|
||||
{
|
||||
$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 new Account;
|
||||
}
|
||||
}
|
60
app/Helpers/Csv/Converter/AssetAccountName.php
Normal file
60
app/Helpers/Csv/Converter/AssetAccountName.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
/**
|
||||
* 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:
|
||||
$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.
|
||||
|
||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$accountData = [
|
||||
'name' => $this->value,
|
||||
'accountType' => 'asset',
|
||||
'virtualBalance' => 0,
|
||||
'virtualBalanceCurrency' => 1, // hard coded.
|
||||
'active' => true,
|
||||
'user' => Auth::user()->id,
|
||||
'iban' => null,
|
||||
'accountNumber' => $this->value,
|
||||
'accountRole' => null,
|
||||
'openingBalance' => 0,
|
||||
'openingBalanceDate' => new Carbon,
|
||||
'openingBalanceCurrency' => 1, // hard coded.
|
||||
|
||||
];
|
||||
|
||||
$account = $repository->store($accountData);
|
||||
|
||||
return $account;
|
||||
}
|
||||
}
|
89
app/Helpers/Csv/Converter/AssetAccountNumber.php
Normal file
89
app/Helpers/Csv/Converter/AssetAccountNumber.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* AssetAccountNumber.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
/**
|
||||
* Class AssetAccountNumber
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class AssetAccountNumber 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 not, search for it (or create it):
|
||||
$value = $this->value ?? '';
|
||||
if (strlen($value) > 0) {
|
||||
// find or create new account:
|
||||
$account = $this->findAccount();
|
||||
|
||||
if (is_null($account->id)) {
|
||||
// create it if doesn't exist.
|
||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
|
||||
|
||||
$accountData = [
|
||||
'name' => $this->value,
|
||||
'accountType' => 'asset',
|
||||
'virtualBalance' => 0,
|
||||
'virtualBalanceCurrency' => 1, // hard coded.
|
||||
'active' => true,
|
||||
'user' => Auth::user()->id,
|
||||
'iban' => null,
|
||||
'accountNumber' => $this->value,
|
||||
'accountRole' => null,
|
||||
'openingBalance' => 0,
|
||||
'openingBalanceDate' => new Carbon,
|
||||
'openingBalanceCurrency' => 1, // hard coded.
|
||||
|
||||
];
|
||||
|
||||
$account = $repository->store($accountData);
|
||||
}
|
||||
|
||||
return $account;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Account
|
||||
*/
|
||||
protected function findAccount(): Account
|
||||
{
|
||||
$set = Auth::user()->accounts()->with(['accountmeta'])->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
|
||||
/** @var Account $entry */
|
||||
foreach ($set as $entry) {
|
||||
$accountNumber = $entry->getMeta('accountNumber');
|
||||
if ($accountNumber == $this->value) {
|
||||
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
||||
return new Account;
|
||||
}
|
||||
}
|
104
app/Helpers/Csv/Converter/BasicConverter.php
Normal file
104
app/Helpers/Csv/Converter/BasicConverter.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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 $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 getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
|
||||
}
|
30
app/Helpers/Csv/Converter/BillId.php
Normal file
30
app/Helpers/Csv/Converter/BillId.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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;
|
||||
}
|
||||
}
|
38
app/Helpers/Csv/Converter/BillName.php
Normal file
38
app/Helpers/Csv/Converter/BillName.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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;
|
||||
}
|
||||
}
|
30
app/Helpers/Csv/Converter/BudgetId.php
Normal file
30
app/Helpers/Csv/Converter/BudgetId.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Budget;
|
||||
|
||||
/**
|
||||
* Class BudgetId
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
}
|
31
app/Helpers/Csv/Converter/BudgetName.php
Normal file
31
app/Helpers/Csv/Converter/BudgetName.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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]); // see issue #180
|
||||
} else {
|
||||
$repository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
|
||||
$budget = $repository->store(['name' => $this->value, 'user' => Auth::user()->id]);
|
||||
}
|
||||
|
||||
return $budget;
|
||||
}
|
||||
}
|
30
app/Helpers/Csv/Converter/CategoryId.php
Normal file
30
app/Helpers/Csv/Converter/CategoryId.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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;
|
||||
}
|
||||
}
|
35
app/Helpers/Csv/Converter/CategoryName.php
Normal file
35
app/Helpers/Csv/Converter/CategoryName.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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( // See issue #180
|
||||
[
|
||||
'name' => $this->value,
|
||||
'user_id' => Auth::user()->id,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return $category;
|
||||
}
|
||||
}
|
44
app/Helpers/Csv/Converter/ConverterInterface.php
Normal file
44
app/Helpers/Csv/Converter/ConverterInterface.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
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 $value
|
||||
*/
|
||||
public function setValue($value);
|
||||
|
||||
}
|
28
app/Helpers/Csv/Converter/CurrencyCode.php
Normal file
28
app/Helpers/Csv/Converter/CurrencyCode.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Class CurrencyCode
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class CurrencyCode extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
28
app/Helpers/Csv/Converter/CurrencyId.php
Normal file
28
app/Helpers/Csv/Converter/CurrencyId.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Class CurrencyId
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class CurrencyId extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
28
app/Helpers/Csv/Converter/CurrencyName.php
Normal file
28
app/Helpers/Csv/Converter/CurrencyName.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Class CurrencyName
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class CurrencyName extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$currency = TransactionCurrency::find($this->mapped[$this->index][$this->value]);
|
||||
} else {
|
||||
$currency = TransactionCurrency::whereName($this->value)->first();
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
}
|
28
app/Helpers/Csv/Converter/CurrencySymbol.php
Normal file
28
app/Helpers/Csv/Converter/CurrencySymbol.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Class CurrencySymbol
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class CurrencySymbol extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$currency = TransactionCurrency::find($this->mapped[$this->index][$this->value]);
|
||||
} else {
|
||||
$currency = TransactionCurrency::whereSymbol($this->value)->first();
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
}
|
38
app/Helpers/Csv/Converter/Date.php
Normal file
38
app/Helpers/Csv/Converter/Date.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use InvalidArgumentException;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class Date
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class Date extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return Carbon
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
$format = session('csv-date-format');
|
||||
try {
|
||||
$date = Carbon::createFromFormat($format, $this->value);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
Log::error('Date conversion error: ' . $e->getMessage() . '. Value was "' . $this->value . '", format was "' . $format . '".');
|
||||
|
||||
$message = trans('firefly.csv_date_parse_error', ['format' => $format, 'value' => $this->value]);
|
||||
|
||||
throw new FireflyException($message);
|
||||
}
|
||||
|
||||
|
||||
return $date;
|
||||
}
|
||||
}
|
23
app/Helpers/Csv/Converter/Description.php
Normal file
23
app/Helpers/Csv/Converter/Description.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
/**
|
||||
* Class Description
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class Description extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
$description = $this->data['description'] ?? '';
|
||||
|
||||
return trim($description . ' ' . $this->value);
|
||||
}
|
||||
}
|
34
app/Helpers/Csv/Converter/INGDebetCredit.php
Normal file
34
app/Helpers/Csv/Converter/INGDebetCredit.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* INGDebetCredit.php
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
|
||||
/**
|
||||
* Class INGDebetCredit
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class INGDebetCredit extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if ($this->value === 'Af') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
20
app/Helpers/Csv/Converter/Ignore.php
Normal file
20
app/Helpers/Csv/Converter/Ignore.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
/**
|
||||
* Class Amount
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class Ignore extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return null
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
57
app/Helpers/Csv/Converter/OpposingAccountIban.php
Normal file
57
app/Helpers/Csv/Converter/OpposingAccountIban.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Account;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class OpposingAccountIban
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class OpposingAccountIban extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* If mapped, return account. Otherwise, only return the name itself.
|
||||
*
|
||||
* @return Account|string
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
|
||||
|
||||
return $account;
|
||||
} else {
|
||||
if (strlen($this->value) > 0) {
|
||||
$account = $this->findAccount();
|
||||
if (!is_null($account)) {
|
||||
return $account;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Account|null
|
||||
*/
|
||||
protected function findAccount()
|
||||
{
|
||||
$set = Auth::user()->accounts()->get();
|
||||
/** @var Account $account */
|
||||
foreach ($set as $account) {
|
||||
if ($account->iban == $this->value) {
|
||||
Log::debug('OpposingAccountIban::convert found an Account (#' . $account->id . ': ******) with IBAN ******');
|
||||
|
||||
return $account;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
32
app/Helpers/Csv/Converter/OpposingAccountId.php
Normal file
32
app/Helpers/Csv/Converter/OpposingAccountId.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
/**
|
||||
* Class OpposingAccountId
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class OpposingAccountId extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return Account
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
|
||||
|
||||
} else {
|
||||
$account = Auth::user()->accounts()->find($this->value);
|
||||
}
|
||||
|
||||
return $account;
|
||||
|
||||
}
|
||||
}
|
31
app/Helpers/Csv/Converter/OpposingAccountName.php
Normal file
31
app/Helpers/Csv/Converter/OpposingAccountName.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Account;
|
||||
|
||||
/**
|
||||
* Class OpposingAccountName
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class OpposingAccountName extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* If mapped, return account. Otherwise, only return the name itself.
|
||||
*
|
||||
* @return Account|string
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if (isset($this->mapped[$this->index][$this->value])) {
|
||||
$account = Auth::user()->accounts()->find($this->mapped[$this->index][$this->value]);
|
||||
|
||||
return $account;
|
||||
} else {
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
}
|
26
app/Helpers/Csv/Converter/RabobankDebetCredit.php
Normal file
26
app/Helpers/Csv/Converter/RabobankDebetCredit.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
|
||||
/**
|
||||
* Class RabobankDebetCredit
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class RabobankDebetCredit extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
if ($this->value == 'D') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
39
app/Helpers/Csv/Converter/TagsComma.php
Normal file
39
app/Helpers/Csv/Converter/TagsComma.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Tag;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class TagsComma
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class TagsComma extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
$tags = new Collection;
|
||||
|
||||
$strings = explode(',', $this->value);
|
||||
foreach ($strings as $string) {
|
||||
$tag = Tag::firstOrCreateEncrypted( // See issue #180
|
||||
[
|
||||
'tag' => $string,
|
||||
'tagMode' => 'nothing',
|
||||
'user_id' => Auth::user()->id,
|
||||
]
|
||||
);
|
||||
$tags->push($tag);
|
||||
}
|
||||
$tags = $tags->merge($this->data['tags']);
|
||||
|
||||
return $tags;
|
||||
}
|
||||
}
|
39
app/Helpers/Csv/Converter/TagsSpace.php
Normal file
39
app/Helpers/Csv/Converter/TagsSpace.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv\Converter;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Models\Tag;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class TagsSpace
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv\Converter
|
||||
*/
|
||||
class TagsSpace extends BasicConverter implements ConverterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function convert()
|
||||
{
|
||||
$tags = new Collection;
|
||||
|
||||
$strings = explode(' ', $this->value);
|
||||
foreach ($strings as $string) {
|
||||
$tag = Tag::firstOrCreateEncrypted( // See issue #180
|
||||
[
|
||||
'tag' => $string,
|
||||
'tagMode' => 'nothing',
|
||||
'user_id' => Auth::user()->id,
|
||||
]
|
||||
);
|
||||
$tags->push($tag);
|
||||
}
|
||||
$tags = $tags->merge($this->data['tags']);
|
||||
|
||||
return $tags;
|
||||
}
|
||||
}
|
325
app/Helpers/Csv/Data.php
Normal file
325
app/Helpers/Csv/Data.php
Normal file
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
declare(strict_types = 1);
|
||||
namespace FireflyIII\Helpers\Csv;
|
||||
|
||||
use Crypt;
|
||||
use League\Csv\Reader;
|
||||
use Session;
|
||||
use Storage;
|
||||
|
||||
/**
|
||||
* Class Data
|
||||
*
|
||||
* @package FireflyIII\Helpers\Csv
|
||||
*/
|
||||
class Data
|
||||
{
|
||||
|
||||
/** @var string */
|
||||
protected $csvFileContent = '';
|
||||
/** @var string */
|
||||
protected $csvFileLocation = '';
|
||||
/** @var string */
|
||||
protected $dateFormat = '';
|
||||
/** @var string */
|
||||
protected $delimiter = '';
|
||||
/** @var bool */
|
||||
protected $hasHeaders;
|
||||
/** @var int */
|
||||
protected $importAccount = 0;
|
||||
/** @var array */
|
||||
protected $map = [];
|
||||
/** @var array */
|
||||
protected $mapped = [];
|
||||
/** @var Reader */
|
||||
protected $reader;
|
||||
/** @var array */
|
||||
protected $roles = [];
|
||||
/** @var array */
|
||||
protected $specifix = [];
|
||||
|
||||
/**
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->sessionHasHeaders();
|
||||
$this->sessionDateFormat();
|
||||
$this->sessionCsvFileLocation();
|
||||
$this->sessionMap();
|
||||
$this->sessionRoles();
|
||||
$this->sessionMapped();
|
||||
$this->sessionSpecifix();
|
||||
$this->sessionImportAccount();
|
||||
$this->sessionDelimiter();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCsvFileContent()
|
||||
{
|
||||
return $this->csvFileContent ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $csvFileContent
|
||||
*/
|
||||
public function setCsvFileContent(string $csvFileContent)
|
||||
{
|
||||
$this->csvFileContent = $csvFileContent;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCsvFileLocation()
|
||||
{
|
||||
return $this->csvFileLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $csvFileLocation
|
||||
*/
|
||||
public function setCsvFileLocation(string $csvFileLocation)
|
||||
{
|
||||
Session::put('csv-file', $csvFileLocation);
|
||||
$this->csvFileLocation = $csvFileLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDateFormat()
|
||||
{
|
||||
return $this->dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $dateFormat
|
||||
*/
|
||||
public function setDateFormat(string $dateFormat)
|
||||
{
|
||||
Session::put('csv-date-format', $dateFormat);
|
||||
$this->dateFormat = $dateFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDelimiter()
|
||||
{
|
||||
return $this->delimiter;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $delimiter
|
||||
*/
|
||||
public function setDelimiter(string $delimiter)
|
||||
{
|
||||
Session::put('csv-delimiter', $delimiter);
|
||||
$this->delimiter = $delimiter;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMap()
|
||||
{
|
||||
return $this->map;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $map
|
||||
*/
|
||||
public function setMap(array $map)
|
||||
{
|
||||
Session::put('csv-map', $map);
|
||||
$this->map = $map;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMapped()
|
||||
{
|
||||
return $this->mapped;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $mapped
|
||||
*/
|
||||
public function setMapped(array $mapped)
|
||||
{
|
||||
Session::put('csv-mapped', $mapped);
|
||||
$this->mapped = $mapped;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Reader
|
||||
*/
|
||||
public function getReader()
|
||||
{
|
||||
if (!is_null($this->csvFileContent) && strlen($this->csvFileContent) === 0) {
|
||||
$this->loadCsvFile();
|
||||
}
|
||||
|
||||
if (is_null($this->reader)) {
|
||||
$this->reader = Reader::createFromString($this->getCsvFileContent());
|
||||
$this->reader->setDelimiter($this->delimiter);
|
||||
}
|
||||
|
||||
return $this->reader;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->roles;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $roles
|
||||
*/
|
||||
public function setRoles(array $roles)
|
||||
{
|
||||
Session::put('csv-roles', $roles);
|
||||
$this->roles = $roles;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSpecifix()
|
||||
{
|
||||
return is_array($this->specifix) ? $this->specifix : [];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $specifix
|
||||
*/
|
||||
public function setSpecifix(array $specifix)
|
||||
{
|
||||
Session::put('csv-specifix', $specifix);
|
||||
$this->specifix = $specifix;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasHeaders()
|
||||
{
|
||||
return $this->hasHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param bool $hasHeaders
|
||||
*/
|
||||
public function setHasHeaders(bool $hasHeaders)
|
||||
{
|
||||
Session::put('csv-has-headers', $hasHeaders);
|
||||
$this->hasHeaders = $hasHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param int $importAccount
|
||||
*/
|
||||
public function setImportAccount(int $importAccount)
|
||||
{
|
||||
Session::put('csv-import-account', $importAccount);
|
||||
$this->importAccount = $importAccount;
|
||||
}
|
||||
|
||||
protected function loadCsvFile()
|
||||
{
|
||||
$file = $this->getCsvFileLocation();
|
||||
$disk = Storage::disk('upload');
|
||||
$content = $disk->get($file);
|
||||
$contentDecrypted = Crypt::decrypt($content);
|
||||
$this->setCsvFileContent($contentDecrypted);
|
||||
}
|
||||
|
||||
protected function sessionCsvFileLocation()
|
||||
{
|
||||
if (Session::has('csv-file')) {
|
||||
$this->csvFileLocation = (string)session('csv-file');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionDateFormat()
|
||||
{
|
||||
if (Session::has('csv-date-format')) {
|
||||
$this->dateFormat = (string)session('csv-date-format');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionDelimiter()
|
||||
{
|
||||
if (Session::has('csv-delimiter')) {
|
||||
$this->delimiter = session('csv-delimiter');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionHasHeaders()
|
||||
{
|
||||
if (Session::has('csv-has-headers')) {
|
||||
$this->hasHeaders = (bool)session('csv-has-headers');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionImportAccount()
|
||||
{
|
||||
if (Session::has('csv-import-account')) {
|
||||
$this->importAccount = intval(session('csv-import-account'));
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionMap()
|
||||
{
|
||||
if (Session::has('csv-map')) {
|
||||
$this->map = (array)session('csv-map');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionMapped()
|
||||
{
|
||||
if (Session::has('csv-mapped')) {
|
||||
$this->mapped = (array)session('csv-mapped');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionRoles()
|
||||
{
|
||||
if (Session::has('csv-roles')) {
|
||||
$this->roles = (array)session('csv-roles');
|
||||
}
|
||||
}
|
||||
|
||||
protected function sessionSpecifix()
|
||||
{
|
||||
if (Session::has('csv-specifix')) {
|
||||
$this->specifix = (array)session('csv-specifix');
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user