Compare commits
3130 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b30f76ccf5 | ||
|
|
7ff19a8419 | ||
|
|
b28c3a64fa | ||
|
|
6fedf1eec0 | ||
|
|
e47911ef43 | ||
|
|
7a873c6ee7 | ||
|
|
c6c76ac710 | ||
|
|
2dae7f40e1 | ||
|
|
918ebafd7c | ||
|
|
466ff4fe3c | ||
|
|
353b3fcba7 | ||
|
|
da980bcf9c | ||
|
|
ed237476fa | ||
|
|
401ae92a62 | ||
|
|
70ab42bc43 | ||
|
|
15e060ea9e | ||
|
|
4c834467ae | ||
|
|
7bf691e2bd | ||
|
|
f63bf12733 | ||
|
|
65f0acbd10 | ||
|
|
6dd0c2612b | ||
|
|
21701fd5f2 | ||
|
|
beabed1c1b | ||
|
|
ece042b468 | ||
|
|
668e36ccf6 | ||
|
|
27d533dd5b | ||
|
|
011e28e8c2 | ||
|
|
dadeb4616e | ||
|
|
bea0c8dd55 | ||
|
|
31b92fe594 | ||
|
|
1753b58ec9 | ||
|
|
ade8bbb221 | ||
|
|
c31160f82d | ||
|
|
d161c9850a | ||
|
|
a3b8cb25ca | ||
|
|
6c5f915751 | ||
|
|
1bb3581fef | ||
|
|
d9e8036dda | ||
|
|
b754c9d8a3 | ||
|
|
b9679284d0 | ||
|
|
3fa5f1cff6 | ||
|
|
dea2b055ae | ||
|
|
84b20f3f32 | ||
|
|
dce39066ad | ||
|
|
6b82679f78 | ||
|
|
1f26b26a16 | ||
|
|
c5de4338e1 | ||
|
|
41d12f4f2f | ||
|
|
055b80cf7a | ||
|
|
1187169dbd | ||
|
|
ca548e166f | ||
|
|
7b3ca053a5 | ||
|
|
110d9278c4 | ||
|
|
b6245d4b0b | ||
|
|
74494a0df6 | ||
|
|
9cdd79ee30 | ||
|
|
9b30bbcf92 | ||
|
|
c64c5495f2 | ||
|
|
a6855349e8 | ||
|
|
c02bb617cd | ||
|
|
a95ff75531 | ||
|
|
e726364eb7 | ||
|
|
301d76c1c5 | ||
|
|
4cdf2184c3 | ||
|
|
4d8736b3cf | ||
|
|
2a5182ba54 | ||
|
|
4f307cf3ca | ||
|
|
26ab5fea7b | ||
|
|
f90a27ce59 | ||
|
|
624b654fa6 | ||
|
|
09118013c9 | ||
|
|
e934d8943f | ||
|
|
9a8ddf5c05 | ||
|
|
d5eb0c5724 | ||
|
|
70d5737d83 | ||
|
|
b1b2bb4cc9 | ||
|
|
3d6acf264c | ||
|
|
730d5d72f3 | ||
|
|
81e86c9b81 | ||
|
|
2215deb7a6 | ||
|
|
950d5892c0 | ||
|
|
8947226064 | ||
|
|
42b5df48d3 | ||
|
|
733d67defc | ||
|
|
20cb3ff065 | ||
|
|
ecd7aa95da | ||
|
|
e4b2142dbf | ||
|
|
4fd4d5b571 | ||
|
|
511d2c8d1e | ||
|
|
9aaee0a951 | ||
|
|
a606a3eef4 | ||
|
|
67ed6e14aa | ||
|
|
f737a4914b | ||
|
|
d1c6e2f8b1 | ||
|
|
3dcf6d892b | ||
|
|
29e02ce31f | ||
|
|
e5514bc61a | ||
|
|
c50e180a4e | ||
|
|
a1e2814990 | ||
|
|
e68594a93b | ||
|
|
9859541927 | ||
|
|
1c124aec0d | ||
|
|
425d6d17f4 | ||
|
|
6203139cb9 | ||
|
|
e0e3d79ee5 | ||
|
|
b18012a36c | ||
|
|
ef0bee6874 | ||
|
|
61eeb84db6 | ||
|
|
0520b91c71 | ||
|
|
e4c883018b | ||
|
|
c2f774ea7c | ||
|
|
8302518a4f | ||
|
|
357b258332 | ||
|
|
3fd72d0584 | ||
|
|
91075084c7 | ||
|
|
687dd0e659 | ||
|
|
f919769bcd | ||
|
|
8c109fc212 | ||
|
|
1ba304462f | ||
|
|
b92222b8e5 | ||
|
|
8cb2a47a38 | ||
|
|
035ef6035d | ||
|
|
e74793ccbc | ||
|
|
b89e7f9307 | ||
|
|
5e6fbdad1a | ||
|
|
f18aeee1fb | ||
|
|
cea4db785e | ||
|
|
3ab0a44bd9 | ||
|
|
9d2fdb8f07 | ||
|
|
1e0806efa7 | ||
|
|
c596506d37 | ||
|
|
f1081d78ea | ||
|
|
8202cd8e22 | ||
|
|
b56d1a2a2b | ||
|
|
3eb96ff593 | ||
|
|
c6f521ec1b | ||
|
|
fb4df3484c | ||
|
|
c17a278e57 | ||
|
|
6770b8396a | ||
|
|
81da87287e | ||
|
|
8267678593 | ||
|
|
675be5fb57 | ||
|
|
8058a8dfce | ||
|
|
5182a5cdc0 | ||
|
|
ca86b81448 | ||
|
|
44e1262447 | ||
|
|
d37a443854 | ||
|
|
d426d7ddd1 | ||
|
|
156ecf98f6 | ||
|
|
f022789342 | ||
|
|
593e9b5946 | ||
|
|
95ac1f5013 | ||
|
|
35a5310485 | ||
|
|
3b9ec379b5 | ||
|
|
7df0230777 | ||
|
|
66d36850a4 | ||
|
|
97a655016f | ||
|
|
35bac16ccc | ||
|
|
cb593da5b7 | ||
|
|
2b09a00d3a | ||
|
|
f2383513e2 | ||
|
|
25aaeead0e | ||
|
|
a22a2fb4ef | ||
|
|
995fd0cfb9 | ||
|
|
011e0b1f29 | ||
|
|
3c964e81de | ||
|
|
b4f28504a3 | ||
|
|
92f22abb01 | ||
|
|
7bdb8bd162 | ||
|
|
9b687b3566 | ||
|
|
9f622285ca | ||
|
|
cbe123c25d | ||
|
|
3d30502dd9 | ||
|
|
7547e944a1 | ||
|
|
bed5e630af | ||
|
|
418d75ad60 | ||
|
|
c000fe4557 | ||
|
|
dd9528f531 | ||
|
|
d1a6b37eb3 | ||
|
|
4b3814d33a | ||
|
|
c691957c54 | ||
|
|
2c26c42339 | ||
|
|
ccd93bc442 | ||
|
|
5b21cebec8 | ||
|
|
f2d1436b82 | ||
|
|
2d1f6a22d3 | ||
|
|
484d70ca86 | ||
|
|
4af0c18020 | ||
|
|
a4b6589cbd | ||
|
|
b4affabb67 | ||
|
|
1cb29ff395 | ||
|
|
55739c801c | ||
|
|
c68777f385 | ||
|
|
4f1d545468 | ||
|
|
0f9220edc9 | ||
|
|
6696513ef9 | ||
|
|
95b5793f63 | ||
|
|
7a57c60891 | ||
|
|
ebcd8dbd7c | ||
|
|
1bfa8f0139 | ||
|
|
2dfe2ddaf3 | ||
|
|
03f33c5e7e | ||
|
|
2b73747ecf | ||
|
|
174d01292f | ||
|
|
782d675259 | ||
|
|
158ebdad30 | ||
|
|
9addbb979a | ||
|
|
b5375a5629 | ||
|
|
04200203a4 | ||
|
|
05a0dfdc2e | ||
|
|
543a1d7835 | ||
|
|
ec87651123 | ||
|
|
c4bb05caf5 | ||
|
|
52fdd35a66 | ||
|
|
6ee40342dc | ||
|
|
42b7ae096c | ||
|
|
95acbf69d3 | ||
|
|
19326bb8ff | ||
|
|
c208ba4d8f | ||
|
|
9c4d3134ef | ||
|
|
6b61883281 | ||
|
|
6bec07bdd3 | ||
|
|
28b68bf0fd | ||
|
|
85797a5d70 | ||
|
|
cc61281523 | ||
|
|
c0d62dfc86 | ||
|
|
134f21bada | ||
|
|
73f3675966 | ||
|
|
5a28b285c2 | ||
|
|
aea6575358 | ||
|
|
d0054e657e | ||
|
|
d2e312e1c3 | ||
|
|
8678f9af65 | ||
|
|
cca29bcdfe | ||
|
|
40f2659b91 | ||
|
|
d306183c95 | ||
|
|
a34d888024 | ||
|
|
2932689c53 | ||
|
|
b0b8a8cc25 | ||
|
|
ce8056424f | ||
|
|
1567a0181b | ||
|
|
b60ad97150 | ||
|
|
cc93e4442b | ||
|
|
1f4ec8211e | ||
|
|
3a9cbcc565 | ||
|
|
fe6cce7495 | ||
|
|
f98e24e443 | ||
|
|
4ffbc0932c | ||
|
|
9eec12a4de | ||
|
|
40d1011c37 | ||
|
|
aa4682af6a | ||
|
|
47bea97c96 | ||
|
|
78b76d0f65 | ||
|
|
3a70a85283 | ||
|
|
aa7e6166c1 | ||
|
|
08dcd9407b | ||
|
|
2c263d6e82 | ||
|
|
ca9a4e44b4 | ||
|
|
a1b74eaa8e | ||
|
|
a3732a65c9 | ||
|
|
f6a162def1 | ||
|
|
7e96f212c6 | ||
|
|
67c4ae5d49 | ||
|
|
c0ce65e71f | ||
|
|
77cc04d9b3 | ||
|
|
5c8ed110f5 | ||
|
|
3104ee1263 | ||
|
|
76ed261441 | ||
|
|
0b36facec3 | ||
|
|
2a4f6d6f1f | ||
|
|
ffe9eaaae5 | ||
|
|
2a2c6335a5 | ||
|
|
8b36c17e30 | ||
|
|
dae3c4ccc7 | ||
|
|
0514258290 | ||
|
|
c5fdeacc87 | ||
|
|
b11ea13b1d | ||
|
|
9823603a0c | ||
|
|
366a618d00 | ||
|
|
dee681ed2a | ||
|
|
8c116862e2 | ||
|
|
9a86b907d7 | ||
|
|
b70861df30 | ||
|
|
f8a1e9b6d5 | ||
|
|
aaac47ebfc | ||
|
|
fd1feadc67 | ||
|
|
1fc54f5207 | ||
|
|
04efdf75db | ||
|
|
eee4909755 | ||
|
|
c8bf7e9c28 | ||
|
|
07e2c1000c | ||
|
|
e9afd21375 | ||
|
|
b1ea6f5595 | ||
|
|
69b454da7d | ||
|
|
c19c7c680b | ||
|
|
12ceecd57b | ||
|
|
75f64225ee | ||
|
|
f157eff2c3 | ||
|
|
95a185ec39 | ||
|
|
7963e511b9 | ||
|
|
2608e1ae74 | ||
|
|
13a6dd56a3 | ||
|
|
a7969dd4b4 | ||
|
|
b80b026246 | ||
|
|
a1a93d9bbb | ||
|
|
12df3d7b8e | ||
|
|
e564a4a0d3 | ||
|
|
b2a9128b2b | ||
|
|
866bcbf702 | ||
|
|
6d538dc568 | ||
|
|
c5737c7fc9 | ||
|
|
c60c0a93a4 | ||
|
|
ed7119bae5 | ||
|
|
c9cb310a2f | ||
|
|
fdfe18a952 | ||
|
|
5631daa173 | ||
|
|
38aa22fa5f | ||
|
|
eab7d400e5 | ||
|
|
29e6fba089 | ||
|
|
979cb605f5 | ||
|
|
be4db5983d | ||
|
|
aabcbaa665 | ||
|
|
dc18db5a17 | ||
|
|
fb140b1379 | ||
|
|
97be088716 | ||
|
|
3e39deec36 | ||
|
|
6f55049fb6 | ||
|
|
066d114dfe | ||
|
|
acb8bd7244 | ||
|
|
d75a1583cc | ||
|
|
c553f9eee0 | ||
|
|
117059077f | ||
|
|
c3555bae1f | ||
|
|
2c7ab07b41 | ||
|
|
12f31ffb81 | ||
|
|
3cb4cc88e8 | ||
|
|
82ea17d2eb | ||
|
|
61ac8adc7d | ||
|
|
7681a2a544 | ||
|
|
5a5bce953c | ||
|
|
1263fd7b98 | ||
|
|
c3ea62aa44 | ||
|
|
82ebf92b06 | ||
|
|
d99adb515a | ||
|
|
5ca239e177 | ||
|
|
b525893c39 | ||
|
|
7cdc159a50 | ||
|
|
0f441aef42 | ||
|
|
6497dc1701 | ||
|
|
bbe13487d3 | ||
|
|
8fc6f82a04 | ||
|
|
e791215bb8 | ||
|
|
db83d541b4 | ||
|
|
08bc3e7596 | ||
|
|
9c47c6173f | ||
|
|
1458300768 | ||
|
|
1752ea527d | ||
|
|
acea869a98 | ||
|
|
91426b9491 | ||
|
|
0491623313 | ||
|
|
91e96aa4b9 | ||
|
|
c099572fd8 | ||
|
|
7d481efff9 | ||
|
|
a210112dc6 | ||
|
|
04e4eea735 | ||
|
|
3e0fb03a0b | ||
|
|
17d042d4a2 | ||
|
|
a54883ab91 | ||
|
|
dfb3f81b69 | ||
|
|
ea1d543795 | ||
|
|
c917d2b1c4 | ||
|
|
96419fb359 | ||
|
|
0b0e0054b3 | ||
|
|
1199a44f92 | ||
|
|
1a81cd45f2 | ||
|
|
6134372101 | ||
|
|
4ec830a2e3 | ||
|
|
73df3040ca | ||
|
|
0dc5282898 | ||
|
|
fafa0bfeef | ||
|
|
e7e512e2f8 | ||
|
|
467571d3bb | ||
|
|
11b01f0cd8 | ||
|
|
f069ee1b0f | ||
|
|
e51ff88671 | ||
|
|
ee68f1df3e | ||
|
|
456ec4ee0a | ||
|
|
9c17594c34 | ||
|
|
2dfc37c1d8 | ||
|
|
1d36221607 | ||
|
|
388c886552 | ||
|
|
fde2dd1c92 | ||
|
|
42898846c6 | ||
|
|
a475c99987 | ||
|
|
ac0e2c9885 | ||
|
|
260ef1a07e | ||
|
|
9d59a9b83e | ||
|
|
c5434aba13 | ||
|
|
dd33b96c12 | ||
|
|
349e449cb8 | ||
|
|
0524ca0297 | ||
|
|
7bdaf8bac3 | ||
|
|
1dd62a1934 | ||
|
|
0a4c4729cf | ||
|
|
daf4c2ad49 | ||
|
|
2e60ab8763 | ||
|
|
62d58afb68 | ||
|
|
93cd7310f4 | ||
|
|
1b8f4f7735 | ||
|
|
d446c1c5e7 | ||
|
|
d5bfe682fe | ||
|
|
47fc3398e0 | ||
|
|
62bd6d13d1 | ||
|
|
9f1ea0807b | ||
|
|
9c5b639986 | ||
|
|
ec73607974 | ||
|
|
e442eb6ce2 | ||
|
|
a7e5072c8e | ||
|
|
db9c0600a8 | ||
|
|
cea1673058 | ||
|
|
3f93941dd9 | ||
|
|
4fa33c892a | ||
|
|
fb3230845d | ||
|
|
37250cbde3 | ||
|
|
3424ec1c27 | ||
|
|
fe9adba7fb | ||
|
|
b1135cee60 | ||
|
|
d44347d7d6 | ||
|
|
f04a28215e | ||
|
|
7b54d93c52 | ||
|
|
a61999baff | ||
|
|
fbeb4b60a3 | ||
|
|
91b7c307b6 | ||
|
|
92239322f9 | ||
|
|
128f9cc9eb | ||
|
|
bbab89d884 | ||
|
|
6fd040d420 | ||
|
|
c8cec91a93 | ||
|
|
38bb074751 | ||
|
|
337088b567 | ||
|
|
1727273d98 | ||
|
|
adeb569d84 | ||
|
|
dd8142e26a | ||
|
|
50df395f72 | ||
|
|
519ca4b2af | ||
|
|
f54b4c3abc | ||
|
|
43a66fd378 | ||
|
|
f4938cfed7 | ||
|
|
6badf101d7 | ||
|
|
3d27f22d2e | ||
|
|
acac5f8ea2 | ||
|
|
1d1b3afab5 | ||
|
|
ad2c6390a6 | ||
|
|
c16bcf7b57 | ||
|
|
7ecf5804bc | ||
|
|
b43e197dde | ||
|
|
48bd80d4c4 | ||
|
|
fc67c9a476 | ||
|
|
ca861e2a5d | ||
|
|
a626f71b9f | ||
|
|
d0f1509a9e | ||
|
|
64194da2f2 | ||
|
|
f4ac589eab | ||
|
|
96b2184d27 | ||
|
|
e196ff7281 | ||
|
|
bc05afeabb | ||
|
|
5e900736f8 | ||
|
|
761e9effae | ||
|
|
e0f1211896 | ||
|
|
fc5494e7f4 | ||
|
|
45a05111e6 | ||
|
|
afe9d109b3 | ||
|
|
768c7e53b4 | ||
|
|
a20d9fa8f1 | ||
|
|
d60ae63153 | ||
|
|
1a1c85b268 | ||
|
|
dd3ddaa838 | ||
|
|
56fcf73ce1 | ||
|
|
c9e7018490 | ||
|
|
bc6a34bb47 | ||
|
|
fcf350b06b | ||
|
|
6c393fb8e0 | ||
|
|
d7ef5df8c3 | ||
|
|
e250ffbd18 | ||
|
|
4b5f500dc1 | ||
|
|
6d69832711 | ||
|
|
233305ecb4 | ||
|
|
78f9fbae40 | ||
|
|
be46aa77f2 | ||
|
|
e741ba2f65 | ||
|
|
3203f7e1b7 | ||
|
|
f4aa982247 | ||
|
|
27c1f1d0d5 | ||
|
|
e291e32a29 | ||
|
|
9072388dd0 | ||
|
|
5f4da0f6a4 | ||
|
|
0583aa53a9 | ||
|
|
1d3ace5f21 | ||
|
|
3e8fe70915 | ||
|
|
bf8ce5471e | ||
|
|
262f8a33c6 | ||
|
|
4f934e54cf | ||
|
|
158bf06efb | ||
|
|
436017baee | ||
|
|
05e55696bb | ||
|
|
f825b5923c | ||
|
|
9a9893236e | ||
|
|
0ee843988f | ||
|
|
adf7e10879 | ||
|
|
59e449c806 | ||
|
|
cc05bfa181 | ||
|
|
b8c7aa68b4 | ||
|
|
6e80b2f4c8 | ||
|
|
ce205ab413 | ||
|
|
626a9aac4b | ||
|
|
73d85ca8c6 | ||
|
|
96795fe197 | ||
|
|
5cacf15322 | ||
|
|
590ce971bf | ||
|
|
7d5e93650b | ||
|
|
561dc57c03 | ||
|
|
625d626b25 | ||
|
|
dcfec9bd89 | ||
|
|
f1ff681b06 | ||
|
|
9bc9aa0bb0 | ||
|
|
24ea20f769 | ||
|
|
1faa520168 | ||
|
|
7e30d761c5 | ||
|
|
750aa80b7c | ||
|
|
861941353b | ||
|
|
3fda7aa1e5 | ||
|
|
6f886e6eaa | ||
|
|
9223f3ef71 | ||
|
|
6dbf4a3e49 | ||
|
|
3b9b74b5ea | ||
|
|
418a6ab5ad | ||
|
|
2268155994 | ||
|
|
b219283d66 | ||
|
|
f077adaefd | ||
|
|
8823666aa9 | ||
|
|
ff9146ab91 | ||
|
|
c40be5299c | ||
|
|
dcb2f45124 | ||
|
|
f6322440cf | ||
|
|
21e4108fd8 | ||
|
|
8e33688268 | ||
|
|
a3fb2717cb | ||
|
|
8017cf9d34 | ||
|
|
8fe304e65b | ||
|
|
28485e461e | ||
|
|
bf270745f0 | ||
|
|
d1e60cd546 | ||
|
|
834db4d02f | ||
|
|
2f8d75eb73 | ||
|
|
53eef3fda7 | ||
|
|
0bcc010de8 | ||
|
|
b43bf35e98 | ||
|
|
769023e36c | ||
|
|
2bf47f6d58 | ||
|
|
a3e1821ca0 | ||
|
|
dc1754bca7 | ||
|
|
8879d76dd9 | ||
|
|
cec99b83a0 | ||
|
|
498873c208 | ||
|
|
80c8f131c8 | ||
|
|
7344bd9054 | ||
|
|
44b4e146eb | ||
|
|
e330eafc91 | ||
|
|
b9e7541cf6 | ||
|
|
0d595d576a | ||
|
|
ab602c98d9 | ||
|
|
a0722fe022 | ||
|
|
4454c0b911 | ||
|
|
ae61064029 | ||
|
|
21168b8a49 | ||
|
|
077a3fb5a8 | ||
|
|
8266cdba66 | ||
|
|
aa0d3fd54c | ||
|
|
86080ad871 | ||
|
|
6b8144e8af | ||
|
|
10ab561fbb | ||
|
|
5d3606c12d | ||
|
|
e8d74bd735 | ||
|
|
7c791d4fbf | ||
|
|
ee2fba415a | ||
|
|
81bef28607 | ||
|
|
d46ba4325f | ||
|
|
e044670c55 | ||
|
|
66c13f35e7 | ||
|
|
f2cb675267 | ||
|
|
6f9b69a032 | ||
|
|
3a3eb4e84f | ||
|
|
c81955d84a | ||
|
|
0543733e3d | ||
|
|
336fb5f5a6 | ||
|
|
6d592d45b0 | ||
|
|
45d2467772 | ||
|
|
643248f9e4 | ||
|
|
94b18798ed | ||
|
|
4a18178a86 | ||
|
|
7bdde6822b | ||
|
|
a118588fe7 | ||
|
|
88bc81b9f5 | ||
|
|
1af68843b0 | ||
|
|
f704ade86b | ||
|
|
2dff8aec69 | ||
|
|
aae26c5da9 | ||
|
|
2dbdcf73ed | ||
|
|
9960b063e7 | ||
|
|
13834a276e | ||
|
|
a50945ad53 | ||
|
|
068b9e388f | ||
|
|
6158288295 | ||
|
|
b9fc298a0a | ||
|
|
a697b0735f | ||
|
|
6b82a8b29a | ||
|
|
158377a522 | ||
|
|
3d32b8eb59 | ||
|
|
9bc53c6644 | ||
|
|
a1b9baae30 | ||
|
|
6b6132b91b | ||
|
|
fdf26905c6 | ||
|
|
8f3731dabe | ||
|
|
e3521692ca | ||
|
|
dc8df37f5a | ||
|
|
141ae05cd6 | ||
|
|
584f4fb286 | ||
|
|
fdec8ab6a2 | ||
|
|
3f79ffecaf | ||
|
|
5ee071fdc7 | ||
|
|
88e0985776 | ||
|
|
a942313f85 | ||
|
|
f2446d46aa | ||
|
|
78c8680300 | ||
|
|
1cb979404b | ||
|
|
44a017db99 | ||
|
|
69a67ca977 | ||
|
|
dd579cc19b | ||
|
|
0346b09cb0 | ||
|
|
eb15d2bbd8 | ||
|
|
6a20f3113a | ||
|
|
b4e8bb1e0f | ||
|
|
83754960a6 | ||
|
|
892f262261 | ||
|
|
0bccf0d734 | ||
|
|
826dce324f | ||
|
|
d9dad4387e | ||
|
|
62c4a9a7fc | ||
|
|
386b069c83 | ||
|
|
6a48c354b7 | ||
|
|
ff0b1d0ec9 | ||
|
|
ceaba5a11c | ||
|
|
560bd6a92b | ||
|
|
05103c0676 | ||
|
|
88ea2aad28 | ||
|
|
55cd717df4 | ||
|
|
812e3d4a74 | ||
|
|
5946e4b9b5 | ||
|
|
ef54e0a845 | ||
|
|
20597c5ee1 | ||
|
|
057e76acd0 | ||
|
|
3582d79530 | ||
|
|
1c72e742cf | ||
|
|
2ac582cd18 | ||
|
|
e36302315c | ||
|
|
e48d14e14a | ||
|
|
608aa5c31e | ||
|
|
533398115d | ||
|
|
a8d69f850a | ||
|
|
98cb74e00c | ||
|
|
49c5c9ba15 | ||
|
|
64979fd941 | ||
|
|
dccafee383 | ||
|
|
0444ad5221 | ||
|
|
693c6fb71b | ||
|
|
d5bcaf42ac | ||
|
|
b002635d1b | ||
|
|
19e3a10a28 | ||
|
|
1d87da7745 | ||
|
|
0840883546 | ||
|
|
9d283b85e2 | ||
|
|
f031b6fa3f | ||
|
|
4b03bc92c0 | ||
|
|
487c81eeb2 | ||
|
|
26f71400e9 | ||
|
|
daeb06ede8 | ||
|
|
fe9705d33e | ||
|
|
25ea1c8f5f | ||
|
|
80a2fd485e | ||
|
|
18f8b102c3 | ||
|
|
b99c8dd32a | ||
|
|
52f1d96cfb | ||
|
|
c143d54c97 | ||
|
|
ac3881779c | ||
|
|
65e0700f2c | ||
|
|
733cee5c8c | ||
|
|
6b09466819 | ||
|
|
b29c0f9d74 | ||
|
|
5d239b896c | ||
|
|
52770a970b | ||
|
|
bbf923b849 | ||
|
|
d735c5d10b | ||
|
|
2417224991 | ||
|
|
d515bda868 | ||
|
|
8e332119e3 | ||
|
|
5ac3dccb37 | ||
|
|
e9354e1b6a | ||
|
|
8700393e61 | ||
|
|
8d76eaf633 | ||
|
|
99b6eb3cd9 | ||
|
|
36ffa46441 | ||
|
|
d110fea710 | ||
|
|
09bd94d44e | ||
|
|
3b8b45d12d | ||
|
|
39045fe2fc | ||
|
|
b7e7c82bd7 | ||
|
|
473eeaa206 | ||
|
|
36b93d6d2b | ||
|
|
f24feb62c8 | ||
|
|
69b82a5043 | ||
|
|
547db2f27b | ||
|
|
6b6599eb79 | ||
|
|
fcad295809 | ||
|
|
9a1e3701a3 | ||
|
|
ba3b82cc87 | ||
|
|
c768949034 | ||
|
|
4749c854bc | ||
|
|
3887231051 | ||
|
|
3078adac2d | ||
|
|
ec40d91f85 | ||
|
|
399cb3bc3f | ||
|
|
fe2bba2c40 | ||
|
|
2bbdd76ee1 | ||
|
|
a8ace43470 | ||
|
|
9c5c5b56ef | ||
|
|
109b9000d2 | ||
|
|
2194cd9da1 | ||
|
|
ac2834954c | ||
|
|
136043bb23 | ||
|
|
459c0fc136 | ||
|
|
22ab01c9ff | ||
|
|
cb7466247c | ||
|
|
a87b1fca1b | ||
|
|
0d4b971bd0 | ||
|
|
2b6fe7cae7 | ||
|
|
beb1ac4c9d | ||
|
|
923cdcde16 | ||
|
|
4ff4ca642c | ||
|
|
a968525d3f | ||
|
|
f73a23db97 | ||
|
|
4437cb67b9 | ||
|
|
abfb47674c | ||
|
|
f4deaf78e7 | ||
|
|
38f588da1d | ||
|
|
d7be6fc9f6 | ||
|
|
dd4b640424 | ||
|
|
ffbe400e33 | ||
|
|
533ea67278 | ||
|
|
9ad0bea76d | ||
|
|
7d6bc09f18 | ||
|
|
40a8a5a8e7 | ||
|
|
47c0a2cf03 | ||
|
|
2c787dd96d | ||
|
|
de340130b8 | ||
|
|
abc71e4cd6 | ||
|
|
444c2af5b0 | ||
|
|
07277b7282 | ||
|
|
41f1bb1dbd | ||
|
|
ee337b9476 | ||
|
|
1cbe63e293 | ||
|
|
eae3bf4d0e | ||
|
|
7502497827 | ||
|
|
a66541fd04 | ||
|
|
522d99477c | ||
|
|
3a4869205d | ||
|
|
5ae49e8e3e | ||
|
|
915321db61 | ||
|
|
bcd5b580cb | ||
|
|
70226a24c9 | ||
|
|
dd4995e02b | ||
|
|
46d3b70154 | ||
|
|
540c03670b | ||
|
|
8037e4a4c4 | ||
|
|
15a13be329 | ||
|
|
9509825552 | ||
|
|
e46ef2f92c | ||
|
|
dc21afe14a | ||
|
|
7667c0fa4a | ||
|
|
7f747cd4ef | ||
|
|
1e3693101b | ||
|
|
d31640734c | ||
|
|
ce3478041a | ||
|
|
ad2752a62c | ||
|
|
d29ebdbf26 | ||
|
|
491b3547b5 | ||
|
|
71cb8fe038 | ||
|
|
816b291ed3 | ||
|
|
b9f6119c68 | ||
|
|
c87d7458fc | ||
|
|
aed5ef3fba | ||
|
|
523824225e | ||
|
|
2a2a18f378 | ||
|
|
c29fb13941 | ||
|
|
30549da044 | ||
|
|
e81775fbce | ||
|
|
e7520a82c4 | ||
|
|
cf0e089616 | ||
|
|
df8207bd9f | ||
|
|
d65d555d63 | ||
|
|
159920296a | ||
|
|
bfd7e009cc | ||
|
|
682f9283a6 | ||
|
|
bbe8a97945 | ||
|
|
f93d11643f | ||
|
|
78bae33433 | ||
|
|
7cab89a291 | ||
|
|
95e91b9af8 | ||
|
|
5e08461385 | ||
|
|
632d95f1fb | ||
|
|
edd1b25330 | ||
|
|
ffaf48dda7 | ||
|
|
0e465ade48 | ||
|
|
ab80803f0f | ||
|
|
88d3db4dc8 | ||
|
|
da4dbb7319 | ||
|
|
808b405dd6 | ||
|
|
a429aaa6fd | ||
|
|
8db9641480 | ||
|
|
8dec769d64 | ||
|
|
06ad377729 | ||
|
|
569f736831 | ||
|
|
7702ed027b | ||
|
|
7c068afe05 | ||
|
|
211d136b7a | ||
|
|
434e0653fe | ||
|
|
cb134a7e13 | ||
|
|
08db90f606 | ||
|
|
964d552d28 | ||
|
|
40d3d9906a | ||
|
|
122467799f | ||
|
|
b1ca56a296 | ||
|
|
cb3504642c | ||
|
|
a8f10bbb09 | ||
|
|
b75849d4ab | ||
|
|
0c88bea772 | ||
|
|
7aaddf2a60 | ||
|
|
35d6db5e73 | ||
|
|
6642e93581 | ||
|
|
4aaacf8e2e | ||
|
|
0a8e6e9f07 | ||
|
|
062272a6e8 | ||
|
|
d610302e79 | ||
|
|
69846bfb18 | ||
|
|
c4bca4c214 | ||
|
|
14a8c686c0 | ||
|
|
c6cc750166 | ||
|
|
3cce84dfa7 | ||
|
|
c8f4c6bd49 | ||
|
|
17501c6cad | ||
|
|
aa64e7947e | ||
|
|
9adfbf1668 | ||
|
|
c6f2d4a0c4 | ||
|
|
4b7fc7b80b | ||
|
|
5c30146ee0 | ||
|
|
28af10444d | ||
|
|
a6f0faa058 | ||
|
|
b6227e633c | ||
|
|
47dd8610c6 | ||
|
|
6ffdbcafc5 | ||
|
|
d89f45d534 | ||
|
|
f014828423 | ||
|
|
f26c672421 | ||
|
|
b1b9804aca | ||
|
|
5c2c947785 | ||
|
|
1319cb2e4e | ||
|
|
1ecf3d04d9 | ||
|
|
b8d4776671 | ||
|
|
43b829bf02 | ||
|
|
6c150f9d06 | ||
|
|
bf818e1ede | ||
|
|
4022b6b9cd | ||
|
|
ab5ff6446e | ||
|
|
ef4bc0ca0c | ||
|
|
07e31d6745 | ||
|
|
e0bcbb0396 | ||
|
|
6a5bdebb7c | ||
|
|
bfcc1d8f03 | ||
|
|
eed6d6c49d | ||
|
|
cf05970ccf | ||
|
|
fa6e82dd25 | ||
|
|
16aaa0b5a6 | ||
|
|
70e146aedd | ||
|
|
338d7587b2 | ||
|
|
50837af607 | ||
|
|
989e931edf | ||
|
|
9238efbd3a | ||
|
|
ea2af2378d | ||
|
|
094ddfcf5f | ||
|
|
7329098ed8 | ||
|
|
0f229e4d7b | ||
|
|
b08eccd076 | ||
|
|
4e6e7c0562 | ||
|
|
eb331104df | ||
|
|
d6b664375e | ||
|
|
90c4f449e8 | ||
|
|
d5e8f5810d | ||
|
|
6215ec8cf6 | ||
|
|
f484785395 | ||
|
|
4eb93dd139 | ||
|
|
2da3f74057 | ||
|
|
4b2abb6f25 | ||
|
|
c38429d3a3 | ||
|
|
d78a5d1225 | ||
|
|
907ff89609 | ||
|
|
7758dcaaba | ||
|
|
ed6da918e1 | ||
|
|
30373db89c | ||
|
|
7e032fdbb3 | ||
|
|
d232a7abbb | ||
|
|
6b6b9ae242 | ||
|
|
241bcce6c1 | ||
|
|
f490d9ebe8 | ||
|
|
fb09843e5a | ||
|
|
ab95698181 | ||
|
|
28b3134ae2 | ||
|
|
ec47c9cd00 | ||
|
|
5e062908a5 | ||
|
|
d0cefd7005 | ||
|
|
c1276e789a | ||
|
|
7ac4cd4665 | ||
|
|
1797bf8108 | ||
|
|
8c32e619cb | ||
|
|
a0d800bbb9 | ||
|
|
0f276f10ee | ||
|
|
473c6aad84 | ||
|
|
f9b60fef85 | ||
|
|
f7ea140018 | ||
|
|
0287416aa5 | ||
|
|
0dfcfbb97e | ||
|
|
d82c386402 | ||
|
|
3c3a32b1fa | ||
|
|
8e2f78226a | ||
|
|
617360c631 | ||
|
|
0f2bd34a62 | ||
|
|
23a028f011 | ||
|
|
6c8da850a7 | ||
|
|
1bf5ae2d3d | ||
|
|
37a25625de | ||
|
|
206887bc71 | ||
|
|
1e8551da4a | ||
|
|
6dd88d25dd | ||
|
|
81089e989b | ||
|
|
8a4355e786 | ||
|
|
20947bc8c1 | ||
|
|
da0436c60e | ||
|
|
04af43a9fa | ||
|
|
9a2d87eb42 | ||
|
|
cb66925f22 | ||
|
|
c7b6688250 | ||
|
|
129dacbfe2 | ||
|
|
568ef92f79 | ||
|
|
75671dc982 | ||
|
|
4d55dbea6c | ||
|
|
67b7f90c26 | ||
|
|
3efd112d8b | ||
|
|
df5830b5f9 | ||
|
|
a6d8b985b2 | ||
|
|
e76a6dc00f | ||
|
|
77ee046b3f | ||
|
|
464f86eb1d | ||
|
|
b9bbd2872e | ||
|
|
7a70b8234c | ||
|
|
e6bf9faa3e | ||
|
|
ede7b1b35c | ||
|
|
6c095d8efa | ||
|
|
95bb8fa6ec | ||
|
|
bbe8fff1e6 | ||
|
|
5dc4cf4c17 | ||
|
|
5b135ada24 | ||
|
|
65b3dab916 | ||
|
|
e2643ead1a | ||
|
|
0dcfddc169 | ||
|
|
b36589b2e6 | ||
|
|
57bea64ad4 | ||
|
|
5b5bbd29c3 | ||
|
|
e80822f1c5 | ||
|
|
c7978150c4 | ||
|
|
70ed0af475 | ||
|
|
57d196fdce | ||
|
|
8dd61e1f86 | ||
|
|
d36801c589 | ||
|
|
9f62df36dc | ||
|
|
aa66cfaae7 | ||
|
|
e36abd2dfb | ||
|
|
9d5a021b1e | ||
|
|
5ddad51911 | ||
|
|
ef5a950ecb | ||
|
|
8419cfae2b | ||
|
|
289e144521 | ||
|
|
97ab06ea22 | ||
|
|
3d06fba918 | ||
|
|
f9aa33315a | ||
|
|
8eb6092f91 | ||
|
|
06a50a5e45 | ||
|
|
4759713d9d | ||
|
|
7061730abc | ||
|
|
f62dee262c | ||
|
|
df3a4d0d45 | ||
|
|
33d1fc085b | ||
|
|
c5eb3923c1 | ||
|
|
596dd03bb4 | ||
|
|
d72bdcfe9b | ||
|
|
0c3174c2b5 | ||
|
|
6abb219499 | ||
|
|
eea1ddc288 | ||
|
|
42cbb7b723 | ||
|
|
a06097b012 | ||
|
|
d7b8115724 | ||
|
|
c7703cd70c | ||
|
|
8dec3717eb | ||
|
|
c0673b10b5 | ||
|
|
91c3f2fb2d | ||
|
|
f83afd82d1 | ||
|
|
cf2cda6694 | ||
|
|
455c6e0d39 | ||
|
|
72b7900ce2 | ||
|
|
dba3d89027 | ||
|
|
8e4a480f05 | ||
|
|
7fe2ed81e2 | ||
|
|
58db856b9d | ||
|
|
62a854c2ea | ||
|
|
acb15e5209 | ||
|
|
ebf4395bc9 | ||
|
|
8af45e8091 | ||
|
|
32d6951c34 | ||
|
|
a172762558 | ||
|
|
7abedd176f | ||
|
|
f63be8a47d | ||
|
|
86aa27d92c | ||
|
|
972480269a | ||
|
|
b829e5c0f6 | ||
|
|
fe4b3c6f36 | ||
|
|
cad3921c95 | ||
|
|
24a84de463 | ||
|
|
3abf949e3f | ||
|
|
b561d86410 | ||
|
|
59ff1ff856 | ||
|
|
88a911f6b7 | ||
|
|
55aa3f1198 | ||
|
|
a6f78aad73 | ||
|
|
54bfbf174b | ||
|
|
be6757c290 | ||
|
|
dda2080d01 | ||
|
|
8ba63338fc | ||
|
|
8ebb39b8d5 | ||
|
|
0f230834a1 | ||
|
|
2dc41df0c8 | ||
|
|
995b879a28 | ||
|
|
b72e8559f6 | ||
|
|
733b5c62af | ||
|
|
b192b5366a | ||
|
|
14aa261aca | ||
|
|
14a218e319 | ||
|
|
4ac5f25279 | ||
|
|
c37ade8f5b | ||
|
|
1a179c7a45 | ||
|
|
237983cecf | ||
|
|
c1985b2fa2 | ||
|
|
fc13df9a09 | ||
|
|
8389b87556 | ||
|
|
b77a783f94 | ||
|
|
cdffd4a995 | ||
|
|
e75d17ed24 | ||
|
|
087b4d5c7f | ||
|
|
7ce631d529 | ||
|
|
829d3680d9 | ||
|
|
dbad6e4e8c | ||
|
|
7453f89827 | ||
|
|
3d639c7d45 | ||
|
|
9348316b12 | ||
|
|
d7d874d48c | ||
|
|
7aec367a3c | ||
|
|
6a29c64f08 | ||
|
|
0ee825212e | ||
|
|
8dfd2b9b07 | ||
|
|
343909f87a | ||
|
|
5e85d5ef32 | ||
|
|
1b14d7aa2d | ||
|
|
139282a39e | ||
|
|
e9724d8b41 | ||
|
|
adc9f92125 | ||
|
|
1c93153d83 | ||
|
|
c73a32f76d | ||
|
|
068af6b0d5 | ||
|
|
01a2d5e017 | ||
|
|
ca9f0fde9b | ||
|
|
b16a9053b4 | ||
|
|
5e6e7ed152 | ||
|
|
93d1c06892 | ||
|
|
e22745d1ff | ||
|
|
3308bc8a0f | ||
|
|
f94193ad53 | ||
|
|
6f5eb45144 | ||
|
|
9bfa7acdee | ||
|
|
e38b259094 | ||
|
|
394e92d538 | ||
|
|
02ee9451d8 | ||
|
|
093fe22ab5 | ||
|
|
2bb4d7c8b9 | ||
|
|
ea2732b38c | ||
|
|
6bb3cf5719 | ||
|
|
54e277e773 | ||
|
|
dec29b3e22 | ||
|
|
9974f71f3e | ||
|
|
25256601a6 | ||
|
|
d3e9fe37eb | ||
|
|
9ccbebdc4f | ||
|
|
73ddd239aa | ||
|
|
598eec219f | ||
|
|
f2f6239b59 | ||
|
|
ce53cdd4a4 | ||
|
|
4a97a6403d | ||
|
|
6ec397b934 | ||
|
|
23be3afc9d | ||
|
|
bf6b12cf57 | ||
|
|
3936251363 | ||
|
|
b50d97c3b7 | ||
|
|
ef29d4efe8 | ||
|
|
92ddf9bb2d | ||
|
|
875d5d50b8 | ||
|
|
83fa13ea4b | ||
|
|
8b24716372 | ||
|
|
670ac4a34f | ||
|
|
82eb923689 | ||
|
|
18aeda4713 | ||
|
|
a388493030 | ||
|
|
c3f8573950 | ||
|
|
36778bb87e | ||
|
|
1a89e379a4 | ||
|
|
0aae349816 | ||
|
|
434291b592 | ||
|
|
668ceda86c | ||
|
|
e3ef729adf | ||
|
|
baafba1774 | ||
|
|
2ccf82749f | ||
|
|
5663fd386a | ||
|
|
6d1ebf3952 | ||
|
|
0ea28c646a | ||
|
|
fab5dc64e9 | ||
|
|
a5013ecbc3 | ||
|
|
5f82e947b2 | ||
|
|
d00b9515de | ||
|
|
eebbbdd0dc | ||
|
|
46adb7644a | ||
|
|
49e7b4f4ea | ||
|
|
55b1c533cf | ||
|
|
f1a7f30167 | ||
|
|
9f5c2b74eb | ||
|
|
78b44af7a2 | ||
|
|
a8442ca0bb | ||
|
|
926b1ae28b | ||
|
|
109c1ce245 | ||
|
|
637ccf1b2a | ||
|
|
a428aedf14 | ||
|
|
2747049986 | ||
|
|
9a52fcf66d | ||
|
|
a2b2e01e39 | ||
|
|
be48a2ed91 | ||
|
|
245db56771 | ||
|
|
ba4616371b | ||
|
|
62a3bbbcf5 | ||
|
|
235c7a3bb8 | ||
|
|
9a1219c70c | ||
|
|
5e692e10bc | ||
|
|
22b6916ac2 | ||
|
|
e628ec6ff0 | ||
|
|
863f812dbb | ||
|
|
21dbf0f14b | ||
|
|
9c392461e8 | ||
|
|
5b9178b18d | ||
|
|
7f4a80f17f | ||
|
|
2798837450 | ||
|
|
381ca70517 | ||
|
|
fe2beaf96a | ||
|
|
c962ec34c8 | ||
|
|
ff390fcb7c | ||
|
|
35ab4a5ff4 | ||
|
|
cac498fd9e | ||
|
|
06fcf8f079 | ||
|
|
5dad1fe2af | ||
|
|
81ae860134 | ||
|
|
91558049d9 | ||
|
|
aa78948c90 | ||
|
|
7cbe0768f2 | ||
|
|
05be2fe25a | ||
|
|
59f46b8265 | ||
|
|
c5cdd748fc | ||
|
|
6fcbe5a37f | ||
|
|
4d595c1380 | ||
|
|
7684e966fc | ||
|
|
40639dfa37 | ||
|
|
5769d0121e | ||
|
|
1d6f3fc57f | ||
|
|
2609f3425b | ||
|
|
bd924b993b | ||
|
|
c4fe9a6a51 | ||
|
|
4694e31e35 | ||
|
|
ca0f09c8f7 | ||
|
|
684c9773c9 | ||
|
|
df443aa34c | ||
|
|
33e381b5da | ||
|
|
4b5d363f55 | ||
|
|
4c3dbc6deb | ||
|
|
519ad64e1d | ||
|
|
93068659e5 | ||
|
|
4b46a3d298 | ||
|
|
3e64028e29 | ||
|
|
9b17715175 | ||
|
|
7d8876f03c | ||
|
|
b955486f14 | ||
|
|
6068cfbd70 | ||
|
|
9cda8c8bcf | ||
|
|
b7522288b5 | ||
|
|
18bc91734f | ||
|
|
ef21ac3d5a | ||
|
|
08af0aab75 | ||
|
|
a29292e018 | ||
|
|
ebb37c09e5 | ||
|
|
6666d1a2f4 | ||
|
|
431bcf20ea | ||
|
|
7b3ef0e3ab | ||
|
|
34894fb76b | ||
|
|
e5afcbd013 | ||
|
|
253a98143c | ||
|
|
59a7feafef | ||
|
|
0b2c3d7ca8 | ||
|
|
bd8afc67dd | ||
|
|
08e5b018b8 | ||
|
|
3d58a0c0f3 | ||
|
|
56f7ca388d | ||
|
|
ddf0ee9972 | ||
|
|
298e6d38a0 | ||
|
|
7bb5d243a0 | ||
|
|
207b0194c2 | ||
|
|
f1081e058c | ||
|
|
7974319c73 | ||
|
|
e84b37fc66 | ||
|
|
4219edc089 | ||
|
|
244dcc0465 | ||
|
|
5e423a8ede | ||
|
|
fe24c8971f | ||
|
|
2410c767f8 | ||
|
|
a785fd27ec | ||
|
|
5d3df4579e | ||
|
|
3182256580 | ||
|
|
84b5c3c789 | ||
|
|
4a1a70fa46 | ||
|
|
fe457d149c | ||
|
|
9a29747bbf | ||
|
|
c04eb6dc2a | ||
|
|
5a9a6a4680 | ||
|
|
1633994fbd | ||
|
|
f9c85d4d81 | ||
|
|
ec636c95a1 | ||
|
|
2915fae942 | ||
|
|
f9b5468481 | ||
|
|
287f37eba5 | ||
|
|
26740668da | ||
|
|
bdd72f0d30 | ||
|
|
7e79f25949 | ||
|
|
2d917e166c | ||
|
|
ad4a811d0a | ||
|
|
ab1aa97af4 | ||
|
|
018941c5b3 | ||
|
|
cc1439fb7b | ||
|
|
f684a2900b | ||
|
|
83b721a322 | ||
|
|
a879528ed8 | ||
|
|
accbff3ccb | ||
|
|
0375f77b73 | ||
|
|
9d01162f42 | ||
|
|
3436dc1564 | ||
|
|
089293079f | ||
|
|
00e2cd7c04 | ||
|
|
f5abb933b0 | ||
|
|
848386bbaf | ||
|
|
5562a3c2ae | ||
|
|
9e8738660b | ||
|
|
178772d50d | ||
|
|
8d7f29c7c9 | ||
|
|
255f87f1c3 | ||
|
|
975354d081 | ||
|
|
ec6890ced1 | ||
|
|
290efb4b62 | ||
|
|
ab3ea76244 | ||
|
|
21d07aef15 | ||
|
|
6031cd02b9 | ||
|
|
2cdb4cab12 | ||
|
|
679217f2ef | ||
|
|
3aacc0a258 | ||
|
|
254cf6cc5b | ||
|
|
c06095259a | ||
|
|
30fd98c8d7 | ||
|
|
3a410f04fe | ||
|
|
4a0a58cdc1 | ||
|
|
c834f93539 | ||
|
|
35bdb84e57 | ||
|
|
36a3a09fcc | ||
|
|
2c07b490e8 | ||
|
|
5790311cbd | ||
|
|
fde3322117 | ||
|
|
5664e133d1 | ||
|
|
a1dc38a83f | ||
|
|
df974f93ee | ||
|
|
3dde64cdac | ||
|
|
6b4887df0f | ||
|
|
ca8ef3961e | ||
|
|
114e0e5b1e | ||
|
|
c7a247cbba | ||
|
|
3a641a7020 | ||
|
|
0977859bf5 | ||
|
|
a644253ee9 | ||
|
|
3403356be8 | ||
|
|
4a9ec0d0d4 | ||
|
|
250c5c0745 | ||
|
|
120b5880b1 | ||
|
|
18eff73795 | ||
|
|
89b9dbb1b4 | ||
|
|
dde4b3ab93 | ||
|
|
b1cc655ba5 | ||
|
|
5645a12d5b | ||
|
|
ce1a935c06 | ||
|
|
58b90ad6c9 | ||
|
|
4740e63e76 | ||
|
|
319932c734 | ||
|
|
7cf415288a | ||
|
|
fe67c1db8f | ||
|
|
09afbd89b8 | ||
|
|
824f7d827c | ||
|
|
3a8ca56f95 | ||
|
|
137e3fd083 | ||
|
|
1285944b1f | ||
|
|
cd8e9deab7 | ||
|
|
de424eac64 | ||
|
|
d106a09766 | ||
|
|
963e8ccd2c | ||
|
|
3474b8f2d0 | ||
|
|
e27b449ae9 | ||
|
|
7656818456 | ||
|
|
d214be1215 | ||
|
|
c8678c3ee5 | ||
|
|
108ee40c3f | ||
|
|
de51d205dc | ||
|
|
1f76246edc | ||
|
|
f91974b766 | ||
|
|
df85936145 | ||
|
|
f39aa0f52a | ||
|
|
180812394b | ||
|
|
291fa9597f | ||
|
|
6c4d8c25fc | ||
|
|
bf4b32a8e9 | ||
|
|
2e9dac7678 | ||
|
|
369314c1cb | ||
|
|
6ab86898af | ||
|
|
f3aa65d219 | ||
|
|
edf4f19de9 | ||
|
|
91eaaae6d7 | ||
|
|
ca0ae5a165 | ||
|
|
86d788d294 | ||
|
|
e345cea9be | ||
|
|
779f7841c2 | ||
|
|
15fdca46b8 | ||
|
|
97e099c70f | ||
|
|
d5a58bb763 | ||
|
|
2774df0d30 | ||
|
|
93a1799a4b | ||
|
|
f65f051c7c | ||
|
|
c46952dd4e | ||
|
|
1dad6b6118 | ||
|
|
e964621f2c | ||
|
|
46ae62f693 | ||
|
|
7d578f5852 | ||
|
|
467f257ad3 | ||
|
|
55186c0a49 | ||
|
|
1a0a4f7112 | ||
|
|
658290ae80 | ||
|
|
cb9f29c6fc | ||
|
|
d8f4955292 | ||
|
|
9803932324 | ||
|
|
a3a416b5e2 | ||
|
|
1453a318fe | ||
|
|
9ffa01d318 | ||
|
|
29b779c873 | ||
|
|
598307f676 | ||
|
|
aa9d546bf5 | ||
|
|
f2ef245eca | ||
|
|
458606381e | ||
|
|
244f174dc9 | ||
|
|
8a577f3197 | ||
|
|
2f1b24cc14 | ||
|
|
d5f836db7a | ||
|
|
ffd7c36cb2 | ||
|
|
dba543d539 | ||
|
|
9753c0f8eb | ||
|
|
c50b4d3d47 | ||
|
|
907f886cf0 | ||
|
|
218a2d2004 | ||
|
|
0e0f2c6833 | ||
|
|
e59090d3b6 | ||
|
|
0404be8bef | ||
|
|
337895cbaa | ||
|
|
743547096e | ||
|
|
81fb3df45e | ||
|
|
12624cab5b | ||
|
|
7d62ea88d2 | ||
|
|
abcc277430 | ||
|
|
4c4c9426ee | ||
|
|
88fdeb2bf2 | ||
|
|
f9ab868022 | ||
|
|
148d2cec8f | ||
|
|
5869f157f6 | ||
|
|
69a2902161 | ||
|
|
c19b048249 | ||
|
|
cd2c8acdb2 | ||
|
|
7d0d1c764f | ||
|
|
b5acf1d529 | ||
|
|
72b08384ad | ||
|
|
f51e48f282 | ||
|
|
2e6d1f3642 | ||
|
|
716af4ed93 | ||
|
|
31de86c9eb | ||
|
|
04a2cd1f1f | ||
|
|
bc0ef11a8c | ||
|
|
90c8420a4c | ||
|
|
657d5e0d74 | ||
|
|
03fa4d957c | ||
|
|
8d4530f1f2 | ||
|
|
6d15c503c3 | ||
|
|
75ddb34398 | ||
|
|
6fbfe6fb72 | ||
|
|
db500e911c | ||
|
|
c0c5ced6ad | ||
|
|
726270f8bc | ||
|
|
c3908450a0 | ||
|
|
f7ba05f465 | ||
|
|
dea7f7d5d6 | ||
|
|
ed7a0a2b9d | ||
|
|
ac6b4db0f8 | ||
|
|
b5d659c13c | ||
|
|
919cb5d1f2 | ||
|
|
e504d3cc35 | ||
|
|
1d67939e76 | ||
|
|
5d1e90d29c | ||
|
|
1678eba9cc | ||
|
|
cc142b2ba1 | ||
|
|
48cbffba14 | ||
|
|
d909bb1b25 | ||
|
|
3313e66fc2 | ||
|
|
085892a4c8 | ||
|
|
817e059230 | ||
|
|
7ce8891246 | ||
|
|
439b2589f9 | ||
|
|
e7b5cf66d2 | ||
|
|
b29fabf76c | ||
|
|
5d837c3ee4 | ||
|
|
4c0396ad1c | ||
|
|
97b62fce79 | ||
|
|
e904a38735 | ||
|
|
ae72187aed | ||
|
|
e4ebeefa61 | ||
|
|
417373ba70 | ||
|
|
36f9ded08e | ||
|
|
858925b8c8 | ||
|
|
d36c96fba9 | ||
|
|
2be6fb329e | ||
|
|
da56363ef9 | ||
|
|
90d73228f3 | ||
|
|
1c76fcd26b | ||
|
|
c26c4ddf15 | ||
|
|
537bdb62da | ||
|
|
b2ac2bd97a | ||
|
|
aee6ea56b5 | ||
|
|
ff5506c842 | ||
|
|
94c5340fbf | ||
|
|
0e11026b60 | ||
|
|
1d8e953ebc | ||
|
|
8708fba4bc | ||
|
|
bc1294ae61 | ||
|
|
308f05101e | ||
|
|
f368739303 | ||
|
|
1bca1b921b | ||
|
|
3e513e92b1 | ||
|
|
194fe178c0 | ||
|
|
5d10a19bfa | ||
|
|
8f52a68526 | ||
|
|
c67d0d59bb | ||
|
|
4477064f17 | ||
|
|
9dbe24b37c | ||
|
|
46a85295e8 | ||
|
|
63170324a8 | ||
|
|
4fd157b5f4 | ||
|
|
e5406a0ea3 | ||
|
|
9b64ba21fd | ||
|
|
18fcf07971 | ||
|
|
d3404c6570 | ||
|
|
1878b5287b | ||
|
|
7f74545586 | ||
|
|
a920894a8f | ||
|
|
2c912456ce | ||
|
|
ebda475972 | ||
|
|
05aace84e1 | ||
|
|
1cfa1faccc | ||
|
|
1caa393974 | ||
|
|
ef357ab6e5 | ||
|
|
c39c5492ea | ||
|
|
1a5d54f74f | ||
|
|
13dc6c7dfb | ||
|
|
4c7dee69c2 | ||
|
|
dc9cf7689d | ||
|
|
778a408c6c | ||
|
|
2b7f3061d0 | ||
|
|
92903e1ec3 | ||
|
|
c5a621010e | ||
|
|
0b5b636578 | ||
|
|
8fcdb91ba3 | ||
|
|
f67d5f1197 | ||
|
|
6e0e6203cc | ||
|
|
2694ce4148 | ||
|
|
7c02b032f6 | ||
|
|
deb7754cb9 | ||
|
|
624f3c60bd | ||
|
|
8a8e792faa | ||
|
|
bc836011bc | ||
|
|
107eedfb49 | ||
|
|
61a7dcda23 | ||
|
|
873ca4f438 | ||
|
|
29221c2901 | ||
|
|
eac9613df7 | ||
|
|
184d5d25a6 | ||
|
|
ae33411566 | ||
|
|
479ebcc3fa | ||
|
|
1ae572cf30 | ||
|
|
ac6e16688d | ||
|
|
69159e0271 | ||
|
|
cae35d6a5a | ||
|
|
df9b65e296 | ||
|
|
fb0b34a6a0 | ||
|
|
db3b822aef | ||
|
|
f4994ef151 | ||
|
|
8e27291417 | ||
|
|
aae9ad78e5 | ||
|
|
fb3efbfc66 | ||
|
|
0f8a66609a | ||
|
|
b3bb8c386f | ||
|
|
b3b5e0e155 | ||
|
|
99a0bf1286 | ||
|
|
650f0ee752 | ||
|
|
2ddcf1120f | ||
|
|
d45c74915c | ||
|
|
cd373791ac | ||
|
|
7b03b0c5fc | ||
|
|
57d6677131 | ||
|
|
05e73344eb | ||
|
|
fff8f96490 | ||
|
|
1ccfb34246 | ||
|
|
b30bd00993 | ||
|
|
6b2d9fe816 | ||
|
|
531114279d | ||
|
|
944aaff0fa | ||
|
|
6bafa6819d | ||
|
|
8d7091285a | ||
|
|
579e95219a | ||
|
|
4a746881e3 | ||
|
|
9122f1b642 | ||
|
|
8b033ed4a8 | ||
|
|
8e53a63243 | ||
|
|
4de01e7387 | ||
|
|
f85ab74e2b | ||
|
|
8bb7d5de3f | ||
|
|
68424e485c | ||
|
|
ac34285eed | ||
|
|
e605a82573 | ||
|
|
1061764426 | ||
|
|
8d93e410f7 | ||
|
|
9336cdcc5d | ||
|
|
7639c03646 | ||
|
|
2da55bff9c | ||
|
|
6ea5d45dec | ||
|
|
e9504a3899 | ||
|
|
7bff2fd1e5 | ||
|
|
694712e933 | ||
|
|
aa675559e6 | ||
|
|
2af19d675a | ||
|
|
4588d16fc2 | ||
|
|
5dbd3031be | ||
|
|
59c16eba77 | ||
|
|
8c21ec96d1 | ||
|
|
2c00a8353d | ||
|
|
19e7a76f85 | ||
|
|
f16a186faf | ||
|
|
456dd39ec4 | ||
|
|
5b69a697e4 | ||
|
|
20d279fee4 | ||
|
|
cd55d819af | ||
|
|
dce51da92f | ||
|
|
6118cf6041 | ||
|
|
4ae8bffd4d | ||
|
|
5ebe86d5b6 | ||
|
|
317d97a310 | ||
|
|
082aa1d8e3 | ||
|
|
2f2963676f | ||
|
|
f2d388f742 | ||
|
|
d79008495a | ||
|
|
43f1867fb8 | ||
|
|
043c28628c | ||
|
|
9540854c8a | ||
|
|
b951a6ca66 | ||
|
|
26561a395d | ||
|
|
0a884c8718 | ||
|
|
b393e3c662 | ||
|
|
c36062210f | ||
|
|
861381fbb6 | ||
|
|
b9019f9590 | ||
|
|
fcfa877e89 | ||
|
|
d61849eefe | ||
|
|
bc83bd6ec8 | ||
|
|
c18c94e565 | ||
|
|
77d077ec08 | ||
|
|
021d0e6359 | ||
|
|
7f4fd2c52f | ||
|
|
8ffe098e3b | ||
|
|
a2ca86ca74 | ||
|
|
deef018806 | ||
|
|
c3f8b2ea56 | ||
|
|
e3696b6055 | ||
|
|
b82b340668 | ||
|
|
a8b01c439b | ||
|
|
6ec686ca7e | ||
|
|
fdb664fecb | ||
|
|
09f838089b | ||
|
|
db0fe918b8 | ||
|
|
8ca696d547 | ||
|
|
b7ccb1ce5c | ||
|
|
5f0033e466 | ||
|
|
477adba3e1 | ||
|
|
eb15ca8ebd | ||
|
|
dbf5907c20 | ||
|
|
e95deb9443 | ||
|
|
e19c36b5c4 | ||
|
|
fdd589db4f | ||
|
|
cd4e45d8f5 | ||
|
|
e6e31b9cab | ||
|
|
b676b1fef9 | ||
|
|
58bfb35fa6 | ||
|
|
09131e8c36 | ||
|
|
1d6ca91c01 | ||
|
|
fa00ba2edd | ||
|
|
65114c8483 | ||
|
|
d033985141 | ||
|
|
5badfbee93 | ||
|
|
44a61842f0 | ||
|
|
70b61af572 | ||
|
|
53a53d393d | ||
|
|
6c95b5757b | ||
|
|
693b3e5a6f | ||
|
|
aac1338bdd | ||
|
|
2979137102 | ||
|
|
0068675f3b | ||
|
|
6c1a22ea7f | ||
|
|
2869b92e6b | ||
|
|
8a38ce1964 | ||
|
|
3a7c5566ed | ||
|
|
1bed8c2b08 | ||
|
|
e24500b306 | ||
|
|
6251914419 | ||
|
|
8d9e943d57 | ||
|
|
f71bc5d323 | ||
|
|
a8082b2b3f | ||
|
|
510b72303d | ||
|
|
4666d4bbaa | ||
|
|
025f1e9502 | ||
|
|
b4c05098a9 | ||
|
|
3c8ee6f7f7 | ||
|
|
8b34135b08 | ||
|
|
d4b7c6689f | ||
|
|
d72aadfb00 | ||
|
|
00ff8ae166 | ||
|
|
cffcf49b26 | ||
|
|
ad55aa8b85 | ||
|
|
accbdea942 | ||
|
|
22144b78ea | ||
|
|
c03ab269f0 | ||
|
|
0c6c4d5959 | ||
|
|
e4e1873770 | ||
|
|
3b3579025d | ||
|
|
5cf8f2f4f4 | ||
|
|
c4ff05b1ba | ||
|
|
2bf54d0b8e | ||
|
|
2a63888546 | ||
|
|
cb8294cbd2 | ||
|
|
c9a99be183 | ||
|
|
5d2e026e5a | ||
|
|
568fdad52a | ||
|
|
174fb65fed | ||
|
|
2e77c45ae8 | ||
|
|
1b674a0abf | ||
|
|
4beb8b1f6b | ||
|
|
3c4abb7b60 | ||
|
|
970c73c221 | ||
|
|
6797c1255f | ||
|
|
0ed159b553 | ||
|
|
faa8679804 | ||
|
|
e3d2253958 | ||
|
|
3f7b7996c0 | ||
|
|
9229ff54df | ||
|
|
204ab8f427 | ||
|
|
8ee6c0789d | ||
|
|
be188e7266 | ||
|
|
1a43b62750 | ||
|
|
eaa8321aa8 | ||
|
|
f01f0071dd | ||
|
|
ec69cc3590 | ||
|
|
102dac1eb8 | ||
|
|
d54c5f1f99 | ||
|
|
c2e0e00c47 | ||
|
|
f24e387363 | ||
|
|
09715b83e4 | ||
|
|
e4f197bbc9 | ||
|
|
de64cef48d | ||
|
|
b85329b371 | ||
|
|
215f9a4245 | ||
|
|
80ce7a64ba | ||
|
|
65f3dc0656 | ||
|
|
f9b6b841b6 | ||
|
|
d4f2d649e8 | ||
|
|
15b057fe68 | ||
|
|
9cb549f4a1 | ||
|
|
4d67578458 | ||
|
|
71faaf1c19 | ||
|
|
0187f29b4b | ||
|
|
9b6ccdd43a | ||
|
|
e82deddefb | ||
|
|
780bec35bb | ||
|
|
27d80fd370 | ||
|
|
952328d55c | ||
|
|
f747f3bd10 | ||
|
|
11c3aca58d | ||
|
|
5ef2067836 | ||
|
|
de9728895e | ||
|
|
19774f32c2 | ||
|
|
e62b979708 | ||
|
|
69eef30ad3 | ||
|
|
71a41bc00d | ||
|
|
dd508dbc49 | ||
|
|
13ad40402a | ||
|
|
98712f288c | ||
|
|
a29a78e199 | ||
|
|
767267c89e | ||
|
|
b3801f65cf | ||
|
|
44a1d6b3d4 | ||
|
|
7a1528d1e4 | ||
|
|
c970a25d58 | ||
|
|
0a78b0b130 | ||
|
|
69f6dc09d3 | ||
|
|
467e708617 | ||
|
|
3a84591e61 | ||
|
|
a527066216 | ||
|
|
ef9823035f | ||
|
|
513ee4c7d9 | ||
|
|
fcc9b3a588 | ||
|
|
71eed45b77 | ||
|
|
6940f00492 | ||
|
|
1c85c20fa9 | ||
|
|
ae30b02405 | ||
|
|
89b7a9d3ac | ||
|
|
dc25fc99b3 | ||
|
|
6e6957a9ab | ||
|
|
0609e7db06 | ||
|
|
f57097b79e | ||
|
|
7e988d97d3 | ||
|
|
2795042c2c | ||
|
|
c3c86545fc | ||
|
|
3fe14a3d56 | ||
|
|
bad5740728 | ||
|
|
c164553ba1 | ||
|
|
e6c72b2995 | ||
|
|
cbcefabbff | ||
|
|
97cfa3f3ae | ||
|
|
803a008821 | ||
|
|
658730928b | ||
|
|
310db374c8 | ||
|
|
dc5bd648cf | ||
|
|
b6be9e6ade | ||
|
|
04f71496e3 | ||
|
|
1eed142423 | ||
|
|
f1e0ad0df0 | ||
|
|
f8fa5f1ba5 | ||
|
|
c187563267 | ||
|
|
fcdbbd5dbc | ||
|
|
6604d04c60 | ||
|
|
63be574a14 | ||
|
|
2414f998ba | ||
|
|
90e2ecad4f | ||
|
|
87a3f5c715 | ||
|
|
a4ef81ebd8 | ||
|
|
67fc810fc2 | ||
|
|
e13a61645d | ||
|
|
aae4a78fd4 | ||
|
|
3947da5e27 | ||
|
|
4e4ce2f77c | ||
|
|
d9a2e081bd | ||
|
|
e60dde7ce5 | ||
|
|
699b138999 | ||
|
|
8f191b497f | ||
|
|
fd013d617c | ||
|
|
a8bda38035 | ||
|
|
411de9aa23 | ||
|
|
f0abe497ef | ||
|
|
9c8be83f5d | ||
|
|
45335af8cf | ||
|
|
945e433bb7 | ||
|
|
70729fdb0c | ||
|
|
4a435e5701 | ||
|
|
427747c6b8 | ||
|
|
be9407cb57 | ||
|
|
c380d3d2a0 | ||
|
|
489b0eb12d | ||
|
|
7c73629962 | ||
|
|
ff619eca1c | ||
|
|
134a39fd71 | ||
|
|
506509b1b2 | ||
|
|
02a36316be | ||
|
|
8549c7c81b | ||
|
|
5a0be7d2ad | ||
|
|
c6f44c6398 | ||
|
|
04a8a0e6a1 | ||
|
|
8a175d147b | ||
|
|
5fbc319b20 | ||
|
|
8e3ba7caf2 | ||
|
|
182aaa7d27 | ||
|
|
ec17d466f7 | ||
|
|
79c2445117 | ||
|
|
aa59db1609 | ||
|
|
814b106be2 | ||
|
|
3901ea0fbe | ||
|
|
65133107be | ||
|
|
08d15cfc5e | ||
|
|
3c89f9a5f1 | ||
|
|
dbc6bc8206 | ||
|
|
dc38291ef5 | ||
|
|
3bb634ed5b | ||
|
|
4bdcfe4d30 | ||
|
|
3b74784486 | ||
|
|
5226664a3d | ||
|
|
6d23823b63 | ||
|
|
da3a56c144 | ||
|
|
58aa54d8cf | ||
|
|
e525e673a8 | ||
|
|
445dbf8779 | ||
|
|
6a27bea2a3 | ||
|
|
13163f9c5c | ||
|
|
fde08f922b | ||
|
|
266ce00872 | ||
|
|
623a70a0d1 | ||
|
|
1d7b738040 | ||
|
|
edc8dd2601 | ||
|
|
31dc932ca4 | ||
|
|
edb355941c | ||
|
|
cddaccb7f7 | ||
|
|
a905cce2c9 | ||
|
|
b9f110ac2b | ||
|
|
7cc24417b3 | ||
|
|
b304284d70 | ||
|
|
c382fb1577 | ||
|
|
77244f4e2c | ||
|
|
8beab5f5bc | ||
|
|
902ae3f0cf | ||
|
|
519ef4e486 | ||
|
|
699e04f371 | ||
|
|
d73de0e60d | ||
|
|
8e0b7d2a73 | ||
|
|
04283cf2d6 | ||
|
|
d60b4aa56f | ||
|
|
9cfeda1b0c | ||
|
|
5e1bd8e1eb | ||
|
|
9b495d212b | ||
|
|
b6fdd0070b | ||
|
|
eea387ad0c | ||
|
|
9cdb0f173a | ||
|
|
51063230d0 | ||
|
|
1111478b7f | ||
|
|
c99c9b441f | ||
|
|
b5065a0276 | ||
|
|
c79a577060 | ||
|
|
091596e80e | ||
|
|
0b4efe4ae1 | ||
|
|
1f9b7faa60 | ||
|
|
762d7bcc34 | ||
|
|
a2145f6b49 | ||
|
|
b48de98865 | ||
|
|
a23179dd83 | ||
|
|
5c18794122 | ||
|
|
f04011f6a7 | ||
|
|
893498238e | ||
|
|
474fa9dea0 | ||
|
|
d8a8574dda | ||
|
|
935fb015d3 | ||
|
|
8bbd3063ec | ||
|
|
92c5cabd70 | ||
|
|
e5db5a7b5c | ||
|
|
28cf123da3 | ||
|
|
5069367873 | ||
|
|
234e656ff6 | ||
|
|
aeadfbdd6a | ||
|
|
39288cfb0b | ||
|
|
5e430968c1 | ||
|
|
154b74ce6f | ||
|
|
2e26303b66 | ||
|
|
51ddcd9ee1 | ||
|
|
9d5d1c0a41 | ||
|
|
6058ccff0d | ||
|
|
a8ec4fe2fd | ||
|
|
65ccb2d443 | ||
|
|
0e929602a8 | ||
|
|
5329e026dc | ||
|
|
a7412e43b3 | ||
|
|
eeae24e058 | ||
|
|
17b6cc43d5 | ||
|
|
b69a2ef0cd | ||
|
|
6d1296094e | ||
|
|
c4039b53e6 | ||
|
|
64831b4c86 | ||
|
|
1dec270907 | ||
|
|
f72f8b03df | ||
|
|
0b47e5d05d | ||
|
|
a487c7b4b2 | ||
|
|
3838b21459 | ||
|
|
7801274d33 | ||
|
|
a505406ee7 | ||
|
|
9487a95c13 | ||
|
|
3b2fe13902 | ||
|
|
db2898dfe5 | ||
|
|
e08fd399d2 | ||
|
|
e45ffba010 | ||
|
|
f7fde93ed2 | ||
|
|
3cf53604a1 | ||
|
|
e041a5e037 | ||
|
|
6c8e10255b | ||
|
|
3464ab1527 | ||
|
|
82e74a2afd | ||
|
|
771ebde295 | ||
|
|
4ce4c3138c | ||
|
|
d37b46effc | ||
|
|
0868aac750 | ||
|
|
4ff5f33966 | ||
|
|
e1aebbe12b | ||
|
|
8273f467b6 | ||
|
|
74664afa68 | ||
|
|
c05f344371 | ||
|
|
ec1507d644 | ||
|
|
8cdc1f0014 | ||
|
|
2b1ab5c6ef | ||
|
|
01fedc0bf8 | ||
|
|
1bd82d71a2 | ||
|
|
1e9dacb6e4 | ||
|
|
94939ea3d3 | ||
|
|
c3ff69d147 | ||
|
|
0fad9d4ac7 | ||
|
|
70cd8ffb72 | ||
|
|
61535bf4b8 | ||
|
|
4adcbf9e48 | ||
|
|
3eba3167fd | ||
|
|
0608fd7732 | ||
|
|
1f41f27e89 | ||
|
|
ded0df9303 | ||
|
|
2a7ba1893a | ||
|
|
6b3b19632a | ||
|
|
98bb0731df | ||
|
|
a102f7044e | ||
|
|
f1028dbaed | ||
|
|
438ce5c3db | ||
|
|
b995a1d091 | ||
|
|
e072f83507 | ||
|
|
79154bba25 | ||
|
|
613eb7522c | ||
|
|
0eb5653713 | ||
|
|
0d624f021b | ||
|
|
b263047f4e | ||
|
|
4410e1bbd7 | ||
|
|
8c3871e8de | ||
|
|
2eafd3cc15 | ||
|
|
368df66947 | ||
|
|
9f9a3ea8fd | ||
|
|
f66286105f | ||
|
|
0f0f912370 | ||
|
|
9fa0e37a5d | ||
|
|
a0cb51ff70 | ||
|
|
a6305ddea4 | ||
|
|
fb8638fe6a | ||
|
|
0009f1f865 | ||
|
|
d449c35025 | ||
|
|
1893d1a2c2 | ||
|
|
0c4539e4fa | ||
|
|
feacddd1d7 | ||
|
|
0c44fe6ce0 | ||
|
|
17fb6983d8 | ||
|
|
5fb73bdb01 | ||
|
|
7f082ea389 | ||
|
|
9856a1831a | ||
|
|
dd17a20b60 | ||
|
|
665a52b106 | ||
|
|
f68d33870b | ||
|
|
49d13b12a5 | ||
|
|
674ab7e41f | ||
|
|
5b3eb3ba82 | ||
|
|
e28d3f3b5a | ||
|
|
870d8b5008 | ||
|
|
6aa240e9a3 | ||
|
|
b55a4047d0 | ||
|
|
a07d87318c | ||
|
|
dd6555c903 | ||
|
|
e8c40b6044 | ||
|
|
91c17a0b2a | ||
|
|
2ed0ea0243 | ||
|
|
df2f92433a | ||
|
|
68b3fc72bf | ||
|
|
df5bb14758 | ||
|
|
e24199bbbe | ||
|
|
2c6099556b | ||
|
|
f98215a5da | ||
|
|
b6b6888493 | ||
|
|
f8e5b9be43 | ||
|
|
692210214f | ||
|
|
cff2546c0c | ||
|
|
f0cc1200f3 | ||
|
|
e83a9af455 | ||
|
|
fb84f9d9cf | ||
|
|
118a2515e1 | ||
|
|
63e891b0f7 | ||
|
|
9891080b57 | ||
|
|
bc7a7e55af | ||
|
|
9b8a029de1 | ||
|
|
11b5575422 | ||
|
|
06336aa580 | ||
|
|
aa8c1d6e9c | ||
|
|
9a4d5d8abf | ||
|
|
3c5631bca3 | ||
|
|
84f85f87b2 | ||
|
|
c35db5976f | ||
|
|
8d1fcf988c | ||
|
|
bbf8f2dd69 | ||
|
|
2f6436e34f | ||
|
|
9cbb03107d | ||
|
|
ee44d7fb2e | ||
|
|
6a0fcd9cf0 | ||
|
|
43cfe3b858 | ||
|
|
dba83c1c03 | ||
|
|
053e139d00 | ||
|
|
04f791a839 | ||
|
|
a4029c9490 | ||
|
|
d471dfec43 | ||
|
|
494bbd46d0 | ||
|
|
1525b9ad06 | ||
|
|
19847ee80b | ||
|
|
fddf1f146c | ||
|
|
5f19cb1c0c | ||
|
|
aaeae992e1 | ||
|
|
a0e7be9d45 | ||
|
|
78faf7e14c | ||
|
|
98f84c2c37 | ||
|
|
278805043e | ||
|
|
dc5215e41e | ||
|
|
7e11691ea4 | ||
|
|
c83dfc44d6 | ||
|
|
68a01b1735 | ||
|
|
0307b58d17 | ||
|
|
9d1508049e | ||
|
|
42322055f9 | ||
|
|
5de8fce156 | ||
|
|
29ff92f833 | ||
|
|
359007c5bf | ||
|
|
bbe40518e4 | ||
|
|
b26f3c0cc6 | ||
|
|
552b4b67a6 | ||
|
|
7fbf359efd | ||
|
|
052b804855 | ||
|
|
67cc611495 | ||
|
|
7e2c24b82e | ||
|
|
4a6bbd4dca | ||
|
|
166bfba5b9 | ||
|
|
87b8ac5f4e | ||
|
|
46b4100291 | ||
|
|
83090ade94 | ||
|
|
44b7a42d5a | ||
|
|
1a5617d430 | ||
|
|
fa818e0924 | ||
|
|
f87b531fe1 | ||
|
|
82fd0c4d37 | ||
|
|
26ceb9e3be | ||
|
|
743458b853 | ||
|
|
920e5f6fbe | ||
|
|
fc0dd22769 | ||
|
|
c7c61ce280 | ||
|
|
5f5a603f71 | ||
|
|
d611858883 | ||
|
|
dbc9ce76a0 | ||
|
|
62386e2e40 | ||
|
|
5aa7ab5e37 | ||
|
|
be1b57eab7 | ||
|
|
ad5c8b41e2 | ||
|
|
09752b25ad | ||
|
|
3f317f961b | ||
|
|
d6d6a62fda | ||
|
|
528833b831 | ||
|
|
95e2bca4a6 | ||
|
|
dfd3327108 | ||
|
|
653befbcd4 | ||
|
|
33202efcdc | ||
|
|
77a37411ba | ||
|
|
491f221741 | ||
|
|
e8e125a598 | ||
|
|
cb01ae0ac5 | ||
|
|
a09469c01f | ||
|
|
662f398b08 | ||
|
|
d7aef627b8 | ||
|
|
87bcf293aa | ||
|
|
0171831ebb | ||
|
|
50cc455f0f | ||
|
|
47a7729358 | ||
|
|
6d508e61a0 | ||
|
|
8ef9223d84 | ||
|
|
e58ea4d0c7 | ||
|
|
9629ba916e | ||
|
|
aad4df1596 | ||
|
|
30ed25f80a | ||
|
|
8b7000681c | ||
|
|
221adbf3db | ||
|
|
39129d8cd0 | ||
|
|
2c2d444906 | ||
|
|
04a1d785bf | ||
|
|
c0a0aa4652 | ||
|
|
21c24fd7f0 | ||
|
|
beb358f8ee | ||
|
|
e3cd11ec2e | ||
|
|
ee08fc2421 | ||
|
|
ae30f7920b | ||
|
|
f4786c3ec8 | ||
|
|
8b9e4d2539 | ||
|
|
d7ca7ed632 | ||
|
|
1346b25fc7 | ||
|
|
15d9314503 | ||
|
|
93f4006c9e | ||
|
|
16182fec6c | ||
|
|
99606ba936 | ||
|
|
be1ed56d42 | ||
|
|
d7fb6f83b8 | ||
|
|
665f1f470a | ||
|
|
7867f26120 | ||
|
|
8e195bf811 | ||
|
|
e3403dc87f | ||
|
|
5844e95488 | ||
|
|
cb3a1f2ff6 | ||
|
|
f95edb06a9 | ||
|
|
86d13060bc | ||
|
|
0b8c2f6f8d | ||
|
|
589cafc64f | ||
|
|
448dc7b5c3 | ||
|
|
10cfde6cab | ||
|
|
e48eb2ce2f | ||
|
|
20a30a2d1d | ||
|
|
2e5b8418ae | ||
|
|
054fd229d2 | ||
|
|
9bdf2c8877 | ||
|
|
04f858a355 | ||
|
|
a9bf405a65 | ||
|
|
463c866cfa | ||
|
|
03fe0c8fff | ||
|
|
102d9f3510 | ||
|
|
3cf9a40c42 | ||
|
|
ff33267296 | ||
|
|
f0dab5bdb9 | ||
|
|
209a907c61 | ||
|
|
c7984d4363 | ||
|
|
a388313e1c | ||
|
|
a3933cb307 | ||
|
|
89c82d9be9 | ||
|
|
6e6311a1a1 | ||
|
|
69b334ed8a | ||
|
|
a84b6f377f | ||
|
|
ee5db4e4cc | ||
|
|
20f3322e5a | ||
|
|
1e84bc3743 | ||
|
|
7f198cbd50 | ||
|
|
1c7d5ccefc | ||
|
|
41dc4d994e | ||
|
|
490733bdd1 | ||
|
|
ed8cf8c431 | ||
|
|
a7e1f85c4d | ||
|
|
4b8919420d | ||
|
|
9afc5d67a4 | ||
|
|
72afaddd7c | ||
|
|
8ae3182e1c | ||
|
|
9d7e16b390 | ||
|
|
3a2ed202ad | ||
|
|
9e4b9b98ab | ||
|
|
e65fb7d995 | ||
|
|
7197830edc | ||
|
|
687603ae84 | ||
|
|
23fc25f926 | ||
|
|
e0c1f07f92 | ||
|
|
9424aa3378 | ||
|
|
57e6e0945f | ||
|
|
d87a033f29 | ||
|
|
10481895e6 | ||
|
|
813432f386 | ||
|
|
aba78c9776 | ||
|
|
8dc56bcee0 | ||
|
|
32b6e030ef | ||
|
|
a27f5d2474 | ||
|
|
e2fe8cfb75 | ||
|
|
9f1c346365 | ||
|
|
3e56803e95 | ||
|
|
fc5feb054d | ||
|
|
8fc233e436 | ||
|
|
22303eb2ff | ||
|
|
d6477ff9ff | ||
|
|
a0f6f13650 | ||
|
|
1dd213d587 | ||
|
|
569e51afbe | ||
|
|
ff06a4ed0d | ||
|
|
ea3fdb0668 | ||
|
|
bd917f6484 | ||
|
|
ee96311222 | ||
|
|
135153ff9c | ||
|
|
fdb98133c8 | ||
|
|
ad4e2c0a85 | ||
|
|
e38cb263aa | ||
|
|
0922136389 | ||
|
|
2a05517a30 | ||
|
|
a0ee924aeb | ||
|
|
1595afce68 | ||
|
|
4919d730c8 | ||
|
|
1407d6cc66 | ||
|
|
55b092e7a0 | ||
|
|
93afb754f3 | ||
|
|
81c0ea8f5c | ||
|
|
6faacd3781 | ||
|
|
ea1e9e407f | ||
|
|
d4f5aa1578 | ||
|
|
1cbbf3fa5d | ||
|
|
dad3dc71ca | ||
|
|
afb1e9f230 | ||
|
|
c33dd1ecee | ||
|
|
7e31a29b12 | ||
|
|
9a69ce309e | ||
|
|
b99bfcd02e | ||
|
|
adb16e4560 | ||
|
|
953c38563b | ||
|
|
89ee9c058a | ||
|
|
bac7a73555 | ||
|
|
5fb6ff230b | ||
|
|
605a718418 | ||
|
|
994542c75d | ||
|
|
d5fdce02fa | ||
|
|
d3637de0c3 | ||
|
|
63acbb222d | ||
|
|
5e1fe157b6 | ||
|
|
8e811da967 | ||
|
|
fb23108f4e | ||
|
|
a0220eb5f8 | ||
|
|
c16cbd5bc8 | ||
|
|
2d0673e1bc | ||
|
|
a90e00d577 | ||
|
|
8db96025a3 | ||
|
|
595596d73f | ||
|
|
240797e92a | ||
|
|
6cafb91680 | ||
|
|
852ce3e32f | ||
|
|
6b9c9458fa | ||
|
|
970ce917b0 | ||
|
|
db46d450bf | ||
|
|
db806b92dd | ||
|
|
6765f08b07 | ||
|
|
99d75ba14b | ||
|
|
0e8ce5680c | ||
|
|
fd01b54a14 | ||
|
|
ce6253bbd7 | ||
|
|
4fd33f19c6 | ||
|
|
01ae278f09 | ||
|
|
7907c71e47 | ||
|
|
4e44733dcc | ||
|
|
dd1d7bb02a | ||
|
|
6f933b3bd1 | ||
|
|
243530b750 | ||
|
|
ea984281b0 | ||
|
|
92cd3d60b9 | ||
|
|
5920ccee04 | ||
|
|
569fec4610 | ||
|
|
5770edcde2 | ||
|
|
1fb0a64f31 | ||
|
|
fe66d089ad | ||
|
|
cef10b4d4e | ||
|
|
b45aa6446d | ||
|
|
61749312b2 | ||
|
|
842bb2c5a6 | ||
|
|
4358fe99b1 | ||
|
|
3fda8b3714 | ||
|
|
09f3274adc | ||
|
|
029224f708 | ||
|
|
e87cce12f8 | ||
|
|
7660667153 | ||
|
|
222b3008d5 | ||
|
|
398cf0b312 | ||
|
|
5ad8be2483 | ||
|
|
6fe319702d | ||
|
|
32c89f9a98 | ||
|
|
64f983786e | ||
|
|
16438b416d | ||
|
|
52cd292a69 | ||
|
|
53b501df19 | ||
|
|
477acafc4c | ||
|
|
ab9146b7c6 | ||
|
|
4d15913e18 | ||
|
|
63a91811e2 | ||
|
|
9df4da6173 | ||
|
|
643927799b | ||
|
|
2652e23089 | ||
|
|
b70c5ae41e | ||
|
|
c53d9b2855 | ||
|
|
2f6712be87 | ||
|
|
37f78985ae | ||
|
|
34ac9bc71a | ||
|
|
19ff2484fd | ||
|
|
b7ef2211d9 | ||
|
|
c5206a4559 | ||
|
|
894296f63d | ||
|
|
61526df245 | ||
|
|
92549c4485 | ||
|
|
6014892d4d | ||
|
|
9515ce6807 | ||
|
|
1adb0f2f0e | ||
|
|
00b1b54347 | ||
|
|
282ce041e1 | ||
|
|
3215c4ee4b | ||
|
|
fce00c95c9 | ||
|
|
0a69ab1dc2 | ||
|
|
94771d250a | ||
|
|
b8395a1dbb | ||
|
|
0436cd1584 | ||
|
|
2c774bb94c | ||
|
|
b879d90b0d | ||
|
|
ba52b5c328 | ||
|
|
bf61de13f4 | ||
|
|
b26e67ae07 | ||
|
|
edafd16c75 | ||
|
|
c62e3dcb78 | ||
|
|
68be58c9f2 | ||
|
|
a25a499ed4 | ||
|
|
97f67912f4 | ||
|
|
e2f3788ff5 | ||
|
|
fd1f06c2cb | ||
|
|
2db8d25038 | ||
|
|
d618ddc8c5 | ||
|
|
79aa0afc97 | ||
|
|
e53d294c1c | ||
|
|
aedc3fdff9 | ||
|
|
b67dfeced2 | ||
|
|
65dbfcba5c | ||
|
|
8f14c78ba1 | ||
|
|
be1b64bb78 | ||
|
|
a34c285820 | ||
|
|
298f0c194d | ||
|
|
f5ad569aba | ||
|
|
c70df01532 | ||
|
|
03e115e066 | ||
|
|
b88fce35ad | ||
|
|
d214e9ff49 | ||
|
|
bd8382c005 | ||
|
|
18cb815e45 | ||
|
|
800e8aca6e | ||
|
|
63a6e0754b | ||
|
|
4abc271805 | ||
|
|
22cca3858c | ||
|
|
b816fbdf82 | ||
|
|
d400060b8b | ||
|
|
c88cfa2d9d | ||
|
|
b060027304 | ||
|
|
d4787aca9c | ||
|
|
69ae2e93f8 | ||
|
|
82a37c62c1 | ||
|
|
ca69970242 | ||
|
|
fac3853d95 | ||
|
|
9dd2f447cc | ||
|
|
ecbd7ca95b | ||
|
|
0c52d54d7d | ||
|
|
78276ac66b | ||
|
|
ca0a22d755 | ||
|
|
47361fd77a | ||
|
|
1af6fd5d74 | ||
|
|
51df78ad2d | ||
|
|
84a3e68eb5 | ||
|
|
b2904e09d8 | ||
|
|
fc42a621e4 | ||
|
|
a1c4fb73cd | ||
|
|
c18f19db97 | ||
|
|
ebc712f6b5 | ||
|
|
ef0057d88d | ||
|
|
a8fdfdd5e0 | ||
|
|
89f7e1ba2a | ||
|
|
6508b4058f | ||
|
|
bec5d93af6 | ||
|
|
1125fcd6c5 | ||
|
|
ff43a547a6 | ||
|
|
ca8684146c | ||
|
|
44bea62383 | ||
|
|
8dc2faa5e5 | ||
|
|
f4867d1d09 | ||
|
|
8d172801b5 | ||
|
|
db6e6dfe4a | ||
|
|
61007a95a6 | ||
|
|
bf138670e8 | ||
|
|
0e59f7433c | ||
|
|
9a033ac62a | ||
|
|
789412ee6a | ||
|
|
91125d20ef | ||
|
|
292b3672e2 | ||
|
|
14ef6b753c | ||
|
|
55fcb97a10 | ||
|
|
6b8ec544c1 | ||
|
|
c0aad385cd | ||
|
|
ecfb5e4711 | ||
|
|
46c9967a68 | ||
|
|
176c44e2b9 | ||
|
|
5957cf5ff8 | ||
|
|
436a270524 | ||
|
|
7a1c14b766 | ||
|
|
721c4aa888 | ||
|
|
638aab4eea | ||
|
|
9aa44f7458 | ||
|
|
1e887a2a8d | ||
|
|
78571ad121 | ||
|
|
8e5ec79097 | ||
|
|
fc351f36b1 | ||
|
|
80204147f7 | ||
|
|
d599b8e5ea | ||
|
|
208ef9d664 | ||
|
|
c14da542d1 | ||
|
|
451832cb2b | ||
|
|
1409aeb8ed | ||
|
|
342f24cfe4 | ||
|
|
8aedfd5153 | ||
|
|
33b099456f | ||
|
|
42cb40102f | ||
|
|
2fbeaaccd3 | ||
|
|
57fb75bef4 | ||
|
|
5c0e22cd31 | ||
|
|
879f74e521 | ||
|
|
e5a2e1a8c7 | ||
|
|
884d6c59a2 | ||
|
|
c206a95d55 | ||
|
|
8b4ef4e2da | ||
|
|
bac5238589 | ||
|
|
ae05d4d51d | ||
|
|
9d22bbee1c | ||
|
|
1d6007b848 | ||
|
|
3157339e44 | ||
|
|
b31d5eefd1 | ||
|
|
e47398dc71 | ||
|
|
757d472704 | ||
|
|
9d0ae99602 | ||
|
|
0d9ceb6fde | ||
|
|
cb665d4016 | ||
|
|
9673dc96d9 | ||
|
|
2295091427 | ||
|
|
45f4395f26 | ||
|
|
d9aa074330 | ||
|
|
33c20c8dc4 | ||
|
|
8101f910f0 | ||
|
|
8fb6c1a0c8 | ||
|
|
978e3e615c | ||
|
|
b3b8981b4b | ||
|
|
015064e5af | ||
|
|
7ef8ff60a5 | ||
|
|
4c3f54699e | ||
|
|
3bf5040324 | ||
|
|
ed9e5b31fa | ||
|
|
506e97e12d | ||
|
|
9365f9ab60 | ||
|
|
dd1e9ecb32 | ||
|
|
d3a2bf174d | ||
|
|
311020ff2e | ||
|
|
a6df3ac1fb | ||
|
|
d313b50e39 | ||
|
|
b23eb07018 | ||
|
|
2116486fe0 | ||
|
|
eed8fe22c6 | ||
|
|
1cec91e4bf | ||
|
|
8decf8ab9f | ||
|
|
79b0c20adb | ||
|
|
65647ca822 | ||
|
|
18fafcd45f | ||
|
|
b7723f4487 | ||
|
|
6418df87bb | ||
|
|
daa88c5be1 | ||
|
|
707b70b136 | ||
|
|
f9b3b6f7d3 | ||
|
|
b295eef970 | ||
|
|
f13dace7ad | ||
|
|
8dfc40ed3e | ||
|
|
2e637031ac | ||
|
|
de9ef20014 | ||
|
|
4f50689d0e | ||
|
|
082392f9e0 | ||
|
|
aca2ef08f1 | ||
|
|
90fcec4ca8 | ||
|
|
c90db28b9e | ||
|
|
56b617bd57 | ||
|
|
06d58c16d8 | ||
|
|
b1a807139a | ||
|
|
ac07736040 | ||
|
|
c68ba8d510 | ||
|
|
470802c93b | ||
|
|
c58745b6ce | ||
|
|
9eea4749f0 | ||
|
|
251206fb75 | ||
|
|
b53a6c5703 | ||
|
|
8c6972d12d | ||
|
|
fe0d88b7b3 | ||
|
|
658b6de9c7 | ||
|
|
4ea89c3811 | ||
|
|
2d3d71f46a | ||
|
|
80a6f431b6 | ||
|
|
0644729148 | ||
|
|
07da48e5ea | ||
|
|
b3f565819b | ||
|
|
af4abfbed9 | ||
|
|
eb0011cb46 | ||
|
|
444439fdab | ||
|
|
a0e66b913b | ||
|
|
96c780c804 | ||
|
|
4f1f46aa93 | ||
|
|
1d9f76ee5a | ||
|
|
a7ceda7eea | ||
|
|
baec4c4d70 | ||
|
|
4fa850048c | ||
|
|
8163655a24 | ||
|
|
4cabf8d2e3 | ||
|
|
db2f08fa96 | ||
|
|
a68be2fed7 | ||
|
|
c3e9aea3a7 | ||
|
|
40c38af766 | ||
|
|
fc2cee7a54 | ||
|
|
3d4feff7de | ||
|
|
f63c6875cd | ||
|
|
115b72149c | ||
|
|
a7e8118c83 | ||
|
|
8569cc5ac6 | ||
|
|
7a0ffce36f | ||
|
|
c573d95ec5 | ||
|
|
d3e1fba4e0 | ||
|
|
e7dd087b52 | ||
|
|
c7cb79906c | ||
|
|
3c3f80c5a0 | ||
|
|
e20fb3c3ac | ||
|
|
e3986a4dd4 | ||
|
|
a3926e3996 | ||
|
|
e737683efb | ||
|
|
0157c4ed65 | ||
|
|
058ade266d | ||
|
|
e0adb4c397 | ||
|
|
35aa61bb23 | ||
|
|
27236d19cf | ||
|
|
063ca3121a | ||
|
|
b8521c6875 | ||
|
|
e3798d6462 | ||
|
|
387a3e541f | ||
|
|
42a3b411e4 | ||
|
|
25c7ec4175 | ||
|
|
7ec11765da | ||
|
|
d57ae126b7 | ||
|
|
87f133555c | ||
|
|
db9883d851 | ||
|
|
8dad5ff7db | ||
|
|
fc36f9cd8c | ||
|
|
563c668e3f | ||
|
|
b3df1f3d26 | ||
|
|
1ac3f7af3b | ||
|
|
6cbb86aed7 | ||
|
|
e459a8c88b | ||
|
|
ca003b7d4d | ||
|
|
03f873a6d3 | ||
|
|
5dbec53847 | ||
|
|
49dfad9b0c | ||
|
|
4ee0462d1b | ||
|
|
3f78be4471 | ||
|
|
d93fad39ac | ||
|
|
aa3429bb0e | ||
|
|
d88246f2f6 | ||
|
|
201db34936 | ||
|
|
47709dfc7c | ||
|
|
2aaafc54ee | ||
|
|
e211881691 | ||
|
|
0d32f16041 | ||
|
|
2082e8d462 | ||
|
|
bfc95cfc57 | ||
|
|
35aeb7e04a | ||
|
|
adcddb09cd | ||
|
|
56199f899f | ||
|
|
ca5c845064 | ||
|
|
a8ac69f008 | ||
|
|
b9309bc7b1 | ||
|
|
41596feb56 | ||
|
|
cf1813b413 | ||
|
|
5b267c0e95 | ||
|
|
3741f70c29 | ||
|
|
1f37ea3d3c | ||
|
|
283ee076c7 | ||
|
|
b13a878927 | ||
|
|
364eb2838e | ||
|
|
94631ca8d7 | ||
|
|
2ed095d58f | ||
|
|
9c10e3970d | ||
|
|
0cf4f44e95 | ||
|
|
89638a0094 | ||
|
|
d7531cf4ff | ||
|
|
2c5acb8ecd | ||
|
|
824c317f74 | ||
|
|
d208fd1772 | ||
|
|
f145aaded9 | ||
|
|
c7043478f6 | ||
|
|
d16bb7f394 | ||
|
|
3ed314dbc6 | ||
|
|
e8c5942e33 | ||
|
|
96c704760c | ||
|
|
70c99f18e1 | ||
|
|
5e2bdb6356 | ||
|
|
dd13285f04 | ||
|
|
561a5bf699 | ||
|
|
f2d794e372 | ||
|
|
f0931b8438 | ||
|
|
aadb9addd5 | ||
|
|
66abb50d23 | ||
|
|
4eca99b745 | ||
|
|
a95a265d47 | ||
|
|
b0e70c25d0 | ||
|
|
8914bd6b9a | ||
|
|
26751e10ee | ||
|
|
579ee9f199 | ||
|
|
48fcb76ba4 | ||
|
|
b872bbbb42 | ||
|
|
73c88aa11f | ||
|
|
aa1700b7b4 | ||
|
|
1aa8e43bdf | ||
|
|
fa8200d3e2 | ||
|
|
bd9fcc6e8d | ||
|
|
6167667f9a | ||
|
|
1081379689 | ||
|
|
712526f1c3 | ||
|
|
7c0cfc5596 | ||
|
|
edd0dcbcef | ||
|
|
b322d67ffc | ||
|
|
38dbac199d | ||
|
|
6eb695c5eb | ||
|
|
b0fd5889aa | ||
|
|
b181f2edf0 | ||
|
|
376940e089 | ||
|
|
1c0762a3df | ||
|
|
df39f5ab98 | ||
|
|
9cd1ae1220 | ||
|
|
3ddef6fe78 | ||
|
|
b8c78217e8 | ||
|
|
3a1b514982 | ||
|
|
5d34dab2ef | ||
|
|
541ed1e764 | ||
|
|
5e764a345e | ||
|
|
33de51c4aa | ||
|
|
5aa038e195 | ||
|
|
0fe437c66b | ||
|
|
790d156503 | ||
|
|
9f515bea20 | ||
|
|
1422adac3f | ||
|
|
5f17e41190 | ||
|
|
0d9daaffe8 | ||
|
|
e1f3bf8d45 | ||
|
|
20a7723e63 | ||
|
|
5ffa6d9500 | ||
|
|
86956969ce | ||
|
|
13beb888c1 | ||
|
|
c1d4caf1a9 | ||
|
|
5e9a605ae4 | ||
|
|
c79d0ed276 | ||
|
|
6204e575a2 | ||
|
|
19f181723a | ||
|
|
4a49bf8799 | ||
|
|
8128c6aed6 | ||
|
|
45dfc74ab3 | ||
|
|
72c4ecced7 | ||
|
|
d21187df6a | ||
|
|
bf33025569 | ||
|
|
065620aec9 | ||
|
|
e8e0fbc988 | ||
|
|
21e61d08dd | ||
|
|
ca9cc50423 | ||
|
|
0fde74883f | ||
|
|
c1d12e5129 | ||
|
|
8ee6cd6c41 | ||
|
|
bb09ea5fa2 | ||
|
|
6b92ef9d71 | ||
|
|
a49f8a27e2 | ||
|
|
d0b3b4b186 | ||
|
|
0bd688962b | ||
|
|
c737ceb63f | ||
|
|
d24e5b9eca | ||
|
|
d68c2b5b8f | ||
|
|
6803707b1f | ||
|
|
13574d812f | ||
|
|
f4e95bdbca | ||
|
|
eb83023864 | ||
|
|
10c81fdfba | ||
|
|
7c47723992 | ||
|
|
0154183800 | ||
|
|
a2b0ea9c5b | ||
|
|
c49caf663c | ||
|
|
17e6698133 | ||
|
|
a7b99b1bb5 | ||
|
|
8d6a217f22 | ||
|
|
d5b1722c0c | ||
|
|
0d9a81f0e4 | ||
|
|
821a443e44 | ||
|
|
9d8d54e5c8 | ||
|
|
411739277d | ||
|
|
fa71feb9fb | ||
|
|
00f9194bfa | ||
|
|
a3e955400f | ||
|
|
05060cee5b | ||
|
|
c10148753a | ||
|
|
53bb64641b | ||
|
|
9a124bb3b2 | ||
|
|
91568cf919 | ||
|
|
b149a816dd | ||
|
|
bf35ecc07a | ||
|
|
711a1a1d4f | ||
|
|
a27b686446 | ||
|
|
1f6180ce5d | ||
|
|
b5032a7597 | ||
|
|
5073fd937c | ||
|
|
f0cb63fd48 | ||
|
|
f7642beb7c | ||
|
|
48c26c5837 | ||
|
|
65a899bf25 | ||
|
|
5d0cdc4ffa | ||
|
|
1d979778e8 | ||
|
|
917b8b40cf | ||
|
|
466ec92492 | ||
|
|
4ff5f526ba | ||
|
|
8460ee2dc4 | ||
|
|
fa39330ceb | ||
|
|
1857bb17d9 | ||
|
|
fe54b2fa3a | ||
|
|
4fbf0291e6 | ||
|
|
8bfcc3315a | ||
|
|
c8f6b42ce6 | ||
|
|
8f5289b7dc | ||
|
|
281e3f706b | ||
|
|
6dfa027ae2 | ||
|
|
623cd51b1c | ||
|
|
3d9e723a0e | ||
|
|
4a2b7cfc4e | ||
|
|
c15bee4511 | ||
|
|
f4afcd29e0 | ||
|
|
770e77a862 | ||
|
|
684d1dc432 | ||
|
|
ec9ddb2bfb | ||
|
|
a5f8aa914f | ||
|
|
ae06f1b8f0 | ||
|
|
e8f76d896b | ||
|
|
07ecb3f0e8 | ||
|
|
893f2d2c55 | ||
|
|
395a7bb33c | ||
|
|
636b371b86 | ||
|
|
f0783df123 | ||
|
|
fa54763425 | ||
|
|
cf2cd9680b | ||
|
|
47aa996b6b | ||
|
|
6442887c1a | ||
|
|
7a34536c80 | ||
|
|
e9a67b1c82 | ||
|
|
bc4cf1a367 | ||
|
|
a1d40a5748 | ||
|
|
e42f858166 | ||
|
|
75e0d19b4e | ||
|
|
5801eba22a | ||
|
|
fd3f756640 | ||
|
|
bd1672fd7b | ||
|
|
2c36820622 | ||
|
|
ff1d1e5b8f | ||
|
|
de0371dd1c | ||
|
|
d6f4bbf4bc | ||
|
|
5fc1e6ad64 | ||
|
|
c37d772759 | ||
|
|
fe2efd88cf | ||
|
|
5a2f48f529 | ||
|
|
4459d09a90 | ||
|
|
79fcd874f7 | ||
|
|
643655a612 | ||
|
|
adb0717ade | ||
|
|
1feae802c2 | ||
|
|
ec146d4cbe | ||
|
|
3399b133ae | ||
|
|
1637190c27 | ||
|
|
79f94771c3 | ||
|
|
018af62826 | ||
|
|
69bd292ed8 | ||
|
|
ac63a082aa | ||
|
|
e15bb05823 | ||
|
|
5528663727 | ||
|
|
1a204d31e7 | ||
|
|
0fe4273d4d | ||
|
|
abf0fdcf35 | ||
|
|
78074a5a54 | ||
|
|
dcc2b9c1cb | ||
|
|
b5a005dcc5 | ||
|
|
4c2d9e0eee | ||
|
|
fb73baca6a | ||
|
|
0be3dd4fe4 | ||
|
|
8e89899070 | ||
|
|
5e47492318 | ||
|
|
aa2d78f36a | ||
|
|
0cbed2d5d2 | ||
|
|
3914796e4e | ||
|
|
b9dac5ff55 | ||
|
|
1285a88660 | ||
|
|
96e0d4e29f | ||
|
|
9bb8a9ccd1 | ||
|
|
d9611bd84f | ||
|
|
915afa4534 | ||
|
|
5105c94233 | ||
|
|
899d4fe611 | ||
|
|
d45a12e544 | ||
|
|
302fc876d9 | ||
|
|
f6a25db17c | ||
|
|
da11303539 | ||
|
|
07ebe71839 | ||
|
|
eba9c4e039 | ||
|
|
7d80120611 | ||
|
|
f2ea5fb253 | ||
|
|
451ab6c531 | ||
|
|
796b63fcc5 | ||
|
|
7d8b3e6513 | ||
|
|
b2026106ec | ||
|
|
dba92d73c4 | ||
|
|
b09a250a03 | ||
|
|
c6f69f63fc | ||
|
|
3a7faa7368 | ||
|
|
f863c01a1d | ||
|
|
8a98204a69 | ||
|
|
77e52f42a6 | ||
|
|
704c0922e8 | ||
|
|
371ce37be4 | ||
|
|
152fb3f885 | ||
|
|
3ff83cd431 | ||
|
|
a9d5b6ef92 | ||
|
|
229f718754 | ||
|
|
646b65918d | ||
|
|
5e596a9cb7 | ||
|
|
353db6c4a5 | ||
|
|
959a1a08f0 | ||
|
|
3e510bd3f6 | ||
|
|
b68d5c4374 | ||
|
|
dc348a72c8 | ||
|
|
5e5d4eca4b | ||
|
|
96b5d174d1 | ||
|
|
df1da32745 | ||
|
|
a7c198048e | ||
|
|
e3599c002b | ||
|
|
094f6a7476 | ||
|
|
c3b4849fa0 | ||
|
|
dfd6c5379c | ||
|
|
9aa53c11e0 | ||
|
|
b0d93621a8 | ||
|
|
a337d9a599 | ||
|
|
615d90c8f4 | ||
|
|
7ffd77dc76 | ||
|
|
96fdf4fd93 | ||
|
|
27b8ce0f7f | ||
|
|
e057c4d79c | ||
|
|
8263fa41dd | ||
|
|
eeae4d215d | ||
|
|
646ed0d4dd | ||
|
|
ac54032f55 | ||
|
|
3aaf356054 | ||
|
|
2c786e6a38 | ||
|
|
355baa7fef | ||
|
|
01468c2663 | ||
|
|
c7341c9194 | ||
|
|
1e947870a6 | ||
|
|
311c1a3c84 | ||
|
|
84e380e4d0 | ||
|
|
4cad2eb0c4 | ||
|
|
4bc3af7176 | ||
|
|
e80298f815 | ||
|
|
14971cf249 | ||
|
|
b79dcd7f23 | ||
|
|
395aaad9c6 | ||
|
|
29f763d4e4 | ||
|
|
2f943c91d2 | ||
|
|
91c96311de | ||
|
|
0f929faa16 | ||
|
|
7a40c34cf0 | ||
|
|
462d987de9 | ||
|
|
f64e8d8973 | ||
|
|
21222eb697 | ||
|
|
e47d6fb3ac | ||
|
|
c7fc10ac89 | ||
|
|
e8b528f520 | ||
|
|
b22de7bf70 | ||
|
|
ec119c8f6e | ||
|
|
a20b38598e | ||
|
|
aa0eb47205 | ||
|
|
723db9d71e | ||
|
|
1d8dc3d65d | ||
|
|
fe2716876a | ||
|
|
fac0e97e5d | ||
|
|
449d009c28 | ||
|
|
55b2e6fe25 | ||
|
|
9989b3b9da | ||
|
|
7ab1cbfc1f | ||
|
|
62d19c3902 | ||
|
|
19700e7ee3 | ||
|
|
de3e8edd6d | ||
|
|
deda48af4a | ||
|
|
7688d7c619 | ||
|
|
76328b5c45 | ||
|
|
1de17bf06f | ||
|
|
6724daf995 | ||
|
|
7caca053a1 | ||
|
|
ae1bf8c017 | ||
|
|
d20b0da438 | ||
|
|
a0218d7df1 | ||
|
|
5ae5d67b91 | ||
|
|
8493ed7603 | ||
|
|
804b681d40 | ||
|
|
e8303bd059 | ||
|
|
ac6c5d4e32 | ||
|
|
90b0d0d52c | ||
|
|
4093bdbd3e | ||
|
|
a2097cf981 | ||
|
|
6a33d0c9dc | ||
|
|
525d5fb427 | ||
|
|
e4946b8cd5 | ||
|
|
76b32df622 | ||
|
|
bc1079364d | ||
|
|
8602febe9d | ||
|
|
d55dfe27dc | ||
|
|
90c16e2a07 | ||
|
|
149c1cd9b1 | ||
|
|
20f1a43369 | ||
|
|
e8fb8f993d | ||
|
|
f0c782dc01 | ||
|
|
50c13e6d20 | ||
|
|
69bedd035f | ||
|
|
85337f0a31 | ||
|
|
f8a7e2f98e | ||
|
|
ec90a49d43 | ||
|
|
5812b150c6 | ||
|
|
c7ebc7273f | ||
|
|
5226c87304 | ||
|
|
25dd1c5d35 | ||
|
|
c5a9e5e56d | ||
|
|
47ed70d671 | ||
|
|
cb5526f469 | ||
|
|
a4f128077f | ||
|
|
7140ba76d5 | ||
|
|
872e8f2de6 | ||
|
|
6c14e9d083 | ||
|
|
e4b1812b46 | ||
|
|
1c2c6bb1d0 | ||
|
|
baefd4f93b | ||
|
|
4270fe07ab | ||
|
|
e4ae925d2b | ||
|
|
dc599361a4 | ||
|
|
738a311f49 | ||
|
|
71f6ba3418 | ||
|
|
d1d573c408 | ||
|
|
50e39a4a75 | ||
|
|
8635fe7ebb | ||
|
|
6b57d4397a | ||
|
|
8f2b898b2b | ||
|
|
0d1d360d18 | ||
|
|
def3b3a155 | ||
|
|
d344512743 | ||
|
|
19eef71133 | ||
|
|
61d58a354e | ||
|
|
be868d37f2 | ||
|
|
20bb151cf3 | ||
|
|
77f889aba6 | ||
|
|
1e69a54972 | ||
|
|
6b7a47ca28 | ||
|
|
c3fdd3b5f7 | ||
|
|
e9f2121667 | ||
|
|
161e9e1e11 | ||
|
|
e336a45f79 | ||
|
|
9c09f93908 | ||
|
|
582398e7f6 | ||
|
|
b118635abd | ||
|
|
ac0d4a75b5 | ||
|
|
c212d5c5ea | ||
|
|
08ac27cccf | ||
|
|
0b5cab99cf | ||
|
|
cc0057cc56 | ||
|
|
1ce49b814b | ||
|
|
5bbaaece38 | ||
|
|
30bc4ccfa7 | ||
|
|
4f64f1d754 | ||
|
|
c0e578dd47 | ||
|
|
2b82fca2cf | ||
|
|
f0028b33e9 | ||
|
|
7ddea23375 | ||
|
|
83edccacc6 | ||
|
|
75e95d6452 | ||
|
|
423bb4bbcd | ||
|
|
43585c563c | ||
|
|
2564a41d05 | ||
|
|
a0bb1e3625 | ||
|
|
9b4fd57f51 | ||
|
|
e67709e339 | ||
|
|
0c4e913f30 | ||
|
|
c6de0e51c7 | ||
|
|
69e85adadf | ||
|
|
b34068207f | ||
|
|
68b7b4b3a4 | ||
|
|
5e3ee30e66 | ||
|
|
aaf7d12b46 | ||
|
|
729a348657 | ||
|
|
0fca6eb810 | ||
|
|
5a0ae8530c | ||
|
|
7949c9ad74 | ||
|
|
6fb9362f7e | ||
|
|
3481d364cc | ||
|
|
373b9cdd9f | ||
|
|
75af63e6ac | ||
|
|
5aa62a1be4 | ||
|
|
aede8bf0e0 | ||
|
|
9ab7abcb95 | ||
|
|
f87b28afd9 | ||
|
|
8661f6d1ac | ||
|
|
4536b4b2b4 | ||
|
|
655f03940b | ||
|
|
4122de7823 | ||
|
|
0f4c67d24e | ||
|
|
20e8c45819 | ||
|
|
2b8b844fb2 | ||
|
|
3284b8764f | ||
|
|
d19946336e | ||
|
|
770a220808 | ||
|
|
78b71e72f1 | ||
|
|
19990f49b0 | ||
|
|
8208d44466 | ||
|
|
002b2b6dee | ||
|
|
c207167b14 | ||
|
|
cfc066e911 | ||
|
|
3a1d011841 | ||
|
|
7d05c0da9c | ||
|
|
1d7f2ca9e4 | ||
|
|
ea2e0d7546 | ||
|
|
64b79ee64c | ||
|
|
8a00101470 | ||
|
|
01aba73f5b | ||
|
|
71e31346e8 | ||
|
|
483cce9880 | ||
|
|
c8db39a91e | ||
|
|
6d398a2edf | ||
|
|
bd3c8119ba | ||
|
|
16aa78d13c | ||
|
|
3be5cca60a | ||
|
|
bc3dfb96fd | ||
|
|
e78e98a6cf | ||
|
|
9db0e48f63 | ||
|
|
3de52b6bc1 | ||
|
|
be52abbe3b | ||
|
|
ac55b0fafb | ||
|
|
887b6789fc | ||
|
|
ff50fec112 | ||
|
|
4538ef3cf9 | ||
|
|
a872cf7061 | ||
|
|
2d8ca363db | ||
|
|
8e8b011587 | ||
|
|
4241ae035e | ||
|
|
3ef569d280 | ||
|
|
6fe28b15df | ||
|
|
a609a47138 | ||
|
|
b575b87f77 | ||
|
|
7c5ee8a67d | ||
|
|
452c14bece | ||
|
|
57f63ba752 | ||
|
|
5f153b8a01 | ||
|
|
1be49876df | ||
|
|
a79b2a7773 | ||
|
|
cdf6e5a487 | ||
|
|
7c82f45604 | ||
|
|
4d49701203 | ||
|
|
d48cc69898 | ||
|
|
af466a1d75 | ||
|
|
b9599d3aa1 | ||
|
|
dbebfe7c07 | ||
|
|
ddf54fdb83 | ||
|
|
619138d294 | ||
|
|
126b19bf2d | ||
|
|
cc76adf7b6 | ||
|
|
83bcb56a6a | ||
|
|
6e88a70661 | ||
|
|
6755a9878b | ||
|
|
b8ef7593ee | ||
|
|
602cc26f0f | ||
|
|
62271fe064 | ||
|
|
83f5f776a6 | ||
|
|
2a5566a820 | ||
|
|
398e547d06 | ||
|
|
ba957196da | ||
|
|
b5c4a24133 | ||
|
|
cc688dc112 | ||
|
|
91b5eaff80 | ||
|
|
4a52503cb3 | ||
|
|
bcd7e7ea94 | ||
|
|
ba9ae54fbb | ||
|
|
39e05c9991 | ||
|
|
8962f90bcc | ||
|
|
daf3a95db0 | ||
|
|
1c9ebafe2b | ||
|
|
00b3df4455 |
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Ignore composer specific files and vendor folder
|
||||||
|
composer.phar
|
||||||
|
composer.lock
|
||||||
|
vendor
|
||||||
56
.env.docker
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
APP_ENV=${FF_APP_ENV}
|
||||||
|
APP_DEBUG=false
|
||||||
|
APP_NAME=FireflyIII
|
||||||
|
APP_KEY=${FF_APP_KEY}
|
||||||
|
APP_LOG=daily
|
||||||
|
APP_LOG_LEVEL=warning
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=${FF_DB_HOST}
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=${FF_DB_NAME}
|
||||||
|
DB_USERNAME=${FF_DB_USER}
|
||||||
|
DB_PASSWORD=${FF_DB_PASSWORD}
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
QUEUE_DRIVER=sync
|
||||||
|
|
||||||
|
COOKIE_PATH="/"
|
||||||
|
COOKIE_DOMAIN=
|
||||||
|
COOKIE_SECURE=false
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_FROM=changeme@example.com
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
SEND_REGISTRATION_MAIL=true
|
||||||
|
SEND_ERROR_MESSAGE=true
|
||||||
|
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||||
|
|
||||||
|
CACHE_PREFIX=firefly
|
||||||
|
|
||||||
|
EXCHANGE_RATE_SERVICE=fixerio
|
||||||
|
|
||||||
|
GOOGLE_MAPS_API_KEY=
|
||||||
|
ANALYTICS_ID=
|
||||||
|
SITE_OWNER=mail@example.com
|
||||||
|
USE_ENCRYPTION=true
|
||||||
|
|
||||||
|
PUSHER_KEY=
|
||||||
|
PUSHER_SECRET=
|
||||||
|
PUSHER_ID=
|
||||||
|
|
||||||
|
DEMO_USERNAME=
|
||||||
|
DEMO_PASSWORD=
|
||||||
|
|
||||||
16
.env.example
Executable file → Normal file
@@ -1,10 +1,11 @@
|
|||||||
APP_ENV=production
|
APP_ENV=local
|
||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_FORCE_SSL=false
|
APP_NAME=FireflyIII
|
||||||
APP_FORCE_ROOT=
|
|
||||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||||
|
APP_LOG=daily
|
||||||
APP_LOG_LEVEL=warning
|
APP_LOG_LEVEL=warning
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
TRUSTED_PROXIES=
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
@@ -27,7 +28,7 @@ REDIS_PASSWORD=null
|
|||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=smtp
|
||||||
MAIL_HOST=mailtrap.io
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=2525
|
||||||
MAIL_FROM=changeme@example.com
|
MAIL_FROM=changeme@example.com
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
@@ -40,13 +41,16 @@ SHOW_INCOMPLETE_TRANSLATIONS=false
|
|||||||
|
|
||||||
CACHE_PREFIX=firefly
|
CACHE_PREFIX=firefly
|
||||||
|
|
||||||
GOOGLE_MAPS_API_KEY=
|
EXCHANGE_RATE_SERVICE=fixerio
|
||||||
|
|
||||||
|
MAPBOX_API_KEY=
|
||||||
ANALYTICS_ID=
|
ANALYTICS_ID=
|
||||||
SITE_OWNER=mail@example.com
|
SITE_OWNER=mail@example.com
|
||||||
|
USE_ENCRYPTION=true
|
||||||
|
|
||||||
PUSHER_KEY=
|
PUSHER_KEY=
|
||||||
PUSHER_SECRET=
|
PUSHER_SECRET=
|
||||||
PUSHER_APP_ID=
|
PUSHER_ID=
|
||||||
|
|
||||||
DEMO_USERNAME=
|
DEMO_USERNAME=
|
||||||
DEMO_PASSWORD=
|
DEMO_PASSWORD=
|
||||||
|
|||||||
55
.env.sandstorm
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
APP_ENV=production
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_NAME=FireflyIII
|
||||||
|
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||||
|
APP_LOG=syslog
|
||||||
|
APP_LOG_LEVEL=debug
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=firefly
|
||||||
|
DB_USERNAME=firefly
|
||||||
|
DB_PASSWORD=firefly
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
QUEUE_DRIVER=sync
|
||||||
|
|
||||||
|
COOKIE_PATH="/"
|
||||||
|
COOKIE_DOMAIN=
|
||||||
|
COOKIE_SECURE=false
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_FROM=changeme@example.com
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
SEND_REGISTRATION_MAIL=true
|
||||||
|
SEND_ERROR_MESSAGE=true
|
||||||
|
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||||
|
|
||||||
|
CACHE_PREFIX=firefly
|
||||||
|
|
||||||
|
EXCHANGE_RATE_SERVICE=fixerio
|
||||||
|
|
||||||
|
GOOGLE_MAPS_API_KEY=
|
||||||
|
ANALYTICS_ID=
|
||||||
|
SITE_OWNER=mail@example.com
|
||||||
|
USE_ENCRYPTION=true
|
||||||
|
|
||||||
|
PUSHER_KEY=
|
||||||
|
PUSHER_SECRET=
|
||||||
|
PUSHER_ID=
|
||||||
|
|
||||||
|
DEMO_USERNAME=
|
||||||
|
DEMO_PASSWORD=
|
||||||
20
.env.testing
Executable file → Normal file
@@ -1,8 +1,8 @@
|
|||||||
APP_ENV=testing
|
APP_ENV=testing
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_FORCE_SSL=false
|
APP_NAME=FireflyIII
|
||||||
APP_FORCE_ROOT=
|
|
||||||
APP_KEY=TestTestTestTestTestTestTestTest
|
APP_KEY=TestTestTestTestTestTestTestTest
|
||||||
|
APP_LOG=daily
|
||||||
APP_LOG_LEVEL=debug
|
APP_LOG_LEVEL=debug
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ DB_CONNECTION=sqlite
|
|||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_USERNAME=homestead
|
DB_USERNAME=homestead
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
@@ -26,7 +26,7 @@ REDIS_PASSWORD=null
|
|||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=smtp
|
||||||
MAIL_HOST=mailtrap.io
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=2525
|
||||||
MAIL_FROM=changeme@example.com
|
MAIL_FROM=changeme@example.com
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
@@ -37,9 +37,19 @@ SEND_REGISTRATION_MAIL=true
|
|||||||
SEND_ERROR_MESSAGE=true
|
SEND_ERROR_MESSAGE=true
|
||||||
SHOW_INCOMPLETE_TRANSLATIONS=false
|
SHOW_INCOMPLETE_TRANSLATIONS=false
|
||||||
|
|
||||||
|
CACHE_PREFIX=firefly
|
||||||
|
|
||||||
|
EXCHANGE_RATE_SERVICE=fixerio
|
||||||
|
|
||||||
|
GOOGLE_MAPS_API_KEY=
|
||||||
ANALYTICS_ID=
|
ANALYTICS_ID=
|
||||||
SITE_OWNER=mail@example.com
|
SITE_OWNER=mail@example.com
|
||||||
|
USE_ENCRYPTION=true
|
||||||
|
|
||||||
PUSHER_KEY=
|
PUSHER_KEY=
|
||||||
PUSHER_SECRET=
|
PUSHER_SECRET=
|
||||||
PUSHER_APP_ID=
|
PUSHER_ID=
|
||||||
|
|
||||||
|
DEMO_USERNAME=
|
||||||
|
DEMO_PASSWORD=
|
||||||
|
|
||||||
|
|||||||
2
.gitattributes
vendored
Executable file → Normal file
@@ -1,3 +1,5 @@
|
|||||||
* text=auto
|
* text=auto
|
||||||
*.css linguist-vendored
|
*.css linguist-vendored
|
||||||
*.scss linguist-vendored
|
*.scss linguist-vendored
|
||||||
|
*.js linguist-vendored
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
|
|||||||
1
.github/CONTRIBUTING
vendored
@@ -1 +0,0 @@
|
|||||||
If you are requesting a new feature, please check out the list of [often requested features](https://firefly-iii.github.io/requested-features/) first. Thanks!
|
|
||||||
15
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Welcome to Firefly III on Github!
|
||||||
|
|
||||||
|
:+1::tada: Thank you for taking the time to contribute something to Firefly III!
|
||||||
|
|
||||||
|
## Feature requests
|
||||||
|
|
||||||
|
I am always interested in expanding Firefly III's many features. If you are requesting a new feature, please check out the list of [often requested features](https://firefly-iii.github.io/requested-features/).
|
||||||
|
|
||||||
|
## Pull requests
|
||||||
|
|
||||||
|
When contributing to Firefly III, please first discuss the change you wish to make via issue, email, or any other method. I can only accept pull requests against the `develop` branch, never the `master` branch.
|
||||||
|
|
||||||
|
## Translations :us: :fr: :de:
|
||||||
|
|
||||||
|
If you see a spelling error, grammatical error or a weird translation in your language, please join [our CrowdIn](https://crowdin.com/project/firefly-iii) project. There, you can submit your translations and fixes. The GitHub repository will download these automatically and they will be included in the next release.
|
||||||
11
.github/SUPPORT.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Welcome to Firefly III on Github!
|
||||||
|
|
||||||
|
:+1::tada: Thank you for taking the time to contribute something to Firefly III!
|
||||||
|
|
||||||
|
## Bugs
|
||||||
|
|
||||||
|
First of all: thank you for reporting a bug instead of ditching the tool altogether. If you find a bug, please take the time and see if the [demo site](https://firefly-iii.nder.be/) is also suffering from this bug. Include as many log files and details as you think are necessary. Bugs have a lot of priority!
|
||||||
|
|
||||||
|
## Installation problems
|
||||||
|
|
||||||
|
Please take the time to read the [installation guide FAQ](https://firefly-iii.github.io/installation-guide-faq/) and make sure you search through closed issues for the problems other people have had. Your problem may be among them! If not, open an issue and I will help where I can.
|
||||||
14
.gitignore
vendored
Executable file → Normal file
@@ -1,14 +1,14 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
/vendor
|
/vendor
|
||||||
/.idea
|
/.vagrant
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
.env
|
.env
|
||||||
_development
|
|
||||||
.env.local
|
|
||||||
result.html
|
|
||||||
test-import.sh
|
|
||||||
test-import-report.txt
|
|
||||||
public/google*.html
|
public/google*.html
|
||||||
.env.backup
|
report.html
|
||||||
|
composer.phar
|
||||||
|
|||||||
5
.sandstorm/.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# vagrant-spk creates shell scripts, which must end in \n, even on a \r\n system.
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
5
.sandstorm/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# This file stores a list of sub-paths of .sandstorm/ that should be ignored by git.
|
||||||
|
.vagrant
|
||||||
|
|
||||||
103
.sandstorm/Vagrantfile
vendored
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# -*- mode: ruby -*-
|
||||||
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
# Guess at a reasonable name for the VM based on the folder vagrant-spk is
|
||||||
|
# run from. The timestamp is there to avoid conflicts if you have multiple
|
||||||
|
# folders with the same name.
|
||||||
|
VM_NAME = File.basename(File.dirname(File.dirname(__FILE__))) + "_sandstorm_#{Time.now.utc.to_i}"
|
||||||
|
|
||||||
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||||
|
VAGRANTFILE_API_VERSION = "2"
|
||||||
|
|
||||||
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
# Base on the Sandstorm snapshots of the official Debian 8 (jessie) box.
|
||||||
|
config.vm.box = "sandstorm/debian-jessie64"
|
||||||
|
|
||||||
|
if Vagrant.has_plugin?("vagrant-vbguest") then
|
||||||
|
# vagrant-vbguest is a Vagrant plugin that upgrades
|
||||||
|
# the version of VirtualBox Guest Additions within each
|
||||||
|
# guest. If you have the vagrant-vbguest plugin, then it
|
||||||
|
# needs to know how to compile kernel modules, etc., and so
|
||||||
|
# we give it this hint about operating system type.
|
||||||
|
config.vm.guest = "debian"
|
||||||
|
end
|
||||||
|
|
||||||
|
# We forward port 6080, the Sandstorm web port, so that developers can
|
||||||
|
# visit their sandstorm app from their browser as local.sandstorm.io:6080
|
||||||
|
# (aka 127.0.0.1:6080).
|
||||||
|
config.vm.network :forwarded_port, guest: 6080, host: 6080
|
||||||
|
|
||||||
|
# Use a shell script to "provision" the box. This installs Sandstorm using
|
||||||
|
# the bundled installer.
|
||||||
|
config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/global-setup.sh", keep_color: true
|
||||||
|
# Then, do stack-specific and app-specific setup.
|
||||||
|
config.vm.provision "shell", inline: "sudo bash /opt/app/.sandstorm/setup.sh", keep_color: true
|
||||||
|
|
||||||
|
# Shared folders are configured per-provider since vboxsf can't handle >4096 open files,
|
||||||
|
# NFS requires privilege escalation every time you bring a VM up,
|
||||||
|
# and 9p is only available on libvirt.
|
||||||
|
|
||||||
|
# Calculate the number of CPUs and the amount of RAM the system has,
|
||||||
|
# in a platform-dependent way; further logic below.
|
||||||
|
cpus = nil
|
||||||
|
total_kB_ram = nil
|
||||||
|
|
||||||
|
host = RbConfig::CONFIG['host_os']
|
||||||
|
if host =~ /darwin/
|
||||||
|
cpus = `sysctl -n hw.ncpu`.to_i
|
||||||
|
total_kB_ram = `sysctl -n hw.memsize`.to_i / 1024
|
||||||
|
elsif host =~ /linux/
|
||||||
|
cpus = `nproc`.to_i
|
||||||
|
total_kB_ram = `grep MemTotal /proc/meminfo | awk '{print $2}'`.to_i
|
||||||
|
elsif host =~ /mingw/
|
||||||
|
# powershell may not be available on Windows XP and Vista, so wrap this in a rescue block
|
||||||
|
begin
|
||||||
|
cpus = `powershell -Command "(Get-WmiObject Win32_Processor -Property NumberOfLogicalProcessors | Select-Object -Property NumberOfLogicalProcessors | Measure-Object NumberOfLogicalProcessors -Sum).Sum"`.to_i
|
||||||
|
total_kB_ram = `powershell -Command "Get-CimInstance -class cim_physicalmemory | % $_.Capacity}"`.to_i / 1024
|
||||||
|
rescue
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# Use the same number of CPUs within Vagrant as the system, with 1
|
||||||
|
# as a default.
|
||||||
|
#
|
||||||
|
# Use at least 512MB of RAM, and if the system has more than 2GB of
|
||||||
|
# RAM, use 1/4 of the system RAM. This seems a reasonable compromise
|
||||||
|
# between having the Vagrant guest operating system not run out of
|
||||||
|
# RAM entirely (which it basically would if we went much lower than
|
||||||
|
# 512MB) and also allowing it to use up a healthily large amount of
|
||||||
|
# RAM so it can run faster on systems that can afford it.
|
||||||
|
if cpus.nil? or cpus.zero?
|
||||||
|
cpus = 1
|
||||||
|
end
|
||||||
|
if total_kB_ram.nil? or total_kB_ram < 2048000
|
||||||
|
assign_ram_mb = 512
|
||||||
|
else
|
||||||
|
assign_ram_mb = (total_kB_ram / 1024 / 4)
|
||||||
|
end
|
||||||
|
# Actually apply these CPU/memory values to the providers.
|
||||||
|
config.vm.provider :virtualbox do |vb, override|
|
||||||
|
vb.cpus = cpus
|
||||||
|
vb.memory = assign_ram_mb
|
||||||
|
vb.name = VM_NAME
|
||||||
|
vb.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
|
||||||
|
|
||||||
|
# /opt/app and /host-dot-sandstorm are used by vagrant-spk
|
||||||
|
override.vm.synced_folder "..", "/opt/app"
|
||||||
|
override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm"
|
||||||
|
# /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
|
||||||
|
# line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
|
||||||
|
override.vm.synced_folder "..", "/vagrant", disabled: true
|
||||||
|
end
|
||||||
|
config.vm.provider :libvirt do |libvirt, override|
|
||||||
|
libvirt.cpus = cpus
|
||||||
|
libvirt.memory = assign_ram_mb
|
||||||
|
libvirt.default_prefix = VM_NAME
|
||||||
|
|
||||||
|
# /opt/app and /host-dot-sandstorm are used by vagrant-spk
|
||||||
|
override.vm.synced_folder "..", "/opt/app", type: "9p", accessmode: "passthrough"
|
||||||
|
override.vm.synced_folder ENV["HOME"] + "/.sandstorm", "/host-dot-sandstorm", type: "9p", accessmode: "passthrough"
|
||||||
|
# /vagrant is not used by vagrant-spk; we need this line so it gets disabled; if we removed the
|
||||||
|
# line, vagrant would automatically insert a synced folder in /vagrant, which is not what we want.
|
||||||
|
override.vm.synced_folder "..", "/vagrant", type: "9p", accessmode: "passthrough", disabled: true
|
||||||
|
end
|
||||||
|
end
|
||||||
BIN
.sandstorm/app-graphics/firefly-iii-128.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
.sandstorm/app-graphics/firefly-iii-150.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
.sandstorm/app-graphics/firefly-iii-24.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
.sandstorm/app-graphics/firefly-iii-48.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
21
.sandstorm/build.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Checks if there's a composer.json, and if so, installs/runs composer.
|
||||||
|
# This script only runs once, when the app connects to sandstorm.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd /opt/app
|
||||||
|
|
||||||
|
cp .env.sandstorm .env
|
||||||
|
|
||||||
|
if [ -f /opt/app/composer.json ] ; then
|
||||||
|
if [ ! -f composer.phar ] ; then
|
||||||
|
curl -sS https://getcomposer.org/installer | php
|
||||||
|
fi
|
||||||
|
php composer.phar install --no-dev --no-suggest
|
||||||
|
fi
|
||||||
|
|
||||||
|
# link storage folder
|
||||||
|
rm -rf /opt/app/storage
|
||||||
|
ln -s /var/storage /opt/app
|
||||||
3
.sandstorm/changelog.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# 3.4.3
|
||||||
|
|
||||||
|
* Initial release on Sandstorm.io
|
||||||
3
.sandstorm/description.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"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 works on the principle that if you know where you’re money is going, you can stop it from going there.
|
||||||
44
.sandstorm/global-setup.sh
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Set options for curl. Since we only want to show errors from these curl commands, we also use
|
||||||
|
# 'cat' to buffer the output; for more information:
|
||||||
|
# https://github.com/sandstorm-io/vagrant-spk/issues/158
|
||||||
|
|
||||||
|
CURL_OPTS="--silent --show-error"
|
||||||
|
echo localhost > /etc/hostname
|
||||||
|
hostname localhost
|
||||||
|
|
||||||
|
# The following line copies stderr through stderr to cat without accidentally leaving it in the
|
||||||
|
# output file. Be careful when changing. See: https://github.com/sandstorm-io/vagrant-spk/pull/159
|
||||||
|
curl $CURL_OPTS https://install.sandstorm.io/ 2>&1 > /host-dot-sandstorm/caches/install.sh | cat
|
||||||
|
|
||||||
|
SANDSTORM_CURRENT_VERSION=$(curl $CURL_OPTS -f "https://install.sandstorm.io/dev?from=0&type=install")
|
||||||
|
SANDSTORM_PACKAGE="sandstorm-$SANDSTORM_CURRENT_VERSION.tar.xz"
|
||||||
|
if [[ ! -f /host-dot-sandstorm/caches/$SANDSTORM_PACKAGE ]] ; then
|
||||||
|
echo -n "Downloading Sandstorm version ${SANDSTORM_CURRENT_VERSION}..."
|
||||||
|
curl $CURL_OPTS --output "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE.partial" "https://dl.sandstorm.io/$SANDSTORM_PACKAGE" 2>&1 | cat
|
||||||
|
mv "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE.partial" "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE"
|
||||||
|
echo "...done."
|
||||||
|
fi
|
||||||
|
if [ ! -e /opt/sandstorm/latest/sandstorm ] ; then
|
||||||
|
echo -n "Installing Sandstorm version ${SANDSTORM_CURRENT_VERSION}..."
|
||||||
|
bash /host-dot-sandstorm/caches/install.sh -d -e "/host-dot-sandstorm/caches/$SANDSTORM_PACKAGE" >/dev/null
|
||||||
|
echo "...done."
|
||||||
|
fi
|
||||||
|
modprobe ip_tables
|
||||||
|
# Make the vagrant user part of the sandstorm group so that commands like
|
||||||
|
# `spk dev` work.
|
||||||
|
usermod -a -G 'sandstorm' 'vagrant'
|
||||||
|
# Bind to all addresses, so the vagrant port-forward works.
|
||||||
|
sudo sed --in-place='' \
|
||||||
|
--expression='s/^BIND_IP=.*/BIND_IP=0.0.0.0/' \
|
||||||
|
/opt/sandstorm/sandstorm.conf
|
||||||
|
sudo service sandstorm restart
|
||||||
|
# Enable apt-cacher-ng proxy to make things faster if one appears to be running on the gateway IP
|
||||||
|
GATEWAY_IP=$(ip route | grep ^default | cut -d ' ' -f 3)
|
||||||
|
if nc -z "$GATEWAY_IP" 3142 ; then
|
||||||
|
echo "Acquire::http::Proxy \"http://$GATEWAY_IP:3142\";" > /etc/apt/apt.conf.d/80httpproxy
|
||||||
|
fi
|
||||||
|
# Configure apt to retry fetching things that fail to download.
|
||||||
|
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80sandstorm-retry
|
||||||
62
.sandstorm/launcher.sh
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Runs every time we create a new grain!
|
||||||
|
|
||||||
|
# Create a bunch of folders under the clean /var that php, nginx, and mysql expect to exist
|
||||||
|
mkdir -p /var/lib/mysql
|
||||||
|
mkdir -p /var/lib/nginx
|
||||||
|
mkdir -p /var/lib/php/sessions/
|
||||||
|
mkdir -p /var/log
|
||||||
|
mkdir -p /var/log/mysql
|
||||||
|
mkdir -p /var/log/nginx
|
||||||
|
# Wipe /var/run, since pidfiles and socket files from previous launches should go away
|
||||||
|
# TODO someday: I'd prefer a tmpfs for these.
|
||||||
|
rm -rf /var/run
|
||||||
|
mkdir -p /var/run
|
||||||
|
rm -rf /var/tmp
|
||||||
|
mkdir -p /var/tmp
|
||||||
|
mkdir -p /var/run/mysqld
|
||||||
|
|
||||||
|
# make storage directories
|
||||||
|
rm -rf /var/storage
|
||||||
|
mkdir -p /var/storage/app/public
|
||||||
|
mkdir -p /var/storage/build
|
||||||
|
mkdir -p /var/storage/database
|
||||||
|
mkdir -p /var/storage/debugbar
|
||||||
|
mkdir -p /var/storage/export
|
||||||
|
mkdir -p /var/storage/framework/cache
|
||||||
|
mkdir -p /var/storage/framework/sessions
|
||||||
|
mkdir -p /var/storage/framework/views
|
||||||
|
mkdir -p /var/storage/logs
|
||||||
|
mkdir -p /var/storage/upload
|
||||||
|
|
||||||
|
|
||||||
|
# Ensure mysql tables created
|
||||||
|
HOME=/etc/mysql /usr/bin/mysql_install_db --force
|
||||||
|
|
||||||
|
# Spawn mysqld, php
|
||||||
|
HOME=/etc/mysql /usr/sbin/mysqld &
|
||||||
|
|
||||||
|
/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf &
|
||||||
|
|
||||||
|
# Wait until mysql and php have bound their sockets, indicating readiness
|
||||||
|
while [ ! -e /var/run/mysqld/mysqld.sock ] ; do
|
||||||
|
echo "waiting for mysql to be available at /var/run/mysqld/mysqld.sock"
|
||||||
|
sleep .5
|
||||||
|
done
|
||||||
|
while [ ! -e /var/run/php7.0-fpm.sock ] ; do
|
||||||
|
echo "waiting for php7.0-fpm to be available at /var/run/php7.0-fpm.sock"
|
||||||
|
sleep .5
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Installing database.."
|
||||||
|
# Install database for Firefly III
|
||||||
|
echo "CREATE DATABASE IF NOT EXISTS firefly; GRANT ALL on firefly.* TO 'firefly'@'localhost' IDENTIFIED BY 'firefly';" | mysql -uroot
|
||||||
|
echo "Done!"
|
||||||
|
|
||||||
|
echo "Migrating..."
|
||||||
|
php /opt/app/artisan migrate --seed --force
|
||||||
|
echo "Done!"
|
||||||
|
|
||||||
|
# Start nginx.
|
||||||
|
/usr/sbin/nginx -c /opt/app/.sandstorm/service-config/nginx.conf -g "daemon off;"
|
||||||
BIN
.sandstorm/pgp-keyring
Normal file
BIN
.sandstorm/pgp-signature
Normal file
1542
.sandstorm/sandstorm-files.list
Normal file
188
.sandstorm/sandstorm-pkgdef.capnp
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
@0x9411e6c8b3c8a4b6;
|
||||||
|
|
||||||
|
using Spk = import "/sandstorm/package.capnp";
|
||||||
|
# This imports:
|
||||||
|
# $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
|
||||||
|
# Check out that file to see the full, documented package definition format.
|
||||||
|
|
||||||
|
const pkgdef :Spk.PackageDefinition = (
|
||||||
|
# The package definition. Note that the spk tool looks specifically for the
|
||||||
|
# "pkgdef" constant.
|
||||||
|
|
||||||
|
id = "uws252ya9mep4t77tevn85333xzsgrpgth8q4y1rhknn1hammw70",
|
||||||
|
# Your app ID is actually its public key. The private key was placed in
|
||||||
|
# your keyring. All updates must be signed with the same key.
|
||||||
|
|
||||||
|
manifest = (
|
||||||
|
appTitle = (defaultText = "Firefly III"),
|
||||||
|
appVersion = 1,
|
||||||
|
appMarketingVersion = (defaultText = "3.4.6"),
|
||||||
|
actions = [
|
||||||
|
# Define your "new document" handlers here.
|
||||||
|
( nounPhrase = (defaultText = "administration"),
|
||||||
|
command = .myCommand
|
||||||
|
# The command to run when starting for the first time. (".myCommand"
|
||||||
|
# is just a constant defined at the bottom of the file.)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
|
||||||
|
continueCommand = .myCommand,
|
||||||
|
# This is the command called to start your app back up after it has been
|
||||||
|
# shut down for inactivity. Here we're using the same command as for
|
||||||
|
# starting a new instance, but you could use different commands for each
|
||||||
|
# case.
|
||||||
|
|
||||||
|
metadata = (
|
||||||
|
icons = (
|
||||||
|
appGrid = (png = (dpi1x = embed "app-graphics/firefly-iii-128.png")),
|
||||||
|
grain = (png = (dpi1x = embed "app-graphics/firefly-iii-24.png",
|
||||||
|
dpi2x = embed "app-graphics/firefly-iii-48.png")),
|
||||||
|
market = (png = (dpi1x = embed "app-graphics/firefly-iii-150.png"))
|
||||||
|
),
|
||||||
|
|
||||||
|
website = "https://firefly-iii.github.io/",
|
||||||
|
codeUrl = "https://github.com/firefly-iii/firefly-iii",
|
||||||
|
#license = (openSource = mit),
|
||||||
|
license = (proprietary = (defaultText = embed "../LICENSE")),
|
||||||
|
# The license this package is distributed under. See
|
||||||
|
# https://docs.sandstorm.io/en/latest/developing/publishing-apps/#license
|
||||||
|
|
||||||
|
categories = [productivity],
|
||||||
|
# A list of categories/genres to which this app belongs, sorted with best fit first.
|
||||||
|
# See the list of categories at
|
||||||
|
# https://docs.sandstorm.io/en/latest/developing/publishing-apps/#categories
|
||||||
|
|
||||||
|
author = (
|
||||||
|
contactEmail = "thegrumpydictator@gmail.com",
|
||||||
|
upstreamAuthor = "James Cole",
|
||||||
|
pgpSignature = embed "pgp-signature",
|
||||||
|
),
|
||||||
|
|
||||||
|
pgpKeyring = embed "pgp-keyring",
|
||||||
|
description = (defaultText = embed "description.md"),
|
||||||
|
shortDescription = (defaultText = "Financial management"),
|
||||||
|
screenshots = [
|
||||||
|
# Screenshots to use for marketing purposes. Examples below.
|
||||||
|
# Sizes are given in device-independent pixels, so if you took these
|
||||||
|
# screenshots on a Retina-style high DPI screen, divide each dimension by two.
|
||||||
|
|
||||||
|
(width = 1200, height = 1000, png = embed "screenshots/screenshot-1.png"),
|
||||||
|
(width = 1200, height = 1000, png = embed "screenshots/screenshot-2.png"),
|
||||||
|
(width = 1200, height = 1518, png = embed "screenshots/screenshot-3.png"),
|
||||||
|
|
||||||
|
],
|
||||||
|
changeLog = (defaultText = embed "changelog.md"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
sourceMap = (
|
||||||
|
# Here we defined where to look for files to copy into your package. The
|
||||||
|
# `spk dev` command actually figures out what files your app needs
|
||||||
|
# automatically by running it on a FUSE filesystem. So, the mappings
|
||||||
|
# here are only to tell it where to find files that the app wants.
|
||||||
|
searchPath = [
|
||||||
|
( sourcePath = "." ), # Search this directory first.
|
||||||
|
( sourcePath = "/", # Then search the system root directory.
|
||||||
|
hidePaths = [ "home", "proc", "sys",
|
||||||
|
"etc/passwd", "etc/hosts", "etc/host.conf",
|
||||||
|
"etc/nsswitch.conf", "etc/resolv.conf" ]
|
||||||
|
# You probably don't want the app pulling files from these places,
|
||||||
|
# so we hide them. Note that /dev, /var, and /tmp are implicitly
|
||||||
|
# hidden because Sandstorm itself provides them.
|
||||||
|
)
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
fileList = "sandstorm-files.list",
|
||||||
|
# `spk dev` will write a list of all the files your app uses to this file.
|
||||||
|
# You should review it later, before shipping your app.
|
||||||
|
|
||||||
|
alwaysInclude = ["app","bootstrap","config","database","public","resources","routes"],
|
||||||
|
# Fill this list with more names of files or directories that should be
|
||||||
|
# included in your package, even if not listed in sandstorm-files.list.
|
||||||
|
# Use this to force-include stuff that you know you need but which may
|
||||||
|
# not have been detected as a dependency during `spk dev`. If you list
|
||||||
|
# a directory here, its entire contents will be included recursively.
|
||||||
|
|
||||||
|
#bridgeConfig = (
|
||||||
|
# # Used for integrating permissions and roles into the Sandstorm shell
|
||||||
|
# # and for sandstorm-http-bridge to pass to your app.
|
||||||
|
# # Uncomment this block and adjust the permissions and roles to make
|
||||||
|
# # sense for your app.
|
||||||
|
# # For more information, see high-level documentation at
|
||||||
|
# # https://docs.sandstorm.io/en/latest/developing/auth/
|
||||||
|
# # and advanced details in the "BridgeConfig" section of
|
||||||
|
# # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/package.capnp
|
||||||
|
# viewInfo = (
|
||||||
|
# # For details on the viewInfo field, consult "ViewInfo" in
|
||||||
|
# # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/grain.capnp
|
||||||
|
#
|
||||||
|
# permissions = [
|
||||||
|
# # Permissions which a user may or may not possess. A user's current
|
||||||
|
# # permissions are passed to the app as a comma-separated list of `name`
|
||||||
|
# # fields in the X-Sandstorm-Permissions header with each request.
|
||||||
|
# #
|
||||||
|
# # IMPORTANT: only ever append to this list! Reordering or removing fields
|
||||||
|
# # will change behavior and permissions for existing grains! To deprecate a
|
||||||
|
# # permission, or for more information, see "PermissionDef" in
|
||||||
|
# # https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/grain.capnp
|
||||||
|
# (
|
||||||
|
# name = "editor",
|
||||||
|
# # Name of the permission, used as an identifier for the permission in cases where string
|
||||||
|
# # names are preferred. Used in sandstorm-http-bridge's X-Sandstorm-Permissions HTTP header.
|
||||||
|
#
|
||||||
|
# title = (defaultText = "editor"),
|
||||||
|
# # Display name of the permission, e.g. to display in a checklist of permissions
|
||||||
|
# # that may be assigned when sharing.
|
||||||
|
#
|
||||||
|
# description = (defaultText = "grants ability to modify data"),
|
||||||
|
# # Prose describing what this role means, suitable for a tool tip or similar help text.
|
||||||
|
# ),
|
||||||
|
# ],
|
||||||
|
# roles = [
|
||||||
|
# # Roles are logical collections of permissions. For instance, your app may have
|
||||||
|
# # a "viewer" role and an "editor" role
|
||||||
|
# (
|
||||||
|
# title = (defaultText = "editor"),
|
||||||
|
# # Name of the role. Shown in the Sandstorm UI to indicate which users have which roles.
|
||||||
|
#
|
||||||
|
# permissions = [true],
|
||||||
|
# # An array indicating which permissions this role carries.
|
||||||
|
# # It should be the same length as the permissions array in
|
||||||
|
# # viewInfo, and the order of the lists must match.
|
||||||
|
#
|
||||||
|
# verbPhrase = (defaultText = "can make changes to the document"),
|
||||||
|
# # Brief explanatory text to show in the sharing UI indicating
|
||||||
|
# # what a user assigned this role will be able to do with the grain.
|
||||||
|
#
|
||||||
|
# description = (defaultText = "editors may view all site data and change settings."),
|
||||||
|
# # Prose describing what this role means, suitable for a tool tip or similar help text.
|
||||||
|
# ),
|
||||||
|
# (
|
||||||
|
# title = (defaultText = "viewer"),
|
||||||
|
# permissions = [false],
|
||||||
|
# verbPhrase = (defaultText = "can view the document"),
|
||||||
|
# description = (defaultText = "viewers may view what other users have written."),
|
||||||
|
# ),
|
||||||
|
# ],
|
||||||
|
# ),
|
||||||
|
# #apiPath = "/api",
|
||||||
|
# # Apps can export an API to the world. The API is to be used primarily by Javascript
|
||||||
|
# # code and native apps, so it can't serve out regular HTML to browsers. If a request
|
||||||
|
# # comes in to your app's API, sandstorm-http-bridge will prefix the request's path with
|
||||||
|
# # this string, if specified.
|
||||||
|
#),
|
||||||
|
);
|
||||||
|
|
||||||
|
const myCommand :Spk.Manifest.Command = (
|
||||||
|
# Here we define the command used to start up your server.
|
||||||
|
argv = ["/sandstorm-http-bridge", "8000", "--", "/opt/app/.sandstorm/launcher.sh"],
|
||||||
|
environ = [
|
||||||
|
# Note that this defines the *entire* environment seen by your app.
|
||||||
|
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
|
||||||
|
(key = "SANDSTORM", value = "1"),
|
||||||
|
# Export SANDSTORM=1 into the environment, so that apps running within Sandstorm
|
||||||
|
# can detect if $SANDSTORM="1" at runtime, switching UI and/or backend to use
|
||||||
|
# the app's Sandstorm-specific integration code.
|
||||||
|
]
|
||||||
|
);
|
||||||
BIN
.sandstorm/screenshots/screenshot-1.png
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
.sandstorm/screenshots/screenshot-2.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
.sandstorm/screenshots/screenshot-3.png
Normal file
|
After Width: | Height: | Size: 280 KiB |
89
.sandstorm/service-config/mime.types
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
types {
|
||||||
|
text/html html htm shtml;
|
||||||
|
text/css css;
|
||||||
|
text/xml xml;
|
||||||
|
image/gif gif;
|
||||||
|
image/jpeg jpeg jpg;
|
||||||
|
application/javascript js;
|
||||||
|
application/atom+xml atom;
|
||||||
|
application/rss+xml rss;
|
||||||
|
|
||||||
|
text/mathml mml;
|
||||||
|
text/plain txt;
|
||||||
|
text/vnd.sun.j2me.app-descriptor jad;
|
||||||
|
text/vnd.wap.wml wml;
|
||||||
|
text/x-component htc;
|
||||||
|
|
||||||
|
image/png png;
|
||||||
|
image/tiff tif tiff;
|
||||||
|
image/vnd.wap.wbmp wbmp;
|
||||||
|
image/x-icon ico;
|
||||||
|
image/x-jng jng;
|
||||||
|
image/x-ms-bmp bmp;
|
||||||
|
image/svg+xml svg svgz;
|
||||||
|
image/webp webp;
|
||||||
|
|
||||||
|
application/font-woff woff;
|
||||||
|
application/java-archive jar war ear;
|
||||||
|
application/json json;
|
||||||
|
application/mac-binhex40 hqx;
|
||||||
|
application/msword doc;
|
||||||
|
application/pdf pdf;
|
||||||
|
application/postscript ps eps ai;
|
||||||
|
application/rtf rtf;
|
||||||
|
application/vnd.apple.mpegurl m3u8;
|
||||||
|
application/vnd.ms-excel xls;
|
||||||
|
application/vnd.ms-fontobject eot;
|
||||||
|
application/vnd.ms-powerpoint ppt;
|
||||||
|
application/vnd.wap.wmlc wmlc;
|
||||||
|
application/vnd.google-earth.kml+xml kml;
|
||||||
|
application/vnd.google-earth.kmz kmz;
|
||||||
|
application/x-7z-compressed 7z;
|
||||||
|
application/x-cocoa cco;
|
||||||
|
application/x-java-archive-diff jardiff;
|
||||||
|
application/x-java-jnlp-file jnlp;
|
||||||
|
application/x-makeself run;
|
||||||
|
application/x-perl pl pm;
|
||||||
|
application/x-pilot prc pdb;
|
||||||
|
application/x-rar-compressed rar;
|
||||||
|
application/x-redhat-package-manager rpm;
|
||||||
|
application/x-sea sea;
|
||||||
|
application/x-shockwave-flash swf;
|
||||||
|
application/x-stuffit sit;
|
||||||
|
application/x-tcl tcl tk;
|
||||||
|
application/x-x509-ca-cert der pem crt;
|
||||||
|
application/x-xpinstall xpi;
|
||||||
|
application/xhtml+xml xhtml;
|
||||||
|
application/xspf+xml xspf;
|
||||||
|
application/zip zip;
|
||||||
|
|
||||||
|
application/octet-stream bin exe dll;
|
||||||
|
application/octet-stream deb;
|
||||||
|
application/octet-stream dmg;
|
||||||
|
application/octet-stream iso img;
|
||||||
|
application/octet-stream msi msp msm;
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
|
||||||
|
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
|
||||||
|
|
||||||
|
audio/midi mid midi kar;
|
||||||
|
audio/mpeg mp3;
|
||||||
|
audio/ogg ogg;
|
||||||
|
audio/x-m4a m4a;
|
||||||
|
audio/x-realaudio ra;
|
||||||
|
|
||||||
|
video/3gpp 3gpp 3gp;
|
||||||
|
video/mp2t ts;
|
||||||
|
video/mp4 mp4;
|
||||||
|
video/mpeg mpeg mpg;
|
||||||
|
video/quicktime mov;
|
||||||
|
video/webm webm;
|
||||||
|
video/x-flv flv;
|
||||||
|
video/x-m4v m4v;
|
||||||
|
video/x-mng mng;
|
||||||
|
video/x-ms-asf asx asf;
|
||||||
|
video/x-ms-wmv wmv;
|
||||||
|
video/x-msvideo avi;
|
||||||
|
}
|
||||||
87
.sandstorm/service-config/nginx.conf
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
worker_processes 4;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
# multi_accept on;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
# Basic Settings
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
# server_names_hash_bucket_size 64;
|
||||||
|
server_tokens off;
|
||||||
|
server_name_in_redirect off;
|
||||||
|
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
access_log off;
|
||||||
|
error_log stderr;
|
||||||
|
|
||||||
|
# Prevent nginx from adding compression; this interacts badly with Sandstorm
|
||||||
|
# WebSession due to https://github.com/sandstorm-io/sandstorm/issues/289
|
||||||
|
gzip off;
|
||||||
|
|
||||||
|
# Trust the sandstorm-http-bridge's X-Forwarded-Proto.
|
||||||
|
map $http_x_forwarded_proto $fe_https {
|
||||||
|
default "";
|
||||||
|
https on;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8000 default_server;
|
||||||
|
listen [::]:8000 default_server ipv6only=on;
|
||||||
|
|
||||||
|
# Allow arbitrarily large bodies - Sandstorm can handle them, and requests
|
||||||
|
# are authenticated already, so there's no reason for apps to add additional
|
||||||
|
# limits by default.
|
||||||
|
client_max_body_size 0;
|
||||||
|
|
||||||
|
server_name localhost;
|
||||||
|
root /opt/app/public;
|
||||||
|
location / {
|
||||||
|
index index.php;
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
autoindex on;
|
||||||
|
sendfile off;
|
||||||
|
}
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_pass unix:/var/run/php7.0-fpm.sock;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
|
||||||
|
|
||||||
|
fastcgi_param QUERY_STRING $query_string;
|
||||||
|
fastcgi_param REQUEST_METHOD $request_method;
|
||||||
|
fastcgi_param CONTENT_TYPE $content_type;
|
||||||
|
fastcgi_param CONTENT_LENGTH $content_length;
|
||||||
|
|
||||||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
|
fastcgi_param REQUEST_URI $request_uri;
|
||||||
|
fastcgi_param DOCUMENT_URI $document_uri;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||||
|
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||||
|
fastcgi_param HTTPS $fe_https if_not_empty;
|
||||||
|
|
||||||
|
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||||
|
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||||
|
|
||||||
|
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||||
|
fastcgi_param REMOTE_PORT $remote_port;
|
||||||
|
fastcgi_param SERVER_ADDR $server_addr;
|
||||||
|
fastcgi_param SERVER_PORT $server_port;
|
||||||
|
fastcgi_param SERVER_NAME $server_name;
|
||||||
|
|
||||||
|
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||||
|
#fastcgi_param REDIRECT_STATUS 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
61
.sandstorm/setup.sh
Executable file
@@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# When you change this file, you must take manual action. Read this doc:
|
||||||
|
# - https://docs.sandstorm.io/en/latest/vagrant-spk/customizing/#setupsh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# install packages so we can install apt-add-repository.
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y python-software-properties software-properties-common
|
||||||
|
|
||||||
|
# actually add repository
|
||||||
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E9C74FEEA2098A6E
|
||||||
|
add-apt-repository "deb http://packages.dotdeb.org jessie all"
|
||||||
|
|
||||||
|
# install packages.
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y nginx php7.0-fpm php7.0-mysql php7.0-cli php7.0-curl git php7.0-dev php7.0-intl php7.0-dom php7.0-mbstring php7.0-bcmath mysql-server
|
||||||
|
service nginx stop
|
||||||
|
service php7.0-fpm stop
|
||||||
|
service mysql stop
|
||||||
|
systemctl disable nginx
|
||||||
|
systemctl disable php7.0-fpm
|
||||||
|
systemctl disable mysql
|
||||||
|
# patch /etc/php/7.0/fpm/pool.d/www.conf to not change uid/gid to www-data
|
||||||
|
sed --in-place='' \
|
||||||
|
--expression='s/^listen.owner = www-data/;listen.owner = www-data/' \
|
||||||
|
--expression='s/^listen.group = www-data/;listen.group = www-data/' \
|
||||||
|
/etc/php/7.0/fpm/pool.d/www.conf
|
||||||
|
# patch /etc/php/7.0/fpm/php-fpm.conf to not have a pidfile
|
||||||
|
sed --in-place='' \
|
||||||
|
--expression='s/^pid =/;pid =/' \
|
||||||
|
/etc/php/7.0/fpm/php-fpm.conf
|
||||||
|
|
||||||
|
# move sock file to better dir:
|
||||||
|
sed --in-place='' \
|
||||||
|
--expression='s/^listen = \/run\/php\/php7.0-fpm.sock/listen = \/var\/run\/php7.0-fpm.sock/' \
|
||||||
|
/etc/php/7.0/fpm/pool.d/www.conf
|
||||||
|
|
||||||
|
# patch /etc/php/7.0/fpm/pool.d/www.conf to no clear environment variables
|
||||||
|
# so we can pass in SANDSTORM=1 to apps
|
||||||
|
sed --in-place='' \
|
||||||
|
--expression='s/^;clear_env = no/clear_env=no/' \
|
||||||
|
/etc/php/7.0/fpm/pool.d/www.conf
|
||||||
|
# patch mysql conf to not change uid, and to use /var/tmp over /tmp
|
||||||
|
# for secure-file-priv see https://github.com/sandstorm-io/vagrant-spk/issues/195
|
||||||
|
sed --in-place='' \
|
||||||
|
--expression='s/^user\t\t= mysql/#user\t\t= mysql/' \
|
||||||
|
--expression='s,^tmpdir\t\t= /tmp,tmpdir\t\t= /var/tmp,' \
|
||||||
|
--expression='/\[mysqld]/ a\ secure-file-priv = ""\' \
|
||||||
|
/etc/mysql/my.cnf
|
||||||
|
# patch mysql conf to use smaller transaction logs to save disk space
|
||||||
|
cat <<EOF > /etc/mysql/conf.d/sandstorm.cnf
|
||||||
|
[mysqld]
|
||||||
|
# Set the transaction log file to the minimum allowed size to save disk space.
|
||||||
|
# innodb_log_file_size = 1048576
|
||||||
|
# Set the main data file to grow by 1MB at a time, rather than 8MB at a time.
|
||||||
|
innodb_autoextend_increment = 1
|
||||||
|
EOF
|
||||||
1
.sandstorm/stack
Normal file
@@ -0,0 +1 @@
|
|||||||
|
lemp
|
||||||
24
.travis.yml
@@ -1,17 +1,31 @@
|
|||||||
language: php
|
language: php
|
||||||
sudo: false
|
|
||||||
php:
|
php:
|
||||||
- '7.0'
|
- 7.1
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- vendor
|
||||||
|
- $HOME/.composer/cache
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- phpenv config-rm xdebug.ini
|
|
||||||
- rm composer.lock
|
- rm composer.lock
|
||||||
- composer update --no-scripts
|
- composer update --no-scripts
|
||||||
|
- cp .env.testing .env
|
||||||
- php artisan clear-compiled
|
- php artisan clear-compiled
|
||||||
- php artisan optimize
|
- php artisan optimize
|
||||||
- php artisan env
|
- php artisan env
|
||||||
- cp .env.testing .env
|
- cp .env.testing .env
|
||||||
- mv storage/database/databasecopy.sqlite storage/database/database.sqlite
|
- wget -q https://github.com/firefly-iii/test-data/raw/master/storage/database.sqlite -O storage/database/database.sqlite
|
||||||
|
- mkdir -p build/logs
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- phpunit
|
- phpunit -c phpunit.coverage.xml
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- travis_retry php vendor/bin/coveralls -x storage/build/clover-all.xml
|
||||||
|
|
||||||
|
# safelist
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- develop
|
||||||
|
- master
|
||||||
552
CHANGELOG.md
@@ -2,51 +2,414 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [4.6.8] - 2017-10-15
|
||||||
|
### Added
|
||||||
|
- Verify routine will check if deposits have a budget (they shouldn't).
|
||||||
|
- New translations!
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Changed docker files for [issue 919](https://github.com/firefly-iii/firefly-iii/issues/919) and [issue 915](https://github.com/firefly-iii/firefly-iii/issues/915)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 917](https://github.com/firefly-iii/firefly-iii/issues/917), as reported by [Wr0ngName](https://github.com/Wr0ngName)
|
||||||
|
- Rules can no longer set a budget for a transfer or a deposit ([issue 916](https://github.com/firefly-iii/firefly-iii/issues/916))
|
||||||
|
- Fixed [issue 925](https://github.com/firefly-iii/firefly-iii/issues/925), [issue 928](https://github.com/firefly-iii/firefly-iii/issues/928) as reported by [dzaikos](https://github.com/dzaikos) and [DeltaKiloz](https://github.com/DeltaKiloz)
|
||||||
|
- A fix for [issue 926](https://github.com/firefly-iii/firefly-iii/issues/926), as reported by [Aquariu](https://github.com/Aquariu)
|
||||||
|
|
||||||
|
## [4.6.7] - 2017-10-09
|
||||||
|
### Added
|
||||||
|
- [Issue 872](https://github.com/firefly-iii/firefly-iii/issues/872), reported [gavu](https://github.com/gavu)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 878](https://github.com/firefly-iii/firefly-iii/issues/878), fixed by [Findus23](https://github.com/Findus23)
|
||||||
|
- [Issue 881](https://github.com/firefly-iii/firefly-iii/issues/881), reported by [nicoschreiner](https://github.com/nicoschreiner)
|
||||||
|
- [Issue 884](https://github.com/firefly-iii/firefly-iii/issues/884), by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 840](https://github.com/firefly-iii/firefly-iii/issues/840), reported by [MacPaille](https://github.com/MacPaille)
|
||||||
|
- [Issue 882](https://github.com/firefly-iii/firefly-iii/issues/882), reported by [nicoschreiner](https://github.com/nicoschreiner)
|
||||||
|
- [Issue 891](https://github.com/firefly-iii/firefly-iii/issues/891), [issue 892](https://github.com/firefly-iii/firefly-iii/issues/892), reported by [nicoschreiner](https://github.com/nicoschreiner)
|
||||||
|
- [Issue 891](https://github.com/firefly-iii/firefly-iii/issues/891), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 827](https://github.com/firefly-iii/firefly-iii/issues/827), fixed by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 903](https://github.com/firefly-iii/firefly-iii/issues/903), fixed by [hduijn](https://github.com/hduijn)
|
||||||
|
- [Issue 904](https://github.com/firefly-iii/firefly-iii/issues/904), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 910](https://github.com/firefly-iii/firefly-iii/issues/910), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 911](https://github.com/firefly-iii/firefly-iii/issues/911), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 915](https://github.com/firefly-iii/firefly-iii/issues/915), reported by [TomWis97](https://github.com/TomWis97)
|
||||||
|
- [Issue 917](https://github.com/firefly-iii/firefly-iii/issues/917), reported by [Wr0ngName](https://github.com/Wr0ngName)
|
||||||
|
|
||||||
|
## [4.6.6] - 2017-09-30
|
||||||
|
### Added
|
||||||
|
- [Issue 826](https://github.com/firefly-iii/firefly-iii/issues/826), reported by [pkoziol](https://github.com/pkoziol).
|
||||||
|
- [Issue 855](https://github.com/firefly-iii/firefly-iii/issues/855), by [ms32035](https://github.com/ms32035)
|
||||||
|
- [Issue 786](https://github.com/firefly-iii/firefly-iii/issues/786), by [SmilingWorlock](https://github.com/SmilingWorlock)
|
||||||
|
- [Issue 875](https://github.com/firefly-iii/firefly-iii/issues/875), by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 834](https://github.com/firefly-iii/firefly-iii/issues/834), by [gavu](https://github.com/gavu) (and others)
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Upgraded to Laravel 5.5
|
||||||
|
- Add version parameter to CSS and JS files
|
||||||
|
- [Issue 823](https://github.com/firefly-iii/firefly-iii/issues/823), [issue 824](https://github.com/firefly-iii/firefly-iii/issues/824) fixed Docker config by [DieBauer](https://github.com/DieBauer)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 830](https://github.com/firefly-iii/firefly-iii/issues/830)
|
||||||
|
- [Issue 822](https://github.com/firefly-iii/firefly-iii/issues/822), reported by [gazben](https://github.com/gazben)
|
||||||
|
- [Issue 827](https://github.com/firefly-iii/firefly-iii/issues/827), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 835](https://github.com/firefly-iii/firefly-iii/issues/835), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 836](https://github.com/firefly-iii/firefly-iii/issues/836), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 838](https://github.com/firefly-iii/firefly-iii/issues/838), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 839](https://github.com/firefly-iii/firefly-iii/issues/839), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 843](https://github.com/firefly-iii/firefly-iii/issues/843), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 837](https://github.com/firefly-iii/firefly-iii/issues/837), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 845](https://github.com/firefly-iii/firefly-iii/issues/845), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 846](https://github.com/firefly-iii/firefly-iii/issues/846), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 848](https://github.com/firefly-iii/firefly-iii/issues/848), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 854](https://github.com/firefly-iii/firefly-iii/issues/854), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 866](https://github.com/firefly-iii/firefly-iii/issues/866), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 847](https://github.com/firefly-iii/firefly-iii/issues/847), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 853](https://github.com/firefly-iii/firefly-iii/issues/853), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 857](https://github.com/firefly-iii/firefly-iii/issues/857), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 865](https://github.com/firefly-iii/firefly-iii/issues/865), reported by [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
- [Issue 826](https://github.com/firefly-iii/firefly-iii/issues/826), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 856](https://github.com/firefly-iii/firefly-iii/issues/856), reported by [ms32035](https://github.com/ms32035)
|
||||||
|
- [Issue 860](https://github.com/firefly-iii/firefly-iii/issues/860), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 861](https://github.com/firefly-iii/firefly-iii/issues/861), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 870](https://github.com/firefly-iii/firefly-iii/issues/870), reported by [gavu](https://github.com/gavu)
|
||||||
|
|
||||||
|
## [4.6.5] - 2017-09-09
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- [Issue 616](https://github.com/firefly-iii/firefly-iii/issues/616), The ability to link transactions
|
||||||
|
- [Issue 763](https://github.com/firefly-iii/firefly-iii/issues/763), as suggested by [tannie](https://github.com/tannie)
|
||||||
|
- [Issue 770](https://github.com/firefly-iii/firefly-iii/issues/770), as suggested by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 780](https://github.com/firefly-iii/firefly-iii/issues/780), as suggested by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 784](https://github.com/firefly-iii/firefly-iii/issues/784), as suggested by [SmilingWorlock](https://github.com/SmilingWorlock)
|
||||||
|
- Lots of code for future support of automated Bunq imports
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Rewrote the export routine
|
||||||
|
- [Issue 782](https://github.com/firefly-iii/firefly-iii/issues/782), as suggested by [NiceGuyIT](https://github.com/NiceGuyIT)
|
||||||
|
- [Issue 800](https://github.com/firefly-iii/firefly-iii/issues/800), as suggested by [jleeong](https://github.com/jleeong)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 724](https://github.com/firefly-iii/firefly-iii/issues/724), reported by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 738](https://github.com/firefly-iii/firefly-iii/issues/738), reported by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 760](https://github.com/firefly-iii/firefly-iii/issues/760), reported by [leander091](https://github.com/leander091)
|
||||||
|
- [Issue 764](https://github.com/firefly-iii/firefly-iii/issues/764), reported by [tannie](https://github.com/tannie)
|
||||||
|
- [Issue 792](https://github.com/firefly-iii/firefly-iii/issues/792), reported by [jleeong](https://github.com/jleeong)
|
||||||
|
- [Issue 793](https://github.com/firefly-iii/firefly-iii/issues/793), reported by [nicoschreiner](https://github.com/nicoschreiner)
|
||||||
|
- [Issue 797](https://github.com/firefly-iii/firefly-iii/issues/797), reported by [leander091](https://github.com/leander091)
|
||||||
|
- [Issue 801](https://github.com/firefly-iii/firefly-iii/issues/801), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 803](https://github.com/firefly-iii/firefly-iii/issues/803), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 805](https://github.com/firefly-iii/firefly-iii/issues/805), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 806](https://github.com/firefly-iii/firefly-iii/issues/806), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 807](https://github.com/firefly-iii/firefly-iii/issues/807), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 808](https://github.com/firefly-iii/firefly-iii/issues/808), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 809](https://github.com/firefly-iii/firefly-iii/issues/809), reported by [pkoziol](https://github.com/pkoziol)
|
||||||
|
- [Issue 814](https://github.com/firefly-iii/firefly-iii/issues/814), reported by [nicoschreiner](https://github.com/nicoschreiner)
|
||||||
|
- [Issue 818](https://github.com/firefly-iii/firefly-iii/issues/818), reported by [gavu](https://github.com/gavu)
|
||||||
|
- [Issue 819](https://github.com/firefly-iii/firefly-iii/issues/819), reported by [DieBauer](https://github.com/DieBauer)
|
||||||
|
- [Issue 820](https://github.com/firefly-iii/firefly-iii/issues/820), reported by [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
- Various other fixes
|
||||||
|
|
||||||
|
|
||||||
|
## [4.6.4] - 2017-08-13
|
||||||
|
### Added
|
||||||
|
- PHP7.1 support
|
||||||
|
- Routine to decrypt attachments from the command line, for [issue 671](https://github.com/firefly-iii/firefly-iii/issues/671)
|
||||||
|
- A routine that can check if your password has been stolen in the past.
|
||||||
|
- Split transaction shows amount left to be split
|
||||||
|
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Importer can (potentially) handle new import routines such as banks.
|
||||||
|
- Importer can fall back from JSON errors
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- PHP7.0 support
|
||||||
|
- Support for extended tag modes
|
||||||
|
- Remove "time jumps" to non-empty periods
|
||||||
|
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 717](https://github.com/firefly-iii/firefly-iii/issues/717), reported by [NiceGuyIT](https://github.com/NiceGuyIT)
|
||||||
|
- [Issue 718](https://github.com/firefly-iii/firefly-iii/issues/718), reported by [wtercato](https://github.com/wtercato)
|
||||||
|
- [Issue 722](https://github.com/firefly-iii/firefly-iii/issues/722), reported by [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
- [Issue 648](https://github.com/firefly-iii/firefly-iii/issues/648), reported by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 730](https://github.com/firefly-iii/firefly-iii/issues/730), reported by [ragnarkarlsson](https://github.com/ragnarkarlsson)
|
||||||
|
- [Issue 733](https://github.com/firefly-iii/firefly-iii/issues/733), reported by [xpfgsyb](https://github.com/xpfgsyb)
|
||||||
|
- [Issue 735](https://github.com/firefly-iii/firefly-iii/issues/735), reported by [kristophr](https://github.com/kristophr)
|
||||||
|
- [Issue 739](https://github.com/firefly-iii/firefly-iii/issues/739), reported by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 515](https://github.com/firefly-iii/firefly-iii/issues/515), reported by [schwalberich](https://github.com/schwalberich)
|
||||||
|
- [Issue 743](https://github.com/firefly-iii/firefly-iii/issues/743), reported by [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
- [Issue 746](https://github.com/firefly-iii/firefly-iii/issues/746), reported by [tannie](https://github.com/tannie)
|
||||||
|
- [Issue 747](https://github.com/firefly-iii/firefly-iii/issues/747), reported by [tannie](https://github.com/tannie)
|
||||||
|
|
||||||
|
|
||||||
|
## [4.6.3.1] - 2017-07-23
|
||||||
|
### Fixed
|
||||||
|
- Hotfix to close [issue 715](https://github.com/firefly-iii/firefly-iii/issues/715)
|
||||||
|
|
||||||
|
## [4.6.3] - 2017-07-23
|
||||||
|
|
||||||
|
This will be the last release to support PHP 7.0.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- New guidelines and new introduction tour to aid new users.
|
||||||
|
- Rules can now be applied at will to transactions, not just rule groups.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Improved category overview.
|
||||||
|
- Improved budget overview.
|
||||||
|
- Improved budget report.
|
||||||
|
- Improved command line import responsiveness and speed.
|
||||||
|
- All code comparisons are now strict.
|
||||||
|
- Improve search page.
|
||||||
|
- Charts are easier to read thanks to [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
- Fixed [issue 708](https://github.com/firefly-iii/firefly-iii/issues/708).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed bug where import would not respect default account. [issue 694](https://github.com/firefly-iii/firefly-iii/issues/694)
|
||||||
|
- Fixed various broken paths
|
||||||
|
- Fixed several import inconsistencies.
|
||||||
|
- Various bug fixes.
|
||||||
|
|
||||||
|
## [4.6.2] - 2017-07-08
|
||||||
|
### Added
|
||||||
|
- Links added to boxes, idea by [simonsmiley](https://github.com/simonsmiley)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Various bugs in import routine
|
||||||
|
|
||||||
|
## [4.6.1] - 2017-07-02
|
||||||
|
### Fixed
|
||||||
|
- Fixed several small issues all around.
|
||||||
|
|
||||||
|
## [4.6.0] - 2017-06-28
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Revamped import routine. Will be buggy.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 667](https://github.com/firefly-iii/firefly-iii/issues/667), postgresql reported by [skibbipl](https://github.com/skibbipl).
|
||||||
|
- [Issue 680](https://github.com/firefly-iii/firefly-iii/issues/680), fixed by [Xeli](https://github.com/Xeli)
|
||||||
|
- Fixed [issue 660](https://github.com/firefly-iii/firefly-iii/issues/660)
|
||||||
|
- Fixes [issue 672](https://github.com/firefly-iii/firefly-iii/issues/672), reported by [dzaikos](https://github.com/dzaikos)
|
||||||
|
- Fix a bug where the balance routine forgot to account for accounts without a currency preference.
|
||||||
|
- Various other bugfixes.
|
||||||
|
|
||||||
|
## [4.5.0] - 2017-06-07
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Better support for multi-currency transactions and display of transactions, accounts and everything. This requires a database overhaul (moving the currency information to specific transactions) so be careful when upgrading.
|
||||||
|
- Translations for Spanish and Slovenian.
|
||||||
|
- New interface for budget page, ~~stolen from~~ inspired by YNAB.
|
||||||
|
- Expanded Docker to work with postgresql as well, thanks to [kressh](https://github.com/kressh)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- PostgreSQL support in database upgrade routine ([issue 644](https://github.com/firefly-iii/firefly-iii/issues/644), reported by [skibbipl](https://github.com/skibbipl))
|
||||||
|
- Frontpage budget chart was off, fix by [nhaarman](https://github.com/nhaarman)
|
||||||
|
- Was not possible to remove opening balance.
|
||||||
|
|
||||||
|
## [4.4.3] - 2017-05-03
|
||||||
|
### Added
|
||||||
|
- Added support for Slovenian
|
||||||
|
- Removed support for Spanish. No translations whatsoever by the guy who requested it.
|
||||||
|
- Removed support for Russian. Same thing.
|
||||||
|
- Removed support for Croatian. Same thing.
|
||||||
|
- Removed support for Chinese Traditional, Hong Kong. Same thing.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- The journal collector, an internal piece of code to collect transactions, now uses a slightly different method of collecting journals. This may cause problems.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 638](https://github.com/firefly-iii/firefly-iii/issues/638) as reported by [worldworm](https://github.com/worldworm).
|
||||||
|
- Possible fix for [issue 624](https://github.com/firefly-iii/firefly-iii/issues/624)
|
||||||
|
|
||||||
|
## [4.4.2] - 2017-04-27
|
||||||
|
### Fixed
|
||||||
|
- Fixed a bug where the opening balance could not be stored.
|
||||||
|
|
||||||
|
## [4.4.1] - 2017-04-27
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Support for deployment on Heroku
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Bug in new-user routine.
|
||||||
|
|
||||||
|
## [4.4.0] - 2017-04-23
|
||||||
|
### Added
|
||||||
|
- Firefly III can now handle foreign currencies better, including some code to get the exchange rate live from the web.
|
||||||
|
- Can now make rules for attachments, see [issue 608](https://github.com/firefly-iii/firefly-iii/issues/608), as suggested by [dzaikos](https://github.com/dzaikos).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed [issue 629](https://github.com/firefly-iii/firefly-iii/issues/629), reported by forcaeluz
|
||||||
|
- Fixed [issue 630](https://github.com/firefly-iii/firefly-iii/issues/630), reported by welbert
|
||||||
|
- And more various bug fixes.
|
||||||
|
|
||||||
|
## [4.3.8] - 2017-04-08
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Better overview / show pages.
|
||||||
|
- [Issue 628](https://github.com/firefly-iii/firefly-iii/issues/628), as reported by [xzaz](https://github.com/xzaz).
|
||||||
|
- Greatly expanded test coverage
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 619](https://github.com/firefly-iii/firefly-iii/issues/619), as reported by [dfiel](https://github.com/dfiel).
|
||||||
|
- [Issue 620](https://github.com/firefly-iii/firefly-iii/issues/620), as reported by [forcaeluz](https://github.com/forcaeluz).
|
||||||
|
- Attempt to fix [issue 624](https://github.com/firefly-iii/firefly-iii/issues/624), as reported by [TheSerenin](https://github.com/TheSerenin).
|
||||||
|
- Favicon link is relative now, fixed by [welbert](https://github.com/welbert).
|
||||||
|
- Some search bugs
|
||||||
|
|
||||||
|
## [4.3.7] - 2017-03-06
|
||||||
|
### Added
|
||||||
|
- Nice user friendly views for empty lists.
|
||||||
|
- Extended contribution guidelines.
|
||||||
|
- First version of financial report filtered on tags.
|
||||||
|
- Suggested monthly savings for piggy banks, by [Zsub](https://github.com/Zsub)
|
||||||
|
- Better test coverage.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Slightly changed tag overview.
|
||||||
|
- Consistent icon for bill in list.
|
||||||
|
- Slightly changed account overview.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Removed IDE specific views from .gitignore, [issue 598](https://github.com/firefly-iii/firefly-iii/issues/598)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Force key generation during installation.
|
||||||
|
- The `date` function takes the fieldname where a date is stored, not the literal date by [Zsub](https://github.com/Zsub)
|
||||||
|
- Improved budget frontpage chart, as suggested by [skibbipl](https://github.com/skibbipl)
|
||||||
|
- [Issue 602](https://github.com/firefly-iii/firefly-iii/issues/602) and [issue 607](https://github.com/firefly-iii/firefly-iii/issues/607), as reported by [skibbipl](https://github.com/skibbipl) and [dzaikos](https://github.com/dzaikos).
|
||||||
|
- [Issue 605](https://github.com/firefly-iii/firefly-iii/issues/605), as reported by [Zsub](https://github.com/Zsub).
|
||||||
|
- [Issue 599](https://github.com/firefly-iii/firefly-iii/issues/599), as reported by [leander091](https://github.com/leander091).
|
||||||
|
- [Issue 610](https://github.com/firefly-iii/firefly-iii/issues/610), as reported by [skibbipl](https://github.com/skibbipl).
|
||||||
|
- [Issue 611](https://github.com/firefly-iii/firefly-iii/issues/611), as reported by [ragnarkarlsson](https://github.com/ragnarkarlsson).
|
||||||
|
- [Issue 612](https://github.com/firefly-iii/firefly-iii/issues/612), as reported by [ragnarkarlsson](https://github.com/ragnarkarlsson).
|
||||||
|
- [Issue 614](https://github.com/firefly-iii/firefly-iii/issues/614), as reported by [worldworm](https://github.com/worldworm).
|
||||||
|
- Various other bug fixes.
|
||||||
|
|
||||||
|
## [4.3.6] - 2017-02-20
|
||||||
|
### Fixed
|
||||||
|
- [Issue 578](https://github.com/firefly-iii/firefly-iii/issues/578), reported by [xpfgsyb](https://github.com/xpfgsyb).
|
||||||
|
|
||||||
|
## [4.3.5] - 2017-02-19
|
||||||
|
### Added
|
||||||
|
- Beta support for Sandstorm.IO
|
||||||
|
- Docker support by [schoentoon](https://github.com/schoentoon), [elohmeier](https://github.com/elohmeier), [patrickkostjens](https://github.com/patrickkostjens) and [crash7](https://github.com/crash7)!
|
||||||
|
- Can now use special keywords in the search to search for specic dates, categories, etc.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Updated to laravel 5.4!
|
||||||
|
- User friendly error message
|
||||||
|
- Updated locales to support more operating systems, first reported in [issue 536](https://github.com/firefly-iii/firefly-iii/issues/536) by [dabenzel](https://github.com/dabenzel)
|
||||||
|
- Updated budget report
|
||||||
|
- Improved 404 page
|
||||||
|
- Smooth curves, improved by [elamperti](https://github.com/elamperti).
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [Issue 549](https://github.com/firefly-iii/firefly-iii/issues/549)
|
||||||
|
- [Issue 553](https://github.com/firefly-iii/firefly-iii/issues/553)
|
||||||
|
- Fixed [issue 559](https://github.com/firefly-iii/firefly-iii/issues/559) reported by [elamperti](https://github.com/elamperti).
|
||||||
|
- [Issue 565](https://github.com/firefly-iii/firefly-iii/issues/565), as reported by a user over the mail
|
||||||
|
- [Issue 566](https://github.com/firefly-iii/firefly-iii/issues/566), as reported by [dspeckmann](https://github.com/dspeckmann)
|
||||||
|
- [Issue 567](https://github.com/firefly-iii/firefly-iii/issues/567), as reported by [winsomniak](https://github.com/winsomniak)
|
||||||
|
- [Issue 569](https://github.com/firefly-iii/firefly-iii/issues/569), as reported by [winsomniak](https://github.com/winsomniak)
|
||||||
|
- [Issue 572](https://github.com/firefly-iii/firefly-iii/issues/572), as reported by [zjean](https://github.com/zjean)
|
||||||
|
- Many issues with the transaction filters which will fix reports (they tended to display the wrong amount).
|
||||||
|
|
||||||
|
## [4.3.4] - 2017-02-02
|
||||||
|
### Fixed
|
||||||
|
- Fixed bug [issue 550](https://github.com/firefly-iii/firefly-iii/issues/550), reported by [worldworm](https://github.com/worldworm)!
|
||||||
|
- Fixed bug [issue 551](https://github.com/firefly-iii/firefly-iii/issues/551), reported by [t-me](https://github.com/t-me)!
|
||||||
|
|
||||||
|
## [4.3.3] - 2017-01-30
|
||||||
|
|
||||||
|
_The 100th release of Firefly!_
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Add locales to Docker ([issue 534](https://github.com/firefly-iii/firefly-iii/issues/534)) by [elohmeier](https://github.com/elohmeier).
|
||||||
|
- Optional database encryption. On by default.
|
||||||
|
- Datepicker for Firefox and other browsers.
|
||||||
|
- New instruction block for updating and installing.
|
||||||
|
- Ability to clone transactions.
|
||||||
|
- Use multi-select Bootstrap thing instead of massive lists of checkboxes.
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Lots of old Javascript
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Missing sort broke various charts
|
||||||
|
- Bug in reports that made amounts behave weird
|
||||||
|
- Various bug fixes
|
||||||
|
|
||||||
|
### Security
|
||||||
|
- Tested FF against the naughty string list.
|
||||||
|
|
||||||
|
## [4.3.2] - 2017-01-09
|
||||||
|
|
||||||
|
An intermediate release because something in the Twig and Twigbridge libraries is broken and I have to make sure it doesn't affect you guys. But some cool features were on their way so there's that oo.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Some code for [issue 475](https://github.com/firefly-iii/firefly-iii/issues/475), consistent overviews.
|
||||||
|
- Better currency display. Make sure you have locale packages installed.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Uses a new version of Laravel.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- The password reset routine was broken.
|
||||||
|
- [Issue 522](https://github.com/firefly-iii/firefly-iii/issues/522), thanks to [xpfgsyb](https://github.com/xpfgsyb)
|
||||||
|
- [Issue 524](https://github.com/firefly-iii/firefly-iii/issues/524), thanks to [worldworm](https://github.com/worldworm)
|
||||||
|
- [Issue 526](https://github.com/firefly-iii/firefly-iii/issues/526), thanks to [worldworm](https://github.com/worldworm)
|
||||||
|
- [Issue 528](https://github.com/firefly-iii/firefly-iii/issues/528), thanks to [skibbipl](https://github.com/skibbipl)
|
||||||
|
- Various other fixes.
|
||||||
|
|
||||||
## [4.3.1] - 2017-01-04
|
## [4.3.1] - 2017-01-04
|
||||||
### Added
|
### Added
|
||||||
- Support for Russian and Polish.
|
- Support for Russian and Polish.
|
||||||
- Support for a proper demo website.
|
- Support for a proper demo website.
|
||||||
- Support for custom decimal places in currencies (#506, suggested by @xpfgsyb).
|
- Support for custom decimal places in currencies ([issue 506](https://github.com/firefly-iii/firefly-iii/issues/506), suggested by [xpfgsyb](https://github.com/xpfgsyb)).
|
||||||
- Most amounts are now right-aligned (#511, suggested by @xpfgsyb).
|
- Most amounts are now right-aligned ([issue 511](https://github.com/firefly-iii/firefly-iii/issues/511), suggested by [xpfgsyb](https://github.com/xpfgsyb)).
|
||||||
- German is now a "complete" language, more than 75% translated!
|
- German is now a "complete" language, more than 75% translated!
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- **[New Github repository!](github.com/firefly-iii/firefly-iii)**
|
- **[New Github repository!](github.com/firefly-iii/firefly-iii)**
|
||||||
- Better category overview.
|
- Better category overview.
|
||||||
- #502, thanks to @zjean
|
- [Issue 502](https://github.com/firefly-iii/firefly-iii/issues/502), thanks to [zjean](https://github.com/zjean)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Removed a lot of administration functions.
|
- Removed a lot of administration functions.
|
||||||
- Removed ability to activate users.
|
- Removed ability to activate users.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- #501, thanks to @zjean
|
- [Issue 501](https://github.com/firefly-iii/firefly-iii/issues/501), thanks to [zjean](https://github.com/zjean)
|
||||||
- #513, thanks to @skibbipl
|
- [Issue 513](https://github.com/firefly-iii/firefly-iii/issues/513), thanks to [skibbipl](https://github.com/skibbipl)
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
- #519, thanks to @xpfgsyb
|
- [Issue 519](https://github.com/firefly-iii/firefly-iii/issues/519), thanks to [xpfgsyb](https://github.com/xpfgsyb)
|
||||||
|
|
||||||
## [4.3.0] - 2015-12-26
|
## [4.3.0] - 2016-12-26
|
||||||
### Added
|
### Added
|
||||||
- New method of keeping track of available budget, see issue #489
|
- New method of keeping track of available budget, see [issue 489](https://github.com/firefly-iii/firefly-iii/issues/489)
|
||||||
- Support for Spanish
|
- Support for Spanish
|
||||||
- Firefly III now has an extended demo mode. Will expand further in the future.
|
- Firefly III now has an extended demo mode. Will expand further in the future.
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- New favicon
|
- New favicon
|
||||||
- Import routine no longer gives transactions a description #483
|
- Import routine no longer gives transactions a description [issue 483](https://github.com/firefly-iii/firefly-iii/issues/483)
|
||||||
|
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- All test data generation code.
|
- All test data generation code.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Removed import accounts from search results #478
|
- Removed import accounts from search results [issue 478](https://github.com/firefly-iii/firefly-iii/issues/478)
|
||||||
- Redirect after delete will no longer go back to deleted item #477
|
- Redirect after delete will no longer go back to deleted item [issue 477](https://github.com/firefly-iii/firefly-iii/issues/477)
|
||||||
- Cannot math #482
|
- Cannot math [issue 482](https://github.com/firefly-iii/firefly-iii/issues/482)
|
||||||
- Fixed bug in virtual balance field #479
|
- Fixed bug in virtual balance field [issue 479](https://github.com/firefly-iii/firefly-iii/issues/479)
|
||||||
|
|
||||||
## [4.2.2] - 2016-12-18
|
## [4.2.2] - 2016-12-18
|
||||||
### Added
|
### Added
|
||||||
@@ -58,50 +421,38 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Various bugs
|
- Various bugs
|
||||||
- Issue #472 thanks to @zjean
|
- [Issue 472](https://github.com/firefly-iii/firefly-iii/issues/472) thanks to [zjean](https://github.com/zjean)
|
||||||
|
|
||||||
## [4.2.1] - 2016-12-09
|
## [4.2.1] - 2016-12-09
|
||||||
### Added
|
### Added
|
||||||
- BIC support (see #430)
|
- BIC support (see [issue 430](https://github.com/firefly-iii/firefly-iii/issues/430))
|
||||||
- New category report section and chart (see the general financial report)
|
- New category report section and chart (see the general financial report)
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Date range picker now also available on mobile devices (see #435)
|
- Date range picker now also available on mobile devices (see [issue 435](https://github.com/firefly-iii/firefly-iii/issues/435))
|
||||||
- Extended range of amounts for issue #439
|
- Extended range of amounts for [issue 439](https://github.com/firefly-iii/firefly-iii/issues/439)
|
||||||
- Rewrote all routes. Old bookmarks may break.
|
- Rewrote all routes. Old bookmarks may break.
|
||||||
|
|
||||||
## [4.2.0] - 2016-11-27
|
## [4.2.0] - 2016-11-27
|
||||||
### Added
|
### Added
|
||||||
- Lots of (empty) tests
|
- Lots of (empty) tests
|
||||||
- Expanded transaction lists (#377)
|
- Expanded transaction lists ([issue 377](https://github.com/firefly-iii/firefly-iii/issues/377))
|
||||||
- New charts at account view
|
- New charts at account view
|
||||||
- First code for #305
|
- First code for [issue 305](https://github.com/firefly-iii/firefly-iii/issues/305)
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Updated all email messages.
|
- Updated all email messages.
|
||||||
- Made some fonts local
|
- Made some fonts local
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Issue #408
|
- [Issue 408](https://github.com/firefly-iii/firefly-iii/issues/408)
|
||||||
- Various issues with split journals
|
- Various issues with split journals
|
||||||
- Issue #414, thx @zjean
|
- [Issue 414](https://github.com/firefly-iii/firefly-iii/issues/414), thx [zjean](https://github.com/zjean)
|
||||||
- Issue #419, thx @schwalberich
|
- [Issue 419](https://github.com/firefly-iii/firefly-iii/issues/419), thx [schwalberich](https://github.com/schwalberich)
|
||||||
- Issue #422, thx @xzaz
|
- [Issue 422](https://github.com/firefly-iii/firefly-iii/issues/422), thx [xzaz](https://github.com/xzaz)
|
||||||
- Various import bugs, such as #416 (@zjean)
|
- Various import bugs, such as [issue 416](https://github.com/firefly-iii/firefly-iii/issues/416) ([zjean](https://github.com/zjean))
|
||||||
|
|
||||||
|
|
||||||
### Security
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
|
|
||||||
## [4.1.7] - 2016-11-19
|
## [4.1.7] - 2016-11-19
|
||||||
### Added
|
### Added
|
||||||
@@ -118,9 +469,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Made all pages more mobile friendly.
|
- Made all pages more mobile friendly.
|
||||||
- Fixed #395 found by @marcoveeneman.
|
- Fixed [issue 395](https://github.com/firefly-iii/firefly-iii/issues/395) found by [marcoveeneman](https://github.com/marcoveeneman).
|
||||||
- Fixed #398 found by @marcoveeneman.
|
- Fixed [issue 398](https://github.com/firefly-iii/firefly-iii/issues/398) found by [marcoveeneman](https://github.com/marcoveeneman).
|
||||||
- Fixed #401 found by @marcoveeneman.
|
- Fixed [issue 401](https://github.com/firefly-iii/firefly-iii/issues/401) found by [marcoveeneman](https://github.com/marcoveeneman).
|
||||||
- Many optimizations.
|
- Many optimizations.
|
||||||
- Updated many libraries.
|
- Updated many libraries.
|
||||||
- Various bugs found by myself.
|
- Various bugs found by myself.
|
||||||
@@ -132,13 +483,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Greatly expanded help pages and their function.
|
- Greatly expanded help pages and their function.
|
||||||
- Built a new transaction collector, which I think was the idea of @roberthorlings originally.
|
- Built a new transaction collector, which I think was the idea of [roberthorlings](https://github.com/roberthorlings) originally.
|
||||||
- Rebuilt seach engine.
|
- Rebuilt seach engine.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- #375, thanks to @schoentoon which made it impossible to resurrect currencies.
|
- [Issue 375](https://github.com/firefly-iii/firefly-iii/issues/375), thanks to [schoentoon](https://github.com/schoentoon) which made it impossible to resurrect currencies.
|
||||||
- #370 thanks to @ksmolder
|
- [Issue 370](https://github.com/firefly-iii/firefly-iii/issues/370) thanks to [ksmolder](https://github.com/ksmolder)
|
||||||
- #378, thanks to @HomelessAvatar
|
- [Issue 378](https://github.com/firefly-iii/firefly-iii/issues/378), thanks to [HomelessAvatar](https://github.com/HomelessAvatar)
|
||||||
|
|
||||||
## [4.1.5] - 2016-11-01
|
## [4.1.5] - 2016-11-01
|
||||||
### Changed
|
### Changed
|
||||||
@@ -147,11 +498,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Help content is translated through Crowdin.
|
- Help content is translated through Crowdin.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Issue #370
|
- [Issue 370](https://github.com/firefly-iii/firefly-iii/issues/370)
|
||||||
|
|
||||||
## [4.1.4] - 2016-10-30
|
## [4.1.4] - 2016-10-30
|
||||||
### Added
|
### Added
|
||||||
- New Dockerfile thanks to @schoentoon
|
- New Dockerfile thanks to [schoentoon](https://github.com/schoentoon)
|
||||||
- Added changing the destination account as rule action.
|
- Added changing the destination account as rule action.
|
||||||
- Added changing the source account as rule action.
|
- Added changing the source account as rule action.
|
||||||
- Can convert transactions into different types.
|
- Can convert transactions into different types.
|
||||||
@@ -164,10 +515,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Change error message to refer to solution.
|
- Change error message to refer to solution.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- #367 thanks to @HungryFeline
|
- [Issue 367](https://github.com/firefly-iii/firefly-iii/issues/367) thanks to [HungryFeline](https://github.com/HungryFeline)
|
||||||
- #366 thanks to @3mz3t
|
- [Issue 366](https://github.com/firefly-iii/firefly-iii/issues/366) thanks to [3mz3t](https://github.com/3mz3t)
|
||||||
- #362 and #341 thanks to @bnw
|
- [Issue 362](https://github.com/firefly-iii/firefly-iii/issues/362) and [issue 341](https://github.com/firefly-iii/firefly-iii/issues/341) thanks to [bnw](https://github.com/bnw)
|
||||||
- #355 thanks to @roberthorlings
|
- [Issue 355](https://github.com/firefly-iii/firefly-iii/issues/355) thanks to [roberthorlings](https://github.com/roberthorlings)
|
||||||
|
|
||||||
## [4.1.3] - 2016-10-22
|
## [4.1.3] - 2016-10-22
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -198,81 +549,66 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Lots of old code
|
- Lots of old code
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- #357, where non utf-8 files would break Firefly.
|
- [Issue 357](https://github.com/firefly-iii/firefly-iii/issues/357), where non utf-8 files would break Firefly.
|
||||||
- Tab delimiter is not properly loaded from import configuration (@roberthorlings)
|
- Tab delimiter is not properly loaded from import configuration ([roberthorlings](https://github.com/roberthorlings))
|
||||||
- System response to yearly bills
|
- System response to yearly bills
|
||||||
|
|
||||||
## [4.0.2] - 2016-10-14
|
## [4.0.2] - 2016-10-14
|
||||||
### Added
|
### Added
|
||||||
- Added ``intl`` dependency to composer file to ease installation (thanks @telyn)
|
- Added ``intl`` dependency to composer file to ease installation (thanks [telyn](https://github.com/telyn))
|
||||||
- Added support for Croatian.
|
- Added support for Croatian.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Updated all copyright notices to refer to the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
|
- Updated all copyright notices to refer to the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
|
||||||
- Fixed #344
|
- Fixed [issue 344](https://github.com/firefly-iii/firefly-iii/issues/344)
|
||||||
- Fixed #346, thanks to @SanderKleykens
|
- Fixed [issue 346](https://github.com/firefly-iii/firefly-iii/issues/346), thanks to [SanderKleykens](https://github.com/SanderKleykens)
|
||||||
- #351
|
- [Issue 351](https://github.com/firefly-iii/firefly-iii/issues/351)
|
||||||
- Did some internal remodelling.
|
- Did some internal remodelling.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- PostgreSQL compatibility thanks to @SanderKleykens
|
- PostgreSQL compatibility thanks to [SanderKleykens](https://github.com/SanderKleykens)
|
||||||
- @RobertHorlings fixed a bug in the ABN Amro import specific.
|
- [roberthorlings](https://github.com/roberthorlings) fixed a bug in the ABN Amro import specific.
|
||||||
|
|
||||||
|
|
||||||
## [4.0.1] - 2016-10-04
|
## [4.0.1] - 2016-10-04
|
||||||
### Added
|
### Added
|
||||||
- New ING import specific by @tomwerf
|
- New ING import specific by [tomwerf](https://github.com/tomwerf)
|
||||||
- New Presidents Choice specific to fix #307
|
- New Presidents Choice specific to fix [issue 307](https://github.com/firefly-iii/firefly-iii/issues/307)
|
||||||
- Added some trimming (#335)
|
- Added some trimming ([issue 335](https://github.com/firefly-iii/firefly-iii/issues/335))
|
||||||
|
|
||||||
### Changed
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
### Deprecated
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed a bug where incoming transactions would not be properly filtered in several reports.
|
- Fixed a bug where incoming transactions would not be properly filtered in several reports.
|
||||||
- #334 by @cyberkov
|
- [Issue 334](https://github.com/firefly-iii/firefly-iii/issues/334) by [cyberkov](https://github.com/cyberkov)
|
||||||
- #337
|
- [Issue 337](https://github.com/firefly-iii/firefly-iii/issues/337)
|
||||||
- #336
|
- [Issue 336](https://github.com/firefly-iii/firefly-iii/issues/336)
|
||||||
- #338 found by @roberthorlings
|
- [Issue 338](https://github.com/firefly-iii/firefly-iii/issues/338) found by [roberthorlings](https://github.com/roberthorlings)
|
||||||
|
|
||||||
### Security
|
## [4.0.0] - 2016-09-26
|
||||||
- Initial release.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [4.0.0] - 2015-09-26
|
|
||||||
### Added
|
### Added
|
||||||
- Upgraded to Laravel 5.3, most other libraries upgraded as well.
|
- Upgraded to Laravel 5.3, most other libraries upgraded as well.
|
||||||
- Added GBP as currency, thanks to @Mortalife
|
- Added GBP as currency, thanks to [Mortalife](https://github.com/Mortalife)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Jump to version 4.0.0.
|
- Jump to version 4.0.0.
|
||||||
- Firefly III is now subject to a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/) license. Previous versions of this software are still MIT licensed.
|
- Firefly III is now subject to a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/) license. Previous versions of this software are still MIT licensed.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Support for specific decimal places, thanks to @Mortalife
|
- Support for specific decimal places, thanks to [Mortalife](https://github.com/Mortalife)
|
||||||
- Various CSS fixes
|
- Various CSS fixes
|
||||||
- Various bugs, thanks to @fuf, @sandermulders and @vissert
|
- Various bugs, thanks to [fuf](https://github.com/fuf), [sandermulders](https://github.com/sandermulders) and [vissert](https://github.com/vissert)
|
||||||
- Various queries optimized for MySQL 5.7
|
- Various queries optimized for MySQL 5.7
|
||||||
|
|
||||||
## [3.10.4] - 2015-09-14
|
## [3.10.4] - 2016-09-14
|
||||||
### Fixed
|
### Fixed
|
||||||
- Migration fix by @sandermulders
|
- Migration fix by [sandermulders](https://github.com/sandermulders)
|
||||||
- Tricky import bug fix thanks to @vissert
|
- Tricky import bug fix thanks to [vissert](https://github.com/vissert)
|
||||||
- Currency preference will be correctly pulled from user settings, thanks to @fuf
|
- Currency preference will be correctly pulled from user settings, thanks to [fuf](https://github.com/fuf)
|
||||||
- Simplified code for upgrade instructions.
|
- Simplified code for upgrade instructions.
|
||||||
|
|
||||||
|
|
||||||
## [3.10.3] - 2016-08-29
|
## [3.10.3] - 2016-08-29
|
||||||
### Added
|
### Added
|
||||||
- More fields for mass-edit, thanks to @Vissert (#282)
|
- More fields for mass-edit, thanks to [vissert](https://github.com/vissert) ([issue 282](https://github.com/firefly-iii/firefly-iii/issues/282))
|
||||||
- First start of German translation
|
- First start of German translation
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@@ -283,7 +619,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- A bug in the translation routine broke the import.
|
- A bug in the translation routine broke the import.
|
||||||
- It was possible to destroy your Firefly installation by removing all currencies. Thanks @mondjef
|
- It was possible to destroy your Firefly installation by removing all currencies. Thanks [mondjef](https://github.com/mondjef)
|
||||||
- Translation bugs.
|
- Translation bugs.
|
||||||
- Import bug.
|
- Import bug.
|
||||||
|
|
||||||
@@ -303,8 +639,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Bug in the mass edit routines.
|
- Bug in the mass edit routines.
|
||||||
- Firefly III over a proxy will now work (see [issue #290](https://github.com/firefly-iii/firefly-iii/issues/290)), thanks @dfiel for reporting.
|
- Firefly III over a proxy will now work (see [issue 290](https://github.com/firefly-iii/firefly-iii/issues/290), thanks [dfiel](https://github.com/dfiel) for reporting.
|
||||||
- Sneaky bug in the import routine, fixed by @Bonno
|
- Sneaky bug in the import routine, fixed by [Bonno](https://github.com/Bonno)
|
||||||
|
|
||||||
## [3.10.1] - 2016-08-25
|
## [3.10.1] - 2016-08-25
|
||||||
### Added
|
### Added
|
||||||
@@ -324,9 +660,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Fixed a bug where a migration would check an empty table name.
|
- Fixed a bug where a migration would check an empty table name.
|
||||||
- Fixed various bugs in the import routine.
|
- Fixed various bugs in the import routine.
|
||||||
- Fixed various bugs in the piggy banks pages.
|
- Fixed various bugs in the piggy banks pages.
|
||||||
- Fixed a bug in the ``firefly:verify`` routine
|
- Fixed a bug in the `firefly:verify` routine
|
||||||
|
|
||||||
## [3.10] - 2015-05-25
|
## [3.10] - 2016-08-12
|
||||||
### Added
|
### Added
|
||||||
- New charts in year report
|
- New charts in year report
|
||||||
- Can add / remove money from piggy bank on mobile device.
|
- Can add / remove money from piggy bank on mobile device.
|
||||||
@@ -337,30 +673,30 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Changed
|
### Changed
|
||||||
- Rewrote the import routine.
|
- Rewrote the import routine.
|
||||||
- The date picker now supports more ranges and periods.
|
- The date picker now supports more ranges and periods.
|
||||||
- Rewrote all migrations. #272
|
- Rewrote all migrations. [issue 272](https://github.com/firefly-iii/firefly-iii/issues/272)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Issue #264
|
- [Issue 264](https://github.com/firefly-iii/firefly-iii/issues/264)
|
||||||
- Issue #265
|
- [Issue 265](https://github.com/firefly-iii/firefly-iii/issues/265)
|
||||||
- Fixed amount calculation problems, #266, thanks @xzaz
|
- Fixed amount calculation problems, [issue 266](https://github.com/firefly-iii/firefly-iii/issues/266), thanks [xzaz](https://github.com/xzaz)
|
||||||
- Issue #271
|
- [Issue 271](https://github.com/firefly-iii/firefly-iii/issues/271)
|
||||||
- Issue #278, #273, thanks @StevenReitsma and @rubella
|
- [Issue 278](https://github.com/firefly-iii/firefly-iii/issues/278), [issue 273](https://github.com/firefly-iii/firefly-iii/issues/273), thanks [StevenReitsma](https://github.com/StevenReitsma) and [rubella](https://github.com/rubella)
|
||||||
- Bug in attachment download routine would report the wrong size to the user's browser.
|
- Bug in attachment download routine would report the wrong size to the user's browser.
|
||||||
- Various NULL errors fixed.
|
- Various NULL errors fixed.
|
||||||
- Various strict typing errors fixed.
|
- Various strict typing errors fixed.
|
||||||
- Fixed pagination problems, #276, thanks @xzaz
|
- Fixed pagination problems, [issue 276](https://github.com/firefly-iii/firefly-iii/issues/276), thanks [xzaz](https://github.com/xzaz)
|
||||||
- Fixed a bug where an expense would be assigned to a piggy bank if you created a transfer first.
|
- Fixed a bug where an expense would be assigned to a piggy bank if you created a transfer first.
|
||||||
- Bulk update problems, #280, thanks @stickgrinder
|
- Bulk update problems, [issue 280](https://github.com/firefly-iii/firefly-iii/issues/280), thanks [stickgrinder](https://github.com/stickgrinder)
|
||||||
- Fixed various problems with amount reporting of split transactions.
|
- Fixed various problems with amount reporting of split transactions.
|
||||||
|
|
||||||
[3.9.1]
|
## [3.9.1] - 2016-06-06
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed a bug where removing money from a piggy bank would not work. See issue #265 and #269
|
- Fixed a bug where removing money from a piggy bank would not work. See [issue 265](https://github.com/firefly-iii/firefly-iii/issues/265) and [issue 269](https://github.com/firefly-iii/firefly-iii/issues/269)
|
||||||
|
|
||||||
[3.9.0]
|
## [3.9.0] - 2016-05-22
|
||||||
### Added
|
### Added
|
||||||
- @zjean has added code that allows you to force "https://"-URL's.
|
- [zjean](https://github.com/zjean) has added code that allows you to force "https://"-URL's.
|
||||||
- @tonicospinelli has added Portuguese (Brazil) translations.
|
- [tonicospinelli](https://github.com/tonicospinelli) has added Portuguese (Brazil) translations.
|
||||||
- Firefly III supports the *splitting* of transactions:
|
- Firefly III supports the *splitting* of transactions:
|
||||||
- A withdrawal (expense) can be split into multiple sub-transactions (with multiple destinations)
|
- A withdrawal (expense) can be split into multiple sub-transactions (with multiple destinations)
|
||||||
- Likewise for deposits (incomes). You can set multiple sources.
|
- Likewise for deposits (incomes). You can set multiple sources.
|
||||||
@@ -391,7 +727,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Several CSV related bugs.
|
- Several CSV related bugs.
|
||||||
- Several other bugs.
|
- Several other bugs.
|
||||||
- Bugs fixed by @Bonno.
|
- Bugs fixed by [Bonno](https://github.com/Bonno).
|
||||||
|
|
||||||
## [3.8.3] - 2016-04-17
|
## [3.8.3] - 2016-04-17
|
||||||
### Added
|
### Added
|
||||||
@@ -438,7 +774,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Added
|
### Added
|
||||||
- Two factor authentication, thanks to the excellent work of [zjean](https://github.com/zjean).
|
- 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.
|
- 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.
|
- You can now see if your current or future rules actually match any transactions, thanks to the excellent work of [roberthorlings](https://github.com/roberthorlings).
|
||||||
- New date fields for transactions. They are not used yet in reports or anything, but they can be filled in.
|
- 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.
|
- 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.
|
- Firefly III will mail the site owner when blocked users try to login, or when blocked domains are used in registrations.
|
||||||
|
|||||||
46
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at thegrumpydictator@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
43
Dockerfile
@@ -11,32 +11,43 @@ RUN apt-get update -y && \
|
|||||||
libtidy-dev \
|
libtidy-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libbz2-dev && \
|
libpq-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
gettext-base \
|
||||||
|
locales && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN docker-php-ext-install -j$(nproc) curl gd intl json mcrypt readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2
|
RUN docker-php-ext-install -j$(nproc) curl gd intl json mcrypt readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2 pdo_pgsql
|
||||||
|
|
||||||
|
# Generate locales supported by firefly
|
||||||
|
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
|
||||||
|
|
||||||
|
COPY ./docker/apache2.conf /etc/apache2/apache2.conf
|
||||||
|
|
||||||
# Enable apache mod rewrite..
|
# Enable apache mod rewrite..
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
# Enable apache mod ssl..
|
||||||
|
RUN a2enmod ssl
|
||||||
|
|
||||||
# Setup the Composer installer
|
# Setup the Composer installer
|
||||||
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer && \
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig && \
|
|
||||||
php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" && \
|
|
||||||
chmod +x /tmp/composer-setup.php && \
|
|
||||||
php /tmp/composer-setup.php && \
|
|
||||||
mv composer.phar /usr/local/bin/composer && \
|
|
||||||
rm -f /tmp/composer-setup.{php,sig}
|
|
||||||
|
|
||||||
ADD . /var/www/firefly-iii
|
# Copy Apache Configs
|
||||||
RUN chown -R www-data:www-data /var/www/
|
COPY ./docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
||||||
ADD docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
|
||||||
|
|
||||||
USER www-data
|
ENV FIREFLY_PATH /var/www/firefly-iii
|
||||||
|
|
||||||
WORKDIR /var/www/firefly-iii
|
WORKDIR $FIREFLY_PATH
|
||||||
|
|
||||||
RUN composer install --no-scripts --no-dev
|
# The working directory
|
||||||
|
COPY . $FIREFLY_PATH
|
||||||
|
|
||||||
USER root
|
RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage
|
||||||
|
|
||||||
|
RUN composer install --prefer-dist --no-dev --no-scripts
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker/entrypoint.sh"]
|
||||||
|
|||||||
1
Procfile
Normal file
@@ -0,0 +1 @@
|
|||||||
|
web: vendor/bin/heroku-php-nginx -C nginx_app.conf public/
|
||||||
52
README.md
@@ -1,36 +1,70 @@
|
|||||||
# Firefly III: A personal finances manager
|
# Firefly III: A personal finances manager
|
||||||
|
|
||||||
[](https://secure.php.net/downloads.php#v7.0.4) [](https://packagist.org/packages/grumpydictator/firefly-iii) [](https://scrutinizer-ci.com/g/firefly-iii/firefly-iii/?branch=master) [](https://travis-ci.org/firefly-iii/firefly-iii) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA)
|
[](https://secure.php.net/downloads.php) [](https://packagist.org/packages/grumpydictator/firefly-iii) [](https://creativecommons.org/licenses/by-sa/4.0/) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA)
|
||||||
|
|
||||||
[](https://i.nder.be/h2b37243) [](https://i.nder.be/hv70pbwc)
|
[](https://i.nder.be/h2b37243) [](https://i.nder.be/hv70pbwc)
|
||||||
|
|
||||||
[](https://i.nder.be/ccn0u2mp) [](https://i.nder.be/gm8hbh7z)
|
[](https://i.nder.be/ccn0u2mp) [](https://i.nder.be/gm8hbh7z)
|
||||||
|
|
||||||
"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 III" is a financial manager for your personal finances.
|
||||||
|
It can help you keep track of your expenses and income.
|
||||||
|
Firefly III supports the use of budgets. You can categorize and tag your transactions.
|
||||||
|
It also supports credit cards, shared household accounts and savings accounts.
|
||||||
|
There are many financial reports available.
|
||||||
|
|
||||||
## Try it out!
|
## Try it out!
|
||||||
|
|
||||||
Try out Firefly III on the [demo site](https://firefly-iii.nder.be/).
|
[](https://heroku.com/deploy?template=https://github.com/firefly-iii/firefly-iii/tree/master)
|
||||||
|
|
||||||
## Installation
|
Firefly III can be run on Heroku.
|
||||||
|
Register for a free Heroku account and instantly run Firefly III on your very own cloud instance.
|
||||||
|
There is also a [demo site](https://firefly-iii.nder.be) with an example financial administration already present.
|
||||||
|
|
||||||
To install Firefly III, you'll need a web server (preferrably on Linux) and access to the command line. Then, please read the [installation guide](https://firefly-iii.github.io/installation-guide/).
|
## Getting started
|
||||||
|
|
||||||
|
To install Firefly III, you'll need a web server (preferrably on Linux) and access to the command line.
|
||||||
|
Then, please read the [installation guide](https://firefly-iii.github.io/using-installing.html).
|
||||||
|
At the moment, installation is fairly complex. I hope to improve this in the future. If you need support, please open a ticket.
|
||||||
|
|
||||||
## More about Firefly III
|
## More about Firefly III
|
||||||
|
|
||||||
Personal financial management is pretty difficult, and everybody has their own approach to it. Some people make budgets, other people limit their cashflow by throwing away their credit cards, others try to increase their current cashflow. There are tons of ways to save and earn money.
|
Personal financial management is pretty difficult, and everybody has their own approach to it.
|
||||||
|
Some people make budgets, other people limit their cashflow by throwing away their credit cards,
|
||||||
|
others try to increase their current cashflow. There are tons of ways to save and earn money.
|
||||||
|
|
||||||
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
|
Firefly works on the principle that if you know where you're money is going, you can stop it from going there.
|
||||||
|
|
||||||
#### Some advantages of using Firefly
|
### Some advantages of using Firefly
|
||||||
|
|
||||||
- Firefly can import any CSV file, so migrating from other systems is easy.
|
- 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 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.
|
- Firefly has lots of features without being fancy or bloated.
|
||||||
- If you feel you're missing something you can just ask me and I'll add it!
|
- If you feel you're missing something you can just ask me and I'll add it!
|
||||||
|
|
||||||
Firefly is pretty awesome. [You can read more about Firefly III, and its features, on the Github Pages](https://firefly-iii.github.io/).
|
Firefly III has become pretty awesome over the years! (but please excuse me for bragging, it's just that I'm proud of it).
|
||||||
|
[You can read more about Firefly III, and its features, on the Github Pages](https://firefly-iii.github.io/).
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
|
||||||
|
Please read [CONTRIBUTING.md](https://github.com/firefly-iii/firefly-iii/blob/master/.github/CONTRIBUTING.md) for details on contributing, and the process for submitting pull requests. Please check out the [code of conduct](https://github.com/firefly-iii/firefly-iii/blob/master/CODE_OF_CONDUCT.md) as well.
|
||||||
|
|
||||||
|
### Versioning
|
||||||
|
|
||||||
|
We use [SemVer](http://semver.org/) for versioning. For the versions available, see [the tags](https://github.com/firefly-iii/firefly-iii/tags) on this repository.
|
||||||
|
|
||||||
|
### Authors
|
||||||
|
|
||||||
|
* James Cole
|
||||||
|
* Over time, [many people have contributed to Firefly III](https://github.com/firefly-iii/firefly-iii/graphs/contributors).
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
This work [is licensed](https://github.com/firefly-iii/firefly-iii/blob/master/LICENSE) under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
||||||
|
|
||||||
|
### Other stuff
|
||||||
|
|
||||||
If you like Firefly and if it helps you save lots of money, why not send me [a dime for every dollar saved](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA) (this is a joke, although the Paypal form works just fine, try it!)
|
If you like Firefly and if it helps you save lots of money, why not send me [a dime for every dollar saved](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA) (this is a joke, although the Paypal form works just fine, try it!)
|
||||||
|
|
||||||
If you want to contact me, please open an issue or [email me](mailto:thegrumpydictator@gmail.com).
|
If you want to contact me, please open an issue or [email me](mailto:thegrumpydictator@gmail.com).
|
||||||
|
|
||||||
|
[](https://travis-ci.org/firefly-iii/firefly-iii) [](https://scrutinizer-ci.com/g/firefly-iii/firefly-iii/?branch=master) [](https://coveralls.io/github/firefly-iii/firefly-iii?branch=master)
|
||||||
|
|||||||
59
app.json
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"name": "Firefly III",
|
||||||
|
"description": "A free and open source personal finances manager",
|
||||||
|
"repository": "https://github.com/firefly-iii/firefly-iii",
|
||||||
|
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/master/public/mstile-150x150.png",
|
||||||
|
"keywords": [
|
||||||
|
"finance",
|
||||||
|
"finances",
|
||||||
|
"manager",
|
||||||
|
"management",
|
||||||
|
"euro",
|
||||||
|
"dollar",
|
||||||
|
"laravel",
|
||||||
|
"money",
|
||||||
|
"currency",
|
||||||
|
"financials",
|
||||||
|
"financial",
|
||||||
|
"budgets",
|
||||||
|
"administration",
|
||||||
|
"tool",
|
||||||
|
"tooling",
|
||||||
|
"help",
|
||||||
|
"helper",
|
||||||
|
"assistant",
|
||||||
|
"planning",
|
||||||
|
"organizing",
|
||||||
|
"bills",
|
||||||
|
"personal finance",
|
||||||
|
"budgets",
|
||||||
|
"budgeting",
|
||||||
|
"budgeting tool",
|
||||||
|
"budgeting application",
|
||||||
|
"transactions",
|
||||||
|
"self hosted",
|
||||||
|
"self-hosted",
|
||||||
|
"transfers",
|
||||||
|
"management"
|
||||||
|
],
|
||||||
|
"website": "https://firefly-iii.github.io/",
|
||||||
|
"addons": [
|
||||||
|
{
|
||||||
|
"plan": "heroku-postgresql"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"postdeploy": "export APP_KEY=$(php artisan --no-ansi key:generate --show)"
|
||||||
|
},
|
||||||
|
"buildpacks": [
|
||||||
|
{
|
||||||
|
"url": "heroku/php"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"APP_KEY": {
|
||||||
|
"description": "This key is used to encrypt your data.",
|
||||||
|
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* ConfigureLogging.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Bootstrap;
|
|
||||||
|
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use Illuminate\Foundation\Bootstrap\ConfigureLogging as IlluminateConfigureLogging;
|
|
||||||
use Illuminate\Log\Writer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class ConfigureLogging
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Bootstrap
|
|
||||||
*/
|
|
||||||
class ConfigureLogging extends IlluminateConfigureLogging
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configure the Monolog handlers for the application.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Contracts\Foundation\Application $app
|
|
||||||
* @param \Illuminate\Log\Writer $log
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function configureDailyHandler(Application $app, Writer $log)
|
|
||||||
{
|
|
||||||
$config = $app->make('config');
|
|
||||||
|
|
||||||
$maxFiles = $config->get('app.log_max_files');
|
|
||||||
|
|
||||||
$log->useDailyFiles(
|
|
||||||
$app->storagePath() . '/logs/firefly-iii.log', is_null($maxFiles) ? 5 : $maxFiles,
|
|
||||||
$config->get('app.log_level', 'debug')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Configure the Monolog handlers for the application.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Contracts\Foundation\Application $app
|
|
||||||
* @param \Illuminate\Log\Writer $log
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function configureSingleHandler(Application $app, Writer $log)
|
|
||||||
{
|
|
||||||
$log->useFiles(
|
|
||||||
$app->storagePath() . '/logs/firefly-iii.log',
|
|
||||||
$app->make('config')->get('app.log_level', 'debug')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
143
app/Console/Commands/CreateExport.php
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* CreateExport.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use FireflyIII\Export\ProcessorInterface;
|
||||||
|
use FireflyIII\Models\AccountType;
|
||||||
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Storage;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class CreateExport
|
||||||
|
*
|
||||||
|
* Generates export from the command line.
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Console\Commands
|
||||||
|
*/
|
||||||
|
class CreateExport extends Command
|
||||||
|
{
|
||||||
|
use VerifiesAccessToken;
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Use this command to create a new import. Your user ID can be found on the /profile page.';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature
|
||||||
|
= 'firefly:create-export
|
||||||
|
{--user= : The user ID that the import should import for.}
|
||||||
|
{--token= : The user\'s access token.}
|
||||||
|
{--with_attachments : Include user\'s attachments?}
|
||||||
|
{--with_uploads : Include user\'s uploads?}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five its fine.
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
if (!$this->verifyAccessToken()) {
|
||||||
|
$this->error('Invalid access token.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->line('Full export is running...');
|
||||||
|
// make repositories
|
||||||
|
/** @var UserRepositoryInterface $userRepository */
|
||||||
|
$userRepository = app(UserRepositoryInterface::class);
|
||||||
|
/** @var ExportJobRepositoryInterface $jobRepository */
|
||||||
|
$jobRepository = app(ExportJobRepositoryInterface::class);
|
||||||
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
|
$accountRepository = app(AccountRepositoryInterface::class);
|
||||||
|
/** @var JournalRepositoryInterface $journalRepository */
|
||||||
|
$journalRepository = app(JournalRepositoryInterface::class);
|
||||||
|
|
||||||
|
// set user
|
||||||
|
$user = $userRepository->find(intval($this->option('user')));
|
||||||
|
$jobRepository->setUser($user);
|
||||||
|
$journalRepository->setUser($user);
|
||||||
|
$accountRepository->setUser($user);
|
||||||
|
|
||||||
|
// first date
|
||||||
|
$firstJournal = $journalRepository->first();
|
||||||
|
$first = new Carbon;
|
||||||
|
if (!is_null($firstJournal->id)) {
|
||||||
|
$first = $firstJournal->date;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create job and settings.
|
||||||
|
$job = $jobRepository->create();
|
||||||
|
$settings = [
|
||||||
|
'accounts' => $accountRepository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]),
|
||||||
|
'startDate' => $first,
|
||||||
|
'endDate' => new Carbon,
|
||||||
|
'exportFormat' => 'csv',
|
||||||
|
'includeAttachments' => $this->option('with_attachments'),
|
||||||
|
'includeOldUploads' => $this->option('with_uploads'),
|
||||||
|
'job' => $job,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/** @var ProcessorInterface $processor */
|
||||||
|
$processor = app(ProcessorInterface::class);
|
||||||
|
$processor->setSettings($settings);
|
||||||
|
|
||||||
|
$processor->collectJournals();
|
||||||
|
$processor->convertJournals();
|
||||||
|
$processor->exportJournals();
|
||||||
|
if ($settings['includeAttachments']) {
|
||||||
|
$processor->collectAttachments();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($settings['includeOldUploads']) {
|
||||||
|
$processor->collectOldUploads();
|
||||||
|
}
|
||||||
|
|
||||||
|
$processor->createZipFile();
|
||||||
|
$disk = Storage::disk('export');
|
||||||
|
$fileName = sprintf('export-%s.zip', date('Y-m-d_H-i-s'));
|
||||||
|
$disk->move($job->key . '.zip', $fileName);
|
||||||
|
|
||||||
|
$this->line('The export has finished! You can find the ZIP file in this location:');
|
||||||
|
$this->line(storage_path(sprintf('export/%s', $fileName)));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,10 +14,14 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Console\Commands;
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
use Artisan;
|
use Artisan;
|
||||||
|
use FireflyIII\Import\Logging\CommandHandler;
|
||||||
|
use FireflyIII\Import\Routine\ImportRoutine;
|
||||||
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\MessageBag;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Monolog\Formatter\LineFormatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class CreateImport
|
* Class CreateImport
|
||||||
@@ -26,6 +30,7 @@ use Log;
|
|||||||
*/
|
*/
|
||||||
class CreateImport extends Command
|
class CreateImport extends Command
|
||||||
{
|
{
|
||||||
|
use VerifiesAccessToken;
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
*
|
*
|
||||||
@@ -38,7 +43,14 @@ class CreateImport extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'firefly:create-import {file} {configuration} {--user=1} {--type=csv} {--start}';
|
protected $signature
|
||||||
|
= 'firefly:create-import
|
||||||
|
{file : The file to import.}
|
||||||
|
{configuration : The configuration file to use for the import/}
|
||||||
|
{--type=csv : The file type of the import.}
|
||||||
|
{--user= : The user ID that the import should import for.}
|
||||||
|
{--token= : The user\'s access token.}
|
||||||
|
{--start : Starts the job immediately.}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
* Create a new command instance.
|
||||||
@@ -50,10 +62,18 @@ class CreateImport extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Run the command.
|
||||||
|
*
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) // cannot be helped
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) // cannot be helped
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
if (!$this->verifyAccessToken()) {
|
||||||
|
$this->error('Invalid access token.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
/** @var UserRepositoryInterface $userRepository */
|
/** @var UserRepositoryInterface $userRepository */
|
||||||
$userRepository = app(UserRepositoryInterface::class);
|
$userRepository = app(UserRepositoryInterface::class);
|
||||||
$file = $this->argument('file');
|
$file = $this->argument('file');
|
||||||
@@ -73,35 +93,63 @@ class CreateImport extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info(sprintf('Going to create a job to import file: %s', $file));
|
$this->line(sprintf('Going to create a job to import file: %s', $file));
|
||||||
$this->info(sprintf('Using configuration file: %s', $configuration));
|
$this->line(sprintf('Using configuration file: %s', $configuration));
|
||||||
$this->info(sprintf('Import into user: #%d (%s)', $user->id, $user->email));
|
$this->line(sprintf('Import into user: #%d (%s)', $user->id, $user->email));
|
||||||
$this->info(sprintf('Type of import: %s', $type));
|
$this->line(sprintf('Type of import: %s', $type));
|
||||||
|
|
||||||
|
|
||||||
/** @var ImportJobRepositoryInterface $jobRepository */
|
/** @var ImportJobRepositoryInterface $jobRepository */
|
||||||
$jobRepository = app(ImportJobRepositoryInterface::class, [$user]);
|
$jobRepository = app(ImportJobRepositoryInterface::class);
|
||||||
|
$jobRepository->setUser($user);
|
||||||
$job = $jobRepository->create($type);
|
$job = $jobRepository->create($type);
|
||||||
$this->line(sprintf('Created job "%s"...', $job->key));
|
$this->line(sprintf('Created job "%s"', $job->key));
|
||||||
|
|
||||||
Artisan::call('firefly:encrypt', ['file' => $file, 'key' => $job->key]);
|
|
||||||
|
Artisan::call('firefly:encrypt-file', ['file' => $file, 'key' => $job->key]);
|
||||||
$this->line('Stored import data...');
|
$this->line('Stored import data...');
|
||||||
|
|
||||||
|
|
||||||
$job->configuration = $configurationData;
|
$job->configuration = $configurationData;
|
||||||
$job->status = 'settings_complete';
|
$job->status = 'configured';
|
||||||
$job->save();
|
$job->save();
|
||||||
$this->line('Stored configuration...');
|
$this->line('Stored configuration...');
|
||||||
|
|
||||||
|
|
||||||
if ($this->option('start') === true) {
|
if ($this->option('start') === true) {
|
||||||
$this->line('The import will start in a moment. This process is not visible...');
|
$this->line('The import will start in a moment. This process is not visible...');
|
||||||
Log::debug('Go for import!');
|
Log::debug('Go for import!');
|
||||||
Artisan::call('firefly:start-import', ['key' => $job->key]);
|
|
||||||
$this->line('Done!');
|
// normally would refer to other firefly:start-import but that doesn't seem to work all to well...
|
||||||
|
$monolog = Log::getMonolog();
|
||||||
|
$handler = new CommandHandler($this);
|
||||||
|
$formatter = new LineFormatter(null, null, false, true);
|
||||||
|
$handler->setFormatter($formatter);
|
||||||
|
$monolog->pushHandler($handler);
|
||||||
|
|
||||||
|
|
||||||
|
// start the actual routine:
|
||||||
|
/** @var ImportRoutine $routine */
|
||||||
|
$routine = app(ImportRoutine::class);
|
||||||
|
$routine->setJob($job);
|
||||||
|
$routine->run();
|
||||||
|
|
||||||
|
// give feedback.
|
||||||
|
/** @var MessageBag $error */
|
||||||
|
foreach ($routine->errors as $index => $error) {
|
||||||
|
$this->error(sprintf('Error importing line #%d: %s', $index, $error));
|
||||||
|
}
|
||||||
|
$this->line(
|
||||||
|
sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->journals->count(), $routine->lines)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Verify user inserts correct arguments.
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly.
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly.
|
||||||
*/
|
*/
|
||||||
@@ -115,12 +163,12 @@ class CreateImport extends Command
|
|||||||
$cwd = getcwd();
|
$cwd = getcwd();
|
||||||
$validTypes = array_keys(config('firefly.import_formats'));
|
$validTypes = array_keys(config('firefly.import_formats'));
|
||||||
$type = strtolower($this->option('type'));
|
$type = strtolower($this->option('type'));
|
||||||
|
|
||||||
if (is_null($user->id)) {
|
if (is_null($user->id)) {
|
||||||
$this->error(sprintf('There is no user with ID %d.', $this->option('user')));
|
$this->error(sprintf('There is no user with ID %d.', $this->option('user')));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($type, $validTypes)) {
|
if (!in_array($type, $validTypes)) {
|
||||||
$this->error(sprintf('Cannot import file of type "%s"', $type));
|
$this->error(sprintf('Cannot import file of type "%s"', $type));
|
||||||
|
|
||||||
|
|||||||
108
app/Console/Commands/DecryptAttachment.php
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* DecryptAttachment.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
|
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class DecryptAttachment
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Console\Commands
|
||||||
|
*/
|
||||||
|
class DecryptAttachment extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Decrypts an attachment and dumps the content in a file in the given directory.';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature
|
||||||
|
= 'firefly:decrypt-attachment {id:The ID of the attachment.} {name:The file name of the attachment.}
|
||||||
|
{directory:Where the file must be stored.}';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five its fine.
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
/** @var AttachmentRepositoryInterface $repository */
|
||||||
|
$repository = app(AttachmentRepositoryInterface::class);
|
||||||
|
$attachmentId = intval($this->argument('id'));
|
||||||
|
$attachment = $repository->findWithoutUser($attachmentId);
|
||||||
|
$attachmentName = trim($this->argument('name'));
|
||||||
|
$storagePath = realpath(trim($this->argument('directory')));
|
||||||
|
if (is_null($attachment->id)) {
|
||||||
|
$this->error(sprintf('No attachment with id #%d', $attachmentId));
|
||||||
|
Log::error(sprintf('DecryptAttachment: No attachment with id #%d', $attachmentId));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($attachmentName !== $attachment->filename) {
|
||||||
|
$this->error('File name does not match.');
|
||||||
|
Log::error('DecryptAttachment: File name does not match.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_dir($storagePath)) {
|
||||||
|
$this->error(sprintf('Path "%s" is not a directory.', $storagePath));
|
||||||
|
Log::error(sprintf('DecryptAttachment: Path "%s" is not a directory.', $storagePath));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_writable($storagePath)) {
|
||||||
|
$this->error(sprintf('Path "%s" is not writable.', $storagePath));
|
||||||
|
Log::error(sprintf('DecryptAttachment: Path "%s" is not writable.', $storagePath));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fullPath = $storagePath . DIRECTORY_SEPARATOR . $attachment->filename;
|
||||||
|
$content = $repository->getContent($attachment);
|
||||||
|
$this->line(sprintf('Going to write content for attachment #%d into file "%s"', $attachment->id, $fullPath));
|
||||||
|
$result = file_put_contents($fullPath, $content);
|
||||||
|
if ($result === false) {
|
||||||
|
$this->error('Could not write to file.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->info(sprintf('%d bytes written. Exiting now..', $result));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,7 +35,7 @@ class EncryptFile extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'firefly:encrypt {file} {key}';
|
protected $signature = 'firefly:encrypt-file {file} {key}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
* Create a new command instance.
|
||||||
|
|||||||
@@ -13,12 +13,11 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Console\Commands;
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
use FireflyIII\Import\ImportProcedure;
|
|
||||||
use FireflyIII\Import\Logging\CommandHandler;
|
use FireflyIII\Import\Logging\CommandHandler;
|
||||||
|
use FireflyIII\Import\Routine\ImportRoutine;
|
||||||
use FireflyIII\Models\ImportJob;
|
use FireflyIII\Models\ImportJob;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\MessageBag;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,13 +51,18 @@ class Import extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Run the import routine.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
Log::debug('Start start-import command');
|
Log::debug('Start start-import command');
|
||||||
$jobKey = $this->argument('key');
|
$jobKey = $this->argument('key');
|
||||||
$job = ImportJob::whereKey($jobKey)->first();
|
$job = ImportJob::where('key', $jobKey)->first();
|
||||||
|
if (is_null($job)) {
|
||||||
|
$this->error(sprintf('No job found with key "%s"', $jobKey));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!$this->isValid($job)) {
|
if (!$this->isValid($job)) {
|
||||||
Log::error('Job is not valid for some reason. Exit.');
|
Log::error('Job is not valid for some reason. Exit.');
|
||||||
|
|
||||||
@@ -70,20 +74,25 @@ class Import extends Command
|
|||||||
$monolog = Log::getMonolog();
|
$monolog = Log::getMonolog();
|
||||||
$handler = new CommandHandler($this);
|
$handler = new CommandHandler($this);
|
||||||
$monolog->pushHandler($handler);
|
$monolog->pushHandler($handler);
|
||||||
$importProcedure = new ImportProcedure;
|
|
||||||
$result = $importProcedure->runImport($job);
|
|
||||||
|
|
||||||
// display result to user:
|
/** @var ImportRoutine $routine */
|
||||||
$this->presentResults($result);
|
$routine = app(ImportRoutine::class);
|
||||||
$this->line('The import has completed.');
|
$routine->setJob($job);
|
||||||
|
$routine->run();
|
||||||
|
|
||||||
// get any errors from the importer:
|
/** @var MessageBag $error */
|
||||||
$this->presentErrors($job);
|
foreach ($routine->errors as $index => $error) {
|
||||||
|
$this->error(sprintf('Error importing line #%d: %s', $index, $error));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->line(sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->journals->count(), $routine->lines));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Check if job is valid to be imported.
|
||||||
|
*
|
||||||
* @param ImportJob $job
|
* @param ImportJob $job
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -91,12 +100,14 @@ class Import extends Command
|
|||||||
private function isValid(ImportJob $job): bool
|
private function isValid(ImportJob $job): bool
|
||||||
{
|
{
|
||||||
if (is_null($job)) {
|
if (is_null($job)) {
|
||||||
|
Log::error('This job does not seem to exist.');
|
||||||
$this->error('This job does not seem to exist.');
|
$this->error('This job does not seem to exist.');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($job->status != 'settings_complete') {
|
if ($job->status !== 'configured') {
|
||||||
|
Log::error(sprintf('This job is not ready to be imported (status is %s).', $job->status));
|
||||||
$this->error('This job is not ready to be imported.');
|
$this->error('This job is not ready to be imported.');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -104,36 +115,4 @@ class Import extends Command
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ImportJob $job
|
|
||||||
*/
|
|
||||||
private function presentErrors(ImportJob $job)
|
|
||||||
{
|
|
||||||
$extendedStatus = $job->extended_status;
|
|
||||||
if (isset($extendedStatus['errors']) && count($extendedStatus['errors']) > 0) {
|
|
||||||
$this->line(sprintf('The following %d error(s) occured during the import:', count($extendedStatus['errors'])));
|
|
||||||
foreach ($extendedStatus['errors'] as $error) {
|
|
||||||
$this->error($error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Collection $result
|
|
||||||
*/
|
|
||||||
private function presentResults(Collection $result)
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var int $index
|
|
||||||
* @var TransactionJournal $journal
|
|
||||||
*/
|
|
||||||
foreach ($result as $index => $journal) {
|
|
||||||
if (!is_null($journal->id)) {
|
|
||||||
$this->line(sprintf('Line #%d has been imported as transaction #%d.', $index, $journal->id));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$this->error(sprintf('Could not store line #%d', $index));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* MoveRepository.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Console\Commands;
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class MoveRepository
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Console\Commands
|
|
||||||
*/
|
|
||||||
class MoveRepository extends Command
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The console command description.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $description = 'Alerts the user that the Github repository will move, if they are interested to know this.';
|
|
||||||
/**
|
|
||||||
* The name and signature of the console command.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $signature = 'firefly:github-move';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new command instance.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the console command.
|
|
||||||
*/
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
$moveDate = new Carbon('2017-01-01');
|
|
||||||
$final = new Carbon('2017-03-01');
|
|
||||||
$now = new Carbon;
|
|
||||||
|
|
||||||
// display message before 2017-01-01
|
|
||||||
if ($moveDate > $now) {
|
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
|
||||||
$this->line('');
|
|
||||||
$this->line('The Github repository for Firefly III will MOVE');
|
|
||||||
$this->line('This move will be on January 1st 2017');
|
|
||||||
$this->line('');
|
|
||||||
$this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
|
|
||||||
$this->line('');
|
|
||||||
$this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
|
|
||||||
$this->line('');
|
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
|
||||||
}
|
|
||||||
|
|
||||||
// display message after 2017-01-01 but before 2017-03-01
|
|
||||||
if ($moveDate <= $now && $now <= $final) {
|
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
|
||||||
$this->line('');
|
|
||||||
$this->line('The Github repository for Firefly III has MOVED');
|
|
||||||
$this->line('This move was on January 1st 2017!');
|
|
||||||
$this->line('');
|
|
||||||
$this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
|
|
||||||
$this->line('');
|
|
||||||
$this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
|
|
||||||
$this->line('');
|
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,18 +15,32 @@ namespace FireflyIII\Console\Commands;
|
|||||||
|
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
|
use FireflyIII\Models\Account;
|
||||||
|
use FireflyIII\Models\AccountMeta;
|
||||||
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\BudgetLimit;
|
use FireflyIII\Models\BudgetLimit;
|
||||||
use FireflyIII\Models\LimitRepetition;
|
use FireflyIII\Models\LimitRepetition;
|
||||||
|
use FireflyIII\Models\Note;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
use FireflyIII\Models\TransactionJournalMeta;
|
||||||
|
use FireflyIII\Models\TransactionType;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Database\QueryException;
|
use Illuminate\Database\QueryException;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use Preferences;
|
||||||
use Schema;
|
use Schema;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UpgradeDatabase
|
* Class UpgradeDatabase
|
||||||
*
|
*
|
||||||
|
* Upgrade user database.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) // it just touches a lot of things.
|
||||||
* @package FireflyIII\Console\Commands
|
* @package FireflyIII\Console\Commands
|
||||||
*/
|
*/
|
||||||
class UpgradeDatabase extends Command
|
class UpgradeDatabase extends Command
|
||||||
@@ -60,19 +74,28 @@ class UpgradeDatabase extends Command
|
|||||||
{
|
{
|
||||||
$this->setTransactionIdentifier();
|
$this->setTransactionIdentifier();
|
||||||
$this->migrateRepetitions();
|
$this->migrateRepetitions();
|
||||||
|
$this->updateAccountCurrencies();
|
||||||
|
$this->line('Updating currency information..');
|
||||||
|
$this->updateTransferCurrencies();
|
||||||
|
$this->updateOtherCurrencies();
|
||||||
|
$this->line('Done updating currency information..');
|
||||||
|
$this->migrateNotes();
|
||||||
|
$this->info('Firefly III database is up to date.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function migrateRepetitions()
|
/**
|
||||||
|
* Migrate budget repetitions to new format where the end date is in the budget limit as well,
|
||||||
|
* making the limit_repetition table obsolete.
|
||||||
|
*/
|
||||||
|
public function migrateRepetitions(): void
|
||||||
{
|
{
|
||||||
if (!Schema::hasTable('budget_limits')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// get all budget limits with end_date NULL
|
|
||||||
$set = BudgetLimit::whereNull('end_date')->get();
|
$set = BudgetLimit::whereNull('end_date')->get();
|
||||||
$this->line(sprintf('Found %d budget limit(s) to update', $set->count()));
|
|
||||||
/** @var BudgetLimit $budgetLimit */
|
/** @var BudgetLimit $budgetLimit */
|
||||||
foreach ($set as $budgetLimit) {
|
foreach ($set as $budgetLimit) {
|
||||||
// get limit repetition (should be just one):
|
|
||||||
/** @var LimitRepetition $repetition */
|
/** @var LimitRepetition $repetition */
|
||||||
$repetition = $budgetLimit->limitrepetitions()->first();
|
$repetition = $budgetLimit->limitrepetitions()->first();
|
||||||
if (!is_null($repetition)) {
|
if (!is_null($repetition)) {
|
||||||
@@ -82,25 +105,30 @@ class UpgradeDatabase extends Command
|
|||||||
$repetition->delete();
|
$repetition->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is strangely complex, because the HAVING modifier is a no-no. And subqueries in Laravel are weird.
|
* This method gives all transactions which are part of a split journal (so more than 2) a sort of "order" so they are easier
|
||||||
|
* to easier to match to their counterpart. When a journal is split, it has two or three transactions: -3, -4 and -5 for example.
|
||||||
|
*
|
||||||
|
* In the database this is reflected as 6 transactions: -3/+3, -4/+4, -5/+5.
|
||||||
|
*
|
||||||
|
* When either of these are the same amount, FF3 can't keep them apart: +3/-3, +3/-3, +3/-3. This happens more often than you would
|
||||||
|
* think. So each set gets a number (1,2,3) to keep them apart.
|
||||||
*/
|
*/
|
||||||
private function setTransactionIdentifier()
|
public function setTransactionIdentifier(): void
|
||||||
{
|
{
|
||||||
// if table does not exist, return false
|
// if table does not exist, return false
|
||||||
if (!Schema::hasTable('transaction_journals')) {
|
if (!Schema::hasTable('transaction_journals')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
$subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||||
->whereNull('transaction_journals.deleted_at')
|
->whereNull('transaction_journals.deleted_at')
|
||||||
->whereNull('transactions.deleted_at')
|
->whereNull('transactions.deleted_at')
|
||||||
->groupBy(['transaction_journals.id'])
|
->groupBy(['transaction_journals.id'])
|
||||||
->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]);
|
->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]);
|
||||||
|
|
||||||
$result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived'))
|
$result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived'))
|
||||||
->mergeBindings($subQuery->getQuery())
|
->mergeBindings($subQuery->getQuery())
|
||||||
->where('t_count', '>', 2)
|
->where('t_count', '>', 2)
|
||||||
@@ -108,8 +136,203 @@ class UpgradeDatabase extends Command
|
|||||||
$journalIds = array_unique($result->pluck('id')->toArray());
|
$journalIds = array_unique($result->pluck('id')->toArray());
|
||||||
|
|
||||||
foreach ($journalIds as $journalId) {
|
foreach ($journalIds as $journalId) {
|
||||||
$this->updateJournal(intval($journalId));
|
$this->updateJournalidentifiers(intval($journalId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's seven but it can't really be helped.
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
|
public function updateAccountCurrencies(): void
|
||||||
|
{
|
||||||
|
$accounts = Account::leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||||
|
->whereIn('account_types.type', [AccountType::DEFAULT, AccountType::ASSET])->get(['accounts.*']);
|
||||||
|
|
||||||
|
$accounts->each(
|
||||||
|
function (Account $account) {
|
||||||
|
// get users preference, fall back to system pref.
|
||||||
|
$defaultCurrencyCode = Preferences::getForUser($account->user, 'currencyPreference', config('firefly.default_currency', 'EUR'))->data;
|
||||||
|
$defaultCurrency = TransactionCurrency::where('code', $defaultCurrencyCode)->first();
|
||||||
|
$accountCurrency = intval($account->getMeta('currency_id'));
|
||||||
|
$openingBalance = $account->getOpeningBalance();
|
||||||
|
$obCurrency = intval($openingBalance->transaction_currency_id);
|
||||||
|
|
||||||
|
// both 0? set to default currency:
|
||||||
|
if ($accountCurrency === 0 && $obCurrency === 0) {
|
||||||
|
AccountMeta::create(['account_id' => $account->id, 'name' => 'currency_id', 'data' => $defaultCurrency->id]);
|
||||||
|
$this->line(sprintf('Account #%d ("%s") now has a currency setting (%s).', $account->id, $account->name, $defaultCurrencyCode));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// account is set to 0, opening balance is not?
|
||||||
|
if ($accountCurrency === 0 && $obCurrency > 0) {
|
||||||
|
AccountMeta::create(['account_id' => $account->id, 'name' => 'currency_id', 'data' => $obCurrency]);
|
||||||
|
$this->line(sprintf('Account #%d ("%s") now has a currency setting (%s).', $account->id, $account->name, $defaultCurrencyCode));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// do not match and opening balance id is not null.
|
||||||
|
if ($accountCurrency !== $obCurrency && $openingBalance->id > 0) {
|
||||||
|
// update opening balance:
|
||||||
|
$openingBalance->transaction_currency_id = $accountCurrency;
|
||||||
|
$openingBalance->save();
|
||||||
|
$this->line(sprintf('Account #%d ("%s") now has a correct currency for opening balance.', $account->id, $account->name));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine verifies that withdrawals, deposits and opening balances have the correct currency settings for
|
||||||
|
* the accounts they are linked to.
|
||||||
|
*
|
||||||
|
* Both source and destination must match the respective currency preference of the related asset account.
|
||||||
|
* So FF3 must verify all transactions.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
|
public function updateOtherCurrencies(): void
|
||||||
|
{
|
||||||
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
$set = TransactionJournal
|
||||||
|
::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||||
|
->whereIn('transaction_types.type', [TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::OPENING_BALANCE])
|
||||||
|
->get(['transaction_journals.*']);
|
||||||
|
|
||||||
|
$set->each(
|
||||||
|
function (TransactionJournal $journal) use ($repository) {
|
||||||
|
// get the transaction with the asset account in it:
|
||||||
|
/** @var Transaction $transaction */
|
||||||
|
$transaction = $journal->transactions()
|
||||||
|
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||||
|
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||||
|
->whereIn('account_types.type', [AccountType::DEFAULT, AccountType::ASSET])->first(['transactions.*']);
|
||||||
|
if (is_null($transaction)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/** @var Account $account */
|
||||||
|
$account = $transaction->account;
|
||||||
|
$currency = $repository->find(intval($account->getMeta('currency_id')));
|
||||||
|
$transactions = $journal->transactions()->get();
|
||||||
|
$transactions->each(
|
||||||
|
function (Transaction $transaction) use ($currency) {
|
||||||
|
if (is_null($transaction->transaction_currency_id)) {
|
||||||
|
$transaction->transaction_currency_id = $currency->id;
|
||||||
|
$transaction->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// when mismatch in transaction:
|
||||||
|
if ($transaction->transaction_currency_id !== $currency->id) {
|
||||||
|
$transaction->foreign_currency_id = $transaction->transaction_currency_id;
|
||||||
|
$transaction->foreign_amount = $transaction->amount;
|
||||||
|
$transaction->transaction_currency_id = $currency->id;
|
||||||
|
$transaction->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// also update the journal, of course:
|
||||||
|
$journal->transaction_currency_id = $currency->id;
|
||||||
|
$journal->save();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine verifies that transfers have the correct currency settings for the accounts they are linked to.
|
||||||
|
* For transfers, this is can be a destructive routine since we FORCE them into a currency setting whether they
|
||||||
|
* like it or not. Previous routines MUST have set the currency setting for both accounts for this to work.
|
||||||
|
*
|
||||||
|
* A transfer always has the
|
||||||
|
*
|
||||||
|
* Both source and destination must match the respective currency preference. So FF3 must verify ALL
|
||||||
|
* transactions.
|
||||||
|
*/
|
||||||
|
public function updateTransferCurrencies()
|
||||||
|
{
|
||||||
|
$set = TransactionJournal
|
||||||
|
::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||||
|
->where('transaction_types.type', TransactionType::TRANSFER)
|
||||||
|
->get(['transaction_journals.*']);
|
||||||
|
|
||||||
|
$set->each(
|
||||||
|
function (TransactionJournal $transfer) {
|
||||||
|
// select all "source" transactions:
|
||||||
|
/** @var Collection $transactions */
|
||||||
|
$transactions = $transfer->transactions()->where('amount', '<', 0)->get();
|
||||||
|
$transactions->each(
|
||||||
|
function (Transaction $transaction) {
|
||||||
|
$this->updateTransactionCurrency($transaction);
|
||||||
|
$this->updateJournalCurrency($transaction);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move all the journal_meta notes to their note object counter parts.
|
||||||
|
*/
|
||||||
|
private function migrateNotes(): void
|
||||||
|
{
|
||||||
|
$set = TransactionJournalMeta::whereName('notes')->get();
|
||||||
|
/** @var TransactionJournalMeta $meta */
|
||||||
|
foreach ($set as $meta) {
|
||||||
|
$journal = $meta->transactionJournal;
|
||||||
|
$note = $journal->notes()->first();
|
||||||
|
if (is_null($note)) {
|
||||||
|
$note = new Note;
|
||||||
|
$note->noteable()->associate($journal);
|
||||||
|
}
|
||||||
|
|
||||||
|
$note->text = $meta->data;
|
||||||
|
$note->save();
|
||||||
|
Log::debug(sprintf('Migrated meta note #%d to Note #%d', $meta->id, $note->id));
|
||||||
|
$meta->delete();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method makes sure that the transaction journal uses the currency given in the transaction.
|
||||||
|
*
|
||||||
|
* @param Transaction $transaction
|
||||||
|
*/
|
||||||
|
private function updateJournalCurrency(Transaction $transaction): void
|
||||||
|
{
|
||||||
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
$currency = $repository->find(intval($transaction->account->getMeta('currency_id')));
|
||||||
|
$journal = $transaction->transactionJournal;
|
||||||
|
|
||||||
|
if (!(intval($currency->id) === intval($journal->transaction_currency_id))) {
|
||||||
|
$this->line(
|
||||||
|
sprintf(
|
||||||
|
'Transfer #%d ("%s") has been updated to use %s instead of %s.', $journal->id, $journal->description, $currency->code,
|
||||||
|
$journal->transactionCurrency->code
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$journal->transaction_currency_id = $currency->id;
|
||||||
|
$journal->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -118,7 +341,7 @@ class UpgradeDatabase extends Command
|
|||||||
*
|
*
|
||||||
* @param int $journalId
|
* @param int $journalId
|
||||||
*/
|
*/
|
||||||
private function updateJournal(int $journalId)
|
private function updateJournalidentifiers(int $journalId): void
|
||||||
{
|
{
|
||||||
$identifier = 0;
|
$identifier = 0;
|
||||||
$processed = [];
|
$processed = [];
|
||||||
@@ -146,14 +369,134 @@ class UpgradeDatabase extends Command
|
|||||||
if (!is_null($opposing)) {
|
if (!is_null($opposing)) {
|
||||||
// give both a new identifier:
|
// give both a new identifier:
|
||||||
$transaction->identifier = $identifier;
|
$transaction->identifier = $identifier;
|
||||||
$transaction->save();
|
|
||||||
$opposing->identifier = $identifier;
|
$opposing->identifier = $identifier;
|
||||||
|
$transaction->save();
|
||||||
$opposing->save();
|
$opposing->save();
|
||||||
$processed[] = $transaction->id;
|
$processed[] = $transaction->id;
|
||||||
$processed[] = $opposing->id;
|
$processed[] = $opposing->id;
|
||||||
$this->line(sprintf('Database upgrade for journal #%d, transactions #%d and #%d', $journalId, $transaction->id, $opposing->id));
|
|
||||||
}
|
}
|
||||||
$identifier++;
|
$identifier++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method makes sure that the tranaction uses the same currency as the source account does.
|
||||||
|
* If not, the currency is updated to include a reference to its original currency as the "foreign" currency.
|
||||||
|
*
|
||||||
|
* The transaction that is sent to this function MUST be the source transaction (amount negative).
|
||||||
|
*
|
||||||
|
* Method is long and complex bit I'm taking it for granted.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
* @SuppressWarnings(PHPMD.NPathComplexity)
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
|
*
|
||||||
|
* @param Transaction $transaction
|
||||||
|
*/
|
||||||
|
private function updateTransactionCurrency(Transaction $transaction): void
|
||||||
|
{
|
||||||
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
$currency = $repository->find(intval($transaction->account->getMeta('currency_id')));
|
||||||
|
|
||||||
|
// has no currency ID? Must have, so fill in using account preference:
|
||||||
|
if (is_null($transaction->transaction_currency_id)) {
|
||||||
|
$transaction->transaction_currency_id = $currency->id;
|
||||||
|
Log::debug(sprintf('Transaction #%d has no currency setting, now set to %s', $transaction->id, $currency->code));
|
||||||
|
$transaction->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// does not match the source account (see above)? Can be fixed
|
||||||
|
// when mismatch in transaction and NO foreign amount is set:
|
||||||
|
if ($transaction->transaction_currency_id !== $currency->id && is_null($transaction->foreign_amount)) {
|
||||||
|
Log::debug(
|
||||||
|
sprintf(
|
||||||
|
'Transaction #%d has a currency setting (#%d) that should be #%d. Amount remains %s, currency is changed.', $transaction->id,
|
||||||
|
$transaction->transaction_currency_id, $currency->id, $transaction->amount
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$transaction->transaction_currency_id = $currency->id;
|
||||||
|
$transaction->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// grab opposing transaction:
|
||||||
|
/** @var TransactionJournal $journal */
|
||||||
|
$journal = $transaction->transactionJournal;
|
||||||
|
/** @var Transaction $opposing */
|
||||||
|
$opposing = $journal->transactions()->where('amount', '>', 0)->where('identifier', $transaction->identifier)->first();
|
||||||
|
$opposingCurrency = $repository->find(intval($opposing->account->getMeta('currency_id')));
|
||||||
|
|
||||||
|
if (is_null($opposingCurrency->id)) {
|
||||||
|
Log::error(sprintf('Account #%d ("%s") must have currency preference but has none.', $opposing->account->id, $opposing->account->name));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the destination account currency is the same, both foreign_amount and foreign_currency_id must be NULL for both transactions:
|
||||||
|
if ($opposingCurrency->id === $currency->id) {
|
||||||
|
// update both transactions to match:
|
||||||
|
$transaction->foreign_amount = null;
|
||||||
|
$transaction->foreign_currency_id = null;
|
||||||
|
$opposing->foreign_amount = null;
|
||||||
|
$opposing->foreign_currency_id = null;
|
||||||
|
$opposing->transaction_currency_id = $currency->id;
|
||||||
|
$transaction->save();
|
||||||
|
$opposing->save();
|
||||||
|
Log::debug(sprintf('Cleaned up transaction #%d and #%d', $transaction->id, $opposing->id));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if destination account currency is different, both transactions must have this currency as foreign currency id.
|
||||||
|
if ($opposingCurrency->id !== $currency->id) {
|
||||||
|
$transaction->foreign_currency_id = $opposingCurrency->id;
|
||||||
|
$opposing->foreign_currency_id = $opposingCurrency->id;
|
||||||
|
$transaction->save();
|
||||||
|
$opposing->save();
|
||||||
|
Log::debug(sprintf('Verified foreign currency ID of transaction #%d and #%d', $transaction->id, $opposing->id));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if foreign amount of one is null and the other is not, use this to restore:
|
||||||
|
if (is_null($transaction->foreign_amount) && !is_null($opposing->foreign_amount)) {
|
||||||
|
$transaction->foreign_amount = bcmul(strval($opposing->foreign_amount), '-1');
|
||||||
|
$transaction->save();
|
||||||
|
Log::debug(sprintf('Restored foreign amount of transaction (1) #%d to %s', $transaction->id, $transaction->foreign_amount));
|
||||||
|
}
|
||||||
|
|
||||||
|
// if foreign amount of one is null and the other is not, use this to restore (other way around)
|
||||||
|
if (is_null($opposing->foreign_amount) && !is_null($transaction->foreign_amount)) {
|
||||||
|
$opposing->foreign_amount = bcmul(strval($transaction->foreign_amount), '-1');
|
||||||
|
$opposing->save();
|
||||||
|
Log::debug(sprintf('Restored foreign amount of transaction (2) #%d to %s', $opposing->id, $opposing->foreign_amount));
|
||||||
|
}
|
||||||
|
|
||||||
|
// when both are zero, try to grab it from journal:
|
||||||
|
if (is_null($opposing->foreign_amount) && is_null($transaction->foreign_amount)) {
|
||||||
|
|
||||||
|
$foreignAmount = $journal->getMeta('foreign_amount');
|
||||||
|
if (is_null($foreignAmount)) {
|
||||||
|
Log::debug(sprintf('Journal #%d has missing foreign currency data, forced to do 1:1 conversion :(.', $transaction->transaction_journal_id));
|
||||||
|
$transaction->foreign_amount = bcmul(strval($transaction->amount), '-1');
|
||||||
|
$opposing->foreign_amount = bcmul(strval($opposing->amount), '-1');
|
||||||
|
$transaction->save();
|
||||||
|
$opposing->save();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$foreignPositive = app('steam')->positive(strval($foreignAmount));
|
||||||
|
Log::debug(
|
||||||
|
sprintf(
|
||||||
|
'Journal #%d has missing foreign currency info, try to restore from meta-data ("%s").', $transaction->transaction_journal_id, $foreignAmount
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$transaction->foreign_amount = bcmul($foreignPositive, '-1');
|
||||||
|
$opposing->foreign_amount = $foreignPositive;
|
||||||
|
$transaction->save();
|
||||||
|
$opposing->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class UpgradeFireflyInstructions extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'firefly:upgrade-instructions';
|
protected $signature = 'firefly:instructions {task}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
* Create a new command instance.
|
||||||
@@ -49,11 +49,50 @@ class UpgradeFireflyInstructions extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
//
|
|
||||||
|
if ($this->argument('task') === 'update') {
|
||||||
|
$this->updateInstructions();
|
||||||
|
}
|
||||||
|
if ($this->argument('task') === 'install') {
|
||||||
|
$this->installInstructions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show a nice box
|
||||||
|
*
|
||||||
|
* @param string $text
|
||||||
|
*/
|
||||||
|
private function boxed(string $text)
|
||||||
|
{
|
||||||
|
$parts = explode("\n", wordwrap($text));
|
||||||
|
foreach ($parts as $string) {
|
||||||
|
$this->line('| ' . sprintf('%-77s', $string) . '|');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show a nice info box
|
||||||
|
*
|
||||||
|
* @param string $text
|
||||||
|
*/
|
||||||
|
private function boxedInfo(string $text)
|
||||||
|
{
|
||||||
|
$parts = explode("\n", wordwrap($text));
|
||||||
|
foreach ($parts as $string) {
|
||||||
|
$this->info('| ' . sprintf('%-77s', $string) . '|');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render instructions.
|
||||||
|
*/
|
||||||
|
private function installInstructions()
|
||||||
|
{
|
||||||
/** @var string $version */
|
/** @var string $version */
|
||||||
$version = config('firefly.version');
|
$version = config('firefly.version');
|
||||||
$config = config('upgrade.text');
|
$config = config('upgrade.text.install');
|
||||||
$text = null;
|
$text = '';
|
||||||
foreach (array_keys($config) as $compare) {
|
foreach (array_keys($config) as $compare) {
|
||||||
// if string starts with:
|
// if string starts with:
|
||||||
$len = strlen($compare);
|
$len = strlen($compare);
|
||||||
@@ -62,22 +101,72 @@ class UpgradeFireflyInstructions extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$this->showLine();
|
||||||
|
$this->boxed('');
|
||||||
if (is_null($text)) {
|
if (is_null($text)) {
|
||||||
$this->line(sprintf('Thank you for installing Firefly III, v%s', $version));
|
|
||||||
$this->info('There are no extra upgrade instructions.');
|
$this->boxed(sprintf('Thank you for installing Firefly III, v%s!', $version));
|
||||||
$this->line('Firefly III should be ready for use.');
|
$this->boxedInfo('There are no extra installation instructions.');
|
||||||
|
$this->boxed('Firefly III should be ready for use.');
|
||||||
|
$this->boxed('');
|
||||||
|
$this->showLine();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
$this->boxed(sprintf('Thank you for installing Firefly III, v%s!', $version));
|
||||||
$this->line('');
|
$this->boxedInfo($text);
|
||||||
$this->line(sprintf('Thank you for installing Firefly III, v%s', $version));
|
$this->boxed('');
|
||||||
$this->info(wordwrap($text));
|
$this->showLine();
|
||||||
$this->line('');
|
}
|
||||||
$this->line('+------------------------------------------------------------------------------+');
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show a line
|
||||||
|
*/
|
||||||
|
private function showLine()
|
||||||
|
{
|
||||||
|
$line = '+';
|
||||||
|
for ($i = 0; $i < 78; $i++) {
|
||||||
|
$line .= '-';
|
||||||
|
}
|
||||||
|
$line .= '+';
|
||||||
|
$this->line($line);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render upgrade instructions.
|
||||||
|
*/
|
||||||
|
private function updateInstructions()
|
||||||
|
{
|
||||||
|
/** @var string $version */
|
||||||
|
$version = config('firefly.version');
|
||||||
|
$config = config('upgrade.text.upgrade');
|
||||||
|
$text = '';
|
||||||
|
foreach (array_keys($config) as $compare) {
|
||||||
|
// if string starts with:
|
||||||
|
$len = strlen($compare);
|
||||||
|
if (substr($version, 0, $len) === $compare) {
|
||||||
|
$text = $config[$compare];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$this->showLine();
|
||||||
|
$this->boxed('');
|
||||||
|
if (is_null($text)) {
|
||||||
|
|
||||||
|
$this->boxed(sprintf('Thank you for updating to Firefly III, v%s', $version));
|
||||||
|
$this->boxedInfo('There are no extra upgrade instructions.');
|
||||||
|
$this->boxed('Firefly III should be ready for use.');
|
||||||
|
$this->boxed('');
|
||||||
|
$this->showLine();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->boxed(sprintf('Thank you for updating to Firefly III, v%s!', $version));
|
||||||
|
$this->boxedInfo($text);
|
||||||
|
$this->boxed('');
|
||||||
|
$this->showLine();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
91
app/Console/Commands/UseEncryption.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UseEncryption.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UseEncryption.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UseEncryption
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Console\Commands
|
||||||
|
*/
|
||||||
|
class UseEncryption extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'This command will make sure that entries in the database will be encrypted (or not) according to the settings in .env';
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'firefly:use-encryption';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->handleObjects('Account', 'name', 'encrypted');
|
||||||
|
$this->handleObjects('Bill', 'name', 'name_encrypted');
|
||||||
|
$this->handleObjects('Bill', 'match', 'match_encrypted');
|
||||||
|
$this->handleObjects('Budget', 'name', 'encrypted');
|
||||||
|
$this->handleObjects('Category', 'name', 'encrypted');
|
||||||
|
$this->handleObjects('PiggyBank', 'name', 'encrypted');
|
||||||
|
$this->handleObjects('TransactionJournal', 'description', 'encrypted');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run each object and encrypt them (or not).
|
||||||
|
*
|
||||||
|
* @param string $class
|
||||||
|
* @param string $field
|
||||||
|
* @param string $indicator
|
||||||
|
*/
|
||||||
|
public function handleObjects(string $class, string $field, string $indicator)
|
||||||
|
{
|
||||||
|
$fqn = sprintf('FireflyIII\Models\%s', $class);
|
||||||
|
$encrypt = config('firefly.encryption') ? 0 : 1;
|
||||||
|
$set = $fqn::where($indicator, $encrypt)->get();
|
||||||
|
|
||||||
|
foreach ($set as $entry) {
|
||||||
|
$newName = $entry->$field;
|
||||||
|
$entry->$field = $newName;
|
||||||
|
$entry->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->line(sprintf('Updated %d %s.', $set->count(), strtolower(Str::plural($class))));
|
||||||
|
}
|
||||||
|
}
|
||||||
70
app/Console/Commands/VerifiesAccessToken.php
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* VerifiesAccessToken.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Console\Commands;
|
||||||
|
|
||||||
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
|
use Log;
|
||||||
|
use Preferences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trait VerifiesAccessToken
|
||||||
|
*
|
||||||
|
* Verifies user access token for sensitive commands.
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Console\Commands
|
||||||
|
*/
|
||||||
|
trait VerifiesAccessToken
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Abstract method to make sure trait knows about method "option".
|
||||||
|
*
|
||||||
|
* @param null $key
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
abstract public function option($key = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns false when given token does not match given user token.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function verifyAccessToken(): bool
|
||||||
|
{
|
||||||
|
$userId = intval($this->option('user'));
|
||||||
|
$token = strval($this->option('token'));
|
||||||
|
/** @var UserRepositoryInterface $repository */
|
||||||
|
$repository = app(UserRepositoryInterface::class);
|
||||||
|
$user = $repository->find($userId);
|
||||||
|
|
||||||
|
if (is_null($user->id)) {
|
||||||
|
Log::error(sprintf('verifyAccessToken(): no such user for input "%d"', $userId));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$accessToken = Preferences::getForUser($user, 'access_token', null);
|
||||||
|
if (is_null($accessToken)) {
|
||||||
|
Log::error(sprintf('User #%d has no access token, so cannot access command line options.', $userId));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!($accessToken->data === $token)) {
|
||||||
|
Log::error(sprintf('Invalid access token for user #%d.', $userId));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,6 +17,8 @@ use Crypt;
|
|||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\AccountType;
|
use FireflyIII\Models\AccountType;
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
|
use FireflyIII\Models\LinkType;
|
||||||
|
use FireflyIII\Models\PiggyBankEvent;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
@@ -25,12 +27,15 @@ use FireflyIII\User;
|
|||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Preferences;
|
||||||
use Schema;
|
use Schema;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class VerifyDatabase
|
* Class VerifyDatabase
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||||
|
*
|
||||||
* @package FireflyIII\Console\Commands
|
* @package FireflyIII\Console\Commands
|
||||||
*/
|
*/
|
||||||
class VerifyDatabase extends Command
|
class VerifyDatabase extends Command
|
||||||
@@ -69,30 +74,91 @@ class VerifyDatabase extends Command
|
|||||||
$this->reportObject('budget');
|
$this->reportObject('budget');
|
||||||
$this->reportObject('category');
|
$this->reportObject('category');
|
||||||
$this->reportObject('tag');
|
$this->reportObject('tag');
|
||||||
|
|
||||||
// accounts with no transactions.
|
|
||||||
$this->reportAccounts();
|
$this->reportAccounts();
|
||||||
// budgets with no limits
|
|
||||||
$this->reportBudgetLimits();
|
$this->reportBudgetLimits();
|
||||||
// budgets with no transactions
|
|
||||||
|
|
||||||
// sum of transactions is not zero.
|
|
||||||
$this->reportSum();
|
$this->reportSum();
|
||||||
// any deleted transaction journals that have transactions that are NOT deleted:
|
|
||||||
$this->reportJournals();
|
$this->reportJournals();
|
||||||
// deleted transactions that are connected to a not deleted journal.
|
|
||||||
$this->reportTransactions();
|
$this->reportTransactions();
|
||||||
// deleted accounts that still have not deleted transactions or journals attached to them.
|
|
||||||
$this->reportDeletedAccounts();
|
$this->reportDeletedAccounts();
|
||||||
|
|
||||||
// report on journals with no transactions at all.
|
|
||||||
$this->reportNoTransactions();
|
$this->reportNoTransactions();
|
||||||
|
|
||||||
// transfers with budgets.
|
|
||||||
$this->reportTransfersBudgets();
|
$this->reportTransfersBudgets();
|
||||||
|
|
||||||
// report on journals with the wrong types of accounts.
|
|
||||||
$this->reportIncorrectJournals();
|
$this->reportIncorrectJournals();
|
||||||
|
$this->repairPiggyBanks();
|
||||||
|
$this->createLinkTypes();
|
||||||
|
$this->createAccessTokens();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create user access tokens, if not present already.
|
||||||
|
*/
|
||||||
|
private function createAccessTokens()
|
||||||
|
{
|
||||||
|
$users = User::get();
|
||||||
|
/** @var User $user */
|
||||||
|
foreach ($users as $user) {
|
||||||
|
$pref = Preferences::getForUser($user, 'access_token', null);
|
||||||
|
if (is_null($pref)) {
|
||||||
|
$token = $user->generateAccessToken();
|
||||||
|
Preferences::setForUser($user, 'access_token', $token);
|
||||||
|
$this->line(sprintf('Generated access token for user %s', $user->email));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create default link types if necessary.
|
||||||
|
*/
|
||||||
|
private function createLinkTypes()
|
||||||
|
{
|
||||||
|
$set = [
|
||||||
|
'Related' => ['relates to', 'relates to'],
|
||||||
|
'Refund' => ['(partially) refunds', 'is (partially) refunded by'],
|
||||||
|
'Paid' => ['(partially) pays for', 'is (partially) paid for by'],
|
||||||
|
'Reimbursement' => ['(partially) reimburses', 'is (partially) reimbursed by'],
|
||||||
|
];
|
||||||
|
foreach ($set as $name => $values) {
|
||||||
|
$link = LinkType::where('name', $name)->where('outward', $values[0])->where('inward', $values[1])->first();
|
||||||
|
if (is_null($link)) {
|
||||||
|
$link = new LinkType;
|
||||||
|
$link->name = $name;
|
||||||
|
$link->outward = $values[0];
|
||||||
|
$link->inward = $values[1];
|
||||||
|
}
|
||||||
|
$link->editable = false;
|
||||||
|
$link->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Eeport (and fix) piggy banks. Make sure there are only transfers linked to piggy bank events.
|
||||||
|
*/
|
||||||
|
private function repairPiggyBanks(): void
|
||||||
|
{
|
||||||
|
$set = PiggyBankEvent::with(['PiggyBank', 'TransactionJournal', 'TransactionJournal.TransactionType'])->get();
|
||||||
|
$set->each(
|
||||||
|
function (PiggyBankEvent $event) {
|
||||||
|
if (is_null($event->transaction_journal_id)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
/** @var TransactionJournal $journal */
|
||||||
|
$journal = $event->transactionJournal()->first();
|
||||||
|
if (is_null($journal)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$type = $journal->transactionType->type;
|
||||||
|
if ($type !== TransactionType::TRANSFER) {
|
||||||
|
$event->transaction_journal_id = null;
|
||||||
|
$event->save();
|
||||||
|
$this->line(sprintf('Piggy bank #%d was referenced by an invalid event. This has been fixed.', $event->piggy_bank_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -131,7 +197,7 @@ class VerifyDatabase extends Command
|
|||||||
/** @var Budget $entry */
|
/** @var Budget $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$line = sprintf(
|
$line = sprintf(
|
||||||
'Notice: User #%d (%s) has budget #%d ("%s") which has no budget limits.',
|
'User #%d (%s) has budget #%d ("%s") which has no budget limits.',
|
||||||
$entry->user_id, $entry->email, $entry->id, $entry->name
|
$entry->user_id, $entry->email, $entry->id, $entry->name
|
||||||
);
|
);
|
||||||
$this->line($line);
|
$this->line($line);
|
||||||
@@ -168,6 +234,9 @@ class VerifyDatabase extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report on journals with bad account types linked to them.
|
||||||
|
*/
|
||||||
private function reportIncorrectJournals()
|
private function reportIncorrectJournals()
|
||||||
{
|
{
|
||||||
$configuration = [
|
$configuration = [
|
||||||
@@ -234,7 +303,7 @@ class VerifyDatabase extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Report on journals without transactions.
|
||||||
*/
|
*/
|
||||||
private function reportNoTransactions()
|
private function reportNoTransactions()
|
||||||
{
|
{
|
||||||
@@ -252,13 +321,15 @@ class VerifyDatabase extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Report on things with no linked journals.
|
||||||
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
private function reportObject(string $name)
|
private function reportObject(string $name)
|
||||||
{
|
{
|
||||||
$plural = str_plural($name);
|
$plural = str_plural($name);
|
||||||
$class = sprintf('FireflyIII\Models\%s', ucfirst($name));
|
$class = sprintf('FireflyIII\Models\%s', ucfirst($name));
|
||||||
$field = $name == 'tag' ? 'tag' : 'name';
|
$field = $name === 'tag' ? 'tag' : 'name';
|
||||||
$set = $class::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
|
$set = $class::leftJoin($name . '_transaction_journal', $plural . '.id', '=', $name . '_transaction_journal.' . $name . '_id')
|
||||||
->leftJoin('users', $plural . '.user_id', '=', 'users.id')
|
->leftJoin('users', $plural . '.user_id', '=', 'users.id')
|
||||||
->distinct()
|
->distinct()
|
||||||
@@ -277,7 +348,7 @@ class VerifyDatabase extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$line = sprintf(
|
$line = sprintf(
|
||||||
'Notice: User #%d (%s) has %s #%d ("%s") which has no transactions.',
|
'User #%d (%s) has %s #%d ("%s") which has no transactions.',
|
||||||
$entry->user_id, $entry->email, $name, $entry->id, $objName
|
$entry->user_id, $entry->email, $name, $entry->id, $objName
|
||||||
);
|
);
|
||||||
$this->line($line);
|
$this->line($line);
|
||||||
@@ -323,22 +394,22 @@ class VerifyDatabase extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Report on transfers that have budgets.
|
||||||
*/
|
*/
|
||||||
private function reportTransfersBudgets()
|
private function reportTransfersBudgets()
|
||||||
{
|
{
|
||||||
$set = TransactionJournal::distinct()
|
$set = TransactionJournal::distinct()
|
||||||
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id')
|
||||||
->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id')
|
->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id')
|
||||||
->where('transaction_types.type', TransactionType::TRANSFER)
|
->whereIn('transaction_types.type', [TransactionType::TRANSFER, TransactionType::DEPOSIT])
|
||||||
->whereNotNull('budget_transaction_journal.budget_id')->get(['transaction_journals.id']);
|
->whereNotNull('budget_transaction_journal.budget_id')->get(['transaction_journals.*']);
|
||||||
|
|
||||||
/** @var TransactionJournal $entry */
|
/** @var TransactionJournal $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$this->error(
|
$this->error(
|
||||||
sprintf(
|
sprintf(
|
||||||
'Error: Transaction journal #%d is a transfer, but has a budget. Edit it without changing anything, so the budget will be removed.',
|
'Error: Transaction journal #%d is a %s, but has a budget. Edit it without changing anything, so the budget will be removed.',
|
||||||
$entry->id
|
$entry->id, $entry->transactionType->type
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kernel.php
|
* Kernel.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
* This software may be modified and distributed under the terms of the
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
*
|
*
|
||||||
* See the LICENSE file for details.
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Console;
|
namespace FireflyIII\Console;
|
||||||
|
|
||||||
use FireflyIII\Console\Commands\CreateImport;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
use FireflyIII\Console\Commands\EncryptFile;
|
|
||||||
use FireflyIII\Console\Commands\Import;
|
|
||||||
use FireflyIII\Console\Commands\MoveRepository;
|
|
||||||
use FireflyIII\Console\Commands\ScanAttachments;
|
|
||||||
use FireflyIII\Console\Commands\UpgradeDatabase;
|
|
||||||
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
|
|
||||||
use FireflyIII\Console\Commands\VerifyDatabase;
|
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Kernel
|
* File to make sure commnds work.
|
||||||
*
|
|
||||||
* @package FireflyIII\Console
|
|
||||||
*/
|
*/
|
||||||
class Kernel extends ConsoleKernel
|
class Kernel extends ConsoleKernel
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* The bootstrap classes for the application.
|
|
||||||
*
|
|
||||||
* Next upgrade verify these are the same.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $bootstrappers
|
|
||||||
= [
|
|
||||||
'Illuminate\Foundation\Bootstrap\DetectEnvironment',
|
|
||||||
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
|
|
||||||
'FireflyIII\Bootstrap\ConfigureLogging',
|
|
||||||
'Illuminate\Foundation\Bootstrap\HandleExceptions',
|
|
||||||
'Illuminate\Foundation\Bootstrap\RegisterFacades',
|
|
||||||
'Illuminate\Foundation\Bootstrap\SetRequestForConsole',
|
|
||||||
'Illuminate\Foundation\Bootstrap\RegisterProviders',
|
|
||||||
'Illuminate\Foundation\Bootstrap\BootProviders',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Artisan commands provided by your application.
|
* The Artisan commands provided by your application.
|
||||||
*
|
*
|
||||||
@@ -56,23 +28,30 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected $commands
|
protected $commands
|
||||||
= [
|
= [
|
||||||
UpgradeFireflyInstructions::class,
|
//
|
||||||
VerifyDatabase::class,
|
|
||||||
Import::class,
|
|
||||||
CreateImport::class,
|
|
||||||
EncryptFile::class,
|
|
||||||
ScanAttachments::class,
|
|
||||||
UpgradeDatabase::class,
|
|
||||||
MoveRepository::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the Closure based commands for the application.
|
* Register the commands for the application.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function commands()
|
protected function commands()
|
||||||
{
|
{
|
||||||
|
$this->load(__DIR__ . '/Commands');
|
||||||
|
|
||||||
require base_path('routes/console.php');
|
require base_path('routes/console.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the application's command schedule.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||||
|
*/
|
||||||
|
protected function schedule(Schedule $schedule)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
44
app/Events/AdminRequestedTestMessage.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdminRequestedTestMessage.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Events;
|
||||||
|
|
||||||
|
|
||||||
|
use FireflyIII\User;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class AdminRequestedTestMessage
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Events
|
||||||
|
*/
|
||||||
|
class AdminRequestedTestMessage extends Event
|
||||||
|
{
|
||||||
|
use SerializesModels;
|
||||||
|
|
||||||
|
public $ipAddress;
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new event instance.
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
* @param string $ipAddress
|
||||||
|
*/
|
||||||
|
public function __construct(User $user, string $ipAddress)
|
||||||
|
{
|
||||||
|
Log::debug(sprintf('Triggered AdminRequestedTestMessage for user #%d (%s) and IP %s!', $user->id, $user->email, $ipAddress));
|
||||||
|
$this->user = $user;
|
||||||
|
$this->ipAddress = $ipAddress;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Events;
|
namespace FireflyIII\Events;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ class StoredTransactionJournal extends Event
|
|||||||
|
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
/** @var TransactionJournal */
|
||||||
public $journal;
|
public $journal;
|
||||||
|
/** @var int */
|
||||||
public $piggyBankId;
|
public $piggyBankId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class UpdatedTransactionJournal extends Event
|
|||||||
|
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
/** @var TransactionJournal */
|
||||||
public $journal;
|
public $journal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
51
app/Events/UserChangedEmail.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* UserChangedEmail.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Events;
|
||||||
|
|
||||||
|
use FireflyIII\User;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UserChangedEmail
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Events
|
||||||
|
*/
|
||||||
|
class UserChangedEmail extends Event
|
||||||
|
{
|
||||||
|
use SerializesModels;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
public $ipAddress;
|
||||||
|
/** @var string */
|
||||||
|
public $newEmail;
|
||||||
|
/** @var string */
|
||||||
|
public $oldEmail;
|
||||||
|
/** @var User */
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UserChangedEmail constructor.
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
* @param string $newEmail
|
||||||
|
* @param string $oldEmail
|
||||||
|
* @param string $ipAddress
|
||||||
|
*/
|
||||||
|
public function __construct(User $user, string $newEmail, string $oldEmail, string $ipAddress)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
$this->ipAddress = $ipAddress;
|
||||||
|
$this->oldEmail = $oldEmail;
|
||||||
|
$this->newEmail = $newEmail;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Exceptions;
|
namespace FireflyIII\Exceptions;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,49 +1,45 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler.php
|
* Handler.php
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
* This software may be modified and distributed under the terms of the
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
*
|
*
|
||||||
* See the LICENSE file for details.
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
namespace FireflyIII\Exceptions;
|
namespace FireflyIII\Exceptions;
|
||||||
|
|
||||||
use ErrorException;
|
use ErrorException;
|
||||||
use Exception;
|
use Exception;
|
||||||
use FireflyIII\Jobs\MailError;
|
use FireflyIII\Jobs\MailError;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
|
||||||
use Illuminate\Auth\AuthenticationException;
|
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Illuminate\Session\TokenMismatchException;
|
|
||||||
use Illuminate\Validation\ValidationException as ValException;
|
|
||||||
use Request;
|
use Request;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Handler
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Exceptions
|
|
||||||
*/
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A list of the exception types that should not be reported.
|
* A list of the inputs that are never flashed for validation exceptions.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontFlash
|
||||||
|
= [
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* A list of the exception types that are not reported.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dontReport
|
protected $dontReport
|
||||||
= [
|
= [
|
||||||
AuthenticationException::class,
|
//
|
||||||
AuthorizationException::class,
|
|
||||||
HttpException::class,
|
|
||||||
ModelNotFoundException::class,
|
|
||||||
TokenMismatchException::class,
|
|
||||||
ValException::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,14 +62,13 @@ class Handler extends ExceptionHandler
|
|||||||
return parent::render($request, $exception);
|
return parent::render($request, $exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report or log an exception.
|
* Report or log an exception.
|
||||||
*
|
*
|
||||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||||
*
|
*
|
||||||
* @param Exception $exception
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five its fine.
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly five.
|
* @param \Exception $exception
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@@ -97,6 +92,7 @@ class Handler extends ExceptionHandler
|
|||||||
'file' => $exception->getFile(),
|
'file' => $exception->getFile(),
|
||||||
'line' => $exception->getLine(),
|
'line' => $exception->getLine(),
|
||||||
'code' => $exception->getCode(),
|
'code' => $exception->getCode(),
|
||||||
|
'version' => config('firefly.version'),
|
||||||
];
|
];
|
||||||
|
|
||||||
// create job that will mail.
|
// create job that will mail.
|
||||||
@@ -105,22 +101,7 @@ class Handler extends ExceptionHandler
|
|||||||
dispatch($job);
|
dispatch($job);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert an authentication exception into an unauthenticated response.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
protected function unauthenticated($request)
|
|
||||||
{
|
|
||||||
if ($request->expectsJson()) {
|
|
||||||
return response()->json(['error' => 'Unauthenticated.'], 401);
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect()->guest('login');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Exceptions;
|
namespace FireflyIII\Exceptions;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Exceptions;
|
namespace FireflyIII\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ namespace FireflyIII\Export\Collector;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use FireflyIII\Models\Attachment;
|
use FireflyIII\Models\Attachment;
|
||||||
use FireflyIII\Models\ExportJob;
|
|
||||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -43,10 +42,8 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* AttachmentCollector constructor.
|
* AttachmentCollector constructor.
|
||||||
*
|
|
||||||
* @param ExportJob $job
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct()
|
||||||
{
|
{
|
||||||
/** @var AttachmentRepositoryInterface repository */
|
/** @var AttachmentRepositoryInterface repository */
|
||||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||||
@@ -54,7 +51,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
|||||||
$this->uploadDisk = Storage::disk('upload');
|
$this->uploadDisk = Storage::disk('upload');
|
||||||
$this->exportDisk = Storage::disk('export');
|
$this->exportDisk = Storage::disk('export');
|
||||||
|
|
||||||
parent::__construct($job);
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -125,6 +122,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
|||||||
*/
|
*/
|
||||||
private function getAttachments(): Collection
|
private function getAttachments(): Collection
|
||||||
{
|
{
|
||||||
|
$this->repository->setUser($this->user);
|
||||||
$attachments = $this->repository->getBetween($this->start, $this->end);
|
$attachments = $this->repository->getBetween($this->start, $this->end);
|
||||||
|
|
||||||
return $attachments;
|
return $attachments;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ namespace FireflyIII\Export\Collector;
|
|||||||
|
|
||||||
|
|
||||||
use FireflyIII\Models\ExportJob;
|
use FireflyIII\Models\ExportJob;
|
||||||
|
use FireflyIII\User;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,18 +27,17 @@ class BasicCollector
|
|||||||
{
|
{
|
||||||
/** @var ExportJob */
|
/** @var ExportJob */
|
||||||
protected $job;
|
protected $job;
|
||||||
|
/** @var User */
|
||||||
|
protected $user;
|
||||||
/** @var Collection */
|
/** @var Collection */
|
||||||
private $entries;
|
private $entries;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BasicCollector constructor.
|
* BasicCollector constructor.
|
||||||
*
|
|
||||||
* @param ExportJob $job
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->entries = new Collection;
|
$this->entries = new Collection;
|
||||||
$this->job = $job;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,5 +56,22 @@ class BasicCollector
|
|||||||
$this->entries = $entries;
|
$this->entries = $entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ExportJob $job
|
||||||
|
*/
|
||||||
|
public function setJob(ExportJob $job)
|
||||||
|
{
|
||||||
|
$this->job = $job;
|
||||||
|
$this->user = $job->user;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function setUser(User $user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Export\Collector;
|
namespace FireflyIII\Export\Collector;
|
||||||
|
|
||||||
|
use FireflyIII\Models\ExportJob;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,4 +41,11 @@ interface CollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function setEntries(Collection $entries);
|
public function setEntries(Collection $entries);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ExportJob $job
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function setJob(ExportJob $job);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,347 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* JournalExportCollector.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Export\Collector;
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use Crypt;
|
|
||||||
use DB;
|
|
||||||
use FireflyIII\Models\Transaction;
|
|
||||||
use Illuminate\Database\Query\JoinClause;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class JournalExportCollector
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Export\Collector
|
|
||||||
*/
|
|
||||||
class JournalExportCollector extends BasicCollector implements CollectorInterface
|
|
||||||
{
|
|
||||||
/** @var Collection */
|
|
||||||
private $accounts;
|
|
||||||
/** @var Carbon */
|
|
||||||
private $end;
|
|
||||||
/** @var Carbon */
|
|
||||||
private $start;
|
|
||||||
|
|
||||||
/** @var Collection */
|
|
||||||
private $workSet;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function run(): bool
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Instead of collecting journals we collect transactions for the given accounts.
|
|
||||||
* We left join the OPPOSING transaction AND some journal data.
|
|
||||||
* After that we complement this info with budgets, categories, etc.
|
|
||||||
*
|
|
||||||
* This is way more efficient and will also work on split journals.
|
|
||||||
*/
|
|
||||||
$this->getWorkSet();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Extract:
|
|
||||||
* possible budget ids for journals
|
|
||||||
* possible category ids journals
|
|
||||||
* possible budget ids for transactions
|
|
||||||
* possible category ids for transactions
|
|
||||||
*
|
|
||||||
* possible IBAN and account numbers?
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$journals = $this->extractJournalIds();
|
|
||||||
$transactions = $this->extractTransactionIds();
|
|
||||||
|
|
||||||
|
|
||||||
// extend work set with category data from journals:
|
|
||||||
$this->categoryDataForJournals($journals);
|
|
||||||
|
|
||||||
// extend work set with category cate from transactions (overrules journals):
|
|
||||||
$this->categoryDataForTransactions($transactions);
|
|
||||||
|
|
||||||
// same for budgets:
|
|
||||||
$this->budgetDataForJournals($journals);
|
|
||||||
$this->budgetDataForTransactions($transactions);
|
|
||||||
|
|
||||||
$this->setEntries($this->workSet);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Collection $accounts
|
|
||||||
*/
|
|
||||||
public function setAccounts(Collection $accounts)
|
|
||||||
{
|
|
||||||
$this->accounts = $accounts;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Carbon $start
|
|
||||||
* @param Carbon $end
|
|
||||||
*/
|
|
||||||
public function setDates(Carbon $start, Carbon $end)
|
|
||||||
{
|
|
||||||
$this->start = $start;
|
|
||||||
$this->end = $end;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $journals
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function budgetDataForJournals(array $journals): bool
|
|
||||||
{
|
|
||||||
$set = DB::table('budget_transaction_journal')
|
|
||||||
->leftJoin('budgets', 'budgets.id', '=', 'budget_transaction_journal.budget_id')
|
|
||||||
->whereIn('budget_transaction_journal.transaction_journal_id', $journals)
|
|
||||||
->get(
|
|
||||||
[
|
|
||||||
'budget_transaction_journal.budget_id',
|
|
||||||
'budget_transaction_journal.transaction_journal_id',
|
|
||||||
'budgets.name',
|
|
||||||
'budgets.encrypted',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$set->each(
|
|
||||||
function ($obj) {
|
|
||||||
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$array = [];
|
|
||||||
foreach ($set as $obj) {
|
|
||||||
$array[$obj->transaction_journal_id] = ['id' => $obj->budget_id, 'name' => $obj->name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->workSet->each(
|
|
||||||
function ($obj) use ($array) {
|
|
||||||
if (isset($array[$obj->transaction_journal_id])) {
|
|
||||||
$obj->budget_id = $array[$obj->transaction_journal_id]['id'];
|
|
||||||
$obj->budget_name = $array[$obj->transaction_journal_id]['name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $transactions
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function budgetDataForTransactions(array $transactions): bool
|
|
||||||
{
|
|
||||||
$set = DB::table('budget_transaction')
|
|
||||||
->leftJoin('budgets', 'budgets.id', '=', 'budget_transaction.budget_id')
|
|
||||||
->whereIn('budget_transaction.transaction_id', $transactions)
|
|
||||||
->get(
|
|
||||||
[
|
|
||||||
'budget_transaction.budget_id',
|
|
||||||
'budget_transaction.transaction_id',
|
|
||||||
'budgets.name',
|
|
||||||
'budgets.encrypted',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$set->each(
|
|
||||||
function ($obj) {
|
|
||||||
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$array = [];
|
|
||||||
foreach ($set as $obj) {
|
|
||||||
$array[$obj->transaction_id] = ['id' => $obj->budget_id, 'name' => $obj->name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->workSet->each(
|
|
||||||
function ($obj) use ($array) {
|
|
||||||
|
|
||||||
// first transaction
|
|
||||||
if (isset($array[$obj->id])) {
|
|
||||||
$obj->budget_id = $array[$obj->id]['id'];
|
|
||||||
$obj->budget_name = $array[$obj->id]['name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $journals
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function categoryDataForJournals(array $journals): bool
|
|
||||||
{
|
|
||||||
$set = DB::table('category_transaction_journal')
|
|
||||||
->leftJoin('categories', 'categories.id', '=', 'category_transaction_journal.category_id')
|
|
||||||
->whereIn('category_transaction_journal.transaction_journal_id', $journals)
|
|
||||||
->get(
|
|
||||||
[
|
|
||||||
'category_transaction_journal.category_id',
|
|
||||||
'category_transaction_journal.transaction_journal_id',
|
|
||||||
'categories.name',
|
|
||||||
'categories.encrypted',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$set->each(
|
|
||||||
function ($obj) {
|
|
||||||
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$array = [];
|
|
||||||
foreach ($set as $obj) {
|
|
||||||
$array[$obj->transaction_journal_id] = ['id' => $obj->category_id, 'name' => $obj->name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->workSet->each(
|
|
||||||
function ($obj) use ($array) {
|
|
||||||
if (isset($array[$obj->transaction_journal_id])) {
|
|
||||||
$obj->category_id = $array[$obj->transaction_journal_id]['id'];
|
|
||||||
$obj->category_name = $array[$obj->transaction_journal_id]['name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $transactions
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function categoryDataForTransactions(array $transactions): bool
|
|
||||||
{
|
|
||||||
$set = DB::table('category_transaction')
|
|
||||||
->leftJoin('categories', 'categories.id', '=', 'category_transaction.category_id')
|
|
||||||
->whereIn('category_transaction.transaction_id', $transactions)
|
|
||||||
->get(
|
|
||||||
[
|
|
||||||
'category_transaction.category_id',
|
|
||||||
'category_transaction.transaction_id',
|
|
||||||
'categories.name',
|
|
||||||
'categories.encrypted',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$set->each(
|
|
||||||
function ($obj) {
|
|
||||||
$obj->name = $obj->encrypted === 1 ? Crypt::decrypt($obj->name) : $obj->name;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$array = [];
|
|
||||||
foreach ($set as $obj) {
|
|
||||||
$array[$obj->transaction_id] = ['id' => $obj->category_id, 'name' => $obj->name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->workSet->each(
|
|
||||||
function ($obj) use ($array) {
|
|
||||||
|
|
||||||
// first transaction
|
|
||||||
if (isset($array[$obj->id])) {
|
|
||||||
$obj->category_id = $array[$obj->id]['id'];
|
|
||||||
$obj->category_name = $array[$obj->id]['name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function extractJournalIds(): array
|
|
||||||
{
|
|
||||||
return $this->workSet->pluck('transaction_journal_id')->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function extractTransactionIds()
|
|
||||||
{
|
|
||||||
$set = $this->workSet->pluck('id')->toArray();
|
|
||||||
$opposing = $this->workSet->pluck('opposing_id')->toArray();
|
|
||||||
$complete = $set + $opposing;
|
|
||||||
|
|
||||||
return array_unique($complete);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
|
||||||
*/
|
|
||||||
private function getWorkSet()
|
|
||||||
{
|
|
||||||
$accountIds = $this->accounts->pluck('id')->toArray();
|
|
||||||
$this->workSet = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
|
||||||
->leftJoin(
|
|
||||||
'transactions AS opposing', function (JoinClause $join) {
|
|
||||||
$join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id')
|
|
||||||
->where('opposing.amount', '=', DB::raw('transactions.amount * -1'))
|
|
||||||
->where('transactions.identifier', '=', DB::raw('opposing.identifier'));
|
|
||||||
}
|
|
||||||
)
|
|
||||||
->leftJoin('accounts', 'transactions.account_id', '=', 'accounts.id')
|
|
||||||
->leftJoin('accounts AS opposing_accounts', 'opposing.account_id', '=', 'opposing_accounts.id')
|
|
||||||
->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', 'transaction_types.id')
|
|
||||||
->leftJoin('transaction_currencies', 'transaction_journals.transaction_currency_id', '=', 'transaction_currencies.id')
|
|
||||||
->whereIn('transactions.account_id', $accountIds)
|
|
||||||
->where('transaction_journals.user_id', $this->job->user_id)
|
|
||||||
->where('transaction_journals.date', '>=', $this->start->format('Y-m-d'))
|
|
||||||
->where('transaction_journals.date', '<=', $this->end->format('Y-m-d'))
|
|
||||||
->where('transaction_journals.completed', 1)
|
|
||||||
->whereNull('transaction_journals.deleted_at')
|
|
||||||
->whereNull('transactions.deleted_at')
|
|
||||||
->whereNull('opposing.deleted_at')
|
|
||||||
->orderBy('transaction_journals.date', 'DESC')
|
|
||||||
->orderBy('transactions.identifier', 'ASC')
|
|
||||||
->get(
|
|
||||||
[
|
|
||||||
'transactions.id',
|
|
||||||
'transactions.amount',
|
|
||||||
'transactions.description',
|
|
||||||
'transactions.account_id',
|
|
||||||
'accounts.name as account_name',
|
|
||||||
'accounts.encrypted as account_name_encrypted',
|
|
||||||
'transactions.identifier',
|
|
||||||
|
|
||||||
'opposing.id as opposing_id',
|
|
||||||
'opposing.amount AS opposing_amount',
|
|
||||||
'opposing.description as opposing_description',
|
|
||||||
'opposing.account_id as opposing_account_id',
|
|
||||||
'opposing_accounts.name as opposing_account_name',
|
|
||||||
'opposing_accounts.encrypted as opposing_account_encrypted',
|
|
||||||
'opposing.identifier as opposing_identifier',
|
|
||||||
|
|
||||||
'transaction_journals.id as transaction_journal_id',
|
|
||||||
'transaction_journals.date',
|
|
||||||
'transaction_journals.description as journal_description',
|
|
||||||
'transaction_journals.encrypted as journal_encrypted',
|
|
||||||
'transaction_journals.transaction_type_id',
|
|
||||||
'transaction_types.type as transaction_type',
|
|
||||||
'transaction_journals.transaction_currency_id',
|
|
||||||
'transaction_currencies.code AS transaction_currency_code',
|
|
||||||
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,8 +14,8 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Export\Collector;
|
namespace FireflyIII\Export\Collector;
|
||||||
|
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use FireflyIII\Models\ExportJob;
|
|
||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
|
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||||
use Log;
|
use Log;
|
||||||
use Storage;
|
use Storage;
|
||||||
|
|
||||||
@@ -30,27 +30,15 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
private $exportDisk;
|
private $exportDisk;
|
||||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||||
private $uploadDisk;
|
private $uploadDisk;
|
||||||
/** @var string */
|
|
||||||
private $vintageFormat;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AttachmentCollector constructor.
|
* AttachmentCollector constructor.
|
||||||
*
|
|
||||||
* @param ExportJob $job
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct($job);
|
parent::__construct();
|
||||||
|
|
||||||
Log::debug('Going to collect attachments', ['key' => $job->key]);
|
|
||||||
|
|
||||||
// make storage:
|
|
||||||
$this->uploadDisk = Storage::disk('upload');
|
$this->uploadDisk = Storage::disk('upload');
|
||||||
$this->exportDisk = Storage::disk('export');
|
$this->exportDisk = Storage::disk('export');
|
||||||
|
|
||||||
// file names associated with the old import routine.
|
|
||||||
$this->vintageFormat = sprintf('csv-upload-%d-', auth()->user()->id);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,10 +48,7 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function run(): bool
|
public function run(): bool
|
||||||
{
|
{
|
||||||
// collect old upload files (names beginning with "csv-upload".
|
Log::debug('Going to collect attachments', ['key' => $this->job->key]);
|
||||||
$this->collectVintageUploads();
|
|
||||||
|
|
||||||
// then collect current upload files:
|
|
||||||
$this->collectModernUploads();
|
$this->collectModernUploads();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -76,7 +61,8 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
*/
|
*/
|
||||||
private function collectModernUploads(): bool
|
private function collectModernUploads(): bool
|
||||||
{
|
{
|
||||||
$set = $this->job->user->importJobs()->where('status', 'import_complete')->get(['import_jobs.*']);
|
$set = $this->job->user->importJobs()->whereIn('status', ['import_complete', 'finished'])->get(['import_jobs.*']);
|
||||||
|
Log::debug(sprintf('Found %d import jobs', $set->count()));
|
||||||
$keys = [];
|
$keys = [];
|
||||||
if ($set->count() > 0) {
|
if ($set->count() > 0) {
|
||||||
$keys = $set->pluck('key')->toArray();
|
$keys = $set->pluck('key')->toArray();
|
||||||
@@ -89,59 +75,6 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method collects all the uploads that are uploaded using the "old" importer. So from before the summer of 2016.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function collectVintageUploads(): bool
|
|
||||||
{
|
|
||||||
// grab upload directory.
|
|
||||||
$files = $this->uploadDisk->files();
|
|
||||||
|
|
||||||
foreach ($files as $entry) {
|
|
||||||
$this->processVintageUpload($entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method tells you when the vintage upload file was actually uploaded.
|
|
||||||
*
|
|
||||||
* @param string $entry
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function getVintageUploadDate(string $entry): string
|
|
||||||
{
|
|
||||||
// this is an original upload.
|
|
||||||
$parts = explode('-', str_replace(['.csv.encrypted', $this->vintageFormat], '', $entry));
|
|
||||||
$originalUpload = intval($parts[1]);
|
|
||||||
$date = date('Y-m-d \a\t H-i-s', $originalUpload);
|
|
||||||
|
|
||||||
return $date;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tells you if a file name is a vintage upload.
|
|
||||||
*
|
|
||||||
* @param string $entry
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function isVintageImport(string $entry): bool
|
|
||||||
{
|
|
||||||
$len = strlen($this->vintageFormat);
|
|
||||||
// file is part of the old import routine:
|
|
||||||
if (substr($entry, 0, $len) === $this->vintageFormat) {
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
* @param string $key
|
||||||
*
|
*
|
||||||
@@ -159,7 +92,7 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
$content = '';
|
$content = '';
|
||||||
try {
|
try {
|
||||||
$content = Crypt::decrypt($this->uploadDisk->get(sprintf('%s.upload', $key)));
|
$content = Crypt::decrypt($this->uploadDisk->get(sprintf('%s.upload', $key)));
|
||||||
} catch (DecryptException $e) {
|
} catch (FileNotFoundException | DecryptException $e) {
|
||||||
Log::error(sprintf('Could not decrypt old import file "%s". Skipped because: %s', $key, $e->getMessage()));
|
Log::error(sprintf('Could not decrypt old import file "%s". Skipped because: %s', $key, $e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,47 +107,4 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If the file is a vintage upload, process it.
|
|
||||||
*
|
|
||||||
* @param string $entry
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function processVintageUpload(string $entry): bool
|
|
||||||
{
|
|
||||||
if ($this->isVintageImport($entry)) {
|
|
||||||
$this->saveVintageImportFile($entry);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This will store the content of the old vintage upload somewhere.
|
|
||||||
*
|
|
||||||
* @param string $entry
|
|
||||||
*/
|
|
||||||
private function saveVintageImportFile(string $entry)
|
|
||||||
{
|
|
||||||
$content = '';
|
|
||||||
try {
|
|
||||||
$content = Crypt::decrypt($this->uploadDisk->get($entry));
|
|
||||||
} catch (DecryptException $e) {
|
|
||||||
Log::error('Could not decrypt old CSV import file ' . $entry . '. Skipped because ' . $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($content) > 0) {
|
|
||||||
// add to export disk.
|
|
||||||
$date = $this->getVintageUploadDate($entry);
|
|
||||||
$file = $this->job->key . '-Old import dated ' . $date . '.csv';
|
|
||||||
$this->exportDisk->put($file, $content);
|
|
||||||
$this->getEntries()->push($file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Export\Entry;
|
namespace FireflyIII\Export\Entry;
|
||||||
|
|
||||||
use Crypt;
|
use FireflyIII\Models\Transaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To extend the exported object, in case of new features in Firefly III for example,
|
* To extend the exported object, in case of new features in Firefly III for example,
|
||||||
@@ -30,6 +30,7 @@ use Crypt;
|
|||||||
*
|
*
|
||||||
* Class Entry
|
* Class Entry
|
||||||
* @SuppressWarnings(PHPMD.LongVariable)
|
* @SuppressWarnings(PHPMD.LongVariable)
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyFields)
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Export\Entry
|
* @package FireflyIII\Export\Entry
|
||||||
*/
|
*/
|
||||||
@@ -37,25 +38,43 @@ final class Entry
|
|||||||
{
|
{
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
public $journal_id;
|
public $journal_id;
|
||||||
|
public $transaction_id = 0;
|
||||||
|
|
||||||
public $date;
|
public $date;
|
||||||
public $description;
|
public $description;
|
||||||
|
|
||||||
public $currency_code;
|
public $currency_code;
|
||||||
public $amount;
|
public $amount;
|
||||||
|
public $foreign_currency_code = '';
|
||||||
|
public $foreign_amount = '0';
|
||||||
|
|
||||||
public $transaction_type;
|
public $transaction_type;
|
||||||
|
|
||||||
public $source_account_id;
|
public $asset_account_id;
|
||||||
public $source_account_name;
|
public $asset_account_name;
|
||||||
|
public $asset_account_iban;
|
||||||
public $destination_account_id;
|
public $asset_account_bic;
|
||||||
public $destination_account_name;
|
public $asset_account_number;
|
||||||
|
public $asset_currency_code;
|
||||||
|
|
||||||
|
public $opposing_account_id;
|
||||||
|
public $opposing_account_name;
|
||||||
|
public $opposing_account_iban;
|
||||||
|
public $opposing_account_bic;
|
||||||
|
public $opposing_account_number;
|
||||||
|
public $opposing_currency_code;
|
||||||
|
|
||||||
public $budget_id;
|
public $budget_id;
|
||||||
public $budget_name;
|
public $budget_name;
|
||||||
|
|
||||||
public $category_id;
|
public $category_id;
|
||||||
public $category_name;
|
public $category_name;
|
||||||
|
|
||||||
|
public $bill_id;
|
||||||
|
public $bill_name;
|
||||||
|
|
||||||
|
public $notes;
|
||||||
|
public $tags;
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,49 +85,77 @@ final class Entry
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $object
|
* Converts a given transaction (as collected by the collector) into an export entry.
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // complex but little choice.
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) // cannot be helped
|
||||||
|
*
|
||||||
|
* @param Transaction $transaction
|
||||||
*
|
*
|
||||||
* @return Entry
|
* @return Entry
|
||||||
*/
|
*/
|
||||||
public static function fromObject($object): Entry
|
public static function fromTransaction(Transaction $transaction): Entry
|
||||||
{
|
{
|
||||||
$entry = new self;
|
$entry = new self;
|
||||||
$entry->journal_id = $object->transaction_journal_id;
|
$entry->journal_id = $transaction->journal_id;
|
||||||
$entry->description = self::decrypt($object->journal_encrypted, $object->journal_description);
|
$entry->transaction_id = $transaction->id;
|
||||||
$entry->amount = $object->amount;
|
$entry->date = $transaction->date->format('Ymd');
|
||||||
$entry->date = $object->date;
|
$entry->description = $transaction->description;
|
||||||
$entry->transaction_type = $object->transaction_type;
|
if (strlen(strval($transaction->transaction_description)) > 0) {
|
||||||
$entry->currency_code = $object->transaction_currency_code;
|
$entry->description = $transaction->transaction_description . '(' . $transaction->description . ')';
|
||||||
$entry->source_account_id = $object->account_id;
|
|
||||||
$entry->source_account_name = self::decrypt($object->account_name_encrypted, $object->account_name);
|
|
||||||
$entry->destination_account_id = $object->opposing_account_id;
|
|
||||||
$entry->destination_account_name = self::decrypt($object->opposing_account_encrypted, $object->opposing_account_name);
|
|
||||||
$entry->category_id = $object->category_id ?? '';
|
|
||||||
$entry->category_name = $object->category_name ?? '';
|
|
||||||
$entry->budget_id = $object->budget_id ?? '';
|
|
||||||
$entry->budget_name = $object->budget_name ?? '';
|
|
||||||
|
|
||||||
// update description when transaction description is different:
|
|
||||||
if (!is_null($object->description) && $object->description != $entry->description) {
|
|
||||||
$entry->description = $entry->description . ' (' . $object->description . ')';
|
|
||||||
}
|
}
|
||||||
|
$entry->currency_code = $transaction->transactionCurrency->code;
|
||||||
|
$entry->amount = round($transaction->transaction_amount, $transaction->transactionCurrency->decimal_places);
|
||||||
|
|
||||||
|
$entry->foreign_currency_code = is_null($transaction->foreign_currency_id) ? null : $transaction->foreignCurrency->code;
|
||||||
|
$entry->foreign_amount = is_null($transaction->foreign_currency_id)
|
||||||
|
? null
|
||||||
|
: strval(
|
||||||
|
round(
|
||||||
|
$transaction->transaction_foreign_amount, $transaction->foreignCurrency->decimal_places
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$entry->transaction_type = $transaction->transaction_type_type;
|
||||||
|
$entry->asset_account_id = $transaction->account_id;
|
||||||
|
$entry->asset_account_name = app('steam')->tryDecrypt($transaction->account_name);
|
||||||
|
$entry->asset_account_iban = $transaction->account_iban;
|
||||||
|
$entry->asset_account_number = $transaction->account_number;
|
||||||
|
$entry->asset_account_bic = $transaction->account_bic;
|
||||||
|
$entry->asset_currency_code = $transaction->account_currency_code;
|
||||||
|
|
||||||
|
$entry->opposing_account_id = $transaction->opposing_account_id;
|
||||||
|
$entry->opposing_account_name = app('steam')->tryDecrypt($transaction->opposing_account_name);
|
||||||
|
$entry->opposing_account_iban = $transaction->opposing_account_iban;
|
||||||
|
$entry->opposing_account_number = $transaction->opposing_account_number;
|
||||||
|
$entry->opposing_account_bic = $transaction->opposing_account_bic;
|
||||||
|
$entry->opposing_currency_code = $transaction->opposing_currency_code;
|
||||||
|
|
||||||
|
/** budget */
|
||||||
|
$entry->budget_id = $transaction->transaction_budget_id;
|
||||||
|
$entry->budget_name = app('steam')->tryDecrypt($transaction->transaction_budget_name);
|
||||||
|
if (is_null($transaction->transaction_budget_id)) {
|
||||||
|
$entry->budget_id = $transaction->transaction_journal_budget_id;
|
||||||
|
$entry->budget_name = app('steam')->tryDecrypt($transaction->transaction_journal_budget_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** category */
|
||||||
|
$entry->category_id = $transaction->transaction_category_id;
|
||||||
|
$entry->category_name = app('steam')->tryDecrypt($transaction->transaction_category_name);
|
||||||
|
if (is_null($transaction->transaction_category_id)) {
|
||||||
|
$entry->category_id = $transaction->transaction_journal_category_id;
|
||||||
|
$entry->category_name = app('steam')->tryDecrypt($transaction->transaction_journal_category_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** budget */
|
||||||
|
$entry->bill_id = $transaction->bill_id;
|
||||||
|
$entry->bill_name = app('steam')->tryDecrypt($transaction->bill_name);
|
||||||
|
|
||||||
|
$entry->tags = $transaction->tags;
|
||||||
|
$entry->notes = $transaction->notes;
|
||||||
|
|
||||||
return $entry;
|
return $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $isEncrypted
|
|
||||||
* @param $value
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected static function decrypt(int $isEncrypted, $value)
|
|
||||||
{
|
|
||||||
if ($isEncrypted === 1) {
|
|
||||||
return Crypt::decrypt($value);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
346
app/Export/ExpandedProcessor.php
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* ExpandedProcessor.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Export;
|
||||||
|
|
||||||
|
|
||||||
|
use Crypt;
|
||||||
|
use DB;
|
||||||
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
|
use FireflyIII\Export\Collector\AttachmentCollector;
|
||||||
|
use FireflyIII\Export\Collector\UploadCollector;
|
||||||
|
use FireflyIII\Export\Entry\Entry;
|
||||||
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
|
use FireflyIII\Helpers\Filter\InternalTransferFilter;
|
||||||
|
use FireflyIII\Models\AccountMeta;
|
||||||
|
use FireflyIII\Models\ExportJob;
|
||||||
|
use FireflyIII\Models\Transaction;
|
||||||
|
use FireflyIII\Models\TransactionJournalMeta;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Log;
|
||||||
|
use Storage;
|
||||||
|
use ZipArchive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ExpandedProcessor
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CouplingBetweenObjects) // its doing a lot.
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Export
|
||||||
|
*/
|
||||||
|
class ExpandedProcessor implements ProcessorInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Collection */
|
||||||
|
public $accounts;
|
||||||
|
/** @var string */
|
||||||
|
public $exportFormat;
|
||||||
|
/** @var bool */
|
||||||
|
public $includeAttachments;
|
||||||
|
/** @var bool */
|
||||||
|
public $includeOldUploads;
|
||||||
|
/** @var ExportJob */
|
||||||
|
public $job;
|
||||||
|
/** @var array */
|
||||||
|
public $settings;
|
||||||
|
/** @var Collection */
|
||||||
|
private $exportEntries;
|
||||||
|
/** @var Collection */
|
||||||
|
private $files;
|
||||||
|
/** @var Collection */
|
||||||
|
private $journals;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processor constructor.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->journals = new Collection;
|
||||||
|
$this->exportEntries = new Collection;
|
||||||
|
$this->files = new Collection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function collectAttachments(): bool
|
||||||
|
{
|
||||||
|
/** @var AttachmentCollector $attachmentCollector */
|
||||||
|
$attachmentCollector = app(AttachmentCollector::class);
|
||||||
|
$attachmentCollector->setJob($this->job);
|
||||||
|
$attachmentCollector->setDates($this->settings['startDate'], $this->settings['endDate']);
|
||||||
|
$attachmentCollector->run();
|
||||||
|
$this->files = $this->files->merge($attachmentCollector->getEntries());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Collects all transaction journals.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
|
public function collectJournals(): bool
|
||||||
|
{
|
||||||
|
// use journal collector thing.
|
||||||
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
$collector = app(JournalCollectorInterface::class);
|
||||||
|
$collector->setUser($this->job->user);
|
||||||
|
$collector->setAccounts($this->accounts)->setRange($this->settings['startDate'], $this->settings['endDate'])
|
||||||
|
->withOpposingAccount()->withBudgetInformation()->withCategoryInformation()
|
||||||
|
->removeFilter(InternalTransferFilter::class);
|
||||||
|
$transactions = $collector->getJournals();
|
||||||
|
// get some more meta data for each entry:
|
||||||
|
$ids = $transactions->pluck('journal_id')->toArray();
|
||||||
|
$assetIds = $transactions->pluck('account_id')->toArray();
|
||||||
|
$opposingIds = $transactions->pluck('opposing_account_id')->toArray();
|
||||||
|
$notes = $this->getNotes($ids);
|
||||||
|
$tags = $this->getTags($ids);
|
||||||
|
/** @var array $ibans */
|
||||||
|
$ibans = $this->getIbans($assetIds) + $this->getIbans($opposingIds);
|
||||||
|
$currencies = $this->getAccountCurrencies($ibans);
|
||||||
|
$transactions->each(
|
||||||
|
function (Transaction $transaction) use ($notes, $tags, $ibans, $currencies) {
|
||||||
|
$journalId = intval($transaction->journal_id);
|
||||||
|
$accountId = intval($transaction->account_id);
|
||||||
|
$opposingId = intval($transaction->opposing_account_id);
|
||||||
|
$currencyId = $ibans[$accountId]['currency_id'] ?? 0;
|
||||||
|
$opposingCurrencyId = $ibans[$opposingId]['currency_id'] ?? 0;
|
||||||
|
$transaction->notes = $notes[$journalId] ?? '';
|
||||||
|
$transaction->tags = join(',', $tags[$journalId] ?? []);
|
||||||
|
$transaction->account_number = $ibans[$accountId]['accountNumber'] ?? '';
|
||||||
|
$transaction->account_bic = $ibans[$accountId]['BIC'] ?? '';
|
||||||
|
$transaction->account_currency_code = $currencies[$currencyId] ?? '';
|
||||||
|
$transaction->opposing_account_number = $ibans[$opposingId]['accountNumber'] ?? '';
|
||||||
|
$transaction->opposing_account_bic = $ibans[$opposingId]['BIC'] ?? '';
|
||||||
|
$transaction->opposing_currency_code = $currencies[$opposingCurrencyId] ?? '';
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->journals = $transactions;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function collectOldUploads(): bool
|
||||||
|
{
|
||||||
|
/** @var UploadCollector $uploadCollector */
|
||||||
|
$uploadCollector = app(UploadCollector::class);
|
||||||
|
$uploadCollector->setJob($this->job);
|
||||||
|
$uploadCollector->run();
|
||||||
|
|
||||||
|
$this->files = $this->files->merge($uploadCollector->getEntries());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function convertJournals(): bool
|
||||||
|
{
|
||||||
|
$this->journals->each(
|
||||||
|
function (Transaction $transaction) {
|
||||||
|
$this->exportEntries->push(Entry::fromTransaction($transaction));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
Log::debug(sprintf('Count %d entries in exportEntries (convertJournals)', $this->exportEntries->count()));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
* @throws FireflyException
|
||||||
|
*/
|
||||||
|
public function createZipFile(): bool
|
||||||
|
{
|
||||||
|
$zip = new ZipArchive;
|
||||||
|
$file = $this->job->key . '.zip';
|
||||||
|
$fullPath = storage_path('export') . '/' . $file;
|
||||||
|
|
||||||
|
if ($zip->open($fullPath, ZipArchive::CREATE) !== true) {
|
||||||
|
throw new FireflyException('Cannot store zip file.');
|
||||||
|
}
|
||||||
|
// for each file in the collection, add it to the zip file.
|
||||||
|
$disk = Storage::disk('export');
|
||||||
|
foreach ($this->getFiles() as $entry) {
|
||||||
|
// is part of this job?
|
||||||
|
$zipFileName = str_replace($this->job->key . '-', '', $entry);
|
||||||
|
$zip->addFromString($zipFileName, $disk->get($entry));
|
||||||
|
}
|
||||||
|
|
||||||
|
$zip->close();
|
||||||
|
|
||||||
|
// delete the files:
|
||||||
|
$this->deleteFiles();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function exportJournals(): bool
|
||||||
|
{
|
||||||
|
$exporterClass = config('firefly.export_formats.' . $this->exportFormat);
|
||||||
|
$exporter = app($exporterClass);
|
||||||
|
$exporter->setJob($this->job);
|
||||||
|
$exporter->setEntries($this->exportEntries);
|
||||||
|
$exporter->run();
|
||||||
|
$this->files->push($exporter->getFileName());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getFiles(): Collection
|
||||||
|
{
|
||||||
|
return $this->files;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save export job settings to class.
|
||||||
|
*
|
||||||
|
* @param array $settings
|
||||||
|
*/
|
||||||
|
public function setSettings(array $settings)
|
||||||
|
{
|
||||||
|
// save settings
|
||||||
|
$this->settings = $settings;
|
||||||
|
$this->accounts = $settings['accounts'];
|
||||||
|
$this->exportFormat = $settings['exportFormat'];
|
||||||
|
$this->includeAttachments = $settings['includeAttachments'];
|
||||||
|
$this->includeOldUploads = $settings['includeOldUploads'];
|
||||||
|
$this->job = $settings['job'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private function deleteFiles()
|
||||||
|
{
|
||||||
|
$disk = Storage::disk('export');
|
||||||
|
foreach ($this->getFiles() as $file) {
|
||||||
|
$disk->delete($file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function getAccountCurrencies(array $array): array
|
||||||
|
{
|
||||||
|
/** @var CurrencyRepositoryInterface $repository */
|
||||||
|
$repository = app(CurrencyRepositoryInterface::class);
|
||||||
|
$return = [];
|
||||||
|
$ids = [];
|
||||||
|
$repository->setUser($this->job->user);
|
||||||
|
foreach ($array as $value) {
|
||||||
|
$ids[] = $value['currency_id'] ?? 0;
|
||||||
|
}
|
||||||
|
$ids = array_unique($ids);
|
||||||
|
$result = $repository->getByIds($ids);
|
||||||
|
|
||||||
|
foreach ($result as $currency) {
|
||||||
|
$return[$currency->id] = $currency->code;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all IBAN / SWIFT / account numbers
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function getIbans(array $array): array
|
||||||
|
{
|
||||||
|
$array = array_unique($array);
|
||||||
|
$return = [];
|
||||||
|
$set = AccountMeta::whereIn('account_id', $array)
|
||||||
|
->leftJoin('accounts', 'accounts.id', 'account_meta.account_id')
|
||||||
|
->where('accounts.user_id', $this->job->user_id)
|
||||||
|
->whereIn('account_meta.name', ['accountNumber', 'BIC', 'currency_id'])
|
||||||
|
->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data']);
|
||||||
|
/** @var AccountMeta $meta */
|
||||||
|
foreach ($set as $meta) {
|
||||||
|
$id = intval($meta->account_id);
|
||||||
|
$return[$id][$meta->name] = $meta->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns, if present, for the given journal ID's the notes.
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function getNotes(array $array): array
|
||||||
|
{
|
||||||
|
$array = array_unique($array);
|
||||||
|
$set = TransactionJournalMeta::whereIn('journal_meta.transaction_journal_id', $array)
|
||||||
|
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id')
|
||||||
|
->where('transaction_journals.user_id', $this->job->user_id)
|
||||||
|
->where('journal_meta.name', 'notes')->get(
|
||||||
|
['journal_meta.transaction_journal_id', 'journal_meta.data', 'journal_meta.id']
|
||||||
|
);
|
||||||
|
$return = [];
|
||||||
|
/** @var TransactionJournalMeta $meta */
|
||||||
|
foreach ($set as $meta) {
|
||||||
|
$id = intval($meta->transaction_journal_id);
|
||||||
|
$return[$id] = $meta->data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a comma joined list of all the users tags linked to these journals.
|
||||||
|
*
|
||||||
|
* @param array $array
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function getTags(array $array): array
|
||||||
|
{
|
||||||
|
$set = DB::table('tag_transaction_journal')
|
||||||
|
->whereIn('tag_transaction_journal.transaction_journal_id', $array)
|
||||||
|
->leftJoin('tags', 'tag_transaction_journal.tag_id', '=', 'tags.id')
|
||||||
|
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'tag_transaction_journal.transaction_journal_id')
|
||||||
|
->where('transaction_journals.user_id', $this->job->user_id)
|
||||||
|
->get(['tag_transaction_journal.transaction_journal_id', 'tags.tag']);
|
||||||
|
$result = [];
|
||||||
|
foreach ($set as $entry) {
|
||||||
|
$id = intval($entry->transaction_journal_id);
|
||||||
|
$result[$id] = isset($result[$id]) ? $result[$id] : [];
|
||||||
|
$result[$id][] = Crypt::decrypt($entry->tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,17 +26,15 @@ class BasicExporter
|
|||||||
{
|
{
|
||||||
/** @var ExportJob */
|
/** @var ExportJob */
|
||||||
protected $job;
|
protected $job;
|
||||||
|
/** @var Collection */
|
||||||
private $entries;
|
private $entries;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BasicExporter constructor.
|
* BasicExporter constructor.
|
||||||
*
|
|
||||||
* @param ExportJob $job
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->entries = new Collection;
|
$this->entries = new Collection;
|
||||||
$this->job = $job;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,5 +53,13 @@ class BasicExporter
|
|||||||
$this->entries = $entries;
|
$this->entries = $entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ExportJob $job
|
||||||
|
*/
|
||||||
|
public function setJob(ExportJob $job)
|
||||||
|
{
|
||||||
|
$this->job = $job;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Export\Exporter;
|
namespace FireflyIII\Export\Exporter;
|
||||||
|
|
||||||
use FireflyIII\Export\Entry\Entry;
|
use FireflyIII\Export\Entry\Entry;
|
||||||
use FireflyIII\Models\ExportJob;
|
|
||||||
use League\Csv\Writer;
|
use League\Csv\Writer;
|
||||||
use SplFileObject;
|
use SplFileObject;
|
||||||
|
|
||||||
@@ -30,13 +29,10 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* CsvExporter constructor.
|
* CsvExporter constructor.
|
||||||
*
|
|
||||||
* @param ExportJob $job
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ExportJob $job)
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct($job);
|
parent::__construct();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +58,11 @@ class CsvExporter extends BasicExporter implements ExporterInterface
|
|||||||
|
|
||||||
// get field names for header row:
|
// get field names for header row:
|
||||||
$first = $this->getEntries()->first();
|
$first = $this->getEntries()->first();
|
||||||
|
$headers = [];
|
||||||
|
if (!is_null($first)) {
|
||||||
$headers = array_keys(get_object_vars($first));
|
$headers = array_keys(get_object_vars($first));
|
||||||
|
}
|
||||||
|
|
||||||
$rows[] = $headers;
|
$rows[] = $headers;
|
||||||
|
|
||||||
/** @var Entry $entry */
|
/** @var Entry $entry */
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace FireflyIII\Export\Exporter;
|
namespace FireflyIII\Export\Exporter;
|
||||||
|
|
||||||
|
use FireflyIII\Models\ExportJob;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,4 +46,9 @@ interface ExporterInterface
|
|||||||
*/
|
*/
|
||||||
public function setEntries(Collection $entries);
|
public function setEntries(Collection $entries);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ExportJob $job
|
||||||
|
*/
|
||||||
|
public function setJob(ExportJob $job);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,195 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Processor.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace FireflyIII\Export;
|
|
||||||
|
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
|
||||||
use FireflyIII\Export\Collector\AttachmentCollector;
|
|
||||||
use FireflyIII\Export\Collector\JournalExportCollector;
|
|
||||||
use FireflyIII\Export\Collector\UploadCollector;
|
|
||||||
use FireflyIII\Export\Entry\Entry;
|
|
||||||
use FireflyIII\Models\ExportJob;
|
|
||||||
use Illuminate\Filesystem\FilesystemAdapter;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Log;
|
|
||||||
use Storage;
|
|
||||||
use ZipArchive;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Processor
|
|
||||||
*
|
|
||||||
* @package FireflyIII\Export
|
|
||||||
*/
|
|
||||||
class Processor implements ProcessorInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
/** @var Collection */
|
|
||||||
public $accounts;
|
|
||||||
/** @var string */
|
|
||||||
public $exportFormat;
|
|
||||||
/** @var bool */
|
|
||||||
public $includeAttachments;
|
|
||||||
/** @var bool */
|
|
||||||
public $includeOldUploads;
|
|
||||||
/** @var ExportJob */
|
|
||||||
public $job;
|
|
||||||
/** @var array */
|
|
||||||
public $settings;
|
|
||||||
/** @var Collection */
|
|
||||||
private $exportEntries;
|
|
||||||
/** @var Collection */
|
|
||||||
private $files;
|
|
||||||
/** @var Collection */
|
|
||||||
private $journals;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Processor constructor.
|
|
||||||
*
|
|
||||||
* @param array $settings
|
|
||||||
*/
|
|
||||||
public function __construct(array $settings)
|
|
||||||
{
|
|
||||||
// save settings
|
|
||||||
$this->settings = $settings;
|
|
||||||
$this->accounts = $settings['accounts'];
|
|
||||||
$this->exportFormat = $settings['exportFormat'];
|
|
||||||
$this->includeAttachments = $settings['includeAttachments'];
|
|
||||||
$this->includeOldUploads = $settings['includeOldUploads'];
|
|
||||||
$this->job = $settings['job'];
|
|
||||||
$this->journals = new Collection;
|
|
||||||
$this->exportEntries = new Collection;
|
|
||||||
$this->files = new Collection;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function collectAttachments(): bool
|
|
||||||
{
|
|
||||||
/** @var AttachmentCollector $attachmentCollector */
|
|
||||||
$attachmentCollector = app(AttachmentCollector::class, [$this->job]);
|
|
||||||
$attachmentCollector->setDates($this->settings['startDate'], $this->settings['endDate']);
|
|
||||||
$attachmentCollector->run();
|
|
||||||
$this->files = $this->files->merge($attachmentCollector->getEntries());
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function collectJournals(): bool
|
|
||||||
{
|
|
||||||
/** @var JournalExportCollector $collector */
|
|
||||||
$collector = app(JournalExportCollector::class, [$this->job]);
|
|
||||||
$collector->setDates($this->settings['startDate'], $this->settings['endDate']);
|
|
||||||
$collector->setAccounts($this->settings['accounts']);
|
|
||||||
$collector->run();
|
|
||||||
$this->journals = $collector->getEntries();
|
|
||||||
Log::debug(sprintf('Count %d journals in collectJournals() ', $this->journals->count()));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function collectOldUploads(): bool
|
|
||||||
{
|
|
||||||
/** @var UploadCollector $uploadCollector */
|
|
||||||
$uploadCollector = app(UploadCollector::class, [$this->job]);
|
|
||||||
$uploadCollector->run();
|
|
||||||
|
|
||||||
$this->files = $this->files->merge($uploadCollector->getEntries());
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function convertJournals(): bool
|
|
||||||
{
|
|
||||||
$count = 0;
|
|
||||||
foreach ($this->journals as $object) {
|
|
||||||
$this->exportEntries->push(Entry::fromObject($object));
|
|
||||||
$count++;
|
|
||||||
}
|
|
||||||
Log::debug(sprintf('Count %d entries in exportEntries (convertJournals)', $this->exportEntries->count()));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
* @throws FireflyException
|
|
||||||
*/
|
|
||||||
public function createZipFile(): bool
|
|
||||||
{
|
|
||||||
$zip = new ZipArchive;
|
|
||||||
$file = $this->job->key . '.zip';
|
|
||||||
$fullPath = storage_path('export') . '/' . $file;
|
|
||||||
|
|
||||||
if ($zip->open($fullPath, ZipArchive::CREATE) !== true) {
|
|
||||||
throw new FireflyException('Cannot store zip file.');
|
|
||||||
}
|
|
||||||
// for each file in the collection, add it to the zip file.
|
|
||||||
$disk = Storage::disk('export');
|
|
||||||
foreach ($this->getFiles() as $entry) {
|
|
||||||
// is part of this job?
|
|
||||||
$zipFileName = str_replace($this->job->key . '-', '', $entry);
|
|
||||||
$zip->addFromString($zipFileName, $disk->get($entry));
|
|
||||||
}
|
|
||||||
|
|
||||||
$zip->close();
|
|
||||||
|
|
||||||
// delete the files:
|
|
||||||
$this->deleteFiles();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function exportJournals(): bool
|
|
||||||
{
|
|
||||||
$exporterClass = config('firefly.export_formats.' . $this->exportFormat);
|
|
||||||
$exporter = app($exporterClass, [$this->job]);
|
|
||||||
$exporter->setEntries($this->exportEntries);
|
|
||||||
$exporter->run();
|
|
||||||
$this->files->push($exporter->getFileName());
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getFiles(): Collection
|
|
||||||
{
|
|
||||||
return $this->files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private function deleteFiles()
|
|
||||||
{
|
|
||||||
$disk = Storage::disk('export');
|
|
||||||
foreach ($this->getFiles() as $file) {
|
|
||||||
$disk->delete($file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -25,11 +25,8 @@ interface ProcessorInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Processor constructor.
|
* Processor constructor.
|
||||||
*
|
|
||||||
* @param array $settings
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function __construct(array $settings);
|
public function __construct();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -65,4 +62,9 @@ interface ProcessorInterface
|
|||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public function getFiles(): Collection;
|
public function getFiles(): Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $settings
|
||||||
|
*/
|
||||||
|
public function setSettings(array $settings);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Generator\Chart\Basic;
|
namespace FireflyIII\Generator\Chart\Basic;
|
||||||
|
|
||||||
use FireflyIII\Support\ChartColour;
|
use FireflyIII\Support\ChartColour;
|
||||||
|
use Steam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ChartJsGenerator
|
* Class ChartJsGenerator
|
||||||
@@ -80,6 +81,9 @@ class ChartJsGenerator implements GeneratorInterface
|
|||||||
if (isset($set['fill'])) {
|
if (isset($set['fill'])) {
|
||||||
$currentSet['fill'] = $set['fill'];
|
$currentSet['fill'] = $set['fill'];
|
||||||
}
|
}
|
||||||
|
if (isset($set['currency_symbol'])) {
|
||||||
|
$currentSet['currency_symbol'] = $set['currency_symbol'];
|
||||||
|
}
|
||||||
|
|
||||||
$chartData['datasets'][] = $currentSet;
|
$chartData['datasets'][] = $currentSet;
|
||||||
}
|
}
|
||||||
@@ -104,15 +108,22 @@ class ChartJsGenerator implements GeneratorInterface
|
|||||||
],
|
],
|
||||||
'labels' => [],
|
'labels' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// sort by value, keep keys.
|
||||||
|
// different sort when values are positive and when they're negative.
|
||||||
|
asort($data);
|
||||||
|
$next = next($data);
|
||||||
|
if (!is_bool($next) && bccomp($next, '0') === 1) {
|
||||||
|
// next is positive, sort other way around.
|
||||||
|
arsort($data);
|
||||||
|
}
|
||||||
|
unset($next);
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
|
|
||||||
// make larger than 0
|
// make larger than 0
|
||||||
if (bccomp($value, '0') === -1) {
|
$chartData['datasets'][0]['data'][] = floatval(Steam::positive($value));
|
||||||
$value = bcmul($value, '-1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$chartData['datasets'][0]['data'][] = $value;
|
|
||||||
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
|
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
|
||||||
$chartData['labels'][] = $key;
|
$chartData['labels'][] = $key;
|
||||||
$index++;
|
$index++;
|
||||||
|
|||||||
@@ -22,10 +22,15 @@ interface GeneratorInterface
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will generate a (ChartJS) compatible array from the given input. Expects this format:
|
* Will generate a Chart JS compatible array from the given input. Expects this format
|
||||||
|
*
|
||||||
|
* Will take labels for all from first set.
|
||||||
*
|
*
|
||||||
* 0: [
|
* 0: [
|
||||||
* 'label' => 'label of set',
|
* 'label' => 'label of set',
|
||||||
|
* 'type' => bar or line, optional
|
||||||
|
* 'yAxisID' => ID of yAxis, optional, will not be included when unused.
|
||||||
|
* 'fill' => if to fill a line? optional, will not be included when unused.
|
||||||
* 'entries' =>
|
* 'entries' =>
|
||||||
* [
|
* [
|
||||||
* 'label-of-entry' => 'value'
|
* 'label-of-entry' => 'value'
|
||||||
@@ -33,12 +38,16 @@ interface GeneratorInterface
|
|||||||
* ]
|
* ]
|
||||||
* 1: [
|
* 1: [
|
||||||
* 'label' => 'label of another set',
|
* 'label' => 'label of another set',
|
||||||
|
* 'type' => bar or line, optional
|
||||||
|
* 'yAxisID' => ID of yAxis, optional, will not be included when unused.
|
||||||
|
* 'fill' => if to fill a line? optional, will not be included when unused.
|
||||||
* 'entries' =>
|
* 'entries' =>
|
||||||
* [
|
* [
|
||||||
* 'label-of-entry' => 'value'
|
* 'label-of-entry' => 'value'
|
||||||
* ]
|
* ]
|
||||||
* ]
|
* ]
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five.
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
|||||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
|
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Steam;
|
use Steam;
|
||||||
|
|
||||||
@@ -129,36 +130,54 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Account $account
|
* @param Account $account
|
||||||
* @param Carbon $date
|
* @param Carbon $date
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) // not that long
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
private function getAuditReport(Account $account, Carbon $date): array
|
private function getAuditReport(Account $account, Carbon $date): array
|
||||||
{
|
{
|
||||||
|
/** @var CurrencyRepositoryInterface $currencyRepos */
|
||||||
|
$currencyRepos = app(CurrencyRepositoryInterface::class);
|
||||||
|
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end);
|
$collector->setAccounts(new Collection([$account]))->setRange($this->start, $this->end);
|
||||||
$journals = $collector->getJournals();
|
$journals = $collector->getJournals();
|
||||||
$journals = $journals->reverse();
|
$journals = $journals->reverse();
|
||||||
$dayBeforeBalance = Steam::balance($account, $date);
|
$dayBeforeBalance = Steam::balance($account, $date);
|
||||||
$startBalance = $dayBeforeBalance;
|
$startBalance = $dayBeforeBalance;
|
||||||
|
$currency = $currencyRepos->find(intval($account->getMeta('currency_id')));
|
||||||
|
|
||||||
/** @var Transaction $journal */
|
/** @var Transaction $journal */
|
||||||
foreach ($journals as $transaction) {
|
foreach ($journals as $transaction) {
|
||||||
$transaction->before = $startBalance;
|
$transaction->before = $startBalance;
|
||||||
$transactionAmount = $transaction->transaction_amount;
|
$transactionAmount = $transaction->transaction_amount;
|
||||||
|
|
||||||
|
if ($currency->id === $transaction->foreign_currency_id) {
|
||||||
|
$transactionAmount = $transaction->transaction_foreign_amount;
|
||||||
|
}
|
||||||
|
|
||||||
$newBalance = bcadd($startBalance, $transactionAmount);
|
$newBalance = bcadd($startBalance, $transactionAmount);
|
||||||
$transaction->after = $newBalance;
|
$transaction->after = $newBalance;
|
||||||
$startBalance = $newBalance;
|
$startBalance = $newBalance;
|
||||||
|
$transaction->currency = $currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Reverse set again.
|
|
||||||
*/
|
|
||||||
$return = [
|
$return = [
|
||||||
'journals' => $journals->reverse(),
|
'journals' => $journals->reverse(),
|
||||||
'exists' => $journals->count() > 0,
|
'exists' => $journals->count() > 0,
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ use Carbon\Carbon;
|
|||||||
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
||||||
use FireflyIII\Generator\Report\Support;
|
use FireflyIII\Generator\Report\Support;
|
||||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
|
use FireflyIII\Helpers\Filter\OpposingAccountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\PositiveAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -132,51 +135,19 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $tags
|
||||||
* @param int $sortFlag
|
|
||||||
*
|
*
|
||||||
* @return array
|
* @return ReportGeneratorInterface
|
||||||
*/
|
*/
|
||||||
private function getAverages(Collection $collection, int $sortFlag): array
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
{
|
{
|
||||||
$result = [];
|
return $this;
|
||||||
/** @var Transaction $transaction */
|
|
||||||
foreach ($collection as $transaction) {
|
|
||||||
// opposing name and ID:
|
|
||||||
$opposingId = $transaction->opposing_account_id;
|
|
||||||
|
|
||||||
// is not set?
|
|
||||||
if (!isset($result[$opposingId])) {
|
|
||||||
$name = $transaction->opposing_account_name;
|
|
||||||
$result[$opposingId] = [
|
|
||||||
'name' => $name,
|
|
||||||
'count' => 1,
|
|
||||||
'id' => $opposingId,
|
|
||||||
'average' => $transaction->transaction_amount,
|
|
||||||
'sum' => $transaction->transaction_amount,
|
|
||||||
];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$result[$opposingId]['count']++;
|
|
||||||
$result[$opposingId]['sum'] = bcadd($result[$opposingId]['sum'], $transaction->transaction_amount);
|
|
||||||
$result[$opposingId]['average'] = bcdiv($result[$opposingId]['sum'], strval($result[$opposingId]['count']));
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort result by average:
|
|
||||||
$average = [];
|
|
||||||
foreach ($result as $key => $row) {
|
|
||||||
$average[$key] = floatval($row['average']);
|
|
||||||
}
|
|
||||||
|
|
||||||
array_multisort($average, $sortFlag, $result);
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
private function getExpenses(): Collection
|
protected function getExpenses(): Collection
|
||||||
{
|
{
|
||||||
if ($this->expenses->count() > 0) {
|
if ($this->expenses->count() > 0) {
|
||||||
Log::debug('Return previous set of expenses.');
|
Log::debug('Return previous set of expenses.');
|
||||||
@@ -185,47 +156,21 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
||||||
->setTypes([TransactionType::WITHDRAWAL])
|
->setTypes([TransactionType::WITHDRAWAL])
|
||||||
->setBudgets($this->budgets)->withOpposingAccount()->disableFilter();
|
->setBudgets($this->budgets)->withOpposingAccount();
|
||||||
|
$collector->removeFilter(TransferFilter::class);
|
||||||
|
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
$collector->addFilter(PositiveAmountFilter::class);
|
||||||
|
|
||||||
$accountIds = $this->accounts->pluck('id')->toArray();
|
|
||||||
$transactions = $collector->getJournals();
|
$transactions = $collector->getJournals();
|
||||||
$transactions = self::filterExpenses($transactions, $accountIds);
|
|
||||||
$this->expenses = $transactions;
|
$this->expenses = $transactions;
|
||||||
|
|
||||||
return $transactions;
|
return $transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
private function getTopExpenses(): Collection
|
|
||||||
{
|
|
||||||
$transactions = $this->getExpenses()->sortBy('transaction_amount');
|
|
||||||
|
|
||||||
return $transactions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Collection $collection
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function summarizeByAccount(Collection $collection): array
|
|
||||||
{
|
|
||||||
$result = [];
|
|
||||||
/** @var Transaction $transaction */
|
|
||||||
foreach ($collection as $transaction) {
|
|
||||||
$accountId = $transaction->account_id;
|
|
||||||
$result[$accountId] = $result[$accountId] ?? '0';
|
|
||||||
$result[$accountId] = bcadd($transaction->transaction_amount, $result[$accountId]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ use Carbon\Carbon;
|
|||||||
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
||||||
use FireflyIII\Generator\Report\Support;
|
use FireflyIII\Generator\Report\Support;
|
||||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
|
use FireflyIII\Helpers\Filter\NegativeAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\OpposingAccountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\PositiveAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -142,51 +146,19 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $tags
|
||||||
* @param int $sortFlag
|
|
||||||
*
|
*
|
||||||
* @return array
|
* @return ReportGeneratorInterface
|
||||||
*/
|
*/
|
||||||
private function getAverages(Collection $collection, int $sortFlag): array
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
{
|
{
|
||||||
$result = [];
|
return $this;
|
||||||
/** @var Transaction $transaction */
|
|
||||||
foreach ($collection as $transaction) {
|
|
||||||
// opposing name and ID:
|
|
||||||
$opposingId = $transaction->opposing_account_id;
|
|
||||||
|
|
||||||
// is not set?
|
|
||||||
if (!isset($result[$opposingId])) {
|
|
||||||
$name = $transaction->opposing_account_name;
|
|
||||||
$result[$opposingId] = [
|
|
||||||
'name' => $name,
|
|
||||||
'count' => 1,
|
|
||||||
'id' => $opposingId,
|
|
||||||
'average' => $transaction->transaction_amount,
|
|
||||||
'sum' => $transaction->transaction_amount,
|
|
||||||
];
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$result[$opposingId]['count']++;
|
|
||||||
$result[$opposingId]['sum'] = bcadd($result[$opposingId]['sum'], $transaction->transaction_amount);
|
|
||||||
$result[$opposingId]['average'] = bcdiv($result[$opposingId]['sum'], strval($result[$opposingId]['count']));
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort result by average:
|
|
||||||
$average = [];
|
|
||||||
foreach ($result as $key => $row) {
|
|
||||||
$average[$key] = floatval($row['average']);
|
|
||||||
}
|
|
||||||
|
|
||||||
array_multisort($average, $sortFlag, $result);
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
private function getExpenses(): Collection
|
protected function getExpenses(): Collection
|
||||||
{
|
{
|
||||||
if ($this->expenses->count() > 0) {
|
if ($this->expenses->count() > 0) {
|
||||||
Log::debug('Return previous set of expenses.');
|
Log::debug('Return previous set of expenses.');
|
||||||
@@ -195,14 +167,16 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
||||||
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||||
->setCategories($this->categories)->withOpposingAccount()->disableFilter();
|
->setCategories($this->categories)->withOpposingAccount();
|
||||||
|
$collector->removeFilter(TransferFilter::class);
|
||||||
|
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
$collector->addFilter(PositiveAmountFilter::class);
|
||||||
|
|
||||||
$accountIds = $this->accounts->pluck('id')->toArray();
|
|
||||||
$transactions = $collector->getJournals();
|
$transactions = $collector->getJournals();
|
||||||
$transactions = self::filterExpenses($transactions, $accountIds);
|
|
||||||
$this->expenses = $transactions;
|
$this->expenses = $transactions;
|
||||||
|
|
||||||
return $transactions;
|
return $transactions;
|
||||||
@@ -211,104 +185,27 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
|||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
private function getIncome(): Collection
|
protected function getIncome(): Collection
|
||||||
{
|
{
|
||||||
if ($this->income->count() > 0) {
|
if ($this->income->count() > 0) {
|
||||||
return $this->income;
|
return $this->income;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
||||||
->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
||||||
->setCategories($this->categories)->withOpposingAccount();
|
->setCategories($this->categories)->withOpposingAccount();
|
||||||
$accountIds = $this->accounts->pluck('id')->toArray();
|
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
$collector->addFilter(NegativeAmountFilter::class);
|
||||||
|
|
||||||
$transactions = $collector->getJournals();
|
$transactions = $collector->getJournals();
|
||||||
$transactions = self::filterIncome($transactions, $accountIds);
|
|
||||||
$this->income = $transactions;
|
$this->income = $transactions;
|
||||||
|
|
||||||
return $transactions;
|
return $transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly five.
|
|
||||||
* @param array $spent
|
|
||||||
* @param array $earned
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function getObjectSummary(array $spent, array $earned): array
|
|
||||||
{
|
|
||||||
$return = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int $accountId
|
|
||||||
* @var string $entry
|
|
||||||
*/
|
|
||||||
foreach ($spent as $objectId => $entry) {
|
|
||||||
if (!isset($return[$objectId])) {
|
|
||||||
$return[$objectId] = ['spent' => 0, 'earned' => 0];
|
|
||||||
}
|
|
||||||
|
|
||||||
$return[$objectId]['spent'] = $entry;
|
|
||||||
}
|
|
||||||
unset($entry);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var int $accountId
|
|
||||||
* @var string $entry
|
|
||||||
*/
|
|
||||||
foreach ($earned as $objectId => $entry) {
|
|
||||||
if (!isset($return[$objectId])) {
|
|
||||||
$return[$objectId] = ['spent' => 0, 'earned' => 0];
|
|
||||||
}
|
|
||||||
|
|
||||||
$return[$objectId]['earned'] = $entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
private function getTopExpenses(): Collection
|
|
||||||
{
|
|
||||||
$transactions = $this->getExpenses()->sortBy('transaction_amount');
|
|
||||||
|
|
||||||
return $transactions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
private function getTopIncome(): Collection
|
|
||||||
{
|
|
||||||
$transactions = $this->getIncome()->sortByDesc('transaction_amount');
|
|
||||||
|
|
||||||
return $transactions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Collection $collection
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function summarizeByAccount(Collection $collection): array
|
|
||||||
{
|
|
||||||
$result = [];
|
|
||||||
/** @var Transaction $transaction */
|
|
||||||
foreach ($collection as $transaction) {
|
|
||||||
$accountId = $transaction->account_id;
|
|
||||||
$result[$accountId] = $result[$accountId] ?? '0';
|
|
||||||
$result[$accountId] = bcadd($transaction->transaction_amount, $result[$accountId]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace FireflyIII\Generator\Report\Category;
|
|||||||
/**
|
/**
|
||||||
* Class MultiYearReportGenerator
|
* Class MultiYearReportGenerator
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Generator\Report\Audit
|
* @package FireflyIII\Generator\Report\Category
|
||||||
*/
|
*/
|
||||||
class MultiYearReportGenerator extends MonthReportGenerator
|
class MultiYearReportGenerator extends MonthReportGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace FireflyIII\Generator\Report\Category;
|
|||||||
/**
|
/**
|
||||||
* Class YearReportGenerator
|
* Class YearReportGenerator
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Generator\Report\Audit
|
* @package FireflyIII\Generator\Report\Category
|
||||||
*/
|
*/
|
||||||
class YearReportGenerator extends MonthReportGenerator
|
class YearReportGenerator extends MonthReportGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ReportGeneratorFactory
|
|||||||
$class = sprintf('FireflyIII\Generator\Report\%s\%sReportGenerator', $type, $period);
|
$class = sprintf('FireflyIII\Generator\Report\%s\%sReportGenerator', $type, $period);
|
||||||
if (class_exists($class)) {
|
if (class_exists($class)) {
|
||||||
/** @var ReportGeneratorInterface $obj */
|
/** @var ReportGeneratorInterface $obj */
|
||||||
$obj = new $class;
|
$obj = app($class);
|
||||||
$obj->setStartDate($start);
|
$obj->setStartDate($start);
|
||||||
$obj->setEndDate($end);
|
$obj->setEndDate($end);
|
||||||
|
|
||||||
|
|||||||
@@ -64,4 +64,11 @@ interface ReportGeneratorInterface
|
|||||||
*/
|
*/
|
||||||
public function setStartDate(Carbon $date): ReportGeneratorInterface;
|
public function setStartDate(Carbon $date): ReportGeneratorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,4 +106,14 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,4 +103,14 @@ class MultiYearReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,4 +103,14 @@ class YearReportGenerator implements ReportGeneratorInterface
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace FireflyIII\Generator\Report;
|
|||||||
|
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,57 +24,122 @@ use Log;
|
|||||||
*/
|
*/
|
||||||
class Support
|
class Support
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
|
||||||
* @param array $accounts
|
|
||||||
*
|
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public static function filterExpenses(Collection $collection, array $accounts): Collection
|
public function getTopExpenses(): Collection
|
||||||
{
|
{
|
||||||
return self::filterTransactions($collection, $accounts, 1);
|
$transactions = $this->getExpenses()->sortBy('transaction_amount');
|
||||||
|
|
||||||
|
return $transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getTopIncome(): Collection
|
||||||
|
{
|
||||||
|
$transactions = $this->getIncome()->sortByDesc('transaction_amount');
|
||||||
|
|
||||||
|
return $transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
* @param array $accounts
|
* @param int $sortFlag
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function filterIncome(Collection $collection, array $accounts): Collection
|
protected function getAverages(Collection $collection, int $sortFlag): array
|
||||||
{
|
{
|
||||||
return self::filterTransactions($collection, $accounts, -1);
|
$result = [];
|
||||||
|
/** @var Transaction $transaction */
|
||||||
|
foreach ($collection as $transaction) {
|
||||||
|
// opposing name and ID:
|
||||||
|
$opposingId = $transaction->opposing_account_id;
|
||||||
|
|
||||||
|
// is not set?
|
||||||
|
if (!isset($result[$opposingId])) {
|
||||||
|
$name = $transaction->opposing_account_name;
|
||||||
|
$result[$opposingId] = [
|
||||||
|
'name' => $name,
|
||||||
|
'count' => 1,
|
||||||
|
'id' => $opposingId,
|
||||||
|
'average' => $transaction->transaction_amount,
|
||||||
|
'sum' => $transaction->transaction_amount,
|
||||||
|
];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$result[$opposingId]['count']++;
|
||||||
|
$result[$opposingId]['sum'] = bcadd($result[$opposingId]['sum'], $transaction->transaction_amount);
|
||||||
|
$result[$opposingId]['average'] = bcdiv($result[$opposingId]['sum'], strval($result[$opposingId]['count']));
|
||||||
|
}
|
||||||
|
|
||||||
|
// sort result by average:
|
||||||
|
$average = [];
|
||||||
|
foreach ($result as $key => $row) {
|
||||||
|
$average[$key] = floatval($row['average']);
|
||||||
|
}
|
||||||
|
|
||||||
|
array_multisort($average, $sortFlag, $result);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly five.
|
||||||
|
* @param array $spent
|
||||||
|
* @param array $earned
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function getObjectSummary(array $spent, array $earned): array
|
||||||
|
{
|
||||||
|
$return = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int $accountId
|
||||||
|
* @var string $entry
|
||||||
|
*/
|
||||||
|
foreach ($spent as $objectId => $entry) {
|
||||||
|
if (!isset($return[$objectId])) {
|
||||||
|
$return[$objectId] = ['spent' => 0, 'earned' => 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$return[$objectId]['spent'] = $entry;
|
||||||
|
}
|
||||||
|
unset($entry);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int $accountId
|
||||||
|
* @var string $entry
|
||||||
|
*/
|
||||||
|
foreach ($earned as $objectId => $entry) {
|
||||||
|
if (!isset($return[$objectId])) {
|
||||||
|
$return[$objectId] = ['spent' => 0, 'earned' => 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$return[$objectId]['earned'] = $entry;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Collection $collection
|
* @param Collection $collection
|
||||||
* @param array $accounts
|
|
||||||
* @param int $modifier
|
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function filterTransactions(Collection $collection, array $accounts, int $modifier): Collection
|
protected function summarizeByAccount(Collection $collection): array
|
||||||
{
|
{
|
||||||
$result = $collection->filter(
|
$result = [];
|
||||||
function (Transaction $transaction) use ($accounts, $modifier) {
|
/** @var Transaction $transaction */
|
||||||
$opposing = $transaction->opposing_account_id;
|
foreach ($collection as $transaction) {
|
||||||
// remove internal transfer
|
$accountId = $transaction->account_id;
|
||||||
if (in_array($opposing, $accounts)) {
|
$result[$accountId] = $result[$accountId] ?? '0';
|
||||||
Log::debug(sprintf('Filtered #%d because its opposite is in accounts.', $transaction->id));
|
$result[$accountId] = bcadd($transaction->transaction_amount, $result[$accountId]);
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
// remove positive amount
|
|
||||||
if (bccomp($transaction->transaction_amount, '0') === $modifier) {
|
|
||||||
Log::debug(sprintf('Filtered #%d because amount is %f.', $transaction->id, $transaction->transaction_amount));
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $transaction;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
228
app/Generator/Report/Tag/MonthReportGenerator.php
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* MonthReportGenerator.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Generator\Report\Tag;
|
||||||
|
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use FireflyIII\Generator\Report\ReportGeneratorInterface;
|
||||||
|
use FireflyIII\Generator\Report\Support;
|
||||||
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
|
use FireflyIII\Helpers\Filter\NegativeAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\OpposingAccountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\PositiveAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||||
|
use FireflyIII\Models\Tag;
|
||||||
|
use FireflyIII\Models\Transaction;
|
||||||
|
use FireflyIII\Models\TransactionType;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class MonthReportGenerator
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Generator\Report\Tag
|
||||||
|
*/
|
||||||
|
class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Collection */
|
||||||
|
private $accounts;
|
||||||
|
/** @var Carbon */
|
||||||
|
private $end;
|
||||||
|
/** @var Collection */
|
||||||
|
private $expenses;
|
||||||
|
/** @var Collection */
|
||||||
|
private $income;
|
||||||
|
/** @var Carbon */
|
||||||
|
private $start;
|
||||||
|
/** @var Collection */
|
||||||
|
private $tags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MonthReportGenerator constructor.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->expenses = new Collection;
|
||||||
|
$this->income = new Collection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function generate(): string
|
||||||
|
{
|
||||||
|
$accountIds = join(',', $this->accounts->pluck('id')->toArray());
|
||||||
|
$tagTags = join(',', $this->tags->pluck('tag')->toArray());
|
||||||
|
$reportType = 'tag';
|
||||||
|
$expenses = $this->getExpenses();
|
||||||
|
$income = $this->getIncome();
|
||||||
|
$accountSummary = $this->getObjectSummary($this->summarizeByAccount($expenses), $this->summarizeByAccount($income));
|
||||||
|
$tagSummary = $this->getObjectSummary($this->summarizeByTag($expenses), $this->summarizeByTag($income));
|
||||||
|
$averageExpenses = $this->getAverages($expenses, SORT_ASC);
|
||||||
|
$averageIncome = $this->getAverages($income, SORT_DESC);
|
||||||
|
$topExpenses = $this->getTopExpenses();
|
||||||
|
$topIncome = $this->getTopIncome();
|
||||||
|
|
||||||
|
|
||||||
|
// render!
|
||||||
|
return view(
|
||||||
|
'reports.tag.month', compact(
|
||||||
|
'accountIds', 'tagTags', 'reportType', 'accountSummary', 'tagSummary', 'averageExpenses', 'averageIncome', 'topIncome',
|
||||||
|
'topExpenses'
|
||||||
|
)
|
||||||
|
)->with('start', $this->start)->with('end', $this->end)->with('tags', $this->tags)->with('accounts', $this->accounts)->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $accounts
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setAccounts(Collection $accounts): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
$this->accounts = $accounts;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $budgets
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setBudgets(Collection $budgets): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $categories
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setCategories(Collection $categories): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Carbon $date
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setEndDate(Carbon $date): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
$this->end = $date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Carbon $date
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setStartDate(Carbon $date): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
$this->start = $date;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return ReportGeneratorInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): ReportGeneratorInterface
|
||||||
|
{
|
||||||
|
$this->tags = $tags;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
protected function getExpenses(): Collection
|
||||||
|
{
|
||||||
|
if ($this->expenses->count() > 0) {
|
||||||
|
Log::debug('Return previous set of expenses.');
|
||||||
|
|
||||||
|
return $this->expenses;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
$collector = app(JournalCollectorInterface::class);
|
||||||
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
||||||
|
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||||
|
->setTags($this->tags)->withOpposingAccount();
|
||||||
|
$collector->removeFilter(TransferFilter::class);
|
||||||
|
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
$collector->addFilter(PositiveAmountFilter::class);
|
||||||
|
|
||||||
|
$transactions = $collector->getJournals();
|
||||||
|
|
||||||
|
$this->expenses = $transactions;
|
||||||
|
|
||||||
|
return $transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
protected function getIncome(): Collection
|
||||||
|
{
|
||||||
|
if ($this->income->count() > 0) {
|
||||||
|
return $this->income;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
$collector = app(JournalCollectorInterface::class);
|
||||||
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)
|
||||||
|
->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])
|
||||||
|
->setTags($this->tags)->withOpposingAccount();
|
||||||
|
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
$collector->addFilter(NegativeAmountFilter::class);
|
||||||
|
|
||||||
|
$transactions = $collector->getJournals();
|
||||||
|
$this->income = $transactions;
|
||||||
|
|
||||||
|
return $transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $collection
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function summarizeByTag(Collection $collection): array
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
/** @var Transaction $transaction */
|
||||||
|
foreach ($collection as $transaction) {
|
||||||
|
$journal = $transaction->transactionJournal;
|
||||||
|
$journalTags = $journal->tags;
|
||||||
|
/** @var Tag $journalTag */
|
||||||
|
foreach ($journalTags as $journalTag) {
|
||||||
|
$journalTagId = $journalTag->id;
|
||||||
|
$result[$journalTagId] = $result[$journalTagId] ?? '0';
|
||||||
|
$result[$journalTagId] = bcadd($transaction->transaction_amount, $result[$journalTagId]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
25
app/Generator/Report/Tag/MultiYearReportGenerator.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* MultiYearReportGenerator.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Generator\Report\Tag;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class MultiYearReportGenerator
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Generator\Report\Tag
|
||||||
|
*/
|
||||||
|
class MultiYearReportGenerator extends MonthReportGenerator
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Doesn't do anything different.
|
||||||
|
*/
|
||||||
|
}
|
||||||
26
app/Generator/Report/Tag/YearReportGenerator.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* YearReportGenerator.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Generator\Report\Tag;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class YearReportGenerator
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Generator\Report\Tag
|
||||||
|
*/
|
||||||
|
class YearReportGenerator extends MonthReportGenerator
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Doesn't do anything different.
|
||||||
|
*/
|
||||||
|
}
|
||||||
56
app/Handlers/Events/AdminEventHandler.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* AdminEventHandler.php
|
||||||
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||||
|
* This software may be modified and distributed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||||
|
*
|
||||||
|
* See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace FireflyIII\Handlers\Events;
|
||||||
|
|
||||||
|
use FireflyIII\Events\AdminRequestedTestMessage;
|
||||||
|
use FireflyIII\Mail\AdminTestMail;
|
||||||
|
use Log;
|
||||||
|
use Mail;
|
||||||
|
use Session;
|
||||||
|
use Swift_TransportException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class AdminEventHandler
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Handlers\Events
|
||||||
|
*/
|
||||||
|
class AdminEventHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param AdminRequestedTestMessage $event
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function sendTestMessage(AdminRequestedTestMessage $event): bool
|
||||||
|
{
|
||||||
|
|
||||||
|
$email = $event->user->email;
|
||||||
|
$ipAddress = $event->ipAddress;
|
||||||
|
|
||||||
|
Log::debug(sprintf('Now in sendTestMessage event handler. Email is %s, IP is %s', $email, $ipAddress));
|
||||||
|
try {
|
||||||
|
Log::debug('Trying to send message...');
|
||||||
|
Mail::to($email)->send(new AdminTestMail($email, $ipAddress));
|
||||||
|
// @codeCoverageIgnoreStart
|
||||||
|
} catch (Swift_TransportException $e) {
|
||||||
|
Log::debug('Send message failed! :(');
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
Log::error($e->getTraceAsString());
|
||||||
|
Session::flash('error', 'Possible email error: ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
Log::debug('If no error above this line, message was sent.');
|
||||||
|
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,59 +14,96 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Handlers\Events;
|
namespace FireflyIII\Handlers\Events;
|
||||||
|
|
||||||
use FireflyIII\Events\StoredTransactionJournal;
|
use FireflyIII\Events\StoredTransactionJournal;
|
||||||
use FireflyIII\Models\PiggyBank;
|
|
||||||
use FireflyIII\Models\PiggyBankEvent;
|
|
||||||
use FireflyIII\Models\PiggyBankRepetition;
|
|
||||||
use FireflyIII\Models\Rule;
|
use FireflyIII\Models\Rule;
|
||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface as JRI;
|
||||||
use FireflyIII\Rules\Processor;
|
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface as PRI;
|
||||||
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface as RGRI;
|
||||||
use FireflyIII\Support\Events\BillScanner;
|
use FireflyIII\Support\Events\BillScanner;
|
||||||
|
use FireflyIII\TransactionRules\Processor;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* Class StoredJournalEventHandler
|
* Class StoredJournalEventHandler
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Handlers\Events
|
* @package FireflyIII\Handlers\Events
|
||||||
*/
|
*/
|
||||||
class StoredJournalEventHandler
|
class StoredJournalEventHandler
|
||||||
{
|
{
|
||||||
|
/** @var JRI */
|
||||||
|
public $journalRepository;
|
||||||
|
/** @var PRI */
|
||||||
|
public $repository;
|
||||||
|
|
||||||
|
/** @var RGRI */
|
||||||
|
public $ruleGroupRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StoredJournalEventHandler constructor.
|
||||||
|
*
|
||||||
|
* @param PRI $repository
|
||||||
|
* @param JRI $journalRepository
|
||||||
|
* @param RGRI $ruleGroupRepository
|
||||||
|
*/
|
||||||
|
public function __construct(PRI $repository, JRI $journalRepository, RGRI $ruleGroupRepository)
|
||||||
|
{
|
||||||
|
$this->repository = $repository;
|
||||||
|
$this->journalRepository = $journalRepository;
|
||||||
|
$this->ruleGroupRepository = $ruleGroupRepository;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method connects a new transfer to a piggy bank.
|
* This method connects a new transfer to a piggy bank.
|
||||||
*
|
*
|
||||||
* @param StoredTransactionJournal $event
|
* @param StoredTransactionJournal $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function connectToPiggyBank(StoredTransactionJournal $event): bool
|
public function connectToPiggyBank(StoredTransactionJournal $event): bool
|
||||||
{
|
{
|
||||||
/** @var TransactionJournal $journal */
|
|
||||||
$journal = $event->journal;
|
$journal = $event->journal;
|
||||||
$piggyBankId = $event->piggyBankId;
|
$piggyBankId = $event->piggyBankId;
|
||||||
Log::debug(sprintf('Trying to connect journal %d to piggy bank %d.', $journal->id, $piggyBankId));
|
$piggyBank = $this->repository->find($piggyBankId);
|
||||||
|
|
||||||
/*
|
// is a transfer?
|
||||||
* Verify existence of piggy bank:
|
if (!$this->journalRepository->isTransfer($journal)) {
|
||||||
*/
|
Log::info(sprintf('Will not connect %s #%d to a piggy bank.', $journal->transactionType->type, $journal->id));
|
||||||
if (!$this->verifyExistence($event)) {
|
|
||||||
Log::error(sprintf('No such piggy bank or no repetition on %s', $journal->date->format('Y-m-d')));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// piggy exists?
|
||||||
* Get relevant data:
|
if (is_null($piggyBank->id)) {
|
||||||
*/
|
Log::error(sprintf('There is no piggy bank with ID #%d', $piggyBankId));
|
||||||
$piggyBank = $journal->user->piggyBanks()->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
|
|
||||||
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
return true;
|
||||||
$amount = $this->getExactAmount($journal, $piggyBank, $repetition);
|
}
|
||||||
$repetition->currentamount = bcadd($repetition->currentamount, $amount);
|
|
||||||
$repetition->save();
|
// repetition exists?
|
||||||
|
$repetition = $this->repository->getRepetition($piggyBank, $journal->date);
|
||||||
|
if (is_null($repetition->id)) {
|
||||||
|
Log::error(sprintf('No piggy bank repetition on %s!', $journal->date->format('Y-m-d')));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the amount
|
||||||
|
$amount = $this->repository->getExactAmount($piggyBank, $repetition, $journal);
|
||||||
|
if (bccomp($amount, '0') === 0) {
|
||||||
|
Log::debug('Amount is zero, will not create event.');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// update amount
|
||||||
|
$this->repository->addAmountToRepetition($repetition, $amount);
|
||||||
|
$event = $this->repository->createEventWithJournal($piggyBank, $amount, $journal);
|
||||||
|
|
||||||
/** @var PiggyBankEvent $event */
|
|
||||||
$event = PiggyBankEvent::create(
|
|
||||||
['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount]
|
|
||||||
);
|
|
||||||
Log::debug(sprintf('Created piggy bank event #%d', $event->id));
|
Log::debug(sprintf('Created piggy bank event #%d', $event->id));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -83,16 +120,11 @@ class StoredJournalEventHandler
|
|||||||
{
|
{
|
||||||
// get all the user's rule groups, with the rules, order by 'order'.
|
// get all the user's rule groups, with the rules, order by 'order'.
|
||||||
$journal = $storedJournalEvent->journal;
|
$journal = $storedJournalEvent->journal;
|
||||||
$groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
|
$groups = $this->ruleGroupRepository->getActiveGroups($journal->user);
|
||||||
//
|
|
||||||
/** @var RuleGroup $group */
|
/** @var RuleGroup $group */
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
$rules = $group->rules()
|
$rules = $this->ruleGroupRepository->getActiveStoreRules($group);
|
||||||
->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 */
|
/** @var Rule $rule */
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
|
|
||||||
@@ -100,9 +132,8 @@ class StoredJournalEventHandler
|
|||||||
$processor->handleTransactionJournal($journal);
|
$processor->handleTransactionJournal($journal);
|
||||||
|
|
||||||
if ($rule->stop_processing) {
|
if ($rule->stop_processing) {
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,81 +154,4 @@ class StoredJournalEventHandler
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's 6 but I can live with it.
|
|
||||||
* @param TransactionJournal $journal
|
|
||||||
* @param PiggyBank $piggyBank
|
|
||||||
* @param PiggyBankRepetition $repetition
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function getExactAmount(TransactionJournal $journal, PiggyBank $piggyBank, PiggyBankRepetition $repetition): string
|
|
||||||
{
|
|
||||||
$amount = TransactionJournal::amountPositive($journal);
|
|
||||||
$sources = TransactionJournal::sourceAccountList($journal)->pluck('id')->toArray();
|
|
||||||
$room = bcsub(strval($piggyBank->targetamount), strval($repetition->currentamount));
|
|
||||||
$compare = bcmul($repetition->currentamount, '-1');
|
|
||||||
|
|
||||||
Log::debug(sprintf('Will add/remove %f to piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));
|
|
||||||
|
|
||||||
// if piggy account matches source account, the amount is positive
|
|
||||||
if (in_array($piggyBank->account_id, $sources)) {
|
|
||||||
$amount = bcmul($amount, '-1');
|
|
||||||
Log::debug(sprintf('Account #%d is the source, so will remove amount from piggy bank.', $piggyBank->account_id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// if the amount is positive, make sure it fits in piggy bank:
|
|
||||||
if (bccomp($amount, '0') === 1 && bccomp($room, $amount) === -1) {
|
|
||||||
// amount is positive and $room is smaller than $amount
|
|
||||||
Log::debug(sprintf('Room in piggy bank for extra money is %f', $room));
|
|
||||||
Log::debug(sprintf('There is NO room to add %f to piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));
|
|
||||||
Log::debug(sprintf('New amount is %f', $room));
|
|
||||||
|
|
||||||
return $room;
|
|
||||||
}
|
|
||||||
|
|
||||||
// amount is negative and $currentamount is smaller than $amount
|
|
||||||
if (bccomp($amount, '0') === -1 && bccomp($compare, $amount) === 1) {
|
|
||||||
Log::debug(sprintf('Max amount to remove is %f', $repetition->currentamount));
|
|
||||||
Log::debug(sprintf('Cannot remove %f from piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));
|
|
||||||
Log::debug(sprintf('New amount is %f', $compare));
|
|
||||||
|
|
||||||
return $compare;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param StoredTransactionJournal $event
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
private function verifyExistence(StoredTransactionJournal $event): bool
|
|
||||||
{
|
|
||||||
/** @var TransactionJournal $journal */
|
|
||||||
$journal = $event->journal;
|
|
||||||
$piggyBankId = $event->piggyBankId;
|
|
||||||
|
|
||||||
/** @var PiggyBank $piggyBank */
|
|
||||||
$piggyBank = $journal->user->piggyBanks()->where('piggy_banks.id', $piggyBankId)->first(['piggy_banks.*']);
|
|
||||||
|
|
||||||
if (is_null($piggyBank)) {
|
|
||||||
Log::error('No such piggy bank!');
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Log::debug(sprintf('Found piggy bank #%d: "%s"', $piggyBank->id, $piggyBank->name));
|
|
||||||
// update piggy bank rep for date of transaction journal.
|
|
||||||
$repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first();
|
|
||||||
if (is_null($repetition)) {
|
|
||||||
Log::error(sprintf('No piggy bank repetition on %s!', $journal->date->format('Y-m-d')));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,16 +17,31 @@ namespace FireflyIII\Handlers\Events;
|
|||||||
use FireflyIII\Events\UpdatedTransactionJournal;
|
use FireflyIII\Events\UpdatedTransactionJournal;
|
||||||
use FireflyIII\Models\Rule;
|
use FireflyIII\Models\Rule;
|
||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
use FireflyIII\Rules\Processor;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
use FireflyIII\Support\Events\BillScanner;
|
use FireflyIII\Support\Events\BillScanner;
|
||||||
|
use FireflyIII\TransactionRules\Processor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* Class UpdatedJournalEventHandler
|
* Class UpdatedJournalEventHandler
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Handlers\Events
|
* @package FireflyIII\Handlers\Events
|
||||||
*/
|
*/
|
||||||
class UpdatedJournalEventHandler
|
class UpdatedJournalEventHandler
|
||||||
{
|
{
|
||||||
|
/** @var RuleGroupRepositoryInterface */
|
||||||
|
public $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* StoredJournalEventHandler constructor.
|
||||||
|
*
|
||||||
|
* @param RuleGroupRepositoryInterface $ruleGroupRepository
|
||||||
|
*/
|
||||||
|
public function __construct(RuleGroupRepositoryInterface $ruleGroupRepository)
|
||||||
|
{
|
||||||
|
$this->repository = $ruleGroupRepository;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method will check all the rules when a journal is updated.
|
* This method will check all the rules when a journal is updated.
|
||||||
@@ -39,16 +54,11 @@ class UpdatedJournalEventHandler
|
|||||||
{
|
{
|
||||||
// get all the user's rule groups, with the rules, order by 'order'.
|
// get all the user's rule groups, with the rules, order by 'order'.
|
||||||
$journal = $updatedJournalEvent->journal;
|
$journal = $updatedJournalEvent->journal;
|
||||||
$groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get();
|
$groups = $this->repository->getActiveGroups($journal->user);
|
||||||
//
|
|
||||||
/** @var RuleGroup $group */
|
/** @var RuleGroup $group */
|
||||||
foreach ($groups as $group) {
|
foreach ($groups as $group) {
|
||||||
$rules = $group->rules()
|
$rules = $this->repository->getActiveUpdateRules($group);
|
||||||
->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 */
|
/** @var Rule $rule */
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
$processor = Processor::make($rule);
|
$processor = Processor::make($rule);
|
||||||
|
|||||||
@@ -15,11 +15,15 @@ namespace FireflyIII\Handlers\Events;
|
|||||||
|
|
||||||
use FireflyIII\Events\RegisteredUser;
|
use FireflyIII\Events\RegisteredUser;
|
||||||
use FireflyIII\Events\RequestedNewPassword;
|
use FireflyIII\Events\RequestedNewPassword;
|
||||||
|
use FireflyIII\Events\UserChangedEmail;
|
||||||
|
use FireflyIII\Mail\ConfirmEmailChangeMail;
|
||||||
|
use FireflyIII\Mail\RegisteredUser as RegisteredUserMail;
|
||||||
|
use FireflyIII\Mail\RequestedNewPassword as RequestedNewPasswordMail;
|
||||||
|
use FireflyIII\Mail\UndoEmailChangeMail;
|
||||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||||
use Illuminate\Mail\Message;
|
|
||||||
use Log;
|
use Log;
|
||||||
use Mail;
|
use Mail;
|
||||||
use Session;
|
use Preferences;
|
||||||
use Swift_TransportException;
|
use Swift_TransportException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,16 +59,50 @@ class UserEventHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle user logout events.
|
* @param UserChangedEmail $event
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function logoutUser(): bool
|
public function sendEmailChangeConfirmMail(UserChangedEmail $event): bool
|
||||||
{
|
{
|
||||||
// dump stuff from the session:
|
$newEmail = $event->newEmail;
|
||||||
Session::forget('twofactor-authenticated');
|
$oldEmail = $event->oldEmail;
|
||||||
Session::forget('twofactor-authenticated-date');
|
$user = $event->user;
|
||||||
|
$ipAddress = $event->ipAddress;
|
||||||
|
$token = Preferences::getForUser($user, 'email_change_confirm_token', 'invalid');
|
||||||
|
$uri = route('profile.confirm-email-change', [$token->data]);
|
||||||
|
try {
|
||||||
|
Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $uri, $ipAddress));
|
||||||
|
// @codeCoverageIgnoreStart
|
||||||
|
} catch (Swift_TransportException $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param UserChangedEmail $event
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function sendEmailChangeUndoMail(UserChangedEmail $event): bool
|
||||||
|
{
|
||||||
|
$newEmail = $event->newEmail;
|
||||||
|
$oldEmail = $event->oldEmail;
|
||||||
|
$user = $event->user;
|
||||||
|
$ipAddress = $event->ipAddress;
|
||||||
|
$token = Preferences::getForUser($user, 'email_change_undo_token', 'invalid');
|
||||||
|
$uri = route('profile.undo-email-change', [$token->data, hash('sha256', $oldEmail)]);
|
||||||
|
try {
|
||||||
|
Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $uri, $ipAddress));
|
||||||
|
// @codeCoverageIgnoreStart
|
||||||
|
} catch (Swift_TransportException $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,15 +121,14 @@ class UserEventHandler
|
|||||||
|
|
||||||
// send email.
|
// send email.
|
||||||
try {
|
try {
|
||||||
Mail::send(
|
Mail::to($email)->send(new RequestedNewPasswordMail($url, $ipAddress));
|
||||||
['emails.password-html', 'emails.password-text'], ['url' => $url, 'ip' => $ipAddress], function (Message $message) use ($email) {
|
// @codeCoverageIgnoreStart
|
||||||
$message->to($email, $email)->subject('Your password reset request');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (Swift_TransportException $e) {
|
} catch (Swift_TransportException $e) {
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,23 +145,23 @@ class UserEventHandler
|
|||||||
|
|
||||||
$sendMail = env('SEND_REGISTRATION_MAIL', true);
|
$sendMail = env('SEND_REGISTRATION_MAIL', true);
|
||||||
if (!$sendMail) {
|
if (!$sendMail) {
|
||||||
return true;
|
return true; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
// get the email address
|
// get the email address
|
||||||
$email = $event->user->email;
|
$email = $event->user->email;
|
||||||
$address = route('index');
|
$uri = route('index');
|
||||||
$ipAddress = $event->ipAddress;
|
$ipAddress = $event->ipAddress;
|
||||||
|
|
||||||
// send email.
|
// send email.
|
||||||
try {
|
try {
|
||||||
Mail::send(
|
Mail::to($email)->send(new RegisteredUserMail($uri, $ipAddress));
|
||||||
['emails.registered-html', 'emails.registered-text'], ['address' => $address, 'ip' => $ipAddress], function (Message $message) use ($email) {
|
// @codeCoverageIgnoreStart
|
||||||
$message->to($email, $email)->subject('Welcome to Firefly III!');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (Swift_TransportException $e) {
|
} catch (Swift_TransportException $e) {
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Helpers\Attachments;
|
namespace FireflyIII\Helpers\Attachments;
|
||||||
|
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use FireflyIII\Models\Attachment;
|
use FireflyIII\Models\Attachment;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
use Log;
|
||||||
use Storage;
|
use Storage;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
|
||||||
@@ -27,14 +30,16 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
|||||||
class AttachmentHelper implements AttachmentHelperInterface
|
class AttachmentHelper implements AttachmentHelperInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** @var Collection */
|
||||||
|
public $attachments;
|
||||||
/** @var MessageBag */
|
/** @var MessageBag */
|
||||||
public $errors;
|
public $errors;
|
||||||
/** @var MessageBag */
|
/** @var MessageBag */
|
||||||
public $messages;
|
public $messages;
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $allowedMimes;
|
protected $allowedMimes = [];
|
||||||
/** @var int */
|
/** @var int */
|
||||||
protected $maxUploadSize;
|
protected $maxUploadSize = 0;
|
||||||
|
|
||||||
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
/** @var \Illuminate\Contracts\Filesystem\Filesystem */
|
||||||
protected $uploadDisk;
|
protected $uploadDisk;
|
||||||
@@ -44,10 +49,11 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->maxUploadSize = config('firefly.maxUploadSize');
|
$this->maxUploadSize = intval(config('firefly.maxUploadSize'));
|
||||||
$this->allowedMimes = config('firefly.allowedMimes');
|
$this->allowedMimes = (array)config('firefly.allowedMimes');
|
||||||
$this->errors = new MessageBag;
|
$this->errors = new MessageBag;
|
||||||
$this->messages = new MessageBag;
|
$this->messages = new MessageBag;
|
||||||
|
$this->attachments = new Collection;
|
||||||
$this->uploadDisk = Storage::disk('upload');
|
$this->uploadDisk = Storage::disk('upload');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +69,14 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getAttachments(): Collection
|
||||||
|
{
|
||||||
|
return $this->attachments;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return MessageBag
|
* @return MessageBag
|
||||||
*/
|
*/
|
||||||
@@ -85,7 +99,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function saveAttachmentsForModel(Model $model, array $files = null): bool
|
public function saveAttachmentsForModel(Model $model, ?array $files): bool
|
||||||
{
|
{
|
||||||
if (is_array($files)) {
|
if (is_array($files)) {
|
||||||
foreach ($files as $entry) {
|
foreach ($files as $entry) {
|
||||||
@@ -109,7 +123,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
$md5 = md5_file($file->getRealPath());
|
$md5 = md5_file($file->getRealPath());
|
||||||
$name = $file->getClientOriginalName();
|
$name = $file->getClientOriginalName();
|
||||||
$class = get_class($model);
|
$class = get_class($model);
|
||||||
$count = auth()->user()->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
|
$count = $model->user->attachments()->where('md5', $md5)->where('attachable_id', $model->id)->where('attachable_type', $class)->count();
|
||||||
|
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
$msg = (string)trans('validation.file_already_attached', ['name' => $name]);
|
$msg = (string)trans('validation.file_already_attached', ['name' => $name]);
|
||||||
@@ -136,7 +150,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$attachment = new Attachment; // create Attachment object.
|
$attachment = new Attachment; // create Attachment object.
|
||||||
$attachment->user()->associate(auth()->user());
|
$attachment->user()->associate($model->user);
|
||||||
$attachment->attachable()->associate($model);
|
$attachment->attachable()->associate($model);
|
||||||
$attachment->md5 = md5_file($file->getRealPath());
|
$attachment->md5 = md5_file($file->getRealPath());
|
||||||
$attachment->filename = $file->getClientOriginalName();
|
$attachment->filename = $file->getClientOriginalName();
|
||||||
@@ -144,17 +158,20 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
$attachment->size = $file->getSize();
|
$attachment->size = $file->getSize();
|
||||||
$attachment->uploaded = 0;
|
$attachment->uploaded = 0;
|
||||||
$attachment->save();
|
$attachment->save();
|
||||||
|
Log::debug('Created attachment:', $attachment->toArray());
|
||||||
|
|
||||||
$fileObject = $file->openFile('r');
|
$fileObject = $file->openFile('r');
|
||||||
$fileObject->rewind();
|
$fileObject->rewind();
|
||||||
$content = $fileObject->fread($file->getSize());
|
$content = $fileObject->fread($file->getSize());
|
||||||
$encrypted = Crypt::encrypt($content);
|
$encrypted = Crypt::encrypt($content);
|
||||||
|
Log::debug(sprintf('Full file length is %d and upload size is %d.', strlen($content), $file->getSize()));
|
||||||
|
Log::debug(sprintf('Encrypted content is %d', strlen($encrypted)));
|
||||||
|
|
||||||
// store it:
|
// store it:
|
||||||
$this->uploadDisk->put($attachment->fileName(), $encrypted);
|
$this->uploadDisk->put($attachment->fileName(), $encrypted);
|
||||||
|
|
||||||
$attachment->uploaded = 1; // update attachment
|
$attachment->uploaded = 1; // update attachment
|
||||||
$attachment->save();
|
$attachment->save();
|
||||||
|
$this->attachments->push($attachment);
|
||||||
|
|
||||||
$name = e($file->getClientOriginalName()); // add message:
|
$name = e($file->getClientOriginalName()); // add message:
|
||||||
$msg = (string)trans('validation.file_attached', ['name' => $name]);
|
$msg = (string)trans('validation.file_attached', ['name' => $name]);
|
||||||
@@ -162,8 +179,6 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
|
|
||||||
// return it.
|
// return it.
|
||||||
return $attachment;
|
return $attachment;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,6 +202,8 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param UploadedFile $file
|
* @param UploadedFile $file
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -217,7 +234,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$this->validSize($file)) {
|
if (!$this->validSize($file)) {
|
||||||
return false;
|
return false; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
if ($this->hasFile($file, $model)) {
|
if ($this->hasFile($file, $model)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Helpers\Attachments;
|
namespace FireflyIII\Helpers\Attachments;
|
||||||
|
|
||||||
use FireflyIII\Models\Attachment;
|
use FireflyIII\Models\Attachment;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,6 +33,11 @@ interface AttachmentHelperInterface
|
|||||||
*/
|
*/
|
||||||
public function getAttachmentLocation(Attachment $attachment): string;
|
public function getAttachmentLocation(Attachment $attachment): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getAttachments(): Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return MessageBag
|
* @return MessageBag
|
||||||
*/
|
*/
|
||||||
@@ -44,8 +51,10 @@ interface AttachmentHelperInterface
|
|||||||
/**
|
/**
|
||||||
* @param Model $model
|
* @param Model $model
|
||||||
*
|
*
|
||||||
|
* @param null|array $files
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function saveAttachmentsForModel(Model $model, array $files = null): bool;
|
public function saveAttachmentsForModel(Model $model, ?array $files): bool;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,20 +12,28 @@ declare(strict_types = 1);
|
|||||||
namespace FireflyIII\Helpers\Chart;
|
namespace FireflyIII\Helpers\Chart;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Generator\Report\Support;
|
|
||||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||||
|
use FireflyIII\Helpers\Filter\NegativeAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\OpposingAccountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\PositiveAmountFilter;
|
||||||
|
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||||
|
use FireflyIII\Models\Tag;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionType;
|
use FireflyIII\Models\TransactionType;
|
||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||||
use FireflyIII\User;
|
use FireflyIII\User;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Steam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MetaPieChart
|
* Class MetaPieChart
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Helpers\Chart
|
* @package FireflyIII\Helpers\Chart
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
class MetaPieChart implements MetaPieChartInterface
|
class MetaPieChart implements MetaPieChartInterface
|
||||||
{
|
{
|
||||||
@@ -45,19 +53,20 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
'account' => ['opposing_account_id'],
|
'account' => ['opposing_account_id'],
|
||||||
'budget' => ['transaction_journal_budget_id', 'transaction_budget_id'],
|
'budget' => ['transaction_journal_budget_id', 'transaction_budget_id'],
|
||||||
'category' => ['transaction_journal_category_id', 'transaction_category_id'],
|
'category' => ['transaction_journal_category_id', 'transaction_category_id'],
|
||||||
|
'tag' => [],
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
protected $repositories
|
protected $repositories
|
||||||
= [
|
= [
|
||||||
'account' => AccountRepositoryInterface::class,
|
'account' => AccountRepositoryInterface::class,
|
||||||
'budget' => BudgetRepositoryInterface::class,
|
'budget' => BudgetRepositoryInterface::class,
|
||||||
'category' => CategoryRepositoryInterface::class,
|
'category' => CategoryRepositoryInterface::class,
|
||||||
|
'tag' => TagRepositoryInterface::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/** @var Carbon */
|
/** @var Carbon */
|
||||||
protected $start;
|
protected $start;
|
||||||
|
/** @var Collection */
|
||||||
|
protected $tags;
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $total = '0';
|
protected $total = '0';
|
||||||
/** @var User */
|
/** @var User */
|
||||||
@@ -68,6 +77,7 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
$this->accounts = new Collection;
|
$this->accounts = new Collection;
|
||||||
$this->budgets = new Collection;
|
$this->budgets = new Collection;
|
||||||
$this->categories = new Collection;
|
$this->categories = new Collection;
|
||||||
|
$this->tags = new Collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,33 +85,39 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
* @param string $group
|
* @param string $group
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
*/
|
*/
|
||||||
public function generate(string $direction, string $group): array
|
public function generate(string $direction, string $group): array
|
||||||
{
|
{
|
||||||
$transactions = $this->getTransactions($direction);
|
$transactions = $this->getTransactions($direction);
|
||||||
$grouped = $this->groupByFields($transactions, $this->grouping[$group]);
|
$grouped = $this->groupByFields($transactions, $this->grouping[$group]);
|
||||||
$chartData = $this->organizeByType($group, $grouped);
|
$chartData = $this->organizeByType($group, $grouped);
|
||||||
|
$key = strval(trans('firefly.everything_else'));
|
||||||
|
|
||||||
// also collect all other transactions
|
// also collect all other transactions
|
||||||
if ($this->collectOtherObjects && $direction === 'expense') {
|
if ($this->collectOtherObjects && $direction === 'expense') {
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [$this->user]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
|
$collector->setUser($this->user);
|
||||||
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)->setTypes([TransactionType::WITHDRAWAL]);
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)->setTypes([TransactionType::WITHDRAWAL]);
|
||||||
|
|
||||||
$journals = $collector->getJournals();
|
$journals = $collector->getJournals();
|
||||||
$sum = strval($journals->sum('transaction_amount'));
|
$sum = strval($journals->sum('transaction_amount'));
|
||||||
$sum = bcmul($sum, '-1');
|
$sum = bcmul($sum, '-1');
|
||||||
$sum = bcsub($sum, $this->total);
|
$sum = bcsub($sum, $this->total);
|
||||||
$chartData[strval(trans('firefly.everything_else'))] = $sum;
|
$chartData[$key] = $sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->collectOtherObjects && $direction === 'income') {
|
if ($this->collectOtherObjects && $direction === 'income') {
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
|
$collector->setUser($this->user);
|
||||||
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)->setTypes([TransactionType::DEPOSIT]);
|
$collector->setAccounts($this->accounts)->setRange($this->start, $this->end)->setTypes([TransactionType::DEPOSIT]);
|
||||||
$journals = $collector->getJournals();
|
$journals = $collector->getJournals();
|
||||||
$sum = strval($journals->sum('transaction_amount'));
|
$sum = strval($journals->sum('transaction_amount'));
|
||||||
$sum = bcsub($sum, $this->total);
|
$sum = bcsub($sum, $this->total);
|
||||||
$chartData[strval(trans('firefly.everything_else'))] = $sum;
|
$chartData[$key] = $sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $chartData;
|
return $chartData;
|
||||||
@@ -109,6 +125,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param Collection $accounts
|
* @param Collection $accounts
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -121,6 +139,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param Collection $budgets
|
* @param Collection $budgets
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -133,6 +153,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param Collection $categories
|
* @param Collection $categories
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -145,6 +167,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param bool $collectOtherObjects
|
* @param bool $collectOtherObjects
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -157,6 +181,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param Carbon $end
|
* @param Carbon $end
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -169,6 +195,8 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param Carbon $start
|
* @param Carbon $start
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -181,6 +209,22 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return MetaPieChartInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): MetaPieChartInterface
|
||||||
|
{
|
||||||
|
$this->tags = $tags;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param User $user
|
* @param User $user
|
||||||
*
|
*
|
||||||
* @return MetaPieChartInterface
|
* @return MetaPieChartInterface
|
||||||
@@ -192,37 +236,44 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getTransactions(string $direction)
|
/**
|
||||||
|
* @param string $direction
|
||||||
|
*
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
protected function getTransactions(string $direction): Collection
|
||||||
{
|
{
|
||||||
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$types = [TransactionType::DEPOSIT, TransactionType::TRANSFER];
|
$types = [TransactionType::DEPOSIT, TransactionType::TRANSFER];
|
||||||
$modifier = -1;
|
$collector->addFilter(NegativeAmountFilter::class);
|
||||||
if ($direction === 'expense') {
|
if ($direction === 'expense') {
|
||||||
$types = [TransactionType::WITHDRAWAL, TransactionType::TRANSFER];
|
$types = [TransactionType::WITHDRAWAL, TransactionType::TRANSFER];
|
||||||
$modifier = 1;
|
$collector->addFilter(PositiveAmountFilter::class);
|
||||||
|
$collector->removeFilter(NegativeAmountFilter::class);
|
||||||
}
|
}
|
||||||
/** @var JournalCollectorInterface $collector */
|
|
||||||
$collector = app(JournalCollectorInterface::class, [auth()->user()]);
|
$collector->setUser($this->user);
|
||||||
$collector->setAccounts($this->accounts);
|
$collector->setAccounts($this->accounts);
|
||||||
$collector->setRange($this->start, $this->end);
|
$collector->setRange($this->start, $this->end);
|
||||||
$collector->setTypes($types);
|
$collector->setTypes($types);
|
||||||
$collector->withOpposingAccount();
|
$collector->withOpposingAccount();
|
||||||
|
$collector->addFilter(OpposingAccountFilter::class);
|
||||||
|
|
||||||
if ($direction === 'income') {
|
if ($direction === 'income') {
|
||||||
$collector->disableFilter();
|
$collector->removeFilter(TransferFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->budgets->count() > 0) {
|
|
||||||
$collector->setBudgets($this->budgets);
|
$collector->setBudgets($this->budgets);
|
||||||
}
|
|
||||||
if ($this->categories->count() > 0) {
|
|
||||||
$collector->setCategories($this->categories);
|
$collector->setCategories($this->categories);
|
||||||
|
|
||||||
|
if ($this->tags->count() > 0) {
|
||||||
|
$collector->setTags($this->tags);
|
||||||
|
$collector->withCategoryInformation();
|
||||||
|
$collector->withBudgetInformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
$accountIds = $this->accounts->pluck('id')->toArray();
|
return $collector->getJournals();
|
||||||
$transactions = $collector->getJournals();
|
|
||||||
$set = Support::filterTransactions($transactions, $accountIds, $modifier);
|
|
||||||
|
|
||||||
return $set;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -230,9 +281,17 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
* @param array $fields
|
* @param array $fields
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
protected function groupByFields(Collection $set, array $fields)
|
protected function groupByFields(Collection $set, array $fields): array
|
||||||
{
|
{
|
||||||
|
if (count($fields) === 0 && $this->tags->count() > 0) {
|
||||||
|
// do a special group on tags:
|
||||||
|
return $this->groupByTag($set);
|
||||||
|
}
|
||||||
|
|
||||||
$grouped = [];
|
$grouped = [];
|
||||||
/** @var Transaction $transaction */
|
/** @var Transaction $transaction */
|
||||||
foreach ($set as $transaction) {
|
foreach ($set as $transaction) {
|
||||||
@@ -258,16 +317,14 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
{
|
{
|
||||||
$chartData = [];
|
$chartData = [];
|
||||||
$names = [];
|
$names = [];
|
||||||
$repository = app($this->repositories[$type], [$this->user]);
|
$repository = app($this->repositories[$type]);
|
||||||
|
$repository->setUser($this->user);
|
||||||
foreach ($array as $objectId => $amount) {
|
foreach ($array as $objectId => $amount) {
|
||||||
if (!isset($names[$objectId])) {
|
if (!isset($names[$objectId])) {
|
||||||
$object = $repository->find(intval($objectId));
|
$object = $repository->find(intval($objectId));
|
||||||
$names[$objectId] = $object->name;
|
$names[$objectId] = $object->name ?? $object->tag;
|
||||||
}
|
}
|
||||||
if (bccomp($amount, '0') === -1) {
|
$amount = Steam::positive($amount);
|
||||||
$amount = bcmul($amount, '-1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->total = bcadd($this->total, $amount);
|
$this->total = bcadd($this->total, $amount);
|
||||||
$chartData[$names[$objectId]] = $amount;
|
$chartData[$names[$objectId]] = $amount;
|
||||||
}
|
}
|
||||||
@@ -275,4 +332,27 @@ class MetaPieChart implements MetaPieChartInterface
|
|||||||
return $chartData;
|
return $chartData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $set
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function groupByTag(Collection $set): array
|
||||||
|
{
|
||||||
|
$grouped = [];
|
||||||
|
/** @var Transaction $transaction */
|
||||||
|
foreach ($set as $transaction) {
|
||||||
|
$journal = $transaction->transactionJournal;
|
||||||
|
$tags = $journal->tags;
|
||||||
|
/** @var Tag $tag */
|
||||||
|
foreach ($tags as $tag) {
|
||||||
|
$tagId = $tag->id;
|
||||||
|
$grouped[$tagId] = $grouped[$tagId] ?? '0';
|
||||||
|
$grouped[$tagId] = bcadd($transaction->transaction_amount, $grouped[$tagId]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $grouped;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -72,6 +72,13 @@ interface MetaPieChartInterface
|
|||||||
*/
|
*/
|
||||||
public function setStart(Carbon $start): MetaPieChartInterface;
|
public function setStart(Carbon $start): MetaPieChartInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $tags
|
||||||
|
*
|
||||||
|
* @return MetaPieChartInterface
|
||||||
|
*/
|
||||||
|
public function setTags(Collection $tags): MetaPieChartInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param User $user
|
* @param User $user
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Account.php
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare(strict_types = 1);
|
|
||||||
namespace FireflyIII\Helpers\Collection;
|
|
||||||
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace FireflyIII\Helpers\Collection;
|
namespace FireflyIII\Helpers\Collection;
|
||||||
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|||||||