mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-08-18 19:47:15 +00:00
Compare commits
2642 Commits
5.5.0-beta
...
v6.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
47a58738d4 | ||
|
e0a31d29a4 | ||
|
45369868ad | ||
|
639c51d651 | ||
|
3d424972cc | ||
|
96fd4da6d8 | ||
|
a97a0d461d | ||
|
8d3170785e | ||
|
ae373a15c5 | ||
|
1f342ed592 | ||
|
3e04f14665 | ||
|
dbf83df363 | ||
|
15bfc0d6fa | ||
|
f3fc1d8382 | ||
|
07cb7dd06e | ||
|
38624442d1 | ||
|
258dfb3d11 | ||
|
51ddfcdaaa | ||
|
2a0acdbb27 | ||
|
99bd28f21e | ||
|
643ae91bb5 | ||
|
591e3ab3ec | ||
|
edd7aed691 | ||
|
2e89586559 | ||
|
173f593a7e | ||
|
d4839c8818 | ||
|
a122dba0ad | ||
|
ae813a536e | ||
|
b9d174238b | ||
|
fbf5adbe79 | ||
|
c676a65f93 | ||
|
5ab8fbddcb | ||
|
b942fa4b09 | ||
|
8ee358551c | ||
|
a5f3b4533b | ||
|
e258efe1bf | ||
|
f9a213e06f | ||
|
05bd732e7c | ||
|
70050678c5 | ||
|
6a649f2f42 | ||
|
6912e05677 | ||
|
c78fa8eaea | ||
|
5a06e3523b | ||
|
b34cb0428b | ||
|
ce3c866168 | ||
|
4ada2f3e3c | ||
|
ad739c1d84 | ||
|
60af2c4232 | ||
|
cc69f50106 | ||
|
0f57094b17 | ||
|
dad738ae42 | ||
|
3df05eb63c | ||
|
57b83dd239 | ||
|
1539dcffd5 | ||
|
b4a09efb8b | ||
|
e82b372f75 | ||
|
83a89181bc | ||
|
b1e08b1084 | ||
|
0eb582ab3b | ||
|
07b58b4200 | ||
|
8807f04599 | ||
|
4657d34ae4 | ||
|
79951453cd | ||
|
5291f485ac | ||
|
ed75d84376 | ||
|
a7011376cb | ||
|
6c4bd84b66 | ||
|
c4418857e6 | ||
|
5d316ea26a | ||
|
4a0887c978 | ||
|
dbfceafb02 | ||
|
4db73285b7 | ||
|
876ea8bb07 | ||
|
e0e90845e7 | ||
|
f1223a5a3f | ||
|
1a3720bfaa | ||
|
1ddcc51c48 | ||
|
9f43ea3118 | ||
|
0fe4ac9ef5 | ||
|
d6d395eccd | ||
|
a26f5e2e6d | ||
|
849e006eda | ||
|
f70a4511c6 | ||
|
21ba311ecf | ||
|
fb0a100a7f | ||
|
2295110cf1 | ||
|
3c82c9af8b | ||
|
df78aa2f0d | ||
|
1ac18909b4 | ||
|
07d793e9f7 | ||
|
2a7b540a95 | ||
|
5cdecf7d04 | ||
|
1a0e6ffffb | ||
|
c0cfc60da6 | ||
|
9f831a8b3d | ||
|
ec3ee2f995 | ||
|
25ca02f541 | ||
|
776c59faea | ||
|
a4b1587a78 | ||
|
1d79eea69e | ||
|
b369b6e7b8 | ||
|
3832297d69 | ||
|
a7e64a130e | ||
|
73715dc0b9 | ||
|
8f66c93ad0 | ||
|
bcaf6402b5 | ||
|
16b0ee0c79 | ||
|
1033655615 | ||
|
6d327b98d4 | ||
|
585cfddfd7 | ||
|
a18cd23154 | ||
|
e421b29b01 | ||
|
e6dc881f56 | ||
|
01308e2076 | ||
|
26ab65c5aa | ||
|
68f398f97c | ||
|
eb04b11c30 | ||
|
29ff1648e2 | ||
|
13a1e45fc5 | ||
|
2ac3e130ec | ||
|
0436614643 | ||
|
427e11dac9 | ||
|
c3a4656e22 | ||
|
aab8eb467c | ||
|
84987dbe02 | ||
|
b7c2576970 | ||
|
57f32ec987 | ||
|
af73069409 | ||
|
1b06211152 | ||
|
8ee428eb17 | ||
|
07f3386ec7 | ||
|
94ae0bd7c3 | ||
|
8bd13b19a6 | ||
|
1118954db6 | ||
|
a798a9d50d | ||
|
9e11b504e1 | ||
|
2e65055c9a | ||
|
733607a8a9 | ||
|
30d40d1d57 | ||
|
a3eec9d5ec | ||
|
d9599b3448 | ||
|
3ca0fc15b1 | ||
|
e3a71b64f8 | ||
|
d403f4f9d3 | ||
|
e0577bddc5 | ||
|
38b88dce44 | ||
|
e1f99139f3 | ||
|
2e5d5f5a36 | ||
|
6b05c0fbd3 | ||
|
0667ccfc98 | ||
|
0d9c4ec25d | ||
|
e4fa385ac5 | ||
|
f8f2a10014 | ||
|
6502559341 | ||
|
3f50cd74da | ||
|
b32500c3e3 | ||
|
1f338f0062 | ||
|
76925585c3 | ||
|
55de722229 | ||
|
5b35e6ec4b | ||
|
80431bae4f | ||
|
68222e20f7 | ||
|
85c2e9cf1e | ||
|
c64227d90b | ||
|
83f9149606 | ||
|
2ad2d53f88 | ||
|
1fd455dbab | ||
|
9b86b20eff | ||
|
13712f7c5e | ||
|
789935cf1c | ||
|
03a4633a98 | ||
|
a252522e27 | ||
|
927d607b1a | ||
|
ef6af34af9 | ||
|
61f04fe4c1 | ||
|
ac1e026981 | ||
|
7225474621 | ||
|
86d6a2f581 | ||
|
f82a884783 | ||
|
df4f28e819 | ||
|
9ee66625de | ||
|
fb595bb335 | ||
|
a8e4fbb7b6 | ||
|
0060c46cdb | ||
|
b909841eae | ||
|
f001675066 | ||
|
c979cfcd89 | ||
|
2a30b10b97 | ||
|
fb903d5e3a | ||
|
268f690d75 | ||
|
2e074009c4 | ||
|
d5e60b206d | ||
|
1964afe876 | ||
|
328a476fb5 | ||
|
12ca0811e6 | ||
|
7a20f7ce34 | ||
|
cce856c0e2 | ||
|
5ef2a33334 | ||
|
6e29a7421f | ||
|
89e6bd7471 | ||
|
df0a6db83f | ||
|
c949ff19b7 | ||
|
e4b4234fbb | ||
|
86aaa3068a | ||
|
08f9da8a15 | ||
|
6bd0aa14b3 | ||
|
38bff09c1d | ||
|
93caa433d7 | ||
|
bcb1fce7ed | ||
|
c777c95ced | ||
|
5e89bde05b | ||
|
79e98cf8a2 | ||
|
bf8ab7f5d7 | ||
|
54a471ba4c | ||
|
26accbc81e | ||
|
242c6c1b0c | ||
|
db659efe27 | ||
|
06be3f0d46 | ||
|
da318fb592 | ||
|
d58c230f00 | ||
|
fd7ba9dd57 | ||
|
47a98451a0 | ||
|
91e961a876 | ||
|
9aaf79a3ab | ||
|
b1e3cf3a20 | ||
|
be0d785a56 | ||
|
efb89023ac | ||
|
9adccb345a | ||
|
83f5b8ab12 | ||
|
de38e7cf9f | ||
|
3a0b3f46a5 | ||
|
806d108d1c | ||
|
794d130ff9 | ||
|
848e7d4c9f | ||
|
6e96c75be7 | ||
|
e20dc78620 | ||
|
35912fe9fb | ||
|
74777a648c | ||
|
0eb0f7f35f | ||
|
1226ef542f | ||
|
7d169518a5 | ||
|
abfd837f68 | ||
|
8ab1e97fb0 | ||
|
9fbb290d0f | ||
|
28deb32f5e | ||
|
2c1023ad40 | ||
|
766418a894 | ||
|
970193473d | ||
|
a782abd6db | ||
|
b98050e238 | ||
|
1c02b04a0d | ||
|
c5f94372a0 | ||
|
928613e908 | ||
|
fd3da949da | ||
|
15210f75e7 | ||
|
dec5e3440d | ||
|
413a4f3d9c | ||
|
1cbb644d65 | ||
|
e008c1f742 | ||
|
9bffa86706 | ||
|
a5a95055c5 | ||
|
5a5c92b5b5 | ||
|
41941b37f9 | ||
|
881fe3e6e7 | ||
|
a7570d9ab5 | ||
|
605afdb271 | ||
|
b6e54fe3cf | ||
|
fbe5a5dd39 | ||
|
e284da368d | ||
|
a5328a9ff4 | ||
|
a925e1aa02 | ||
|
81c37b3349 | ||
|
c84c64a1c2 | ||
|
ced9ea4777 | ||
|
36c0e8df2d | ||
|
61a0a7795e | ||
|
e2b4448985 | ||
|
f5d1a597cf | ||
|
80607bc6ae | ||
|
8c5c6c2bde | ||
|
f476a909df | ||
|
9bf86be305 | ||
|
3d96f5df58 | ||
|
fc0adfd375 | ||
|
1d62d5d44a | ||
|
6c2486faa7 | ||
|
f9daf7751a | ||
|
c269913510 | ||
|
cc436605d0 | ||
|
c697d2aa13 | ||
|
90219bec35 | ||
|
afca023767 | ||
|
1502c5de94 | ||
|
cd408e581b | ||
|
122c8acae0 | ||
|
13cffaa1e3 | ||
|
feab244edd | ||
|
259ad852c9 | ||
|
6802f53c96 | ||
|
d922390802 | ||
|
2a9f51a40f | ||
|
614d54c9bd | ||
|
3ea8792c6e | ||
|
3d802b9c9e | ||
|
480d787242 | ||
|
820c6feadd | ||
|
8c1eeedf17 | ||
|
9b5931f1d6 | ||
|
d5cade320b | ||
|
ef46ab6de2 | ||
|
d0d3921ff6 | ||
|
2cb2e2e635 | ||
|
1a0047205d | ||
|
468655cd94 | ||
|
09cb4b10b9 | ||
|
6eaf83d6d2 | ||
|
7c8a2e3591 | ||
|
ba5c3ef0a1 | ||
|
c0f744b03a | ||
|
8cd13ba13b | ||
|
10db3d63ac | ||
|
a753fde2f1 | ||
|
d4f1b9a1bc | ||
|
3cfaa5aa03 | ||
|
bc47017e31 | ||
|
125d9e7e9d | ||
|
4cea7a3287 | ||
|
e7a1ad23f4 | ||
|
afd3fd9f88 | ||
|
f2251d7bfa | ||
|
700ccaa853 | ||
|
0fcdcf0f01 | ||
|
fa347a5ee4 | ||
|
d412c2407a | ||
|
dea86242fd | ||
|
973c175213 | ||
|
e135d01655 | ||
|
9b37d5ab8d | ||
|
84c3868c9b | ||
|
3c0b23aaed | ||
|
7e6ce7c3e8 | ||
|
7111aec101 | ||
|
1f9e0b48c9 | ||
|
63a7aad44c | ||
|
9191ae5054 | ||
|
618e70748c | ||
|
68e4f26656 | ||
|
5124a5eba9 | ||
|
708cd014c5 | ||
|
9654f631c5 | ||
|
65027d7832 | ||
|
db0500dcf0 | ||
|
89d4a34acf | ||
|
23bbebb80e | ||
|
4ccdd8f322 | ||
|
3033b0fa7f | ||
|
abc7bfb54c | ||
|
1fede6b802 | ||
|
6e3381844e | ||
|
3f2560c8e5 | ||
|
abdbb86d05 | ||
|
9008d19494 | ||
|
929513c220 | ||
|
566a303650 | ||
|
e783b8dba4 | ||
|
bb6cbe884e | ||
|
3be4c07848 | ||
|
732a87f051 | ||
|
124d3aaf96 | ||
|
65df355440 | ||
|
29e07c6604 | ||
|
c0af63e59e | ||
|
772f0f5ba4 | ||
|
6db3e3d75e | ||
|
9290c2247e | ||
|
5967762cd8 | ||
|
5845ba0daf | ||
|
961d067aec | ||
|
81ce2c1b3e | ||
|
d6bf304390 | ||
|
fe9620a438 | ||
|
d90321aa1e | ||
|
c26667ebc7 | ||
|
862140a9fc | ||
|
8447670ed5 | ||
|
7a2c52531a | ||
|
cb4e5a80b2 | ||
|
c976149bf1 | ||
|
4917f40abf | ||
|
4c27bbf069 | ||
|
a90214273b | ||
|
5167f53fd5 | ||
|
40083230fd | ||
|
ca57942b38 | ||
|
ef58d5b1b2 | ||
|
cc218e203f | ||
|
9fdaf1cee8 | ||
|
770d092e93 | ||
|
6d4e45b89f | ||
|
1fee2092d6 | ||
|
7bd824e8cb | ||
|
fa588db1a9 | ||
|
c3e0ce0c08 | ||
|
6a629a7da3 | ||
|
07e4e93632 | ||
|
6784fe4436 | ||
|
af8c127106 | ||
|
ebd32e0e08 | ||
|
b56acf36c5 | ||
|
4daaa44ba8 | ||
|
93ae82691b | ||
|
c3e739cd6f | ||
|
851da6a0a1 | ||
|
a99f68fd17 | ||
|
1266eff7f6 | ||
|
e5d5e774dc | ||
|
0429f50e5c | ||
|
e9e0225731 | ||
|
e4db5f5a21 | ||
|
3c1f44f554 | ||
|
67434bb8a5 | ||
|
b0b65c3f04 | ||
|
fe724fa1b8 | ||
|
c3ce9e896e | ||
|
c60120ac20 | ||
|
8bbe519350 | ||
|
c426ff352c | ||
|
15605dd163 | ||
|
4d0ff86bfa | ||
|
7722ca2bf0 | ||
|
5878b2c427 | ||
|
f2499e0a77 | ||
|
81f781a823 | ||
|
b5734beb32 | ||
|
24696bf800 | ||
|
27a576ae8a | ||
|
2b9996b844 | ||
|
742c84269b | ||
|
333c348117 | ||
|
ed4d2ee6ad | ||
|
445804a7f1 | ||
|
ee0116f112 | ||
|
03e176bd16 | ||
|
a84050a084 | ||
|
bef7887a8d | ||
|
5b8e01fbfb | ||
|
56b9b66352 | ||
|
6cfdc58cb1 | ||
|
dbf3e76ecc | ||
|
0022009dd5 | ||
|
6249488f0f | ||
|
29bd3a2804 | ||
|
ba35c5da0b | ||
|
9b242f1a75 | ||
|
1acc2ab18b | ||
|
e031fffe65 | ||
|
2a61633ab9 | ||
|
5e3f9f9bce | ||
|
8c320fd199 | ||
|
85a2a87806 | ||
|
3666ef8c59 | ||
|
e4db21f0c0 | ||
|
d137b2938d | ||
|
d3a619cb15 | ||
|
d40fd485ca | ||
|
32e89155a0 | ||
|
cae0b1798a | ||
|
5e654786be | ||
|
75ce777090 | ||
|
f350948fb2 | ||
|
1f4ca9c8fe | ||
|
dd0c36d464 | ||
|
e468d5b892 | ||
|
e58cf0d3c9 | ||
|
e389fd7d7c | ||
|
83b5ca69dd | ||
|
5e17cb5823 | ||
|
bb11e61034 | ||
|
eff631276e | ||
|
89ab62fff2 | ||
|
bdf7d3978f | ||
|
3fbaed2fdc | ||
|
a4f3be5397 | ||
|
265d973811 | ||
|
e22ed9a69b | ||
|
80762616f3 | ||
|
fcecd5c85e | ||
|
2780cf4b20 | ||
|
7e63700ca2 | ||
|
2d9a3f5fc6 | ||
|
f5bbd445d2 | ||
|
12008fb0e9 | ||
|
5f6c84ab4c | ||
|
8b9936044b | ||
|
db478711ed | ||
|
63184ac298 | ||
|
5f6772260d | ||
|
22a237d316 | ||
|
c47980a737 | ||
|
e43372b2ce | ||
|
395b6ecb76 | ||
|
328a1e256e | ||
|
4a31f9ce7e | ||
|
345f4903a9 | ||
|
3fe5e5ea8c | ||
|
b0da22ddf2 | ||
|
388ee14dfc | ||
|
2c53c72024 | ||
|
de260adca4 | ||
|
33f764088e | ||
|
23a8835758 | ||
|
034647a5ca | ||
|
d8813120a7 | ||
|
989fd1adba | ||
|
a5f4793e81 | ||
|
9529721368 | ||
|
86243131cd | ||
|
344cbe4fb7 | ||
|
44af5473a8 | ||
|
f33f9c797b | ||
|
352eedb136 | ||
|
c8d6ef3782 | ||
|
922a5fa9c7 | ||
|
c125984d55 | ||
|
a60c3165f1 | ||
|
363c849c50 | ||
|
36c9782c8f | ||
|
49847a91e3 | ||
|
516653d007 | ||
|
2743359a4e | ||
|
8055e9e927 | ||
|
702f2c3146 | ||
|
ad36082fca | ||
|
81e650986d | ||
|
f3c89e8055 | ||
|
3a8c0074b7 | ||
|
dcfcbfd9b5 | ||
|
04c71a2e9e | ||
|
2383d16e7a | ||
|
5bb7705702 | ||
|
2e3267ab9e | ||
|
d969cd72c0 | ||
|
e4894c756a | ||
|
f52044e794 | ||
|
43960a5b60 | ||
|
81b0b048db | ||
|
3278d9850e | ||
|
b13bcec61a | ||
|
21d18acabc | ||
|
4060d14de0 | ||
|
c67a71e238 | ||
|
ed330e30d0 | ||
|
7673d11673 | ||
|
e1114f720d | ||
|
b49e7d6b21 | ||
|
c9ba5f08c4 | ||
|
5aa8793e33 | ||
|
dd98549bce | ||
|
d6d53cc598 | ||
|
6516495e2b | ||
|
7fcdf85dee | ||
|
704c6055b3 | ||
|
f650dd9463 | ||
|
1b261359e6 | ||
|
8050c8cb84 | ||
|
7666960a86 | ||
|
0a7210729f | ||
|
90c9fdaf55 | ||
|
60d8bb2aab | ||
|
d55833cb86 | ||
|
39fbf3ce20 | ||
|
acd9685578 | ||
|
15994c8c56 | ||
|
b942f351f8 | ||
|
f16b679049 | ||
|
8d8f81c27d | ||
|
74610a5d55 | ||
|
409b4fe4d9 | ||
|
817a9f57c4 | ||
|
e05c174e6d | ||
|
05d461fb88 | ||
|
7bb2f96ae2 | ||
|
8f15bd716d | ||
|
a702662e88 | ||
|
0c6e00666b | ||
|
5ba079e71c | ||
|
ebcf9b3be1 | ||
|
e7e3370baa | ||
|
21d4b396cc | ||
|
249b0c3377 | ||
|
b36f6741ff | ||
|
0059ed7bde | ||
|
d7bbc8334e | ||
|
bd245d5c92 | ||
|
4e618a4d0b | ||
|
b57785a234 | ||
|
2b7101e362 | ||
|
e74b629dc2 | ||
|
a4f329cfc3 | ||
|
e993abc8fb | ||
|
6961365a40 | ||
|
16303515f5 | ||
|
bb5bca9cf0 | ||
|
e8a61821e9 | ||
|
5d4cf5f55e | ||
|
5e9de60c1a | ||
|
417700ef13 | ||
|
b14062b197 | ||
|
33f370359c | ||
|
c032ffd4f9 | ||
|
1a7d60ccc8 | ||
|
f52675068b | ||
|
f53923f16c | ||
|
2eebcb21f1 | ||
|
64ff5eed27 | ||
|
1667b88dcd | ||
|
b27fe59ab4 | ||
|
bdcd9825ec | ||
|
8edfb1460c | ||
|
914dc8596b | ||
|
6b64a39182 | ||
|
d28326cc89 | ||
|
e3181e90df | ||
|
486f25cd96 | ||
|
612a395eb2 | ||
|
a3b4d5ff62 | ||
|
b613b56d1e | ||
|
6b7fc03f02 | ||
|
5999ee406c | ||
|
e348127770 | ||
|
b60a3be34b | ||
|
e3bdc62ac4 | ||
|
83b8fdba05 | ||
|
b21461c824 | ||
|
0b64507fd7 | ||
|
45dcd5df09 | ||
|
3bdea43744 | ||
|
b3895a04a0 | ||
|
d4738b21ab | ||
|
2f66315416 | ||
|
f4af19e121 | ||
|
abdb717b37 | ||
|
e229bd8121 | ||
|
d31fa743d0 | ||
|
4ad666d964 | ||
|
f7b66a048a | ||
|
a91f6fbfaf | ||
|
f3566c609a | ||
|
904320b9b8 | ||
|
35c1ce6504 | ||
|
a96c830e3e | ||
|
ddefdd5ec5 | ||
|
9e41cd9c8c | ||
|
b3740e643a | ||
|
55ac76f663 | ||
|
49560ca6a6 | ||
|
fd37054493 | ||
|
bf589e5c57 | ||
|
e97018cf2e | ||
|
5038ed7708 | ||
|
02081b09a2 | ||
|
a74d345ac2 | ||
|
e472c3520d | ||
|
39654249e4 | ||
|
69929bee31 | ||
|
b276b24a79 | ||
|
1b99dbab0a | ||
|
1ea0fa318c | ||
|
4066fc643f | ||
|
b7975c6a88 | ||
|
1e88b1eb88 | ||
|
88490de38f | ||
|
77759d5580 | ||
|
22971ded84 | ||
|
841edcfffb | ||
|
05fe503456 | ||
|
030b6cb281 | ||
|
896c15a7a1 | ||
|
b176308dbd | ||
|
da71d6172c | ||
|
f1457fcda6 | ||
|
a39553256e | ||
|
553a9be3d5 | ||
|
187e1914e3 | ||
|
fc83565d02 | ||
|
7e94f246e3 | ||
|
44637dfaab | ||
|
bab4c05e5f | ||
|
5b43a2e99f | ||
|
ee2b87d5fe | ||
|
c9f7e96450 | ||
|
ea361365f0 | ||
|
5dfb35064a | ||
|
5522e4f514 | ||
|
c1367d12a6 | ||
|
db2485f97a | ||
|
321c8fca67 | ||
|
73b98612a5 | ||
|
671e93c50f | ||
|
553c3ec17e | ||
|
94b933c7a4 | ||
|
38bdd6c36c | ||
|
536e054961 | ||
|
6dfe93bc19 | ||
|
d8a15e41e6 | ||
|
ca8a65af60 | ||
|
06cd75ba74 | ||
|
10d2a91d99 | ||
|
f2f3d69aa8 | ||
|
0338010eaa | ||
|
185842a891 | ||
|
ff91fe432c | ||
|
681b0b9046 | ||
|
5f11272d49 | ||
|
c4e46bf89b | ||
|
ee9b651f0f | ||
|
9bfa52f3ce | ||
|
5c471059f3 | ||
|
5714bd0749 | ||
|
749ce2ca9b | ||
|
93c83fbe7a | ||
|
4474a71e65 | ||
|
697ad5b2b5 | ||
|
1558e87923 | ||
|
3b18a29adc | ||
|
c6bc308ce7 | ||
|
36caf5d8ec | ||
|
c49f3fcccf | ||
|
d144392bd6 | ||
|
9b7285ea84 | ||
|
0671f20ab1 | ||
|
4bdc5fa3fc | ||
|
ddff192a1f | ||
|
ff55b36f32 | ||
|
8e4c772dcd | ||
|
fd7683c212 | ||
|
6eaed9829b | ||
|
3c33ea959e | ||
|
80a732b32b | ||
|
a9f2741282 | ||
|
600fa388c1 | ||
|
45d7042405 | ||
|
2945f5fcde | ||
|
be1dff49fa | ||
|
665b78ebf5 | ||
|
416fe0c147 | ||
|
4ca346fc4d | ||
|
6f9482fc1b | ||
|
af6e70c41c | ||
|
7116c65bd7 | ||
|
9e98c52c64 | ||
|
c5e0c492a7 | ||
|
f43c74df66 | ||
|
40dbae17b1 | ||
|
3ca88adade | ||
|
c8be9ceaf5 | ||
|
52df1aad14 | ||
|
6bc73f4f55 | ||
|
4ade02efc8 | ||
|
d2c52b47f1 | ||
|
c25b63d87b | ||
|
c120a908f3 | ||
|
07541fa08f | ||
|
0098a9c3c0 | ||
|
9f95d7a76f | ||
|
67126e46b9 | ||
|
c4c178b39d | ||
|
eef14ced59 | ||
|
d9245f06f7 | ||
|
625ad14d7d | ||
|
23e5cf1b34 | ||
|
ad9efde2d0 | ||
|
10f2cf2481 | ||
|
f0416f5322 | ||
|
11ba24482f | ||
|
e5bc074e68 | ||
|
93ea86f921 | ||
|
cf8957a460 | ||
|
9c2f771bae | ||
|
d9e8f8106a | ||
|
6589f88883 | ||
|
38ebdd8249 | ||
|
6296ead897 | ||
|
ecf5cc62f9 | ||
|
b205cc87fc | ||
|
4c60473f02 | ||
|
7104433a68 | ||
|
f47464944b | ||
|
edb9480c90 | ||
|
615e789134 | ||
|
3e96bb526c | ||
|
1d21a8788c | ||
|
e420ead9e8 | ||
|
06b7f18d55 | ||
|
8659c7efbd | ||
|
80fe52f5d7 | ||
|
77358301e8 | ||
|
93ed1de23f | ||
|
a81ca5114b | ||
|
9a69b941d8 | ||
|
194ecc7ac7 | ||
|
44da3be910 | ||
|
22de6e61ff | ||
|
37f91cabf5 | ||
|
7f9d87a117 | ||
|
52e83c2ec2 | ||
|
70c08d6b50 | ||
|
0b49e9b8a8 | ||
|
6add8765c4 | ||
|
73d97d90ae | ||
|
4d12e6b58b | ||
|
43650583fe | ||
|
3cc0e0f20f | ||
|
27d6e70469 | ||
|
ab4ee2fdb0 | ||
|
23a09825cb | ||
|
ce1e99be9a | ||
|
63440c4cb7 | ||
|
e5b30fa156 | ||
|
8c067019f7 | ||
|
bb3ceaeb0e | ||
|
7cf6066afd | ||
|
b6e8144fe9 | ||
|
7cabc5db57 | ||
|
059df6f8ac | ||
|
6ae43aee5c | ||
|
0ef99077d8 | ||
|
3ea48eb6ee | ||
|
322b6d19d8 | ||
|
8045d3c170 | ||
|
76885d2c50 | ||
|
a1f7a518e3 | ||
|
55205d6107 | ||
|
c7ce5632ea | ||
|
91cec7485a | ||
|
37fbc657a7 | ||
|
908dc15a3b | ||
|
d4bd7c0549 | ||
|
4c0d6a5259 | ||
|
48c8c5b353 | ||
|
d502c8d286 | ||
|
79c4fad922 | ||
|
ae0a675668 | ||
|
b1532ab982 | ||
|
08e65887ca | ||
|
4c0934bae8 | ||
|
1670fe5e4d | ||
|
bba362fb58 | ||
|
4aa361617f | ||
|
be01b177fa | ||
|
4d1b21f70d | ||
|
aa3fba91d4 | ||
|
cc6a7b181a | ||
|
c460ccfad5 | ||
|
69d875d981 | ||
|
75ea1c4f4b | ||
|
cfbda09e36 | ||
|
7746f2ca19 | ||
|
a8fb463520 | ||
|
3ef732b895 | ||
|
1101af87cb | ||
|
c9e0043cc1 | ||
|
edb8bb3ce3 | ||
|
ac0f75c808 | ||
|
b39e16c51c | ||
|
23d3abbf63 | ||
|
34e5433082 | ||
|
9fbc4c2ba1 | ||
|
38ed7c1543 | ||
|
39a928d7f4 | ||
|
121561da3e | ||
|
5893b30da8 | ||
|
858480929c | ||
|
242fb3b498 | ||
|
47469c7082 | ||
|
18f2633810 | ||
|
c50a4ae993 | ||
|
2db32ce44f | ||
|
38b505d036 | ||
|
b03a36b87f | ||
|
fa72912349 | ||
|
7e98fac3b7 | ||
|
f14c8a2ec2 | ||
|
443b76388e | ||
|
7c63f097c8 | ||
|
037cd75658 | ||
|
4e394d6017 | ||
|
76dadd1cab | ||
|
d8506c4361 | ||
|
d49809c939 | ||
|
ea808b441b | ||
|
a464ad015f | ||
|
e8ec13ca5f | ||
|
7f694ede98 | ||
|
203ae2812f | ||
|
20dfeae653 | ||
|
397c0abebe | ||
|
72ef7ac5e4 | ||
|
9f8e33a1ec | ||
|
0b378b51f8 | ||
|
20ab457222 | ||
|
b138812e1a | ||
|
dcfd4d6672 | ||
|
11b109d425 | ||
|
ba1f0d9a24 | ||
|
3cdae5a851 | ||
|
7c162fe87f | ||
|
eb8f595541 | ||
|
6b6107fb00 | ||
|
b4feb27118 | ||
|
2e8ea7493a | ||
|
d26a5a6e9c | ||
|
29dce924cf | ||
|
2bd068211b | ||
|
1406abe7ae | ||
|
c97792d1d1 | ||
|
ef23948b41 | ||
|
4e47641c76 | ||
|
0e8d2c5f0a | ||
|
9493046212 | ||
|
5c3b4d1663 | ||
|
5e8671d24b | ||
|
9118a153d5 | ||
|
b97988a597 | ||
|
56ff25285c | ||
|
2f20bac734 | ||
|
4b23ca1186 | ||
|
cb7e766321 | ||
|
a63f1c30d9 | ||
|
196c504b3d | ||
|
68755137e4 | ||
|
19bef9b725 | ||
|
34e006d87b | ||
|
d215510124 | ||
|
9d75ac221c | ||
|
e610c3d6ab | ||
|
96d70a84ab | ||
|
3f6abdb457 | ||
|
00d19241d9 | ||
|
7c44cae83c | ||
|
9652c86782 | ||
|
cea8c4c217 | ||
|
03637a080c | ||
|
e27cffcf31 | ||
|
f52144d8d9 | ||
|
b12d72bef6 | ||
|
4e6dc3bcef | ||
|
c1cd322f8f | ||
|
0995d78506 | ||
|
34c9823096 | ||
|
040ba2cf8b | ||
|
08896c5813 | ||
|
ebe67b14c1 | ||
|
75ed1fbbfc | ||
|
e39c0c8414 | ||
|
769fb7c218 | ||
|
359a5656e8 | ||
|
8e3b5f9cbc | ||
|
a9747d668a | ||
|
9c815c916f | ||
|
faa995fd01 | ||
|
be224367bb | ||
|
609ff7d2aa | ||
|
10544e5fbd | ||
|
812e767ba4 | ||
|
134f0cfcd1 | ||
|
e46adb6539 | ||
|
97c1233e89 | ||
|
3e0d8e024c | ||
|
1f7fbf57af | ||
|
ade653c393 | ||
|
016395fe8a | ||
|
e0c9d3627e | ||
|
07fe4400ed | ||
|
70ddbd743c | ||
|
5a02006a42 | ||
|
cc7db2b614 | ||
|
1b2106d43b | ||
|
86d15435a5 | ||
|
beed44f065 | ||
|
de3376c966 | ||
|
313676e3be | ||
|
86d4549874 | ||
|
c3bd46d7c0 | ||
|
46e97f95f9 | ||
|
f13dd18b6f | ||
|
c916fbbee9 | ||
|
d007db166a | ||
|
d3314e0130 | ||
|
75b033c563 | ||
|
f451efd90c | ||
|
81f2c59ae4 | ||
|
ef67355e3b | ||
|
4201bc16a1 | ||
|
14d58c9834 | ||
|
8ac9fe7e69 | ||
|
9c08b9f1d3 | ||
|
6b2619c5cc | ||
|
2ace09eb49 | ||
|
47167c06ae | ||
|
2d62fcac06 | ||
|
eeda74d79c | ||
|
4cf23a954f | ||
|
0bc1e6dbaa | ||
|
7da0c94e45 | ||
|
69b1985ac0 | ||
|
61eb8f325e | ||
|
0ab92114a5 | ||
|
66310b494b | ||
|
805d3ec975 | ||
|
f83ab0a7dc | ||
|
ced55b5065 | ||
|
986863f1d2 | ||
|
d1529a0cfc | ||
|
f3ceba5325 | ||
|
711b4c62b5 | ||
|
f441f68da6 | ||
|
2cf8bb2537 | ||
|
bf434e5d42 | ||
|
b1ea36ae5b | ||
|
5f3524c5aa | ||
|
2f75437ac1 | ||
|
6c945bfd60 | ||
|
82f993f0ff | ||
|
08f3f2aeb9 | ||
|
099fc49c4b | ||
|
6f2c46cb36 | ||
|
135424f8b8 | ||
|
9534fa59d6 | ||
|
51ae15a650 | ||
|
29776fa98c | ||
|
7ddffb9251 | ||
|
069770b39e | ||
|
626119d774 | ||
|
993d18d508 | ||
|
7b84c7c2dc | ||
|
76429c923e | ||
|
ca1b048758 | ||
|
fb11971b84 | ||
|
465542b0f5 | ||
|
5185a3ed5a | ||
|
4d1615197d | ||
|
83c6887ed0 | ||
|
9d1e20192d | ||
|
ad17837593 | ||
|
40ec63ddb9 | ||
|
bc3c019d03 | ||
|
35f8ecf9bf | ||
|
4c649a7099 | ||
|
1abf214141 | ||
|
8cb748745b | ||
|
f3df783ed3 | ||
|
50d6234089 | ||
|
baa1da3e8e | ||
|
35a8016744 | ||
|
89af363ba1 | ||
|
9020ed158c | ||
|
2e3071d40f | ||
|
df5aff279e | ||
|
249b2c63d8 | ||
|
6d8f5b88fe | ||
|
2579750ba3 | ||
|
5e7ee8c5bf | ||
|
610bc9f4bc | ||
|
3d1233314a | ||
|
a258b35236 | ||
|
51e23dae21 | ||
|
13f2e6537e | ||
|
cba3590dec | ||
|
613a02fa52 | ||
|
2b615cf757 | ||
|
52a593e2e0 | ||
|
cf89d93cec | ||
|
295724c4e9 | ||
|
20852acc78 | ||
|
39fbd545ad | ||
|
0babe84a33 | ||
|
3373961143 | ||
|
7f5b50d1f6 | ||
|
04267f1388 | ||
|
cddba20499 | ||
|
791833ab61 | ||
|
0ad9a75274 | ||
|
172d78f810 | ||
|
d2018ad3ec | ||
|
8c64c1d5e4 | ||
|
97124bcbce | ||
|
27dd30785f | ||
|
093794f7a5 | ||
|
a67bad11b2 | ||
|
91a53032b9 | ||
|
a87ce030d8 | ||
|
799da3597f | ||
|
663bf22a2a | ||
|
5d3abb315c | ||
|
a6ce34b67e | ||
|
75f5b5b51d | ||
|
555b358b80 | ||
|
7772190d45 | ||
|
311effb518 | ||
|
d2ccb33c54 | ||
|
5b312708f9 | ||
|
f4ae1e6c79 | ||
|
a91298d045 | ||
|
cfcf860438 | ||
|
71d53fbda4 | ||
|
4a3c2d5d97 | ||
|
089514908d | ||
|
9cfced1732 | ||
|
a2627b5158 | ||
|
342e9a263a | ||
|
1d90748e4d | ||
|
40efaa1017 | ||
|
641683d431 | ||
|
b10c1044bd | ||
|
0fea3a5a85 | ||
|
7b830a69d9 | ||
|
5c069caea1 | ||
|
e78f2213ed | ||
|
22af0b373e | ||
|
ca34e0ebd5 | ||
|
e139cf76de | ||
|
50f87a210a | ||
|
ac5c11a8d7 | ||
|
3813b7a9e8 | ||
|
86a6e51ebc | ||
|
eb4343407d | ||
|
8eb4c64602 | ||
|
f033a14bc7 | ||
|
59199134a6 | ||
|
c6d831fd94 | ||
|
a963e1bc03 | ||
|
be48d3bea2 | ||
|
7d438375c1 | ||
|
b20b8868bf | ||
|
b4638e1ae5 | ||
|
9872c18715 | ||
|
e854c1b8ae | ||
|
e243ec10ba | ||
|
b8f2f0a73f | ||
|
8c481e38f2 | ||
|
609e911fd6 | ||
|
d894ccc9cc | ||
|
19d4b6ba86 | ||
|
789dba7cf9 | ||
|
b6e88a56c5 | ||
|
b96a9a359c | ||
|
ba64a7d039 | ||
|
20c8fea520 | ||
|
e6854b9265 | ||
|
122cab1757 | ||
|
51b07f08ac | ||
|
e453ee19a1 | ||
|
4786c97c0b | ||
|
b5d4e82f45 | ||
|
c0072625c6 | ||
|
8c2455e8dd | ||
|
55c82b2a0f | ||
|
3120e29940 | ||
|
1211a5c878 | ||
|
8f98be32f9 | ||
|
65764199fe | ||
|
9ce39f5724 | ||
|
59922e6c2e | ||
|
cb62469a80 | ||
|
3df8c4ff75 | ||
|
cf4c1d8089 | ||
|
88539497bf | ||
|
123693096c | ||
|
60786461a9 | ||
|
452b6d0e1b | ||
|
d04efb8325 | ||
|
d1a09ff33b | ||
|
29bed2547c | ||
|
1209c4e76a | ||
|
9cdaf7076a | ||
|
2a1738cbe1 | ||
|
09bd0b572a | ||
|
9c19a08b17 | ||
|
37f05338f7 | ||
|
a72af79fab | ||
|
2dfd230918 | ||
|
409c24d45a | ||
|
35e187be77 | ||
|
df78ef1c78 | ||
|
d978838c84 | ||
|
3320e06f81 | ||
|
ab50a6518b | ||
|
e1155328b8 | ||
|
daa6ddc39f | ||
|
3b1ffc87bc | ||
|
94be254367 | ||
|
abb1095cef | ||
|
f2849c8058 | ||
|
e5a08d2cf1 | ||
|
46e01475fc | ||
|
89c1a2d912 | ||
|
2be7813a67 | ||
|
cbf14f541c | ||
|
8ee4c2ea11 | ||
|
980120f1bd | ||
|
679e72e5e2 | ||
|
ff7f4e5bba | ||
|
582c6676c6 | ||
|
8002610234 | ||
|
3ba81c6254 | ||
|
dc16a1a430 | ||
|
2f50fb38b0 | ||
|
aca008c911 | ||
|
ad0dcc2cf4 | ||
|
be1d5591c4 | ||
|
bb57015004 | ||
|
96f7047989 | ||
|
25e6114948 | ||
|
0ac4a42351 | ||
|
02687dfe53 | ||
|
ba10aa5ca5 | ||
|
c000e090fe | ||
|
9c0893c093 | ||
|
1e1aa28ab2 | ||
|
52a5995bd1 | ||
|
5ca0a9f75a | ||
|
45d99aa456 | ||
|
39eeea9c3c | ||
|
55a6cc5cd4 | ||
|
e3ecfdfac6 | ||
|
3ddbb282d7 | ||
|
346478622b | ||
|
fcb9e76c17 | ||
|
bbcd86eab5 | ||
|
24a6f5f36c | ||
|
6e18b8056d | ||
|
1e5137e5db | ||
|
78342537a0 | ||
|
b20e736f41 | ||
|
df65f08dec | ||
|
03b6f6fcb1 | ||
|
5c30981e76 | ||
|
0b2ca03848 | ||
|
70041e713e | ||
|
31625cad4b | ||
|
8663c877af | ||
|
f76ce602ce | ||
|
32d1554fbe | ||
|
7c28b47f91 | ||
|
ff249a4ee6 | ||
|
a5c75e6abe | ||
|
b8a8ddf23e | ||
|
43c52daf6b | ||
|
f0265b9fda | ||
|
07813fa858 | ||
|
ca7c86a057 | ||
|
c59ccb1077 | ||
|
2ab45ac5d4 | ||
|
ae6b177a08 | ||
|
50806ace32 | ||
|
efb0dc42ff | ||
|
2fbeef95f1 | ||
|
f02d524e82 | ||
|
6479fbabed | ||
|
059bf32563 | ||
|
2f55499f7d | ||
|
9c8bcd4f4c | ||
|
2715a181e3 | ||
|
b3c831d596 | ||
|
274885c8a6 | ||
|
d6e5f71d50 | ||
|
b9536dfe4e | ||
|
22a6e34279 | ||
|
b1a68b087c | ||
|
ef8f9672af | ||
|
b696b09f92 | ||
|
9892e70028 | ||
|
52f885df20 | ||
|
a58c6b0cec | ||
|
b59723f276 | ||
|
20ab27b237 | ||
|
046d7befca | ||
|
a8cbbde8fc | ||
|
efb7d4275d | ||
|
d4f275e566 | ||
|
45db911011 | ||
|
50fccec438 | ||
|
67e72e864c | ||
|
dff4946b48 | ||
|
a38700f3fa | ||
|
42c4441755 | ||
|
1a4b646acd | ||
|
5888dd38a2 | ||
|
f56d63c754 | ||
|
93db50383a | ||
|
4e9b5a71db | ||
|
c85be915e6 | ||
|
1df4cdda42 | ||
|
cad03b04ae | ||
|
cddfa3a8d2 | ||
|
3a49af94d0 | ||
|
e60320a9be | ||
|
0ffb3508c6 | ||
|
d618f6d355 | ||
|
e542a65bf3 | ||
|
d1e1314dcf | ||
|
9ebdb00579 | ||
|
95a7a0c90d | ||
|
cabd3d60f0 | ||
|
ab8ee8b72a | ||
|
01f06a7e5b | ||
|
aa7d4a610b | ||
|
3f61b6d707 | ||
|
9ae0cc5700 | ||
|
6f65a73dd9 | ||
|
fb676a9ad7 | ||
|
dd66a1adf0 | ||
|
8c9bb3addb | ||
|
472c1a0c37 | ||
|
6fe8bf6c41 | ||
|
342e6f2fef | ||
|
23a8e3ef41 | ||
|
7c11b99469 | ||
|
e715162ed6 | ||
|
368cc550cb | ||
|
60311341e0 | ||
|
749ebd9cc4 | ||
|
c699a14a35 | ||
|
b05a2d385c | ||
|
7c78d19e3a | ||
|
8632307cb1 | ||
|
5a18f3ce4a | ||
|
1258aff0b4 | ||
|
b0904c11a0 | ||
|
ca517eb4d9 | ||
|
c522dd2931 | ||
|
7399edee2e | ||
|
ec93b7b5a0 | ||
|
280762fff3 | ||
|
b733fa2961 | ||
|
5176f8bdc2 | ||
|
91d96b2f0e | ||
|
c3229e597c | ||
|
0f371bc5a9 | ||
|
297d5940ce | ||
|
3b27ceaf53 | ||
|
d9142c1197 | ||
|
9b3d1160d6 | ||
|
05d144c279 | ||
|
a318b66854 | ||
|
431eef5e80 | ||
|
a8d20c5a01 | ||
|
676d75646e | ||
|
6cbc438aa0 | ||
|
4a8913c98c | ||
|
9d1ecd845a | ||
|
16987aca71 | ||
|
445e8d7838 | ||
|
e521d5dcd0 | ||
|
a4ed85d33b | ||
|
65e8a7fed6 | ||
|
1052a19262 | ||
|
a2b7a5f1f0 | ||
|
9f09872e0f | ||
|
60ea033064 | ||
|
1f3badb731 | ||
|
eb0281e47f | ||
|
7fc94415fb | ||
|
8dd7d9ba26 | ||
|
b9ac43e86d | ||
|
99a5f827ae | ||
|
fbdb7e099c | ||
|
6080dabb56 | ||
|
cf1540060a | ||
|
f96a9f652d | ||
|
d969109e05 | ||
|
9a08cf6266 | ||
|
10ea575cd8 | ||
|
356876b2b2 | ||
|
f5197ec2e0 | ||
|
71af5db38e | ||
|
45195e6496 | ||
|
a56a6df557 | ||
|
d7e6a7b125 | ||
|
ddabfbc1ad | ||
|
944864ed25 | ||
|
1c795e71d5 | ||
|
7d7e1366a6 | ||
|
158a7b1517 | ||
|
03f19ec235 | ||
|
a82ec20833 | ||
|
fb8e238319 | ||
|
ab943bf006 | ||
|
b15b58f099 | ||
|
fee8d962e3 | ||
|
4b1eaddfc2 | ||
|
c0aca0e021 | ||
|
4c3910dc59 | ||
|
ec9e8cd672 | ||
|
5cbd93bba6 | ||
|
30fc0fbf54 | ||
|
d26e847d54 | ||
|
7c553c1f0b | ||
|
eb63163ddf | ||
|
6e4adc86b8 | ||
|
b46398242f | ||
|
db071b1014 | ||
|
ebf6b50126 | ||
|
ebc498f0ff | ||
|
ef4c34a31f | ||
|
1d26c12771 | ||
|
cb8b49fd7a | ||
|
b0e6d12325 | ||
|
6da6a68e33 | ||
|
a12fd4a3ae | ||
|
003d8ba02a | ||
|
acb2a8697a | ||
|
aff0e4a9df | ||
|
b7ba04dacf | ||
|
ee6c8786b2 | ||
|
4fc19b7eba | ||
|
37964a375d | ||
|
b8573d03a4 | ||
|
b104914076 | ||
|
1d30b58685 | ||
|
326baa93a7 | ||
|
ab9f26f850 | ||
|
9a944175ac | ||
|
0bcc3240b7 | ||
|
1bf3608142 | ||
|
9dc971550c | ||
|
33c52513a3 | ||
|
2408ff11f6 | ||
|
3d130e5d99 | ||
|
bc0355c5b1 | ||
|
b90b13632e | ||
|
bad57c907c | ||
|
374793eb92 | ||
|
8a6ae6105e | ||
|
ecda8eebf2 | ||
|
f0a5257921 | ||
|
860a4bdc0a | ||
|
f6ddf72323 | ||
|
ec212bb98e | ||
|
fd7d37ac23 | ||
|
b4cd0d6bbc | ||
|
0a5908e4d8 | ||
|
59f0631685 | ||
|
7718deb4a5 | ||
|
75d52b7024 | ||
|
ecc72dd01b | ||
|
6591512cf6 | ||
|
4a0e97e36a | ||
|
f90b2d9410 | ||
|
582ba0ce5d | ||
|
ce411ab9b0 | ||
|
d90468db3f | ||
|
3a621e6ff7 | ||
|
a7ffe66547 | ||
|
4a57f4d6dd | ||
|
5b72ffa575 | ||
|
04a9e2cec2 | ||
|
17022c1174 | ||
|
59914a9d87 | ||
|
a7b9653de3 | ||
|
c8dc065e24 | ||
|
bac58ad0c2 | ||
|
6b2431b054 | ||
|
7e212ebd48 | ||
|
b3223b90da | ||
|
6ea773cdd7 | ||
|
997cddcb5a | ||
|
8228f76f5d | ||
|
b35ee9ccf4 | ||
|
16942af52b | ||
|
b190ce3538 | ||
|
9027915280 | ||
|
19aaaef37e | ||
|
a3bb90e160 | ||
|
06bae0dd8b | ||
|
7d48ab5671 | ||
|
8588405aa1 | ||
|
8238ae7d0a | ||
|
78ebec01a4 | ||
|
ac1137d7e8 | ||
|
212e9b833b | ||
|
52ad0ba352 | ||
|
318d86a1f5 | ||
|
fbffba4c21 | ||
|
c7f4e5423a | ||
|
5f282a9b7d | ||
|
7539ee3560 | ||
|
032389c6c0 | ||
|
788ac54f86 | ||
|
4e0fbc8532 | ||
|
5764d9756c | ||
|
85e79922ab | ||
|
6f3826a6ff | ||
|
c061b0b777 | ||
|
fc7bbfa8e2 | ||
|
0da20c7a1b | ||
|
4e2d5fe166 | ||
|
70767678ba | ||
|
7340e146f1 | ||
|
583bc59d23 | ||
|
ff5b872fa3 | ||
|
28517a8b78 | ||
|
34138d1533 | ||
|
ccf589f093 | ||
|
3ee100e71e | ||
|
1e0547a02c | ||
|
577e1f1b56 | ||
|
a7d25125a7 | ||
|
dbb09ef5d1 | ||
|
d840c94a29 | ||
|
114980480e | ||
|
95b1a821f3 | ||
|
206397cc81 | ||
|
a6b1a6d0c2 | ||
|
aba39a3b27 | ||
|
b5f095dd91 | ||
|
a9e92d4fa6 | ||
|
867a2eacd3 | ||
|
accecf6a76 | ||
|
f12b3bc9b7 | ||
|
a2ed755c9c | ||
|
235639b728 | ||
|
b1d5882fa6 | ||
|
39e632d950 | ||
|
87ced85657 | ||
|
0c53a8db66 | ||
|
84dcbaf0e7 | ||
|
047440eaea | ||
|
217ad0234b | ||
|
9795f46bea | ||
|
10bc0098b9 | ||
|
7a900fd3d9 | ||
|
45cfb4e565 | ||
|
5320480767 | ||
|
3e18e984fa | ||
|
fce759e98f | ||
|
f4439778f1 | ||
|
11176fc212 | ||
|
ffc71da2eb | ||
|
246fa0d6e4 | ||
|
3444146da3 | ||
|
5c4a482f64 | ||
|
01f84ea11d | ||
|
08402babbd | ||
|
7ef3dcbd23 | ||
|
8836fa205b | ||
|
f544a278c5 | ||
|
4b8fd6adb9 | ||
|
1ac8a9b4ac | ||
|
08a8a69b34 | ||
|
dbd668bda5 | ||
|
cc0760553b | ||
|
1142ff6b1f | ||
|
927da5d742 | ||
|
9a734e48fe | ||
|
345fe39b54 | ||
|
c7e9d62712 | ||
|
5918095f11 | ||
|
24612eb634 | ||
|
f7125d6198 | ||
|
47870cd50c | ||
|
45fbf83971 | ||
|
6044cffef3 | ||
|
4d933e1ef7 | ||
|
181e088ad5 | ||
|
179b86c3ba | ||
|
083c15b956 | ||
|
7c780dd75c | ||
|
d35d51c014 | ||
|
14c6926360 | ||
|
bedfcb5c5d | ||
|
19461020ef | ||
|
36ecf25804 | ||
|
0229fc243a | ||
|
a2f09b305c | ||
|
32d7a0fd1b | ||
|
5d3f95762e | ||
|
4ca9ee6eec | ||
|
9026b0bfd7 | ||
|
3d30a5938a | ||
|
bcb06779b9 | ||
|
26b70f37d6 | ||
|
b20a354344 | ||
|
753f518f77 | ||
|
33d3019ffd | ||
|
26e3157ae7 | ||
|
b592528318 | ||
|
936d55d7de | ||
|
6df45fccc5 | ||
|
f43ebcce87 | ||
|
23fc261a82 | ||
|
344db19232 | ||
|
5f777845a3 | ||
|
f32bdd6c76 | ||
|
219c3c11f9 | ||
|
b3b367fcb3 | ||
|
52a43e7f30 | ||
|
04f5098d06 | ||
|
9731503826 | ||
|
b431351a22 | ||
|
089097a41c | ||
|
4468fdd76b | ||
|
79c70c59e3 | ||
|
c8ffc81527 | ||
|
048db14a08 | ||
|
a9ee07b19a | ||
|
e316d9ce6d | ||
|
6bf354cf93 | ||
|
384ebf9341 | ||
|
b2c74ba86a | ||
|
0c915de314 | ||
|
327e7efa89 | ||
|
c361b6cc07 | ||
|
59948d6746 | ||
|
1d93cf41fd | ||
|
8bbbb05adc | ||
|
6e314b6a30 | ||
|
499b2ca7ef | ||
|
77823d3f33 | ||
|
88dfb954ca | ||
|
ddc229f270 | ||
|
8af8cc2c9a | ||
|
775492b391 | ||
|
1419176094 | ||
|
aa0ca5fdcf | ||
|
0d61a3ad5d | ||
|
bdbb3d9ad1 | ||
|
fc73bddd43 | ||
|
7515578ba7 | ||
|
84b9841886 | ||
|
6b66476927 | ||
|
7357f19f81 | ||
|
f29d8322d5 | ||
|
31a3f6f4d8 | ||
|
7432a0c5cb | ||
|
f6d58191b2 | ||
|
89fbf0869a | ||
|
b1e453438e | ||
|
284c6033d3 | ||
|
b85b32560c | ||
|
35bc92bb49 | ||
|
243a5217e7 | ||
|
b2eeeed0af | ||
|
afd4700758 | ||
|
03a1601bf3 | ||
|
edfff4ec57 | ||
|
7b5bc3a25e | ||
|
d98ca0bb44 | ||
|
518b4ba5a7 | ||
|
9c1f781be3 | ||
|
fa7c1b3ec8 | ||
|
89acb9b6f3 | ||
|
45971f8f26 | ||
|
21f12b87a0 | ||
|
d264333ab8 | ||
|
0f9c1b9427 | ||
|
c273f309d4 | ||
|
17fd2f9909 | ||
|
0436701f29 | ||
|
840632b34e | ||
|
764481690c | ||
|
66b9d7421b | ||
|
a02c1557ac | ||
|
ff8af87179 | ||
|
9c8b31fdbb | ||
|
bda1413da4 | ||
|
f1cc8a10f5 | ||
|
babf462bcf | ||
|
dba24d2dee | ||
|
42066cfca2 | ||
|
32e550c8e0 | ||
|
4f2c94a5a8 | ||
|
95076bdb6a | ||
|
547caadeb2 | ||
|
2469e1e811 | ||
|
ded267c9ac | ||
|
2c9733e739 | ||
|
72fd263ddf | ||
|
8b84a4b336 | ||
|
3caf1f2d36 | ||
|
16391fe99c | ||
|
6d3c858cbe | ||
|
7afe9fac0a | ||
|
e6a2c10a19 | ||
|
cc9867bcc4 | ||
|
ba7ae19533 | ||
|
47fa9e3956 | ||
|
0b739b0e3f | ||
|
221e912645 | ||
|
81f4e92231 | ||
|
4fef85d5d0 | ||
|
04a6b09861 | ||
|
e31842d768 | ||
|
e99efae839 | ||
|
36f91aa11b | ||
|
140658c1a3 | ||
|
38be52d12f | ||
|
a7fd8069c2 | ||
|
2df57bf684 | ||
|
4a6cac96f6 | ||
|
0e6eb89cea | ||
|
0c883259d9 | ||
|
13bd98b842 | ||
|
c641046aa5 | ||
|
05bddbb40e | ||
|
4de6d10e27 | ||
|
253ed7b2bd | ||
|
0d38741de7 | ||
|
b5cef50dc7 | ||
|
16ee3df31f | ||
|
341478db73 | ||
|
ef1bf7c3e6 | ||
|
ee5b64904d | ||
|
0ff3b95f89 | ||
|
b70c904ec3 | ||
|
3e3465fb56 | ||
|
9e37a107ee | ||
|
4de2512b34 | ||
|
90d4545a1f | ||
|
8561f3e177 | ||
|
51b5b3a846 | ||
|
1401282aa0 | ||
|
8b81526e54 | ||
|
a16b6cb2b8 | ||
|
7876030737 | ||
|
402d5748e4 | ||
|
280975b81a | ||
|
6f8778d87f | ||
|
fbf7578fb0 | ||
|
7dd560a2e3 | ||
|
0b2e1bc8e2 | ||
|
baea455fde | ||
|
eb303157ca | ||
|
733b0d183f | ||
|
66233b7b00 | ||
|
46a820fda5 | ||
|
0244989b94 | ||
|
990c369cab | ||
|
af501952c2 | ||
|
d7ba71b1c0 | ||
|
b8df070d93 | ||
|
c55c4e0e89 | ||
|
4249336320 | ||
|
903b9bfd08 | ||
|
e32a4a84a8 | ||
|
b42d8d1e30 | ||
|
e9e9a359c8 | ||
|
b3f424fa28 | ||
|
ba740322f4 | ||
|
898a517ae9 | ||
|
c2c8c42ef3 | ||
|
4d9c4a415d | ||
|
f4fe930430 | ||
|
04dfeaf488 | ||
|
797064a119 | ||
|
4d8d9cb87d | ||
|
d1ae2cffcb | ||
|
102412cdb9 | ||
|
f9ef5868cc | ||
|
d9b2112b19 | ||
|
5edcd97c78 | ||
|
9227a3039e | ||
|
f97521c118 | ||
|
119870fe9a | ||
|
f4942e32ed | ||
|
0ef5c10749 | ||
|
d37fc311db | ||
|
7b05b78cf7 | ||
|
576a429426 | ||
|
47ef0c3a0b | ||
|
66303f614b | ||
|
98358f7578 | ||
|
8486b846f2 | ||
|
6cb35137cb | ||
|
f6182412a0 | ||
|
a67c87101d | ||
|
84b32514df | ||
|
df8b7158a7 | ||
|
ee226d4618 | ||
|
6e2324528c | ||
|
344ae4399e | ||
|
f91353f2f5 | ||
|
339ac7c996 | ||
|
d153a4d83e | ||
|
dc8e41357d | ||
|
20ec53b41a | ||
|
7bd9f55df8 | ||
|
d5045b51c7 | ||
|
fc19a86e1f | ||
|
422de9c672 | ||
|
3d75d83a84 | ||
|
0af2fd845d | ||
|
e60444cf65 | ||
|
10f8002da5 | ||
|
e331c10d7e | ||
|
f4844e6252 | ||
|
76a07c84e9 | ||
|
1c9dc9926a | ||
|
aae80c348b | ||
|
ab6707b9d9 | ||
|
4e7a27dd65 | ||
|
5d71baa4a1 | ||
|
1e0e5d0fe9 | ||
|
0a89af3c83 | ||
|
0518c96567 | ||
|
ad8a8ae612 | ||
|
b894bffad9 | ||
|
68ad6b9913 | ||
|
1a1ff2dc44 | ||
|
eaeb1f99c6 | ||
|
cc67583278 | ||
|
a14568c796 | ||
|
b919a5705c | ||
|
d1e6f4a136 | ||
|
8662dfa4c0 | ||
|
4e84a5c40c | ||
|
2e3877f770 | ||
|
437f939c57 | ||
|
a85b6420c1 | ||
|
3f1ec6a6d2 | ||
|
a694329998 | ||
|
b1b6ea9b11 | ||
|
d447f5f9d7 | ||
|
c4dbc2bc7f | ||
|
91eee69d9d | ||
|
8152c4e75c | ||
|
053dd50640 | ||
|
4d1dd28431 | ||
|
04be7d6538 | ||
|
195427e544 | ||
|
57bf78489b | ||
|
5df04cb5ff | ||
|
d55ff5735e | ||
|
f38c56ee0d | ||
|
f003ad9ee9 | ||
|
dd7344d05d | ||
|
138b60c462 | ||
|
8ec556f8ae | ||
|
6c532f99ad | ||
|
30c23b51b6 | ||
|
9b7ed21787 | ||
|
b06d296a44 | ||
|
6e084e662e | ||
|
bf30b8027e | ||
|
71ff4b8fe0 | ||
|
578f350498 | ||
|
8f0a55feb0 | ||
|
048ba35d52 | ||
|
915f4a0045 | ||
|
1efbbe4b84 | ||
|
18fad5f115 | ||
|
eae0cc17a4 | ||
|
060c08c011 | ||
|
a2dedde094 | ||
|
4003cea759 | ||
|
9b9d52e99f | ||
|
e829d79589 | ||
|
3589c9f60f | ||
|
481a6bdd5f | ||
|
b3a98d7079 | ||
|
d18e9da468 | ||
|
4f27ca28c3 | ||
|
190b6fb25f | ||
|
4fcc659263 | ||
|
cf16398794 | ||
|
edf8ab6208 | ||
|
1d02d86f9e | ||
|
f63a561c76 | ||
|
a74098d7dc | ||
|
ebcf40cb8f | ||
|
0ab9db23d1 | ||
|
46f2494dfd | ||
|
5e5d2b2acc | ||
|
6691062747 | ||
|
0e5256c8ce | ||
|
f95a064eca | ||
|
eaa293f406 | ||
|
7c0f387f2c | ||
|
34f9b38ea3 | ||
|
232cdd6901 | ||
|
a815d7b3e2 | ||
|
91b1a89334 | ||
|
d7a5da0fc9 | ||
|
18b0386c75 | ||
|
64d8985be1 | ||
|
73c30f532a | ||
|
27b556e653 | ||
|
511d3d958f | ||
|
69f091e430 | ||
|
f230aba392 | ||
|
d1033251ff | ||
|
1e4551b306 | ||
|
12535706d0 | ||
|
1d325c3433 | ||
|
fff9676811 | ||
|
244428929f | ||
|
947336b578 | ||
|
c38e712338 | ||
|
5bac889d52 | ||
|
4352f4a095 | ||
|
4ab7f00f86 | ||
|
c0099262ea | ||
|
e53eb48ecc | ||
|
16d39ff9d0 | ||
|
e9f2f56634 | ||
|
dceea6795a | ||
|
7756227dc2 | ||
|
5d0596053e | ||
|
436298891e | ||
|
55b8b082ed | ||
|
faff056674 | ||
|
b10484d993 | ||
|
b61c47cc8a | ||
|
859a71cc6a | ||
|
8297aa4100 | ||
|
83e5b5edc6 | ||
|
fbfd763a74 | ||
|
925dbfead8 | ||
|
7de8439323 | ||
|
8572e056f9 | ||
|
6fee873729 | ||
|
b96a7bcbbd | ||
|
4f2e7ac0d4 | ||
|
30d155a8e2 | ||
|
a08440aacf | ||
|
0cd5773362 | ||
|
a13af41e9f | ||
|
d8a7bb4dc7 | ||
|
9b8d50aa54 | ||
|
10787aada8 | ||
|
a14c9438ad | ||
|
92f7a9c574 | ||
|
d9e3d9ca9e | ||
|
54b4b9438e | ||
|
ef3d2b8e99 | ||
|
fa2c90064d | ||
|
ec1764ba8c | ||
|
8049a5d301 | ||
|
edf4f9e49b | ||
|
17757eb3ca | ||
|
cd009f51d6 | ||
|
c9c043712a | ||
|
f80178b1b2 | ||
|
06d319cd71 | ||
|
14cdce113e | ||
|
83518d7f96 | ||
|
e73f04cf77 | ||
|
2a1cec61f3 | ||
|
c16eb6f939 | ||
|
901d4a2206 | ||
|
3b7bf5a1dd | ||
|
716a90cf7e | ||
|
df51dac805 | ||
|
c4567a521b | ||
|
d1fa375d6f | ||
|
fe4db6ea35 | ||
|
dfe5af9191 | ||
|
0618b29778 | ||
|
a4ba6e1842 | ||
|
077fe2eb69 | ||
|
b1ea497262 | ||
|
f741d05f94 | ||
|
d222a7f1b7 | ||
|
1b62e7289f | ||
|
41cb256d49 | ||
|
baa3a91f65 | ||
|
fd932ad5b3 | ||
|
02aeccbfb4 | ||
|
ec7bc53b5a | ||
|
21d28a9a19 | ||
|
8328c26df3 | ||
|
8e104a62ae | ||
|
840316d4e4 | ||
|
5938fb7f88 | ||
|
c54dc1ad98 | ||
|
54cf46ff32 | ||
|
6f7900234d | ||
|
d97f090f86 | ||
|
4b9f70db1c | ||
|
a7eb92b9bb | ||
|
e04a71738d | ||
|
f7f296c674 | ||
|
440ddd175d | ||
|
c814082918 | ||
|
879c0224d5 | ||
|
18bd06760a | ||
|
5232aec11e | ||
|
8f926fb176 | ||
|
0cda2b7e4e | ||
|
7ba803965e | ||
|
a22ee35cd0 | ||
|
c6386241fd | ||
|
3cd1369e61 | ||
|
924b615019 | ||
|
47c43b485a | ||
|
8ebdd481aa | ||
|
1a79525024 | ||
|
03bdca39f1 | ||
|
89f98bb7ab | ||
|
0d4e952a69 | ||
|
3760d5b039 | ||
|
011d6273fa | ||
|
c980be28ac | ||
|
095ef308c7 | ||
|
e329784448 | ||
|
b44f893869 | ||
|
2df20b4480 | ||
|
cad0004a92 | ||
|
453ca0b9f4 | ||
|
ab525867e1 | ||
|
0153a326da | ||
|
9885b7e716 | ||
|
abb4b0befe | ||
|
217a382616 | ||
|
a18742d250 | ||
|
91e7d3bac0 | ||
|
b5a2531090 | ||
|
afc9f4b7eb | ||
|
cb759e5c21 | ||
|
33d6584924 | ||
|
6bbd0f5be6 | ||
|
fbb5a4dc25 | ||
|
abb9ced8e6 | ||
|
35bd023a79 | ||
|
d827bfee99 | ||
|
afc21844b5 | ||
|
8a5354fcd7 | ||
|
e959dbc6e0 | ||
|
704cf26725 | ||
|
e8c08a0e93 | ||
|
6d971e86b1 | ||
|
fb17da3f56 | ||
|
fae8c05e71 | ||
|
a865f4b72e | ||
|
48ef268c0d | ||
|
2c943e0d53 | ||
|
7e1af72186 | ||
|
1bf4fb1b70 | ||
|
b7919e4ef2 | ||
|
d828660b9e | ||
|
ddb222cc72 | ||
|
b0ccd26928 | ||
|
c741878f9f | ||
|
e2380def5d | ||
|
ec73020b3c | ||
|
253e7499e3 | ||
|
48fdd50428 | ||
|
c0d3554acb | ||
|
24b633b5ad | ||
|
41cfa7b84e | ||
|
f9abb1fb6e | ||
|
c4172d7f52 | ||
|
addb351c85 | ||
|
20d94782f5 | ||
|
8135c034a9 | ||
|
b5583eba23 | ||
|
b0ab79bb48 | ||
|
5eca404866 | ||
|
b94885f8ba | ||
|
6814582f32 | ||
|
a09d831613 | ||
|
d35b0ea279 | ||
|
10545f3e1b | ||
|
2d294015f2 | ||
|
739d01efe4 | ||
|
3d81315769 | ||
|
1350da9666 | ||
|
7e73af789d | ||
|
42267bfc65 | ||
|
e864525e79 | ||
|
a952ba5411 | ||
|
8bf0eaf969 | ||
|
27c90bd217 | ||
|
1d6e05f7cf | ||
|
7bd1041820 | ||
|
7195f198a6 | ||
|
70da5917c9 | ||
|
0fed21e831 | ||
|
405384dbe5 | ||
|
b7ae5eda35 | ||
|
3c18808601 | ||
|
720a90a6ab | ||
|
0008da3e79 | ||
|
3625204df9 | ||
|
d4483aed74 | ||
|
8f5ac5cd7e | ||
|
9d1135cb69 | ||
|
ac8f2e9e0d | ||
|
070a26a85e | ||
|
0eb3676268 | ||
|
b6f4a30316 | ||
|
84b9aab3c2 | ||
|
82b877ed7c | ||
|
c446351ffa | ||
|
26bc625079 | ||
|
395eaddb0c | ||
|
00c4f47f42 | ||
|
363d8075f2 | ||
|
3325353639 | ||
|
dbc5997198 | ||
|
1c8080a9fe | ||
|
3c8e6cfd31 | ||
|
f56a6e8ecd | ||
|
6a107bf745 | ||
|
5eec0d15bd | ||
|
91a798f34e | ||
|
0b1b7c4952 | ||
|
1e3668a9d1 | ||
|
29dc3ce430 | ||
|
e523abacc7 | ||
|
0b7edec983 | ||
|
c774f87f2e | ||
|
d7ca66efc5 | ||
|
8ded52b3b3 | ||
|
87fbeeaab4 | ||
|
926f826182 | ||
|
bcfe3784d7 | ||
|
3cc60905bd | ||
|
2fa927266f | ||
|
c9eeaf7e95 | ||
|
1bd87bfb88 | ||
|
1f2c0f634b | ||
|
1f176c93d5 | ||
|
3e31752a8f | ||
|
4ba55e8546 | ||
|
0d80582874 | ||
|
3e88bf4692 | ||
|
baae9955c8 | ||
|
4a77b9c8d5 | ||
|
f17b6dbdf3 | ||
|
8d454ed92a | ||
|
3f9661d9b4 | ||
|
4846d102f2 | ||
|
53947eced8 | ||
|
f4d6d8efa1 | ||
|
2d4c537c54 | ||
|
c681d2742b | ||
|
2047fa00a9 | ||
|
eb9d3f04b9 | ||
|
b19f69dc2a | ||
|
5262c0240e | ||
|
c98706fac0 | ||
|
85204de9aa | ||
|
4614625f82 | ||
|
91b08d1772 | ||
|
cd9d1cf4ab | ||
|
10597e3bef | ||
|
5854dff37e | ||
|
fbc3a2fb6a | ||
|
c290aaa774 | ||
|
def456bd9b | ||
|
1f83ebc6c7 | ||
|
6a928a3321 | ||
|
39ad131b55 | ||
|
00a122833a | ||
|
c593515ec6 | ||
|
6dde89d1eb | ||
|
351bb81e78 | ||
|
5ea7c66c83 | ||
|
8c171fa4d1 | ||
|
310448e9bb | ||
|
aba56b331d | ||
|
8832387b84 | ||
|
0d7d3f45f0 | ||
|
fdf379b88b | ||
|
8a9a36b512 | ||
|
e9f2d6b5ea | ||
|
460161d9a5 | ||
|
204d5ee1e3 | ||
|
c4a00fbc9a | ||
|
41c22c18fe | ||
|
374aea4e09 | ||
|
ebe37495c0 | ||
|
eb4b9f0599 | ||
|
ea2afa46ed | ||
|
0fd8d86eac | ||
|
10d6ed01e1 | ||
|
9873365369 | ||
|
81669bfcc1 | ||
|
719b9e690a | ||
|
bd0444437a | ||
|
57e28eb90e | ||
|
ff850d750e | ||
|
7bd44f5f62 | ||
|
31ba0133c7 | ||
|
a5bb8dfa5a | ||
|
20e51d79b6 | ||
|
26ad0d3bc3 | ||
|
a8f4154a77 | ||
|
eacaee9e47 | ||
|
4d4290c234 | ||
|
a61ea446aa | ||
|
782340908d | ||
|
d1a0dac092 | ||
|
fa50f76f5d | ||
|
38dcb96086 | ||
|
8b90d2297d | ||
|
28479ef2ed | ||
|
9b03ae160d | ||
|
5303321952 | ||
|
95ba6aa2c3 | ||
|
a54f152a34 | ||
|
021e0a04ac | ||
|
28faee6e41 | ||
|
acc496e3e9 | ||
|
55ae280aaa | ||
|
299b857946 | ||
|
2d395023fe | ||
|
e0f34384a3 | ||
|
5278e7f072 | ||
|
895e2d3d7c | ||
|
d3a7a59792 | ||
|
4449ff99dc | ||
|
ca42a31135 | ||
|
906fca7e9e | ||
|
f64e1f3c1b | ||
|
c8af3684c6 | ||
|
16a5dae61d | ||
|
e3474bb075 | ||
|
a7726a014b | ||
|
3be9493e9f | ||
|
40bbed2a8b | ||
|
e379bbab4c | ||
|
12c2c58afd | ||
|
8140613a29 | ||
|
00d5b4d29d | ||
|
251a347a42 | ||
|
7fb090392f | ||
|
312472e7bb | ||
|
2afd959c4f | ||
|
20442a5023 | ||
|
bfadc5ae52 | ||
|
8c7f7cf439 | ||
|
2a5591c95d | ||
|
85ff048fd8 | ||
|
bd181aeed4 | ||
|
cdde0d252e | ||
|
ad54163518 | ||
|
d60650cff2 | ||
|
815fd5ff6b | ||
|
3ec9753808 | ||
|
2bff7750b4 | ||
|
29aca7006b | ||
|
d54a219d3d | ||
|
3b1b353b79 | ||
|
5cb13dceb8 | ||
|
55538b668f | ||
|
6b5f4932ce | ||
|
bc366044e4 | ||
|
666c1f2919 | ||
|
d732ab81b7 | ||
|
8a8aa7ca71 | ||
|
a7f74522bd | ||
|
e7d8c3451b | ||
|
c4c85dddc1 | ||
|
579ffce81b | ||
|
c385979af6 | ||
|
6ba45ec3f2 | ||
|
7851bb476e | ||
|
7453975e92 | ||
|
3f1bd6b3f1 | ||
|
53dffc961f | ||
|
80384000c1 | ||
|
e3efb23b78 | ||
|
8e667fe291 | ||
|
688515b8bf | ||
|
6e3cf51749 | ||
|
082e690f51 | ||
|
7e285d97f0 | ||
|
8af2d845e7 | ||
|
038996dff9 | ||
|
06a5b60aaf | ||
|
873dfa179c | ||
|
33f6725d37 | ||
|
22c09b7849 | ||
|
2488e444aa | ||
|
1157625f6d | ||
|
47ef9a0102 | ||
|
15fde3a220 | ||
|
daf7d79a21 | ||
|
787be9deb9 | ||
|
10c50fffb1 | ||
|
13b96bb3b6 | ||
|
c318790bbf | ||
|
0d969dd42a | ||
|
4e70601d19 | ||
|
e4a6ff293a | ||
|
d0edae76f2 | ||
|
9eaacf30ad | ||
|
40111ed25e | ||
|
506f972c75 | ||
|
843f3c9b45 | ||
|
6c2c2ca41f | ||
|
8315734471 | ||
|
2d9b2ab379 | ||
|
45f20509f4 | ||
|
c5b9c79b82 | ||
|
6a196884e5 | ||
|
1d9431795b | ||
|
b3074b2f6a | ||
|
3be65ff806 | ||
|
8c0005e460 | ||
|
c7128dedf2 | ||
|
4a2f751db3 | ||
|
ef3468ef1f | ||
|
ca1eeed605 | ||
|
2263aa4dbe | ||
|
2577e7301a | ||
|
e5736c822d | ||
|
6d466af424 | ||
|
3f4697b6c3 | ||
|
d0622dbcd3 | ||
|
8f6655f85e | ||
|
dbe827e3c5 | ||
|
5a7f933a5c | ||
|
54d5f9a9c3 | ||
|
cc682485fc | ||
|
f8cb8967d9 | ||
|
0480db10ac | ||
|
f52c6f7b00 | ||
|
7d1f5f5257 | ||
|
ea0942b7fe | ||
|
3298f2d815 | ||
|
fae5cdae50 | ||
|
8ffe08bfb9 | ||
|
1c2b14868b | ||
|
7775a0141b | ||
|
831272d971 | ||
|
aac3027480 | ||
|
c8c4507d4b | ||
|
6a74cd21fb | ||
|
eb5eca9fa5 | ||
|
0e702fb334 | ||
|
626f97cd65 | ||
|
a83578d1ae | ||
|
be844b82af | ||
|
65c49c7a71 | ||
|
f03b0569cf | ||
|
82f3a37a3e | ||
|
112a27dbd9 | ||
|
366eca3173 | ||
|
fab0c5bfd9 | ||
|
dc3b923258 | ||
|
3622d3234a | ||
|
8ef6595ced | ||
|
cf2c99d986 | ||
|
672add8668 | ||
|
d5826861a0 | ||
|
a8494bd6f0 | ||
|
0b94851623 | ||
|
7fa0c14f8c | ||
|
9bd22d4252 | ||
|
b78f5bd54a | ||
|
0949a264b8 | ||
|
97a0110931 | ||
|
83ec935ac3 | ||
|
e46da428eb | ||
|
26089f992e | ||
|
13233e0893 | ||
|
da934575a6 | ||
|
6feb04c800 | ||
|
be3cb791a5 | ||
|
e3b93af297 | ||
|
d56f97e86d | ||
|
a78614f198 | ||
|
2b25631611 | ||
|
98613b5ea6 | ||
|
105ecc4452 | ||
|
418a682f7e | ||
|
215e5d42a7 | ||
|
21d71bd03c | ||
|
3184a8536e | ||
|
ddf9938c00 | ||
|
388d19b99c | ||
|
ec03017eca | ||
|
0b920b5c64 | ||
|
6e0be9a6a2 | ||
|
f1798a1c97 | ||
|
57cb428105 | ||
|
adc52f7b63 | ||
|
f8cf02bda1 | ||
|
4b14ad9770 | ||
|
2a630b0a50 | ||
|
1a311664e8 | ||
|
0a4e3edf43 | ||
|
9b0b80d1d4 | ||
|
dcd123a9ec | ||
|
e06452d97c | ||
|
e5b4e7afe0 | ||
|
0ea22269a0 | ||
|
577dcfa938 | ||
|
99f08da4df | ||
|
2f9724e7ca | ||
|
8cda89569c | ||
|
5421e30293 | ||
|
a2deff0f7a | ||
|
bff661fe69 | ||
|
f6b890e284 | ||
|
acb8fa522b | ||
|
b47614c965 | ||
|
9af458df49 | ||
|
a67e2b597d | ||
|
39925f8139 | ||
|
3c36eed461 | ||
|
5a7c3bd716 | ||
|
43476167d8 | ||
|
d357eaeb51 | ||
|
2e118c5f22 | ||
|
a41d7378ef | ||
|
16b51711f5 | ||
|
8e95530ca8 | ||
|
202facf43d | ||
|
0426fa63d0 | ||
|
5d7ca1ef9a | ||
|
a2957b9e80 | ||
|
001c1f6518 | ||
|
7fb4b2bb40 | ||
|
bff274d058 | ||
|
41d1ef27b5 | ||
|
36fa7ae97e | ||
|
30aea37391 | ||
|
f5af0350a4 | ||
|
e07377af86 | ||
|
a04a6845f7 | ||
|
185e9b66d6 | ||
|
7825fe4f1d | ||
|
d01814821f | ||
|
93a7c51dd1 | ||
|
01234b52e3 | ||
|
21ac42d3a6 | ||
|
dcc5d9f583 | ||
|
3a3cec4f9a | ||
|
083749e8fe | ||
|
f9ac40a811 | ||
|
b0027acf34 | ||
|
f5e5854479 | ||
|
95d72d065b | ||
|
56b2fa69bc | ||
|
e614427925 | ||
|
34dc1f9f53 | ||
|
94d9b78a33 | ||
|
b9d949d259 | ||
|
3376e1e663 | ||
|
ea98c2631f | ||
|
50b9fe649d | ||
|
56054531a3 | ||
|
1912e46113 | ||
|
075f951cfe | ||
|
26aad765ae | ||
|
73ba78d46d | ||
|
0d5dd40134 | ||
|
f0d84ad142 | ||
|
0b4ebf644d | ||
|
5b60db120f | ||
|
f2073a4494 | ||
|
3e12d26afd | ||
|
e458208966 | ||
|
e28a77dc87 | ||
|
a709596ccb | ||
|
849c7dfe02 | ||
|
e580093a34 | ||
|
4fa7a5c1bc | ||
|
d668007fee | ||
|
6cbccf3be6 | ||
|
9cd75dda1a | ||
|
56dff7ea67 | ||
|
6160f99e92 | ||
|
115639a004 | ||
|
a0c98c7d9f | ||
|
7842700bf1 | ||
|
4ecda4d4e0 | ||
|
c76d140d0b | ||
|
4f42eb1796 | ||
|
c67b10e38d | ||
|
614ceabd45 | ||
|
a94b2e8806 | ||
|
732616984b | ||
|
eddf0c1200 | ||
|
49013264d5 | ||
|
f12744ad8c | ||
|
4ddcb0c965 | ||
|
0846d4898f | ||
|
cb746200fa | ||
|
fe06a1f7a0 | ||
|
9c1cee738d | ||
|
7cc778673a | ||
|
38d0f0427f | ||
|
8572280b7b | ||
|
69b1769f22 | ||
|
5ceef2e9c3 | ||
|
d32446b171 | ||
|
d8ca39ffea | ||
|
d47bddde62 | ||
|
e4802ec958 | ||
|
6d855e119d | ||
|
7ab81e493a | ||
|
fa0397e431 | ||
|
aba3b361be | ||
|
1cf188ee08 | ||
|
f5983f08fd | ||
|
b812c2e09f | ||
|
d7466efbe1 | ||
|
dff30af9f2 | ||
|
25dcb73e27 | ||
|
63ed3d09d5 | ||
|
caf1e6010b | ||
|
2d97408c1f | ||
|
01c0d76c5a | ||
|
7c7032d951 | ||
|
6e722f5833 | ||
|
d3502c56d3 | ||
|
1b8eb3cd68 | ||
|
bc7bd84221 | ||
|
85b22341a4 | ||
|
f8c725e5b2 | ||
|
e6344e4f51 | ||
|
8eac10bf89 | ||
|
c1da0eeced | ||
|
0a6d5b1766 | ||
|
4035ac09ce | ||
|
f81a7cfac0 | ||
|
2b086879cc | ||
|
a3091f7509 | ||
|
70a6ac0038 | ||
|
468a53d587 | ||
|
51f3b17ad2 | ||
|
a864d3bd56 | ||
|
a4d5aa0d10 | ||
|
aff5ac2c0a | ||
|
effe92a05c | ||
|
a4ca6dfd38 | ||
|
e6012e1ca2 | ||
|
472497cafd | ||
|
34f4b16a63 | ||
|
7f55a870d9 | ||
|
6a37ad7c15 | ||
|
788981d170 | ||
|
f377c92d8a | ||
|
0dc3068f7f | ||
|
1ad8ec6dd1 | ||
|
18a80f3519 | ||
|
82f8b091c1 | ||
|
71785bae57 | ||
|
6d979a68f2 | ||
|
ef852ef963 | ||
|
00b0ce6c6e | ||
|
5750087d37 | ||
|
a2ae977550 | ||
|
b893651223 | ||
|
e221d37d2b | ||
|
f0acab21a3 | ||
|
93dc5fae09 | ||
|
40746db53e | ||
|
4404db650c | ||
|
ab968a56e6 | ||
|
246a3d000a | ||
|
cbcf251bb3 | ||
|
0756054690 | ||
|
b6109ca93e | ||
|
823ee2cea0 | ||
|
18f6052681 | ||
|
4f2ab72567 | ||
|
bc6a2c2cca | ||
|
7a6a911f7f | ||
|
abeff39829 | ||
|
4d18c1bf83 | ||
|
8a818059f2 | ||
|
3768262224 | ||
|
b790a0731e | ||
|
c38b9eeb08 | ||
|
22b376da71 | ||
|
fde53abb1a | ||
|
c32e09a2b3 | ||
|
a243f3d7c2 | ||
|
3586c76b95 | ||
|
c9d9840235 | ||
|
10390953fe | ||
|
d6c6bc05ad | ||
|
a17601e2a8 | ||
|
93d481b515 | ||
|
13b8ba3746 | ||
|
e6fbd9259d | ||
|
b5eeacc128 | ||
|
2c575f3ca5 | ||
|
5abbb8a807 | ||
|
6401b5c9eb | ||
|
7edc1a2571 | ||
|
f489add855 | ||
|
adfdcdb9c6 | ||
|
922050a79b | ||
|
436bef01da | ||
|
b7ba6f81da | ||
|
381b09d68b | ||
|
fbed65d464 | ||
|
bcd612d42f | ||
|
eac2293778 | ||
|
72deff81f9 | ||
|
a8e9ba3041 | ||
|
3e73641378 | ||
|
7cf44a604a | ||
|
9003db6eba | ||
|
d1c87e1c21 | ||
|
ccaadd1f52 | ||
|
e64653eaff | ||
|
abb0f3d2be | ||
|
7f48a1b6ee | ||
|
4affed8f68 | ||
|
1088a43866 | ||
|
e0d0f49bfd | ||
|
ee5b4d6a03 | ||
|
7062294419 | ||
|
97a687e40a | ||
|
206845575c | ||
|
da1751940e | ||
|
9502544abf | ||
|
b975ed87a0 | ||
|
cbf3118b8a | ||
|
657726e667 | ||
|
eb90dac89d | ||
|
4c2f758f69 | ||
|
e577db4635 | ||
|
b1023cdfda | ||
|
f15da8e4b3 | ||
|
5df6135a0e | ||
|
186cbed777 | ||
|
bc5aa4b4cd | ||
|
836f0ecf3f | ||
|
e32f14578c | ||
|
03d3ede036 | ||
|
b4d44fdd2b | ||
|
a93da2a912 | ||
|
df86c89acc | ||
|
690edb8fcc | ||
|
a43bd745d1 | ||
|
d5ee87ddee | ||
|
a0b46d9d8a | ||
|
1783f0beb1 | ||
|
8d84dfb3aa | ||
|
b9bf5c9856 | ||
|
83be7c1886 | ||
|
81404d934c |
13
.ci/.env.ci
13
.ci/.env.ci
@@ -60,7 +60,7 @@ APP_LOG_LEVEL=info
|
||||
# Use "pgsql" for PostgreSQL
|
||||
# Use "mysql" for MySQL and MariaDB.
|
||||
# Use "sqlite" for SQLite.
|
||||
DB_CONNECTION=sqlite_test
|
||||
DB_CONNECTION=sqlite
|
||||
|
||||
# MySQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
@@ -127,7 +127,6 @@ MAIL_ENCRYPTION=null
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
|
||||
|
||||
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAILGUN_ENDPOINT=api.mailgun.net
|
||||
@@ -136,7 +135,6 @@ MAILGUN_ENDPOINT=api.mailgun.net
|
||||
MANDRILL_SECRET=
|
||||
SPARKPOST_SECRET=
|
||||
|
||||
|
||||
# Firefly III can send you the following messages
|
||||
SEND_REGISTRATION_MAIL=true
|
||||
SEND_ERROR_MESSAGE=true
|
||||
@@ -188,7 +186,7 @@ AUTHENTICATION_GUARD=web
|
||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
||||
#
|
||||
CUSTOM_LOGOUT_URI=
|
||||
CUSTOM_LOGOUT_URL=
|
||||
|
||||
# LDAP connection configuration
|
||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
||||
@@ -223,7 +221,6 @@ ADLDAP_ADMIN_PASSWORD=
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
ADLDAP_LOGIN_FALLBACK=false
|
||||
@@ -260,12 +257,6 @@ DISABLE_CSP_HEADER=false
|
||||
TRACKER_SITE_ID=
|
||||
TRACKER_URL=
|
||||
|
||||
#
|
||||
# Firefly III can collect telemetry on how you use Firefly III. This is opt-in.
|
||||
# In order to allow this, change the following variable to true.
|
||||
# To read more about this feature, go to this page: https://docs.firefly-iii.org/support/telemetry
|
||||
SEND_TELEMETRY=false
|
||||
|
||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
||||
# However if you know what you're doing you can significantly speed up container start times.
|
||||
|
1
.ci/php-cs-fixer/.gitignore
vendored
Normal file
1
.ci/php-cs-fixer/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
vendor
|
44
.ci/php-cs-fixer/.php-cs-fixer.php
Normal file
44
.ci/php-cs-fixer/.php-cs-fixer.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* .php-cs-fixer.php
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$current = __DIR__;
|
||||
|
||||
$paths = [
|
||||
$current . '/../../app',
|
||||
$current . '/../../config',
|
||||
$current . '/../../database',
|
||||
$current . '/../../routes',
|
||||
$current . '/../../tests',
|
||||
$current . '/../../resources/lang',
|
||||
];
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in($paths);
|
||||
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
return $config->setRules([
|
||||
'@PSR12' => true,
|
||||
'strict_param' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
])
|
||||
->setFinder($finder)
|
||||
;
|
5
.ci/php-cs-fixer/composer.json
Normal file
5
.ci/php-cs-fixer/composer.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"require": {
|
||||
"friendsofphp/php-cs-fixer": "^3.12"
|
||||
}
|
||||
}
|
2053
.ci/php-cs-fixer/composer.lock
generated
Normal file
2053
.ci/php-cs-fixer/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# render.sh
|
||||
# phpstan.sh
|
||||
# Copyright (c) 2021 james@firefly-iii.org
|
||||
#
|
||||
# This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -20,7 +20,18 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[ -d "~/Sites" ] && exit 1;
|
||||
# Install composer packages
|
||||
#composer install --no-scripts --no-ansi
|
||||
|
||||
# build translations.
|
||||
php /sites/FF3/dev/tools/cli.php ff3:json-translations v2
|
||||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
# enable test .env file.
|
||||
# cp .ci/.env.ci .env
|
||||
|
||||
# clean up php code
|
||||
cd $SCRIPT_DIR/php-cs-fixer
|
||||
composer update
|
||||
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
|
||||
cd $SCRIPT_DIR/..
|
||||
|
||||
exit 0
|
@@ -8,13 +8,63 @@ parameters:
|
||||
ignoreErrors:
|
||||
- '#is not allowed to extend#'
|
||||
- '#is neither abstract nor final#'
|
||||
- '#Control structures using switch should not be used\.#'
|
||||
- '#has a nullable return type declaration#'
|
||||
- '#with a nullable type declaration#'
|
||||
- '#with null as default value#'
|
||||
- '#is not covariant with PHPDoc type array#'
|
||||
-
|
||||
message: '#but containers should not be injected#'
|
||||
paths:
|
||||
- ../app/Support/Authentication/RemoteUserGuard.php
|
||||
-
|
||||
message: '#Control structures using switch should not be used.#'
|
||||
paths:
|
||||
- ../app/Api/V1/Controllers/Data/DestroyController.php
|
||||
- ../app/Console/Commands/Correction/FixAccountTypes.php
|
||||
- ../app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php
|
||||
- ../app/Exceptions/GracefulNotFoundHandler.php
|
||||
- ../app/Generator/Webhook/StandardMessageGenerator.php
|
||||
- ../app/Support/Amount.php
|
||||
- ../app/Support/Navigation.php
|
||||
- ../app/Support/ParseDateString.php
|
||||
- ../app/Support/Search/AccountSearch.php
|
||||
- ../app/Support/Search/OperatorQuerySearch.php
|
||||
- ../app/Support/Twig/General.php
|
||||
- ../app/Transformers/RecurrenceTransformer.php
|
||||
- ../app/Validation/AccountValidator.php
|
||||
- ../app/Validation/RecurrenceValidation.php
|
||||
- ../app/Validation/TransactionValidation.php
|
||||
|
||||
-
|
||||
message: '#Function compact\(\) should not be used#'
|
||||
paths:
|
||||
- ../app/Generator/Report/Account/MonthReportGenerator.php
|
||||
- ../app/Generator/Report/Audit/MonthReportGenerator.php
|
||||
- ../app/Generator/Report/Budget/MonthReportGenerator.php
|
||||
- ../app/Generator/Report/Category/MonthReportGenerator.php
|
||||
- ../app/Generator/Report/Standard/MonthReportGenerator.php
|
||||
- ../app/Generator/Report/Standard/MultiYearReportGenerator.php
|
||||
- ../app/Generator/Report/Standard/YearReportGenerator.php
|
||||
- ../app/Generator/Report/Tag/MonthReportGenerator.php
|
||||
- ../app/Http/Controllers/Account/*.php
|
||||
- ../app/Http/Controllers/Admin/*.php
|
||||
- ../app/Http/Controllers/*.php
|
||||
- ../app/Support/ExpandedForm.php
|
||||
- ../app/Support/Form/AccountForm.php
|
||||
- ../app/Support/Form/CurrencyForm.php
|
||||
- ../app/Support/Form/FormSupport.php
|
||||
-
|
||||
message: '#Either catch a more specific exception#'
|
||||
paths:
|
||||
- ../app/Support/Form/FormSupport.php
|
||||
|
||||
paths:
|
||||
- ../app
|
||||
- ../database
|
||||
- ../routes
|
||||
- ../config
|
||||
- ../bootstrap/app.php
|
||||
|
||||
# The level 8 is the highest level. original was 5
|
||||
level: 5
|
||||
level: 4
|
||||
|
||||
|
@@ -21,12 +21,15 @@
|
||||
#
|
||||
|
||||
# Install composer packages
|
||||
composer install --no-scripts --no-ansi
|
||||
#composer install --no-scripts --no-ansi
|
||||
|
||||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
# enable test .env file.
|
||||
cp .ci/.env.ci .env
|
||||
# cp .ci/.env.ci .env
|
||||
|
||||
# Do static code analysis.
|
||||
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress
|
||||
# ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress
|
||||
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --xdebug --error-format=table > phpstan-report.txt
|
||||
|
||||
exit 0
|
||||
echo 'The PHPstan report can be found in phpstan-report.txt'
|
||||
|
@@ -19,14 +19,43 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
# enable test .env file.
|
||||
cp .ci/.env.ci ../.env
|
||||
cp $SCRIPT_DIR/../.env $SCRIPT_DIR/../.env.backup
|
||||
cp $SCRIPT_DIR/.env.ci $SCRIPT_DIR/../.env
|
||||
|
||||
COVERAGE=false
|
||||
RESET=false
|
||||
FILE=storage/database/database.sqlite
|
||||
|
||||
while getopts "cr" o; do
|
||||
case "${o}" in
|
||||
c) COVERAGE=true;;
|
||||
r) RESET=true;;
|
||||
esac
|
||||
done
|
||||
|
||||
# reset if necessary.
|
||||
if [ $RESET = "true" ] ; then
|
||||
rm -f $FILE
|
||||
fi
|
||||
|
||||
# download test database
|
||||
wget --quiet https://raw.githubusercontent.com/firefly-iii/test-data/main/test_db.sqlite -o storage/database/test_db.sqlite
|
||||
if [ -f "$FILE" ]; then
|
||||
echo 'DB exists, will use it'
|
||||
else
|
||||
echo 'Download new DB'
|
||||
wget --quiet https://github.com/firefly-iii/test-fixtures/raw/main/test-database.sqlite -O $FILE
|
||||
fi
|
||||
|
||||
# run phpunit
|
||||
./vendor/bin/phpunit --configuration phpunit.coverage.xml
|
||||
if [ $COVERAGE = "true" ] ; then
|
||||
echo 'Run with coverage'
|
||||
XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration phpunit.xml --coverage-html $SCRIPT_DIR/coverage
|
||||
else
|
||||
echo 'Run without coverage'
|
||||
./vendor/bin/phpunit --configuration phpunit.xml
|
||||
fi
|
||||
|
||||
exit 0
|
||||
# restore .env file
|
||||
mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env
|
||||
|
@@ -189,7 +189,7 @@ AUTHENTICATION_GUARD=web
|
||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
||||
#
|
||||
CUSTOM_LOGOUT_URI=
|
||||
CUSTOM_LOGOUT_URL=
|
||||
|
||||
# LDAP connection configuration
|
||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
||||
@@ -261,12 +261,6 @@ DISABLE_CSP_HEADER=false
|
||||
TRACKER_SITE_ID=
|
||||
TRACKER_URL=
|
||||
|
||||
#
|
||||
# Firefly III can collect telemetry on how you use Firefly III. This is opt-in.
|
||||
# In order to allow this, change the following variable to true.
|
||||
# To read more about this feature, go to this page: https://docs.firefly-iii.org/support/telemetry
|
||||
SEND_TELEMETRY=false
|
||||
|
||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
||||
# However if you know what you're doing you can significantly speed up container start times.
|
||||
|
@@ -1,5 +1,7 @@
|
||||
bg_BG
|
||||
ca_ES
|
||||
cs_CZ
|
||||
da_DK
|
||||
de_DE
|
||||
el_GR
|
||||
en_GB
|
||||
@@ -8,7 +10,9 @@ es_ES
|
||||
fi_FI
|
||||
fr_FR
|
||||
hu_HU
|
||||
id_ID
|
||||
it_IT
|
||||
ja_JP
|
||||
nb_NO
|
||||
nl_NL
|
||||
pl_PL
|
||||
@@ -17,7 +21,10 @@ pt_PT
|
||||
ro_RO
|
||||
ru_RU
|
||||
sk_SK
|
||||
sl_SI
|
||||
sv_SE
|
||||
tr_TR
|
||||
uk_UA
|
||||
vi_VN
|
||||
zh-hans_CN
|
||||
zh-hant_CN
|
||||
|
184
.env.example
184
.env.example
@@ -7,11 +7,15 @@ APP_DEBUG=false
|
||||
|
||||
# This should be your email address.
|
||||
# If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE
|
||||
# The variable is used in some errors shown to users who aren't admin.
|
||||
SITE_OWNER=mail@example.com
|
||||
|
||||
# The encryption key for your sessions. Keep this very secure.
|
||||
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
|
||||
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
|
||||
#
|
||||
# Avoid the "#" character in your APP_KEY, it may break things.
|
||||
#
|
||||
APP_KEY=SomeRandomStringOf32CharsExactly
|
||||
|
||||
# Firefly III will launch using this language (for new users and unauthenticated visitors)
|
||||
@@ -37,15 +41,16 @@ TRUSTED_PROXIES=
|
||||
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
||||
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
||||
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
||||
# A cool option is 'papertrail' for cloud logging
|
||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||
|
||||
# - Docker + versions <= 4.8.1.8 and before: use "stdout"
|
||||
# - Docker + versions > 4.8.1.8 : use "docker_out"
|
||||
# - Docker + versions >= 5.1.1 : use "stack"
|
||||
# - For everything else (als not Docker) : use 'stack'
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
#
|
||||
# Used when logging to papertrail:
|
||||
#
|
||||
PAPERTRAIL_HOST=
|
||||
PAPERTRAIL_PORT=
|
||||
|
||||
# Log level. You can set this from least severe to most severe:
|
||||
# debug, info, notice, warning, error, critical, alert, emergency
|
||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||
@@ -53,8 +58,7 @@ LOG_CHANNEL=stack
|
||||
APP_LOG_LEVEL=notice
|
||||
|
||||
# Audit log level.
|
||||
# set to "emergency" if you dont want to store audit logs.
|
||||
# leave on info otherwise.
|
||||
# Set this to "emergency" if you dont want to store audit logs, leave on info otherwise.
|
||||
AUDIT_LOG_LEVEL=info
|
||||
|
||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||
@@ -64,11 +68,13 @@ AUDIT_LOG_LEVEL=info
|
||||
# Use "mysql" for MySQL and MariaDB.
|
||||
# Use "sqlite" for SQLite.
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=fireflyiiidb
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=firefly
|
||||
DB_USERNAME=firefly
|
||||
DB_PASSWORD=secret_firefly_password
|
||||
# leave empty or omit when not using a socket connection
|
||||
DB_SOCKET=
|
||||
|
||||
# MySQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
@@ -89,11 +95,14 @@ PGSQL_SSL_CERT=null
|
||||
PGSQL_SSL_KEY=null
|
||||
PGSQL_SSL_CRL_FILE=null
|
||||
|
||||
# If you're looking for performance improvements, you could install memcached.
|
||||
# more PostgreSQL settings
|
||||
PGSQL_SCHEMA=public
|
||||
|
||||
# If you're looking for performance improvements, you could install memcached or redis
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
|
||||
# If you set either of these to 'redis', you might want to update these settings too
|
||||
# If you set either of the options above to 'redis', you might want to update these settings too
|
||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
||||
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
|
||||
|
||||
@@ -107,7 +116,10 @@ REDIS_PATH=
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
|
||||
REDIS_PASSWORD=null
|
||||
# Use only with Redis 6+ with proper ACL set. Leave empty otherwise.
|
||||
REDIS_USERNAME=
|
||||
REDIS_PASSWORD=
|
||||
|
||||
# always use quotes and make sure redis db "0" and "1" exists. Otherwise change accordingly.
|
||||
REDIS_DB="0"
|
||||
REDIS_CACHE_DB="1"
|
||||
@@ -115,12 +127,13 @@ REDIS_CACHE_DB="1"
|
||||
# Cookie settings. Should not be necessary to change these.
|
||||
# If you use Docker or similar, you can set COOKIE_DOMAIN_FILE to set
|
||||
# the value from a file instead of from an environment variable
|
||||
# Setting samesite to "strict" may give you trouble logging in.
|
||||
COOKIE_PATH="/"
|
||||
COOKIE_DOMAIN=
|
||||
COOKIE_SECURE=false
|
||||
COOKIE_SAMESITE=lax
|
||||
|
||||
# If you want Firefly III to mail you, update these settings
|
||||
# If you want Firefly III to email you, update these settings
|
||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MAIL_MAILER=log
|
||||
@@ -136,7 +149,6 @@ MAIL_ENCRYPTION=null
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
|
||||
|
||||
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAILGUN_ENDPOINT=api.mailgun.net
|
||||
@@ -145,113 +157,62 @@ MAILGUN_ENDPOINT=api.mailgun.net
|
||||
MANDRILL_SECRET=
|
||||
SPARKPOST_SECRET=
|
||||
|
||||
# Firefly III can send you the following messages
|
||||
SEND_REGISTRATION_MAIL=true
|
||||
# Firefly III can send you the following messages.
|
||||
SEND_ERROR_MESSAGE=true
|
||||
SEND_LOGIN_NEW_IP_WARNING=true
|
||||
|
||||
# These messages contain (sensitive) transaction information:
|
||||
SEND_REPORT_JOURNALS=true
|
||||
|
||||
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAPBOX_API_KEY=
|
||||
# Set this value to true if you want to set the location
|
||||
# of certain things, like transactions. Since this involves an external service, it's optional
|
||||
# and disabled by default.
|
||||
ENABLE_EXTERNAL_MAP=false
|
||||
|
||||
# Set this value to true if you want Firefly III to download currency exchange rates
|
||||
# from the internet. These rates are hosted by the creator of Firefly III inside
|
||||
# an Azure Storage Container.
|
||||
# Not all currencies may be available. Rates may be wrong.
|
||||
ENABLE_EXTERNAL_RATES=false
|
||||
|
||||
# The map will default to this location:
|
||||
MAP_DEFAULT_LAT=51.983333
|
||||
MAP_DEFAULT_LONG=5.916667
|
||||
MAP_DEFAULT_ZOOM=6
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
LOGIN_PROVIDER=eloquent
|
||||
#
|
||||
# Firefly III authentication settings
|
||||
#
|
||||
|
||||
# It's also possible to change the way users are authenticated. You could use Authelia for example.
|
||||
# Authentication via the REMOTE_USER header is supported. Change the value below to "remote_user_guard".
|
||||
#
|
||||
# This will also allow Windows SSO.
|
||||
#
|
||||
# If you do this please read the documentation for instructions and warnings:
|
||||
# Firefly III supports a few authentication methods:
|
||||
# - 'web' (default, uses built in DB)
|
||||
# - 'remote_user_guard' for Authelia etc
|
||||
# Read more about these settings in the documentation.
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
#
|
||||
# This function is available in Firefly III v5.3.0 and higher.
|
||||
# LDAP is no longer supported :(
|
||||
#
|
||||
AUTHENTICATION_GUARD=web
|
||||
|
||||
# If the guard is changed, Firefly III uses the 'REMOTE_USER' header as per RFC 3875.
|
||||
# You can also use another header, like AUTH_USER when using Windows SSO.
|
||||
# Some systems use X-Auth headers. In that case, use HTTP_X_AUTH_USERNAME or HTTP_X_AUTH_EMAIL
|
||||
# Depending on your system, REMOTE_USER may need to be changed to HTTP_REMOTE_USER
|
||||
#
|
||||
# If this header is 'unexpectedly empty', check out the documentation.
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
# Remote user guard settings
|
||||
#
|
||||
AUTHENTICATION_GUARD_HEADER=REMOTE_USER
|
||||
|
||||
#
|
||||
# Firefly III uses email addresses as user identifiers. When you're using an external authentication guard
|
||||
# that doesn't do this, Firefly III is incapable of emailing you. Messages sent to "Bill Gates" always fail.
|
||||
#
|
||||
# However, if you set this value, Firefly III will store the value from this header as the user's backup
|
||||
# email address and use it to communicate. So user "Bill Gates" could still have
|
||||
# the email address "bill@microsoft.com".
|
||||
#
|
||||
# Example value: AUTHENTICATION_GUARD_EMAIL=HTTP_X_AUTH_EMAIL
|
||||
#
|
||||
AUTHENTICATION_GUARD_EMAIL=
|
||||
|
||||
|
||||
# It's impossible to log out users who's authentication is handled by an external system.
|
||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
||||
#
|
||||
CUSTOM_LOGOUT_URI=
|
||||
# Firefly III generates a basic keypair for your OAuth tokens.
|
||||
# If you want, you can overrule the key with your own (secure) value.
|
||||
# It's also possible to set PASSPORT_PUBLIC_KEY_FILE or PASSPORT_PRIVATE_KEY_FILE
|
||||
# if you're using Docker secrets or similar solutions for secret management
|
||||
#
|
||||
PASSPORT_PRIVATE_KEY=
|
||||
PASSPORT_PUBLIC_KEY=
|
||||
|
||||
# LDAP connection configuration
|
||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
||||
# # If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
ADLDAP_CONNECTION_SCHEME=OpenLDAP
|
||||
ADLDAP_AUTO_CONNECT=true
|
||||
|
||||
# LDAP connection settings
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
# ADLDAP_CONTROLLERS, ADLDAP_PORT, ADLDAP_BASEDN
|
||||
ADLDAP_CONTROLLERS=
|
||||
ADLDAP_PORT=389
|
||||
ADLDAP_TIMEOUT=5
|
||||
ADLDAP_BASEDN=""
|
||||
ADLDAP_FOLLOW_REFFERALS=false
|
||||
|
||||
# SSL/TLS settings
|
||||
ADLDAP_USE_SSL=false
|
||||
ADLDAP_USE_TLS=false
|
||||
ADLDAP_SSL_CACERTDIR=
|
||||
ADLDAP_SSL_CACERTFILE=
|
||||
ADLDAP_SSL_CERTFILE=
|
||||
ADLDAP_SSL_KEYFILE=
|
||||
ADLDAP_SSL_CIPHER_SUITE=
|
||||
ADLDAP_SSL_REQUIRE_CERT=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ADMIN_USERNAME=
|
||||
ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
ADLDAP_LOGIN_FALLBACK=false
|
||||
|
||||
ADLDAP_DISCOVER_FIELD=distinguishedname
|
||||
ADLDAP_AUTH_FIELD=distinguishedname
|
||||
|
||||
# field to sync as local username.
|
||||
# You can set the following variable from a file by appending it with _FILE:
|
||||
ADLDAP_SYNC_FIELD=userprincipalname
|
||||
#
|
||||
# Extra authentication settings
|
||||
#
|
||||
CUSTOM_LOGOUT_URL=
|
||||
|
||||
# You can disable the X-Frame-Options header if it interferes with tools like
|
||||
# Organizr. This is at your own risk. Applications running in frames run the risk
|
||||
@@ -272,21 +233,34 @@ DISABLE_CSP_HEADER=false
|
||||
TRACKER_SITE_ID=
|
||||
TRACKER_URL=
|
||||
|
||||
# Firefly III can collect telemetry on how you use Firefly III. This is opt-in.
|
||||
# In order to allow this, change the following variable to true.
|
||||
# To read more about this feature, go to this page: https://docs.firefly-iii.org/support/telemetry
|
||||
SEND_TELEMETRY=false
|
||||
|
||||
#
|
||||
# Firefly III supports webhooks. These are security sensitive and must be enabled manually first.
|
||||
#
|
||||
ALLOW_WEBHOOKS=false
|
||||
|
||||
#
|
||||
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
|
||||
# 1. Set this token to any 32-character value (this is important!).
|
||||
# 2. Use this token in the cron URL instead of a user's command line token.
|
||||
#
|
||||
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
|
||||
#
|
||||
# You can set this variable from a file by appending it with _FILE
|
||||
#
|
||||
STATIC_CRON_TOKEN=
|
||||
|
||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lots of inconsistent data.
|
||||
# However if you know what you're doing you can significantly speed up container start times.
|
||||
# Set each value to true to enable, or false to disable.
|
||||
|
||||
# Set this to true to build all locales supported by Firefly III.
|
||||
# This may take quite some time (several minutes) and is generally not recommended.
|
||||
# If you wish to change or alter the list of locales, start your Docker container with
|
||||
# `docker run -v locale.gen:/etc/locale.gen -e DKR_BUILD_LOCALE=true`
|
||||
# and make sure your preferred locales are in your own locale.gen.
|
||||
DKR_BUILD_LOCALE=false
|
||||
|
||||
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
|
||||
# Won't significantly speed up things.
|
||||
DKR_CHECK_SQLITE=true
|
||||
@@ -315,11 +289,11 @@ DKR_RUN_PASSPORT_INSTALL=true
|
||||
# Leave the following configuration vars as is.
|
||||
# Unless you like to tinker and know what you're doing.
|
||||
APP_NAME=FireflyIII
|
||||
ADLDAP_CONNECTION=default
|
||||
BROADCAST_DRIVER=log
|
||||
QUEUE_DRIVER=sync
|
||||
CACHE_PREFIX=firefly
|
||||
PUSHER_KEY=
|
||||
IPINFO_TOKEN=
|
||||
PUSHER_SECRET=
|
||||
PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
@@ -332,6 +306,8 @@ FIREFLY_III_LAYOUT=v1
|
||||
# It won't work. It doesn't do ANYTHING. Don't believe the lies you read online. I'm not joking.
|
||||
# This configuration value WILL NOT HELP.
|
||||
#
|
||||
# Notable exception to this rule is Synology, which, according to some users, will use APP_URL to rewrite stuff.
|
||||
#
|
||||
# This variable is ONLY used in some of the emails Firefly III sends around. Nowhere else.
|
||||
# So when configuring anything WEB related this variable doesn't do anything. Nothing
|
||||
#
|
||||
|
7
.github/.mergify.yml
vendored
7
.github/.mergify.yml
vendored
@@ -1,7 +0,0 @@
|
||||
pull_request_rules:
|
||||
- name: PR on main is never approved.
|
||||
conditions:
|
||||
- base=main
|
||||
actions:
|
||||
close:
|
||||
message: Please reopen this PR on the `develop` branch. Thank you.
|
33
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
33
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@@ -1,33 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help Firefly III improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Bug description**
|
||||
I am running Firefly III version x.x.x, and my problem is:
|
||||
|
||||
<!-- Replace the version and describe your problem or your issue may be closed. -->
|
||||
|
||||
**Steps to reproduce**
|
||||
<!-- What do you need to do to trigger this bug? -->
|
||||
|
||||
**Extra info**
|
||||
<!-- Please add extra info here, such as OS, browser, and the output from the /debug page of your Firefly III installation (click the version at the bottom).
|
||||
|
||||
DO NOT PUT ```BACKTICKS``` AROUND THE OUTPUT OF THE /debug PAGE
|
||||
|
||||
-->
|
||||
|
||||
|
||||
**Bonus points**
|
||||
<!-- Before you submit, verify the following please: -->
|
||||
|
||||
- I searched and nobody reported this bug before
|
||||
- I have added a stack trace from my log files <!-- (see https://bit.ly/FF3-get-debug-info) -->
|
||||
- I have added a screenshot.
|
||||
- I was able to replicate it on the demo site https://demo.firefly-iii.org/
|
||||
<!-- - I donated money (this is a joke ;)-->
|
27
.github/ISSUE_TEMPLATE/Custom.md
vendored
27
.github/ISSUE_TEMPLATE/Custom.md
vendored
@@ -1,27 +0,0 @@
|
||||
---
|
||||
name: I have a question or a problem
|
||||
about: Ask away!
|
||||
|
||||
---
|
||||
|
||||
I am running Firefly III version x.x.x.
|
||||
|
||||
**Description**
|
||||
<!-- (if relevant of course) -->
|
||||
|
||||
**Extra info**
|
||||
<!-- Please add extra info here, such as OS, browser, and the output from the `/debug`-page of your Firefly III installation (click the version at the bottom).
|
||||
|
||||
DO NOT PUT ```BACKTICKS``` AROUND THE OUTPUT OF THE /debug PAGE
|
||||
|
||||
-->
|
||||
|
||||
**Bonus points**
|
||||
|
||||
<!-- Complete the following checklist for bonus points -->
|
||||
|
||||
- I have read the FAQ at https://bit.ly/FF3-FAQ
|
||||
- I added a screenshot
|
||||
- I added log files <!-- (see https://bit.ly/FF3-get-debug-info) -->
|
||||
- I was able to replicate the issue on the demo site.
|
||||
<!-- - I donated money (this is a joke :wink:)-->
|
34
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
34
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea or feature for Firefly III
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Description**
|
||||
<!--
|
||||
Please describe your feature request:
|
||||
|
||||
- I would like Firefly III to do ABC.
|
||||
- What if you would add feature XYZ?
|
||||
- Firefly III doesn't do DEF.
|
||||
|
||||
-->
|
||||
|
||||
**Solution**
|
||||
<!-- Describe what your feature would add to Firefly III. -->
|
||||
|
||||
**What are alternatives?**
|
||||
<!-- Please describe what alternatives currently exist. -->
|
||||
|
||||
**Additional context**
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
|
||||
**Bonus points**
|
||||
<!-- Earn bonus points by:
|
||||
|
||||
- Make a drawing
|
||||
- Donate money (just kidding ;)
|
||||
-->
|
57
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
57
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Bug Report
|
||||
description: Report a bug in Firefly III (or associated tools)
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Support guidelines
|
||||
description: Please read the support guidelines before proceeding.
|
||||
options:
|
||||
- label: I've read the [support guidelines](https://github.com/firefly-iii/firefly-iii/blob/main/.github/support.md)
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: I've found a bug and checked that ...
|
||||
description: Make sure that your request fulfills all of the following requirements. If one requirement cannot be satisfied, explain in detail why.
|
||||
options:
|
||||
- label: ... [the documentation](https://docs.firefly-iii.org/) does not mention anything about my problem
|
||||
- label: ... there are no open or closed issues that are related to my problem
|
||||
- label: ... it's [definitely a Firefly III issue, not me](https://github.com/firefly-iii/firefly-iii/blob/main/.github/its_you_not_me.md)
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Please provide a brief description of the bug in 1-2 sentences.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Debug information
|
||||
description: Please provide the table from the /debug page. Do not add backticks or quotes.
|
||||
placeholder: The output from the /debug page
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behaviour
|
||||
description: Please describe precisely what you'd expect to happen. Be specific.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Please describe the steps to reproduce the bug.
|
||||
placeholder: |
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional info
|
||||
description: Please provide any additional information that seem useful.
|
42
.github/ISSUE_TEMPLATE/fr.yml
vendored
Normal file
42
.github/ISSUE_TEMPLATE/fr.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Feature Request
|
||||
description: Request a feature or enhancement in Firefly III (or associated tools)
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Support guidelines
|
||||
description: Please read the support guidelines before proceeding.
|
||||
options:
|
||||
- label: I've read the [support guidelines](https://github.com/firefly-iii/firefly-iii/blob/main/.github/support.md)
|
||||
required: true
|
||||
- label: My request is not listed as [a very good idea, but unfortunately...](https://docs.firefly-iii.org/firefly-iii/more-information/what-its-not/)
|
||||
required: true
|
||||
- label: I've used [the search](https://github.com/firefly-iii/firefly-iii/issues?q=is%3Aissue) and this has not been requested before.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: Please describe your feature request
|
||||
placeholder: |
|
||||
- I would like Firefly III to do (thing).
|
||||
- What if you would add feature (feature here)?
|
||||
- Firefly III doesn't do (thing).
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Solution
|
||||
description: Describe what your feature would add to Firefly III.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What are alternatives?
|
||||
description: Please describe what alternatives currently exist.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
BIN
.github/assets/img/imac-complete.png
vendored
Normal file
BIN
.github/assets/img/imac-complete.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 544 KiB |
BIN
.github/assets/img/ipad-complete.png
vendored
Normal file
BIN
.github/assets/img/ipad-complete.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 921 KiB |
BIN
.github/assets/img/iphone-complete.png
vendored
Normal file
BIN
.github/assets/img/iphone-complete.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 357 KiB |
BIN
.github/assets/img/logo-small.png
vendored
Normal file
BIN
.github/assets/img/logo-small.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -6,6 +6,7 @@ updates:
|
||||
directory: "/" # Location of package manifests
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
@@ -14,13 +15,14 @@ updates:
|
||||
directory: "/"
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
# yarn / JS updates for new frontend
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/frontend"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
16
.github/its_you_not_me.md
vendored
Normal file
16
.github/its_you_not_me.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# It's not you, it's me
|
||||
|
||||
Sometimes bugs reported to Firefly III are configuration and system problems on the user's side.
|
||||
|
||||
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration issue.
|
||||
|
||||
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's correct.
|
||||
- ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems
|
||||
- ⚠️ You can't login due to `419` errors (page expired)
|
||||
- ⚠️ Any `500` error when starting Firefly III
|
||||
- ⚠️ Any white page when starting Firefly III
|
||||
- ⚠️ Time-out when starting Firefly III for the first time
|
||||
- ⚠️ Firefly III does not work behind your reverse proxy
|
||||
- ⚠️ You can't connect to the Data Importer due to 404's or authentication issues.
|
||||
|
||||
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions) or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we can fix rather quickly :+1:
|
35
.github/lock.yml
vendored
35
.github/lock.yml
vendored
@@ -1,35 +0,0 @@
|
||||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
|
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 90
|
||||
|
||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||
skipCreatedBefore: false
|
||||
|
||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
||||
exemptLabels: []
|
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||
lockLabel: false
|
||||
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: false
|
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - help-wanted
|
||||
# lockLabel: outdated
|
||||
|
||||
# pulls:
|
||||
# daysUntilLock: 30
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
63
.github/mergify.yml
vendored
Normal file
63
.github/mergify.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
pull_request_rules:
|
||||
- name: Close all on main
|
||||
conditions:
|
||||
- base=main
|
||||
- -author~=^dependabot(|-preview)\[bot\]$
|
||||
actions:
|
||||
close:
|
||||
message: Please do not open PR's on the `main` branch, but on the `develop`
|
||||
branch only. Thank you!
|
||||
- name: No translations
|
||||
conditions:
|
||||
- -author~=^dependabot(|-preview)\[bot\]$
|
||||
- base=develop
|
||||
- or:
|
||||
- files~=^resources/lang/bg_BG
|
||||
- files~=^resources/lang/ca_ES
|
||||
- files~=^resources/lang/cs_CZ
|
||||
- files~=^resources/lang/da_DK
|
||||
- files~=^resources/lang/de_DE
|
||||
- files~=^resources/lang/el_GR
|
||||
- files~=^resources/lang/en_GB
|
||||
- files~=^resources/lang/es_ES
|
||||
- files~=^resources/lang/et_EE
|
||||
- files~=^resources/lang/fa_IR
|
||||
- files~=^resources/lang/fi_FI
|
||||
- files~=^resources/lang/fr_FR
|
||||
- files~=^resources/lang/he_IL
|
||||
- files~=^resources/lang/hu_HU
|
||||
- files~=^resources/lang/id_ID
|
||||
- files~=^resources/lang/is_IS
|
||||
- files~=^resources/lang/it_IT
|
||||
- files~=^resources/lang/ja_JP
|
||||
- files~=^resources/lang/ko_KR
|
||||
- files~=^resources/lang/lt_LT
|
||||
- files~=^resources/lang/nb_NO
|
||||
- files~=^resources/lang/nl_NL
|
||||
- files~=^resources/lang/pl_PL
|
||||
- files~=^resources/lang/pt_BR
|
||||
- files~=^resources/lang/pt_PT
|
||||
- files~=^resources/lang/ro_RO
|
||||
- files~=^resources/lang/ru_RU
|
||||
- files~=^resources/lang/si_LK
|
||||
- files~=^resources/lang/sk_SK
|
||||
- files~=^resources/lang/sl_SI
|
||||
- files~=^resources/lang/sr_CS
|
||||
- files~=^resources/lang/sv_SE
|
||||
- files~=^resources/lang/th_TH
|
||||
- files~=^resources/lang/tlh_AA
|
||||
- files~=^resources/lang/tr_TR
|
||||
- files~=^resources/lang/uk_UA
|
||||
- files~=^resources/lang/vi_VN
|
||||
- files~=^resources/lang/zh_CN
|
||||
- files~=^resources/lang/zh_TW
|
||||
actions:
|
||||
comment:
|
||||
message: >
|
||||
Please do not submit translated strings in your PR. If you need new
|
||||
sentences to be translated, add them to the `en_US` language strings.
|
||||
New or changed translations for other languages can be submitted at
|
||||
https://crowdin.com/project/firefly-iii
|
||||
|
||||
Thank you!
|
3
.github/pull_request_template.md
vendored
3
.github/pull_request_template.md
vendored
@@ -2,8 +2,7 @@
|
||||
Before you create a new PR, please consider:
|
||||
|
||||
1) Pull requests for the MAIN branch will be closed.
|
||||
2) We cannot accept pull requests to add new currencies.
|
||||
3) DO NOT include translations in your PR. Only English US sentences.
|
||||
2) DO NOT include translations in your PR. Only English US sentences.
|
||||
|
||||
Thanks.
|
||||
-->
|
||||
|
82
.github/security.md
vendored
82
.github/security.md
vendored
@@ -1,53 +1,101 @@
|
||||
# Security Policy
|
||||
|
||||
Firefly III is an application to manage your personal finances. As such, the developer has adopted this security disclosure and response policy to ensure that critical issues are responsibly handled.
|
||||
Firefly III is an application to manage your personal finances. As such, the developer has adopted this security
|
||||
disclosure and response policy to ensure that critical issues are responsibly handled.
|
||||
|
||||
## Supported Versions
|
||||
Only the latest Firefly III release is maintained. Applicable fixes, including security fixes, will not backported to older release branches. Please refer to [releases.md](https://github.com/firefly-iii/firefly-iii/blob/main/releases.md) for details.
|
||||
|
||||
Only the latest Firefly III release is maintained. Applicable fixes, including security fixes, will not backported to
|
||||
older release branches. Please refer to [releases.md](https://github.com/firefly-iii/firefly-iii/blob/main/releases.md)
|
||||
for details.
|
||||
|
||||
## Reporting a Vulnerability - Private Disclosure Process
|
||||
Security is of the highest importance and all security vulnerabilities or suspected security vulnerabilities should be reported to Firefly III privately, to minimize attacks against current users of Firefly III before they are fixed. Vulnerabilities will be investigated and patched on the next patch (or minor) release as soon as possible. This information could be kept entirely internal to the project.
|
||||
|
||||
If you know of a publicly disclosed security vulnerability for Firefly III, please **IMMEDIATELY** contact james@firefly-iii.org to inform the Firefly III developer. You can use my [GPG key](https://keybase.io/jc5) for extra security.
|
||||
Security is of the highest importance and all security vulnerabilities or suspected security vulnerabilities should be
|
||||
reported to Firefly III privately, to minimize attacks against current users of Firefly III before they are fixed.
|
||||
Vulnerabilities will be investigated and patched on the next patch (or minor) release as soon as possible. This
|
||||
information could be kept entirely internal to the project.
|
||||
|
||||
If you know of a publicly disclosed security vulnerability for Firefly III, please **IMMEDIATELY** contact
|
||||
james@firefly-iii.org to inform the Firefly III developer. You can use my [GPG key](https://keybase.io/jc5) for extra
|
||||
security.
|
||||
|
||||
**IMPORTANT: Do not file public issues on GitHub for security vulnerabilities**
|
||||
|
||||
To report a vulnerability or a security-related issue, please email the private address james@firefly-iii.org with the details of the vulnerability. The email will be received by the developer of Firefly III. Emails will be addressed within 3 business days, including a detailed plan to investigate the issue and any potential workarounds to perform in the meantime. Do not report non-security-impacting bugs through this channel. Use [GitHub issues](https://github.com/firefly-iii/firefly-iii/issues/new/choose) instead.
|
||||
To report a vulnerability or a security-related issue, please email the private address james@firefly-iii.org with the
|
||||
details of the vulnerability. The email will be received by the developer of Firefly III. Emails will be addressed
|
||||
within 3 business days, including a detailed plan to investigate the issue and any potential workarounds to perform in
|
||||
the meantime. Do not report non-security-impacting bugs through this channel.
|
||||
Use [GitHub issues](https://github.com/firefly-iii/firefly-iii/issues/new/choose) instead.
|
||||
|
||||
### Proposed Email Content
|
||||
|
||||
Provide a descriptive subject line and in the body of the email include the following information:
|
||||
|
||||
* Basic identity information, such as your name and your affiliation or company.
|
||||
* Detailed steps to reproduce the vulnerability (POC scripts, screenshots, and compressed packet captures are all helpful to us).
|
||||
* Description of the effects of the vulnerability on Firefly III and the related hardware and software configurations, so that the developer can reproduce it.
|
||||
* Detailed steps to reproduce the vulnerability (POC scripts, screenshots, and compressed packet captures are all
|
||||
helpful to us).
|
||||
* Description of the effects of the vulnerability on Firefly III and the related hardware and software configurations,
|
||||
so that the developer can reproduce it.
|
||||
* How the vulnerability affects Firefly III usage and an estimation of the attack surface, if there is one.
|
||||
* List other projects or dependencies that were used in conjunction with Firefly III to produce the vulnerability.
|
||||
|
||||
## When to report a vulnerability
|
||||
|
||||
* When you think Firefly III has a potential security vulnerability.
|
||||
* When you suspect a potential vulnerability but you are unsure that it impacts Firefly III.
|
||||
* When you know of or suspect a potential vulnerability on another project that is used by Firefly III. For example Firefly III has a dependency on Docker, MySQL, etc.
|
||||
* When you know of or suspect a potential vulnerability on another project that is used by Firefly III. For example
|
||||
Firefly III has a dependency on Docker, MySQL, etc.
|
||||
|
||||
## Patch, Release, and Disclosure
|
||||
|
||||
The Firefly III developer will respond to vulnerability reports as follows:
|
||||
|
||||
1. The developer will investigate the vulnerability and determine its effects and criticality.
|
||||
2. If the issue is not deemed to be a vulnerability, the developer will follow up with a detailed reason for rejection.
|
||||
3. The developer will initiate a conversation with the reporter within 3 business days.
|
||||
4. If a vulnerability is acknowledged and the timeline for a fix is determined, the developer will work on a plan to communicate with the appropriate community, including identifying mitigating steps that affected users can take to protect themselves until the fix is rolled out.
|
||||
5. The developer will also create a [CVSS](https://www.first.org/cvss/specification-document) using the [CVSS Calculator](https://www.first.org/cvss/calculator/3.0). The developer makes the final call on the calculated CVSS; it is better to move quickly than making the CVSS perfect. Issues may also be reported to [Mitre](https://cve.mitre.org/) using this [scoring calculator](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator). The CVE will initially be set to private.
|
||||
6. The developer will work on fixing the vulnerability and perform internal testing before preparing to roll out the fix.
|
||||
7. A public disclosure date is negotiated by the Firefly III developer and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation or patch is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for distributor coordination. The timeframe for disclosure is from immediate (especially if it’s already publicly known) to a few weeks. For a critical vulnerability with a straightforward mitigation, we expect report date to public disclosure date to be on the order of 14 business days. The Firefly III developer holds the final say when setting a public disclosure date.
|
||||
9. Once the fix is confirmed, the developer will patch the vulnerability in the next patch or minor release. Upon release of the patched version of Firefly III, we will follow the **Public Disclosure Process**.
|
||||
4. If a vulnerability is acknowledged and the timeline for a fix is determined, the developer will work on a plan to
|
||||
communicate with the appropriate community, including identifying mitigating steps that affected users can take to
|
||||
protect themselves until the fix is rolled out.
|
||||
5. The developer will also create a [CVSS](https://www.first.org/cvss/specification-document) using
|
||||
the [CVSS Calculator](https://www.first.org/cvss/calculator/3.0). The developer makes the final call on the
|
||||
calculated CVSS; it is better to move quickly than making the CVSS perfect. Issues may also be reported
|
||||
to [Mitre](https://cve.mitre.org/) using
|
||||
this [scoring calculator](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator). The CVE will initially be set to
|
||||
private.
|
||||
6. The developer will work on fixing the vulnerability and perform internal testing before preparing to roll out the
|
||||
fix.
|
||||
7. A public disclosure date is negotiated by the Firefly III developer and the bug submitter. We prefer to fully
|
||||
disclose the bug as soon as possible once a user mitigation or patch is available. It is reasonable to delay
|
||||
disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for distributor
|
||||
coordination. The timeframe for disclosure is from immediate (especially if it’s already publicly known) to a few
|
||||
weeks. For a critical vulnerability with a straightforward mitigation, we expect report date to public disclosure
|
||||
date to be on the order of 14 business days. The Firefly III developer holds the final say when setting a public
|
||||
disclosure date.
|
||||
8. Once the fix is confirmed, the developer will patch the vulnerability in the next patch or minor release. Upon
|
||||
release of the patched version of Firefly III, we will follow the **Public Disclosure Process**.
|
||||
|
||||
### Public Disclosure Process
|
||||
The developer publishes a public [advisory](https://github.com/firefly-iii/firefly-iii/security/advisories) to the Firefly III community via GitHub. In most cases, additional communication via Twitter, reddit and other channels will assist in educating Firefly III users and rolling out the patched release to affected users.
|
||||
|
||||
The develop will also publish any mitigating steps users can take until the fix can be applied to their Firefly III instances.
|
||||
The developer publishes a public [advisory](https://github.com/firefly-iii/firefly-iii/security/advisories) to the
|
||||
Firefly III community via GitHub. In most cases, additional communication via Mastodon, Gitter and other channels will
|
||||
assist in educating Firefly III users and rolling out the patched release to affected users.
|
||||
|
||||
The developer will also publish any mitigating steps users can take until the fix can be applied to their Firefly III
|
||||
instances.
|
||||
|
||||
## Confidentiality, integrity and availability
|
||||
We consider vulnerabilities leading to the compromise of data confidentiality, elevation of privilege, or integrity to be our highest priority concerns. Availability, in particular in areas relating to DoS and resource exhaustion, is also a serious security concern. The Firefly III developer takes all vulnerabilities, potential vulnerabilities, and suspected vulnerabilities seriously and will investigate them in an urgent and expeditious manner.
|
||||
|
||||
Note that we do not currently consider the default settings for Firefly III to be secure-by-default. It is necessary for operators to explicitly configure settings, role based access control, and other resource related features in Firefly III to provide a hardened Firefly III environment. We will not act on any security disclosure that relates to a lack of safe defaults. Over time, we will work towards improved safe-by-default configuration, taking into account backwards compatibility.
|
||||
We consider vulnerabilities leading to the compromise of data confidentiality, elevation of privilege, or integrity to
|
||||
be our highest priority concerns. Availability, in particular in areas relating to DoS and resource exhaustion, is also
|
||||
a serious security concern. The Firefly III developer takes all vulnerabilities, potential vulnerabilities, and
|
||||
suspected vulnerabilities seriously and will investigate them in an urgent and expeditious manner.
|
||||
|
||||
Note that we do not currently consider the default settings for Firefly III to be secure-by-default. It is necessary for
|
||||
operators to explicitly configure settings, role based access control, and other resource related features in Firefly
|
||||
III to provide a hardened Firefly III environment. We will not act on any security disclosure that relates to a lack of
|
||||
safe defaults. Over time, we will work towards improved safe-by-default configuration, taking into account backwards
|
||||
compatibility.
|
||||
|
||||
## Credits
|
||||
|
||||
|
5
.github/stale.yml
vendored
5
.github/stale.yml
vendored
@@ -1,11 +1,11 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 7
|
||||
daysUntilStale: 14
|
||||
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 7
|
||||
daysUntilClose: 14
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
# - "[Status] Maybe Later"
|
||||
@@ -14,6 +14,7 @@ exemptLabels:
|
||||
- feature
|
||||
- bug
|
||||
- announcement
|
||||
- "layout-v3"
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: false
|
||||
|
32
.github/support.md
vendored
32
.github/support.md
vendored
@@ -1,12 +1,32 @@
|
||||
# Welcome to Firefly III on Github!
|
||||
# Support [](http://isitmaintained.com/project/firefly-iii/firefly-iii "Average time to resolve an issue")
|
||||
|
||||
:+1::tada: Thank you for taking the time to contribute something to Firefly III!
|
||||
|
||||
## Bugs
|
||||
## Reporting an issue
|
||||
|
||||
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://demo.firefly-iii.org/) is also suffering from this bug. Include as many log files and details as you think are necessary. Bugs have a lot of priority!
|
||||
First of all: thank you for reporting a bug instead of ditching the tool altogether. Bugs have a lot of priority!
|
||||
|
||||
## Installation problems
|
||||
1. Open bugs will have open issues, so search for one first.
|
||||
2. If your feature request is already there, vote on it with :+1: or :-1: reactions.
|
||||
3. Do NOT hijack old issues with the bug you found, open your own issue.
|
||||
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your issue.
|
||||
5. If relevant, read the [documentation](https://docs.firefly-iii.org/).
|
||||
|
||||
Please take the time to read the [documentation](https://docs.firefly-iii.org/) 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.
|
||||
Please follow these guidelines when opening new issues:
|
||||
|
||||
## Writing good issues
|
||||
|
||||
- File a single issue for a single problem or feature requests. Feel free to open multiple issues.
|
||||
- Collect as many details as you can.
|
||||
- Be clear and specific, and state what you're not sure about.
|
||||
|
||||
Only then [create a new issue](https://github.com/firefly-iii/firefly-iii/issues/new/choose)!
|
||||
|
||||
## Issue closure and abandonment policy
|
||||
|
||||
- Issues can be converted into discussions if it's not a bug or feature request.
|
||||
- Features that won't be implemented will be labelled "wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
|
||||
- Issues can be closed if they're duplicates of other issues.
|
||||
- Issues can be closed if the answer is in the FAQ.
|
||||
- Issues will be closed automatically after 14 days.
|
||||
- Issues will be locked automatically after 90 days.
|
||||
|
16
.github/workflows/build.yml
vendored
Normal file
16
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Sonarcloud CI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: SonarCloud
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
99
.github/workflows/cleanup.yml
vendored
Normal file
99
.github/workflows/cleanup.yml
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
# This workflow prunes old workflow runs for an entire repository.
|
||||
|
||||
name: Prune old builds
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
prune:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Prune cancelled/skipped runs
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
|
||||
script: |
|
||||
const cancelled = await github.rest.actions.listWorkflowRunsForRepo({
|
||||
owner: context.repo.owner,
|
||||
per_page: 100,
|
||||
repo: context.repo.repo,
|
||||
status: 'cancelled',
|
||||
});
|
||||
|
||||
const skipped = await github.rest.actions.listWorkflowRunsForRepo({
|
||||
owner: context.repo.owner,
|
||||
per_page: 100,
|
||||
repo: context.repo.repo,
|
||||
status: 'skipped',
|
||||
});
|
||||
|
||||
for (const response of [cancelled, skipped]) {
|
||||
for (const run of response.data.workflow_runs) {
|
||||
console.log(`Run id ${run.id} of '${run.name}' is a cancelled/skipped run. Deleting...`);
|
||||
await github.rest.actions.deleteWorkflowRun({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: run.id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- name: Prune runs older than 3 days
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
|
||||
script: |
|
||||
const days_to_expiration = 3;
|
||||
const ms_in_day = 86400000;
|
||||
const now = Date.now();
|
||||
const pages = 5;
|
||||
|
||||
// we don't want to prune old runs from test.yml
|
||||
// because we track the duration of runs over time
|
||||
|
||||
const workflows = [
|
||||
'build.yml',
|
||||
'cleanup.yml',
|
||||
'depsreview.yaml',
|
||||
'laravel.yml',
|
||||
'lock.yml',
|
||||
'stale.yml'
|
||||
]
|
||||
|
||||
let runs_to_delete = [];
|
||||
|
||||
for (const workflow of workflows) {
|
||||
for (let page = 0; page < pages; page += 1) {
|
||||
let response = await github.rest.actions.listWorkflowRuns({
|
||||
owner: context.repo.owner,
|
||||
page: page,
|
||||
per_page: 100,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: workflow
|
||||
});
|
||||
|
||||
if (response.data.workflow_runs.length > 0) {
|
||||
for (const run of response.data.workflow_runs) {
|
||||
if (now - Date.parse(run.created_at) > ms_in_day * days_to_expiration) {
|
||||
runs_to_delete.push([run.id, run.name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const run of runs_to_delete) {
|
||||
console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`);
|
||||
try {
|
||||
await github.rest.actions.deleteWorkflowRun({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: run[0]
|
||||
});
|
||||
} catch (error) {
|
||||
// ignore errors
|
||||
}
|
||||
}
|
22
.github/workflows/closed-issues.yml
vendored
Normal file
22
.github/workflows/closed-issues.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: "Reply to closed issue"
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- closed
|
||||
jobs:
|
||||
auto_comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
uses: aws-actions/closed-issue-message@v1
|
||||
with:
|
||||
message: |
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue is now closed. Please be aware that closed issues are not actively monitored. If you reply, you may get no response.
|
||||
|
||||
- If the original bug is not actually fixed, please feel free to open a new issue. Please refer to this issue for clarity.
|
||||
- Follow-up questions can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
||||
|
||||
Thank you for your consideration.
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
14
.github/workflows/depsreview.yaml
vendored
Normal file
14
.github/workflows/depsreview.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@v3
|
8
.github/workflows/laravel.yml
vendored
8
.github/workflows/laravel.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: test -f .env || cp .ci/.env.ci .env
|
||||
- name: Prepare dependencies
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
- prepare
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: test -f .env || cp .ci/.env.ci .env
|
||||
- name: Download database
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
- prepare
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: test -f .env || cp .ci/.env.ci .env
|
||||
- name: Download database
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
- prepare
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: test -f .env || cp .ci/.env.ci .env
|
||||
- name: Download database
|
||||
|
30
.github/workflows/lock.yml
vendored
Normal file
30
.github/workflows/lock.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Lock old issues
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
permissions:
|
||||
issues: write # for dessant/lock-threads to lock issues
|
||||
pull-requests: write # for dessant/lock-threads to lock PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v4
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-inactive-days: '90'
|
||||
issue-comment: >
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue is now `locked` :lock:.
|
||||
|
||||
- If you feel there is more to be said about this specific issue, please feel free to open a new issue. Please refer to this issue for clarity.
|
||||
- Follow-up questions and comments can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
||||
|
||||
Thank you for your consideration.
|
37
.github/workflows/qodana.yml
vendored
Normal file
37
.github/workflows/qodana.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Qodana
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened ]
|
||||
jobs:
|
||||
qodana:
|
||||
runs-on: ubuntu-latest
|
||||
name: 'Qodana Scan'
|
||||
steps:
|
||||
- name: Setup PHP with no coverage driver
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
coverage: none
|
||||
extensions: bcmath, intl
|
||||
env:
|
||||
update: true
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer install --no-scripts
|
||||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
php artisan clear-compiled
|
||||
php artisan ide-helper:generate;
|
||||
|
||||
- name: 'Qodana Scan'
|
||||
uses: JetBrains/qodana-action@main
|
||||
env:
|
||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
27
.github/workflows/stale.yml
vendored
27
.github/workflows/stale.yml
vendored
@@ -2,22 +2,33 @@ name: "Close stale issues"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write # for actions/stale to close stale issues
|
||||
pull-requests: write # for actions/stale to close stale PRs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@v6
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
|
||||
|
||||
Thank you for your contributions.
|
||||
stale-pr-message: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
|
||||
|
||||
Thank you for your contributions.
|
||||
days-before-stale: 14
|
||||
days-before-close: 7
|
||||
exempt-issue-labels: 'enhancement,feature,bug,announcement'
|
||||
exempt-issue-labels: 'enhancement,feature,bug,announcement,layout-v3'
|
||||
|
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,18 +1,10 @@
|
||||
/node_modules
|
||||
/frontend/node_modules
|
||||
/frontend/fonts
|
||||
/frontend/images
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
/.vagrant
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
public/google*.html
|
||||
report.html
|
||||
composer.phar
|
||||
app.js.map
|
||||
/.ci/php-cs-fixer/vendor
|
||||
/.ci/coverage
|
||||
|
@@ -1,58 +0,0 @@
|
||||
---
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
project_setup:
|
||||
override: true
|
||||
tests:
|
||||
override:
|
||||
- php-scrutinizer-run
|
||||
checks:
|
||||
javascript: true
|
||||
php:
|
||||
align_assignments: true
|
||||
avoid_fixme_comments: true
|
||||
avoid_multiple_statements_on_same_line: true
|
||||
avoid_perl_style_comments: true
|
||||
avoid_todo_comments: true
|
||||
duplication: false
|
||||
encourage_single_quotes: true
|
||||
newline_at_end_of_file: true
|
||||
no_goto: true
|
||||
no_long_variable_names:
|
||||
maximum: "20"
|
||||
no_short_method_names:
|
||||
minimum: "3"
|
||||
no_short_variable_names:
|
||||
minimum: "3"
|
||||
optional_parameters_at_the_end: true
|
||||
parameter_doc_comments: true
|
||||
remove_extra_empty_lines: true
|
||||
return_doc_comment_if_not_inferrable: true
|
||||
return_doc_comments: true
|
||||
uppercase_constants: true
|
||||
use_self_instead_of_fqcn: true
|
||||
coding_style:
|
||||
php:
|
||||
spaces:
|
||||
around_operators:
|
||||
concatenation: true
|
||||
other:
|
||||
after_type_cast: false
|
||||
filter:
|
||||
excluded_paths:
|
||||
- database/migrations/*
|
||||
- bootstrap/*
|
||||
- config/*
|
||||
- docker/*
|
||||
- public/js/lib/*
|
||||
- public/lib/adminlte/js/*
|
||||
- public/lib/bootstrap/js/*
|
||||
- resources/*
|
||||
- routes/*
|
||||
- storage/*
|
||||
paths:
|
||||
- app/*
|
||||
- public/js/ff/*
|
||||
tools:
|
||||
external_code_coverage: false
|
20
.travis.yml
20
.travis.yml
@@ -1,20 +0,0 @@
|
||||
language: php
|
||||
php:
|
||||
- '7.4'
|
||||
dist: xenial
|
||||
os: linux
|
||||
cache:
|
||||
directories:
|
||||
- "/home/travis/.config"
|
||||
- "/home/travis/build/firefly-iii/firefly-iii/vendor"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
|
||||
before_script:
|
||||
- phpenv config-rm xdebug.ini || return 0
|
||||
|
||||
script:
|
||||
- "./.ci/phpstan.sh"
|
||||
- "./.ci/phpunit.sh"
|
@@ -23,15 +23,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use JsonException;
|
||||
|
||||
/**
|
||||
* Class AccountController
|
||||
@@ -43,7 +44,6 @@ class AccountController extends Controller
|
||||
private array $balanceTypes;
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*/
|
||||
@@ -64,9 +64,15 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getAccountsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws JsonException
|
||||
* @throws FireflyException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function accounts(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
@@ -104,12 +110,11 @@ class AccountController extends Controller
|
||||
|
||||
// custom order.
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
|
||||
|
||||
usort(
|
||||
$return, function ($a, $b) use ($order) {
|
||||
$pos_a = array_search($a['type'], $order);
|
||||
$pos_b = array_search($b['type'], $order);
|
||||
$return,
|
||||
function ($a, $b) use ($order) {
|
||||
$pos_a = array_search($a['type'], $order, true);
|
||||
$pos_b = array_search($b['type'], $order, true);
|
||||
|
||||
return $pos_a - $pos_b;
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\Bill;
|
||||
@@ -38,7 +37,6 @@ class BillController extends Controller
|
||||
{
|
||||
private BillRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* BillController constructor.
|
||||
*/
|
||||
@@ -58,6 +56,10 @@ class BillController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBillsAC
|
||||
* TODO expand API to add active field.
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -71,12 +73,11 @@ class BillController extends Controller
|
||||
return [
|
||||
'id' => (string)$item->id,
|
||||
'name' => $item->name,
|
||||
'active' => $item->active,
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
return response()->json($filtered->toArray());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\Budget;
|
||||
@@ -38,7 +37,6 @@ class BudgetController extends Controller
|
||||
{
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* BudgetController constructor.
|
||||
*/
|
||||
@@ -58,6 +56,9 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBudgetsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -37,7 +37,6 @@ class CategoryController extends Controller
|
||||
{
|
||||
private CategoryRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* CategoryController constructor.
|
||||
*/
|
||||
@@ -57,6 +56,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCategoriesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
@@ -38,7 +37,6 @@ class CurrencyController extends Controller
|
||||
{
|
||||
private CurrencyRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* CurrencyController constructor.
|
||||
*/
|
||||
@@ -58,31 +56,9 @@ class CurrencyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AutocompleteRequest $request
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCurrenciesAC
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function currenciesWithCode(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$collection = $this->repository->searchCurrency($data['query'], $data['limit']);
|
||||
$result = [];
|
||||
|
||||
/** @var TransactionCurrency $currency */
|
||||
foreach ($collection as $currency) {
|
||||
$result[] = [
|
||||
'id' => (string) $currency->id,
|
||||
'name' => sprintf('%s (%s)', $currency->name, $currency->code),
|
||||
'code' => $currency->code,
|
||||
'symbol' => $currency->symbol,
|
||||
'decimal_places' => $currency->decimal_places,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -106,4 +82,33 @@ class CurrencyController extends Controller
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCurrenciesCodeAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @deprecated
|
||||
*/
|
||||
public function currenciesWithCode(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$collection = $this->repository->searchCurrency($data['query'], $data['limit']);
|
||||
$result = [];
|
||||
|
||||
/** @var TransactionCurrency $currency */
|
||||
foreach ($collection as $currency) {
|
||||
$result[] = [
|
||||
'id' => (string)$currency->id,
|
||||
'name' => sprintf('%s (%s)', $currency->name, $currency->code),
|
||||
'code' => $currency->code,
|
||||
'symbol' => $currency->symbol,
|
||||
'decimal_places' => $currency->decimal_places,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
@@ -38,7 +37,6 @@ class ObjectGroupController extends Controller
|
||||
{
|
||||
private ObjectGroupRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* CurrencyController constructor.
|
||||
*/
|
||||
@@ -58,6 +56,9 @@ class ObjectGroupController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getObjectGroupsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -68,7 +69,7 @@ class ObjectGroupController extends Controller
|
||||
$return = [];
|
||||
$result = $this->repository->search($data['query'], $data['limit']);
|
||||
|
||||
/** @var ObjectGroup $account */
|
||||
/** @var ObjectGroup $objectGroup */
|
||||
foreach ($result as $objectGroup) {
|
||||
$return[] = [
|
||||
'id' => (string)$objectGroup->id,
|
||||
@@ -79,5 +80,4 @@ class ObjectGroupController extends Controller
|
||||
|
||||
return response()->json($return);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
@@ -37,10 +36,8 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class PiggyBankController extends Controller
|
||||
{
|
||||
private PiggyBankRepositoryInterface $piggyRepository;
|
||||
|
||||
private AccountRepositoryInterface $accountRepository;
|
||||
|
||||
private PiggyBankRepositoryInterface $piggyRepository;
|
||||
|
||||
/**
|
||||
* PiggyBankController constructor.
|
||||
@@ -63,6 +60,9 @@ class PiggyBankController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getPiggiesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -77,13 +77,17 @@ class PiggyBankController extends Controller
|
||||
/** @var PiggyBank $piggy */
|
||||
foreach ($piggies as $piggy) {
|
||||
$currency = $this->accountRepository->getAccountCurrency($piggy->account) ?? $defaultCurrency;
|
||||
$objectGroup = $piggy->objectGroups()->first();
|
||||
$response[] = [
|
||||
'id' => (string)$piggy->id,
|
||||
'name' => $piggy->name,
|
||||
'currency_id' => $currency->id,
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'object_group_id' => null === $objectGroup ? null : (string)$objectGroup->id,
|
||||
'object_group_title' => $objectGroup?->title,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -91,6 +95,9 @@ class PiggyBankController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getPiggiesBalanceAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -105,21 +112,26 @@ class PiggyBankController extends Controller
|
||||
foreach ($piggies as $piggy) {
|
||||
$currency = $this->accountRepository->getAccountCurrency($piggy->account) ?? $defaultCurrency;
|
||||
$currentAmount = $this->piggyRepository->getRepetition($piggy)->currentamount ?? '0';
|
||||
$objectGroup = $piggy->objectGroups()->first();
|
||||
$response[] = [
|
||||
'id' => (string)$piggy->id,
|
||||
'name' => $piggy->name,
|
||||
'name_with_balance' => sprintf(
|
||||
'%s (%s / %s)', $piggy->name, app('amount')->formatAnything($currency, $currentAmount, false),
|
||||
'%s (%s / %s)',
|
||||
$piggy->name,
|
||||
app('amount')->formatAnything($currency, $currentAmount, false),
|
||||
app('amount')->formatAnything($currency, $piggy->targetamount, false),
|
||||
),
|
||||
'currency_id' => $currency->id,
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_name' => $currency->name,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'object_group_id' => null === $objectGroup ? null : (string)$objectGroup->id,
|
||||
'object_group_title' => $objectGroup?->title,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,10 +23,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
@@ -37,7 +36,6 @@ class RecurrenceController extends Controller
|
||||
{
|
||||
private RecurringRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* RecurrenceController constructor.
|
||||
*/
|
||||
@@ -47,6 +45,7 @@ class RecurrenceController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(RecurringRepositoryInterface::class);
|
||||
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
@@ -55,6 +54,9 @@ class RecurrenceController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRecurringAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -62,19 +64,18 @@ class RecurrenceController extends Controller
|
||||
public function recurring(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$rules = $this->repository->searchRecurrence($data['query'], $data['limit']);
|
||||
$recurrences = $this->repository->searchRecurrence($data['query'], $data['limit']);
|
||||
$response = [];
|
||||
|
||||
/** @var Rule $rule */
|
||||
foreach ($rules as $rule) {
|
||||
/** @var Recurrence $recurrence */
|
||||
foreach ($recurrences as $recurrence) {
|
||||
$response[] = [
|
||||
'id' => (string)$rule->id,
|
||||
'name' => $rule->title,
|
||||
'description' => $rule->description,
|
||||
'id' => (string)$recurrence->id,
|
||||
'name' => $recurrence->title,
|
||||
'description' => $recurrence->description,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\Rule;
|
||||
@@ -37,7 +36,6 @@ class RuleController extends Controller
|
||||
{
|
||||
private RuleRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* RuleController constructor.
|
||||
*/
|
||||
@@ -55,6 +53,9 @@ class RuleController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRulesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -76,5 +77,4 @@ class RuleController extends Controller
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
@@ -37,7 +36,6 @@ class RuleGroupController extends Controller
|
||||
{
|
||||
private RuleGroupRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* RuleGroupController constructor.
|
||||
*/
|
||||
@@ -55,6 +53,9 @@ class RuleGroupController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRuleGroupsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\Tag;
|
||||
@@ -38,7 +37,6 @@ class TagController extends Controller
|
||||
{
|
||||
private TagRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* TagController constructor.
|
||||
*/
|
||||
@@ -58,6 +56,9 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTagAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@@ -38,10 +37,8 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
private JournalRepositoryInterface $repository;
|
||||
|
||||
private TransactionGroupRepositoryInterface $groupRepository;
|
||||
|
||||
private JournalRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* TransactionController constructor.
|
||||
@@ -63,8 +60,10 @@ class TransactionController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -92,6 +91,9 @@ class TransactionController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionsIDAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -99,7 +101,7 @@ class TransactionController extends Controller
|
||||
public function transactionsWithID(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$result = new Collection;
|
||||
$result = new Collection();
|
||||
if (is_numeric($data['query'])) {
|
||||
// search for group, not journal.
|
||||
$firstResult = $this->groupRepository->find((int)$data['query']);
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Autocomplete;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Autocomplete\AutocompleteRequest;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -37,7 +36,6 @@ class TransactionTypeController extends Controller
|
||||
{
|
||||
private TransactionTypeRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* TransactionTypeController constructor.
|
||||
*/
|
||||
@@ -54,10 +52,12 @@ class TransactionTypeController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionTypesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function transactionTypes(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
|
@@ -27,6 +27,7 @@ namespace FireflyIII\Api\V1\Controllers\Chart;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Data\DateRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
@@ -34,6 +35,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\ApiSupport;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use JsonException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class AccountController
|
||||
@@ -45,11 +49,10 @@ class AccountController extends Controller
|
||||
private CurrencyRepositoryInterface $currencyRepository;
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -70,9 +73,16 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/charts/getChartAccountOverview
|
||||
*
|
||||
* @param DateRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function overview(DateRequest $request): JsonResponse
|
||||
{
|
||||
@@ -87,12 +97,12 @@ class AccountController extends Controller
|
||||
$defaultSet = $this->repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray();
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', $defaultSet);
|
||||
$default = app('amount')->getDefaultCurrency();
|
||||
// @codeCoverageIgnoreStart
|
||||
if (0 === count($frontPage->data)) {
|
||||
|
||||
if (!(is_array($frontPage->data) && count($frontPage->data) > 0)) {
|
||||
$frontPage->data = $defaultSet;
|
||||
$frontPage->save();
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
|
||||
// get accounts:
|
||||
$accounts = $this->repository->getAccountsById($frontPage->data);
|
||||
@@ -101,7 +111,7 @@ class AccountController extends Controller
|
||||
foreach ($accounts as $account) {
|
||||
$currency = $this->repository->getAccountCurrency($account);
|
||||
if (null === $currency) {
|
||||
$currency = $default; // @codeCoverageIgnore
|
||||
$currency = $default;
|
||||
}
|
||||
$currentSet = [
|
||||
'label' => $account->name,
|
||||
@@ -109,20 +119,20 @@ class AccountController extends Controller
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'start_date' => $start->format('Y-m-d'),
|
||||
'end_date' => $end->format('Y-m-d'),
|
||||
'start_date' => $start->toAtomString(),
|
||||
'end_date' => $end->toAtomString(),
|
||||
'type' => 'line', // line, area or bar
|
||||
'yAxisID' => 0, // 0, 1, 2
|
||||
'entries' => [],
|
||||
];
|
||||
/** @var Carbon $currentStart */
|
||||
$currentStart = clone $start;
|
||||
$range = app('steam')->balanceInRange($account, $start, clone $end);
|
||||
$previous = round((float)array_values($range)[0], 12);
|
||||
// 2022-10-11 this method no longer converts to float.
|
||||
$previous = array_values($range)[0];
|
||||
while ($currentStart <= $end) {
|
||||
$format = $currentStart->format('Y-m-d');
|
||||
$label = $currentStart->format('Y-m-d');
|
||||
$balance = array_key_exists($format, $range) ? round((float)$range[$format], 12) : $previous;
|
||||
$label = $currentStart->toAtomString();
|
||||
$balance = array_key_exists($format, $range) ? $range[$format] : $previous;
|
||||
$previous = $balance;
|
||||
$currentStart->addDay();
|
||||
$currentSet['entries'][$label] = $balance;
|
||||
|
@@ -26,25 +26,32 @@ namespace FireflyIII\Api\V1\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Carbon\Exceptions\InvalidDateException;
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Manager;
|
||||
use League\Fractal\Serializer\JsonApiSerializer;
|
||||
use Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
* Class Controller.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
use AuthorizesRequests;
|
||||
use DispatchesJobs;
|
||||
use ValidatesRequests;
|
||||
|
||||
protected const CONTENT_TYPE = 'application/vnd.api+json';
|
||||
protected array $allowedSort;
|
||||
protected ParameterBag $parameters;
|
||||
|
||||
/**
|
||||
@@ -53,6 +60,7 @@ abstract class Controller extends BaseController
|
||||
public function __construct()
|
||||
{
|
||||
// get global parameters
|
||||
$this->allowedSort = config('firefly.allowed_sort_parameters');
|
||||
$this->parameters = $this->getParameters();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
@@ -64,34 +72,46 @@ abstract class Controller extends BaseController
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to grab all parameters from the URI.
|
||||
* Method to grab all parameters from the URL.
|
||||
*
|
||||
* @return ParameterBag
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
private function getParameters(): ParameterBag
|
||||
{
|
||||
$bag = new ParameterBag;
|
||||
$bag = new ParameterBag();
|
||||
$page = (int)request()->get('page');
|
||||
if (0 === $page) {
|
||||
|
||||
if ($page < 1) {
|
||||
$page = 1;
|
||||
}
|
||||
if ($page > (2 ^ 16)) {
|
||||
$page = (2 ^ 16);
|
||||
}
|
||||
$bag->set('page', $page);
|
||||
|
||||
// some date fields:
|
||||
$dates = ['start', 'end', 'date'];
|
||||
foreach ($dates as $field) {
|
||||
$date = null;
|
||||
try {
|
||||
$date = request()->query->get($field);
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $field));
|
||||
Log::error($e->getMessage());
|
||||
$value = null;
|
||||
}
|
||||
$obj = null;
|
||||
if (null !== $date) {
|
||||
try {
|
||||
$obj = Carbon::parse($date);
|
||||
} catch (InvalidDateException $e) {
|
||||
} catch (InvalidDateException|InvalidFormatException $e) {
|
||||
// don't care
|
||||
Log::error(sprintf('Invalid date exception in API controller: %s', $e->getMessage()));
|
||||
app('log')->warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', substr($date, 0, 20), $e->getMessage()));
|
||||
}
|
||||
}
|
||||
$bag->set($field, $obj);
|
||||
@@ -100,18 +120,60 @@ abstract class Controller extends BaseController
|
||||
// integer fields:
|
||||
$integers = ['limit'];
|
||||
foreach ($integers as $integer) {
|
||||
try {
|
||||
$value = request()->query->get($integer);
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $integer));
|
||||
Log::error($e->getMessage());
|
||||
$value = null;
|
||||
}
|
||||
if (null !== $value) {
|
||||
$bag->set($integer, (int)$value);
|
||||
}
|
||||
}
|
||||
|
||||
return $bag;
|
||||
|
||||
// sort fields:
|
||||
return $this->getSortParameters($bag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to help build URI's.
|
||||
* @param ParameterBag $bag
|
||||
*
|
||||
* @return ParameterBag
|
||||
*/
|
||||
private function getSortParameters(ParameterBag $bag): ParameterBag
|
||||
{
|
||||
$sortParameters = [];
|
||||
try {
|
||||
$param = (string)request()->query->get('sort');
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error('Request field "sort" contains a non-scalar value. Value set to NULL.');
|
||||
Log::error($e->getMessage());
|
||||
$param = '';
|
||||
}
|
||||
if ('' === $param) {
|
||||
return $bag;
|
||||
}
|
||||
$parts = explode(',', $param);
|
||||
foreach ($parts as $part) {
|
||||
$part = trim($part);
|
||||
$direction = 'asc';
|
||||
if ('-' === $part[0]) {
|
||||
$part = substr($part, 1);
|
||||
$direction = 'desc';
|
||||
}
|
||||
if (in_array($part, $this->allowedSort, true)) {
|
||||
$sortParameters[] = [$part, $direction];
|
||||
}
|
||||
}
|
||||
$bag->set('sort', $sortParameters);
|
||||
|
||||
return $bag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to help build URL's.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -139,7 +201,7 @@ abstract class Controller extends BaseController
|
||||
final protected function getManager(): Manager
|
||||
{
|
||||
// create some objects:
|
||||
$manager = new Manager;
|
||||
$manager = new Manager();
|
||||
$baseUrl = request()->getSchemeAndHttpHost().'/api/v1';
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
|
100
app/Api/V1/Controllers/Data/Bulk/TransactionController.php
Normal file
100
app/Api/V1/Controllers/Data/Bulk/TransactionController.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* TransactionController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Data\Bulk;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Data\Bulk\TransactionRequest;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Destroy\AccountDestroyService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class TransactionController
|
||||
*
|
||||
* Endpoint to update transactions by submitting
|
||||
* (optional) a "where" clause and an "update"
|
||||
* clause.
|
||||
*
|
||||
* Because this is a security nightmare waiting to happen validation
|
||||
* is pretty strict.
|
||||
*/
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/bulkUpdateTransactions
|
||||
*
|
||||
* @param TransactionRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(TransactionRequest $request): JsonResponse
|
||||
{
|
||||
$query = $request->getAll();
|
||||
$params = $query['query'];
|
||||
|
||||
// this deserves better code, but for now a loop of basic if-statements
|
||||
// to respond to what is in the $query.
|
||||
// this is OK because only one thing can be in the query at the moment.
|
||||
if ($this->updatesTransactionAccount($params)) {
|
||||
$original = $this->repository->find((int)$params['where']['account_id']);
|
||||
$destination = $this->repository->find((int)$params['update']['account_id']);
|
||||
|
||||
/** @var AccountDestroyService $service */
|
||||
$service = app(AccountDestroyService::class);
|
||||
$service->moveTransactions($original, $destination);
|
||||
}
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function updatesTransactionAccount(array $params): bool
|
||||
{
|
||||
return array_key_exists('account_id', $params['where']) && array_key_exists('account_id', $params['update']);
|
||||
}
|
||||
}
|
@@ -45,13 +45,19 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Destroy\AccountDestroyService;
|
||||
use FireflyIII\Services\Internal\Destroy\JournalDestroyService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class DestroyController
|
||||
*/
|
||||
class DestroyController extends Controller
|
||||
{
|
||||
private bool $unused;
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/destroyData
|
||||
*
|
||||
* @param DestroyRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -60,10 +66,10 @@ class DestroyController extends Controller
|
||||
public function destroy(DestroyRequest $request): JsonResponse
|
||||
{
|
||||
$objects = $request->getObjects();
|
||||
|
||||
$this->unused = $request->boolean('unused', false);
|
||||
switch ($objects) {
|
||||
default:
|
||||
throw new FireflyException(sprintf('This endpoint can\'t handle object "%s"', $objects));
|
||||
throw new FireflyException(sprintf('200033: This endpoint can\'t handle object "%s"', $objects));
|
||||
case 'budgets':
|
||||
$this->destroyBudgets();
|
||||
break;
|
||||
@@ -88,27 +94,55 @@ class DestroyController extends Controller
|
||||
case 'object_groups':
|
||||
$this->destroyObjectGroups();
|
||||
break;
|
||||
case 'not_assets_liabilities':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::CASH,
|
||||
AccountType::CREDITCARD,
|
||||
AccountType::DEFAULT,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::IMPORT,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::LIABILITY_CREDIT,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::REVENUE,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'accounts':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::ASSET, AccountType::DEFAULT,
|
||||
AccountType::BENEFICIARY, AccountType::EXPENSE,
|
||||
AccountType::REVENUE, AccountType::INITIAL_BALANCE,
|
||||
AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD,
|
||||
AccountType::ASSET,
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::CASH,
|
||||
AccountType::CREDITCARD,
|
||||
AccountType::DEBT,
|
||||
AccountType::DEFAULT,
|
||||
AccountType::EXPENSE,
|
||||
AccountType::IMPORT,
|
||||
AccountType::INITIAL_BALANCE,
|
||||
AccountType::LIABILITY_CREDIT,
|
||||
AccountType::LOAN,
|
||||
AccountType::MORTGAGE,
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::REVENUE,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'asset_accounts':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::ASSET, AccountType::DEFAULT,
|
||||
AccountType::ASSET,
|
||||
AccountType::DEFAULT,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'expense_accounts':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::BENEFICIARY, AccountType::EXPENSE,
|
||||
AccountType::BENEFICIARY,
|
||||
AccountType::EXPENSE,
|
||||
]
|
||||
);
|
||||
break;
|
||||
@@ -122,7 +156,10 @@ class DestroyController extends Controller
|
||||
case 'liabilities':
|
||||
$this->destroyAccounts(
|
||||
[
|
||||
AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE, AccountType::CREDITCARD,
|
||||
AccountType::DEBT,
|
||||
AccountType::LOAN,
|
||||
AccountType::MORTGAGE,
|
||||
AccountType::CREDITCARD,
|
||||
]
|
||||
);
|
||||
break;
|
||||
@@ -159,6 +196,7 @@ class DestroyController extends Controller
|
||||
);
|
||||
break;
|
||||
}
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
@@ -257,9 +295,19 @@ class DestroyController extends Controller
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$collection = $repository->getAccountsByType($types);
|
||||
$service = app(AccountDestroyService::class);
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($collection as $account) {
|
||||
$count = $account->transactions()->count();
|
||||
if (true === $this->unused && 0 === $count) {
|
||||
Log::info(sprintf('Deleted unused account #%d "%s"', $account->id, $account->name));
|
||||
$service->destroy($account, null);
|
||||
continue;
|
||||
}
|
||||
if (false === $this->unused) {
|
||||
Log::info(sprintf('Deleting account #%d "%s"', $account->id, $account->name));
|
||||
$service->destroy($account, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,5 +325,4 @@ class DestroyController extends Controller
|
||||
$service->destroy($journal);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* AccountController.php
|
||||
* ExportController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -19,13 +20,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Data\Export;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Data\Export;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Support\Export\ExportDataGenerator;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
|
||||
/**
|
||||
@@ -43,146 +45,35 @@ class ExportController extends Controller
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
/** @var ExportDataGenerator $exporter */
|
||||
$this->exporter = app(ExportDataGenerator::class);
|
||||
$this->exporter->setUser($user);
|
||||
$this->exporter->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportAccounts
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function accounts(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportAccounts(true);
|
||||
|
||||
return $this->returnExport('accounts');
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function bills(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportBills(true);
|
||||
|
||||
return $this->returnExport('bills');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function budgets(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportBudgets(true);
|
||||
|
||||
return $this->returnExport('budgets');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function categories(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportCategories(true);
|
||||
|
||||
return $this->returnExport('categories');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function piggyBanks(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportPiggies(true);
|
||||
|
||||
return $this->returnExport('piggies');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function recurring(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportRecurring(true);
|
||||
|
||||
return $this->returnExport('recurrences');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function rules(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportRules(true);
|
||||
|
||||
return $this->returnExport('rules');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function tags(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportTags(true);
|
||||
|
||||
return $this->returnExport('tags');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function transactions(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$params = $request->getAll();
|
||||
$this->exporter->setStart($params['start']);
|
||||
$this->exporter->setEnd($params['end']);
|
||||
$this->exporter->setAccounts($params['accounts']);
|
||||
$this->exporter->setExportTransactions(true);
|
||||
|
||||
return $this->returnExport('transactions');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function returnExport(string $key): LaravelResponse
|
||||
{
|
||||
@@ -201,9 +92,140 @@ class ExportController extends Controller
|
||||
->header('Expires', '0')
|
||||
->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
|
||||
->header('Pragma', 'public')
|
||||
->header('Content-Length', strlen($data[$key]));
|
||||
->header('Content-Length', (string)strlen($data[$key]));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportBills
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function bills(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportBills(true);
|
||||
|
||||
return $this->returnExport('bills');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportBudgets
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function budgets(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportBudgets(true);
|
||||
|
||||
return $this->returnExport('budgets');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportCategories
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function categories(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportCategories(true);
|
||||
|
||||
return $this->returnExport('categories');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportPiggies
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function piggyBanks(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportPiggies(true);
|
||||
|
||||
return $this->returnExport('piggies');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportRecurring
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function recurring(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportRecurring(true);
|
||||
|
||||
return $this->returnExport('recurrences');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportRules
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function rules(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportRules(true);
|
||||
|
||||
return $this->returnExport('rules');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportTags
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function tags(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$this->exporter->setExportTags(true);
|
||||
|
||||
return $this->returnExport('tags');
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportTransactions
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(ExportRequest $request): LaravelResponse
|
||||
{
|
||||
$params = $request->getAll();
|
||||
$this->exporter->setStart($params['start']);
|
||||
$this->exporter->setEnd($params['end']);
|
||||
$this->exporter->setAccounts($params['accounts']);
|
||||
$this->exporter->setExportTransactions(true);
|
||||
|
||||
return $this->returnExport('transactions');
|
||||
}
|
||||
}
|
95
app/Api/V1/Controllers/Data/PurgeController.php
Normal file
95
app/Api/V1/Controllers/Data/PurgeController.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*
|
||||
* PurgeController.php
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Data;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\Rule;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class PurgeController extends Controller
|
||||
{
|
||||
/**
|
||||
* TODO cleanup and use repositories.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function purge(): JsonResponse
|
||||
{
|
||||
$user = auth()->user();
|
||||
|
||||
// some manual code, too lazy to call all repositories.
|
||||
|
||||
// budgets:
|
||||
Budget::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// bills
|
||||
Bill::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// piggies
|
||||
$set = PiggyBank::leftJoin('accounts', 'accounts.id', 'piggy_banks.account_id')
|
||||
->where('accounts.user_id', $user->id)->onlyTrashed()->get(['piggy_banks.*']);
|
||||
/** @var PiggyBank $piggy */
|
||||
foreach ($set as $piggy) {
|
||||
$piggy->forceDelete();
|
||||
}
|
||||
|
||||
// rule group
|
||||
RuleGroup::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// rules
|
||||
Rule::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// recurring transactions
|
||||
Recurrence::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// categories
|
||||
Category::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// tags
|
||||
Tag::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
|
||||
// accounts
|
||||
Account::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// transaction groups
|
||||
TransactionGroup::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
// transaction journals
|
||||
TransactionJournal::whereUserId($user->id)->onlyTrashed()->forceDelete();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
}
|
@@ -37,20 +37,20 @@ use Illuminate\Http\JsonResponse;
|
||||
* Class AccountController
|
||||
*
|
||||
* Shows expense information grouped or limited by date.
|
||||
* Ie. all expenses grouped by account + currency.
|
||||
* I.e. all expenses grouped by account + currency.
|
||||
*/
|
||||
class AccountController extends Controller
|
||||
{
|
||||
use ApiSupport;
|
||||
|
||||
private CurrencyRepositoryInterface $currencyRepository;
|
||||
private AccountRepositoryInterface $repository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -73,6 +73,40 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseAsset
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function asset(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$expenses = $this->opsRepository->sumExpensesBySource($start, $end, $assetAccounts);
|
||||
$result = [];
|
||||
|
||||
/** @var array $expense */
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'id' => (string)$expense['id'],
|
||||
'name' => $expense['name'],
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseExpense
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -83,14 +117,16 @@ class AccountController extends Controller
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$expenseAccounts = $request->getExpenseAccounts();
|
||||
$expenses = $this->opsRepository->sumExpenses($start, $end, $assetAccounts, $expenseAccounts);
|
||||
$expenses = $this->opsRepository->sumExpensesByDestination($start, $end, $assetAccounts, $expenseAccounts);
|
||||
$result = [];
|
||||
|
||||
/** @var array $expense */
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'id' => (string)$expense['id'],
|
||||
'name' => $expense['name'],
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
@@ -98,31 +134,4 @@ class AccountController extends Controller
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function asset(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$expenses = $this->opsRepository->sumExpenses($start, $end, $assetAccounts);
|
||||
$result = [];
|
||||
|
||||
/** @var array $expense */
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* PeriodController.php
|
||||
* BillController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -19,8 +20,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -54,6 +56,9 @@ class BillController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseBill
|
||||
*
|
||||
* Expenses per bill, possibly filtered by bill and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
@@ -96,7 +101,7 @@ class BillController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], $journal['amount']);
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference']; // intentional float
|
||||
}
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $response[$foreignKey] ?? [
|
||||
@@ -106,7 +111,7 @@ class BillController extends Controller
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd($response[$foreignKey]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference'];
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference']; // intentional float
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +119,9 @@ class BillController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseNoBill
|
||||
*
|
||||
* Expenses for no bill filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
@@ -146,7 +154,7 @@ class BillController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$currencyId]['difference'] = bcadd($response[$currencyId]['difference'], $journal['amount']);
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference'];
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference']; // intentional float
|
||||
}
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignCurrencyId] = $response[$foreignCurrencyId] ?? [
|
||||
@@ -156,11 +164,10 @@ class BillController extends Controller
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference']; // intentional float
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -36,14 +37,14 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class BudgetController extends Controller
|
||||
{
|
||||
private NoBudgetRepositoryInterface $noRepository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private BudgetRepositoryInterface $repository;
|
||||
private NoBudgetRepositoryInterface $noRepository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -64,6 +65,9 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseBudget
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -80,14 +84,14 @@ class BudgetController extends Controller
|
||||
}
|
||||
/** @var Budget $budget */
|
||||
foreach ($budgets as $budget) {
|
||||
$expenses = $this->opsRepository->sumExpenses($start, $end, $assetAccounts, new Collection([$budget]), null);
|
||||
$expenses = $this->opsRepository->sumExpenses($start, $end, $assetAccounts, new Collection([$budget]));
|
||||
/** @var array $expense */
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'id' => (string)$budget->id,
|
||||
'name' => $budget->name,
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
@@ -98,6 +102,9 @@ class BudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseNoBudget
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -108,19 +115,17 @@ class BudgetController extends Controller
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$result = [];
|
||||
$expenses = $this->noRepository->sumExpenses($start, $end, $assetAccounts, null);
|
||||
$expenses = $this->noRepository->sumExpenses($start, $end, $assetAccounts);
|
||||
/** @var array $expense */
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,9 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* CategoryController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
use FireflyIII\Models\Category;
|
||||
@@ -18,14 +38,14 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private CategoryRepositoryInterface $repository;
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -46,6 +66,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -69,7 +92,7 @@ class CategoryController extends Controller
|
||||
'id' => (string)$category->id,
|
||||
'name' => $category->name,
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
@@ -80,6 +103,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -95,13 +121,12 @@ class CategoryController extends Controller
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // intentional float
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -33,8 +34,10 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class PeriodController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -62,7 +65,7 @@ class PeriodController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$currencyId]['difference'] = bcadd($response[$currencyId]['difference'], $journal['amount']);
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference'];
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference']; // intentional float
|
||||
}
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignCurrencyId] = $response[$foreignCurrencyId] ?? [
|
||||
@@ -72,11 +75,10 @@ class PeriodController extends Controller
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference']; // intentional float
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* PeriodController.php
|
||||
* TagController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -19,8 +20,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Expense;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -44,9 +46,8 @@ class TagController extends Controller
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$user = auth()->user();
|
||||
$this->repository = app(TagRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -54,73 +55,9 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseNoTag
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::WITHDRAWAL])->setRange($start, $end)->setSourceAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $entry */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], $journal['amount']);
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd($response[$foreignKey]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses for no tag filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
@@ -153,7 +90,7 @@ class TagController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$currencyId]['difference'] = bcadd($response[$currencyId]['difference'], $journal['amount']);
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference'];
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference']; // float but on purpose.
|
||||
}
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignCurrencyId] = $response[$foreignCurrencyId] ?? [
|
||||
@@ -163,11 +100,80 @@ class TagController extends Controller
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference']; // float but on purpose.
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseTag
|
||||
*
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::WITHDRAWAL])->setRange($start, $end)->setSourceAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $journal */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], $journal['amount']);
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference']; // float but on purpose.
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd($response[$foreignKey]['difference'], $journal['foreign_amount']);
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference']; // float but on purpose.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
}
|
@@ -37,21 +37,20 @@ use Illuminate\Http\JsonResponse;
|
||||
* Class AccountController
|
||||
*
|
||||
* Shows income information grouped or limited by date.
|
||||
* Ie. all income grouped by account + currency.
|
||||
* TODO same code as Expense/AccountController.
|
||||
* I.e. all income grouped by account + currency.
|
||||
*/
|
||||
class AccountController extends Controller
|
||||
{
|
||||
use ApiSupport;
|
||||
|
||||
private CurrencyRepositoryInterface $currencyRepository;
|
||||
private AccountRepositoryInterface $repository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -74,35 +73,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* // TOOD same as
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function revenue(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$revenueAccounts = $request->getRevenueAccounts();
|
||||
$income = $this->opsRepository->sumIncome($start, $end, $assetAccounts, $revenueAccounts);
|
||||
$result = [];
|
||||
|
||||
/** @var array $entry */
|
||||
foreach ($income as $entry) {
|
||||
$result[] = [
|
||||
'difference' => $entry['sum'],
|
||||
'difference_float' => (float)$entry['sum'],
|
||||
'currency_id' => (string)$entry['currency_id'],
|
||||
'currency_code' => $entry['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO same code as Expense/AccountController.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeAsset
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
@@ -113,13 +85,15 @@ class AccountController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$income = $this->opsRepository->sumIncome($start, $end, $assetAccounts);
|
||||
$income = $this->opsRepository->sumIncomeByDestination($start, $end, $assetAccounts);
|
||||
$result = [];
|
||||
/** @var array $entry */
|
||||
foreach ($income as $entry) {
|
||||
$result[] = [
|
||||
'id' => (string)$entry['id'],
|
||||
'name' => $entry['name'],
|
||||
'difference' => $entry['sum'],
|
||||
'difference_float' => (float)$entry['sum'],
|
||||
'difference_float' => (float)$entry['sum'], // float but on purpose.
|
||||
'currency_id' => (string)$entry['currency_id'],
|
||||
'currency_code' => $entry['currency_code'],
|
||||
];
|
||||
@@ -128,4 +102,35 @@ class AccountController extends Controller
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeRevenue
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function revenue(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$revenueAccounts = $request->getRevenueAccounts();
|
||||
$income = $this->opsRepository->sumIncomeBySource($start, $end, $assetAccounts, $revenueAccounts);
|
||||
$result = [];
|
||||
|
||||
/** @var array $entry */
|
||||
foreach ($income as $entry) {
|
||||
$result[] = [
|
||||
'id' => (string)$entry['id'],
|
||||
'name' => $entry['name'],
|
||||
'difference' => $entry['sum'],
|
||||
'difference_float' => (float)$entry['sum'], // float but on purpose.
|
||||
'currency_id' => (string)$entry['currency_id'],
|
||||
'currency_code' => $entry['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* CategoryController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Income;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
use FireflyIII\Models\Category;
|
||||
@@ -15,18 +35,17 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CategoryController
|
||||
* TODO same as opposing category controller
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private CategoryRepositoryInterface $repository;
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -47,6 +66,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -70,7 +92,7 @@ class CategoryController extends Controller
|
||||
'id' => (string)$category->id,
|
||||
'name' => $category->name,
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // float but on purpose.
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
@@ -81,6 +103,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -96,13 +121,12 @@ class CategoryController extends Controller
|
||||
foreach ($expenses as $expense) {
|
||||
$result[] = [
|
||||
'difference' => $expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'],
|
||||
'difference_float' => (float)$expense['sum'], // float but on purpose.
|
||||
'currency_id' => (string)$expense['currency_id'],
|
||||
'currency_code' => $expense['currency_code'],
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Income;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Income;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -33,8 +34,10 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class PeriodController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -62,7 +65,7 @@ class PeriodController extends Controller
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$currencyId]['difference'] = bcadd($response[$currencyId]['difference'], app('steam')->positive($journal['amount']));
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference'];
|
||||
$response[$currencyId]['difference_float'] = (float)$response[$currencyId]['difference']; // float but on purpose.
|
||||
}
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignCurrencyId] = $response[$foreignCurrencyId] ?? [
|
||||
@@ -71,12 +74,14 @@ class PeriodController extends Controller
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd(
|
||||
$response[$foreignCurrencyId]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference']; // float but on purpose.
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* PeriodController.php
|
||||
* TagController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -19,8 +20,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Income;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Income;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -54,73 +56,9 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeTag
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::DEPOSIT])->setRange($start, $end)->setDestinationAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $entry */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], app('steam')->positive($journal['amount']));
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd($response[$foreignKey]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses for no tag filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
@@ -162,7 +100,10 @@ class TagController extends Controller
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd(
|
||||
$response[$foreignCurrencyId]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
}
|
||||
}
|
||||
@@ -170,4 +111,76 @@ class TagController extends Controller
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeNoTag
|
||||
*
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::DEPOSIT])->setRange($start, $end)->setDestinationAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $journal */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], app('steam')->positive($journal['amount']));
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd(
|
||||
$response[$foreignKey]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -40,7 +41,7 @@ class AccountController extends Controller
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -57,7 +58,8 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO same code as Expense/AccountController.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransfers
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
@@ -68,18 +70,8 @@ class AccountController extends Controller
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$assetAccounts = $request->getAssetAccounts();
|
||||
$income = $this->opsRepository->sumTransfers($start, $end, $assetAccounts);
|
||||
$result = [];
|
||||
/** @var array $entry */
|
||||
foreach ($income as $entry) {
|
||||
$result[] = [
|
||||
'difference' => $entry['sum'],
|
||||
'difference_float' => (float)$entry['sum'],
|
||||
'currency_id' => (string)$entry['currency_id'],
|
||||
'currency_code' => $entry['currency_code'],
|
||||
];
|
||||
}
|
||||
$transfers = $this->opsRepository->sumTransfers($start, $end, $assetAccounts);
|
||||
|
||||
return response()->json($result);
|
||||
return response()->json($transfers);
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -36,14 +37,14 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
private OperationsRepositoryInterface $opsRepository;
|
||||
private CategoryRepositoryInterface $repository;
|
||||
private NoCategoryRepositoryInterface $noRepository;
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -64,6 +65,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -98,6 +102,9 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -120,6 +127,5 @@ class CategoryController extends Controller
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -33,8 +34,10 @@ use Illuminate\Http\JsonResponse;
|
||||
*/
|
||||
class PeriodController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
@@ -71,12 +74,14 @@ class PeriodController extends Controller
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd(
|
||||
$response[$foreignCurrencyId]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Insight\Transfer;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Insight\GenericRequest;
|
||||
@@ -38,7 +39,6 @@ class TagController extends Controller
|
||||
|
||||
/**
|
||||
* TagController constructor.
|
||||
* TODO lots of copying and pasting here.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -55,74 +55,8 @@ class TagController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Transfers per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::TRANSFER])->setRange($start, $end)->setDestinationAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $entry */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], app('steam')->positive($journal['amount']));
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd($response[$foreignKey]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Expenses for no tag filtered by account.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoTag
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
@@ -163,11 +97,87 @@ class TagController extends Controller
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd($response[$foreignCurrencyId]['difference'], app('steam')->positive($journal['foreign_amount']));
|
||||
$response[$foreignCurrencyId]['difference'] = bcadd(
|
||||
$response[$foreignCurrencyId]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignCurrencyId]['difference_float'] = (float)$response[$foreignCurrencyId]['difference'];
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferTag
|
||||
*
|
||||
* Transfers per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function tag(GenericRequest $request): JsonResponse
|
||||
{
|
||||
$accounts = $request->getAssetAccounts();
|
||||
$tags = $request->getTags();
|
||||
$start = $request->getStart();
|
||||
$end = $request->getEnd();
|
||||
$response = [];
|
||||
|
||||
// get all tags:
|
||||
if (0 === $tags->count()) {
|
||||
$tags = $this->repository->get();
|
||||
}
|
||||
|
||||
// collect all expenses in this period (regardless of type) by the given bills and accounts.
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setTypes([TransactionType::TRANSFER])->setRange($start, $end)->setDestinationAccounts($accounts);
|
||||
$collector->setTags($tags);
|
||||
$genericSet = $collector->getExtractedJournals();
|
||||
/** @var array $journal */
|
||||
foreach ($genericSet as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$foreignCurrencyId = (int)$journal['foreign_currency_id'];
|
||||
|
||||
/** @var array $tag */
|
||||
foreach ($journal['tags'] as $tag) {
|
||||
$tagId = $tag['id'];
|
||||
$key = sprintf('%d-%d', $tagId, $currencyId);
|
||||
$foreignKey = sprintf('%d-%d', $tagId, $foreignCurrencyId);
|
||||
|
||||
// on currency ID
|
||||
if (0 !== $currencyId) {
|
||||
$response[$key] = $response[$key] ?? [
|
||||
'id' => (string)$tagId,
|
||||
'name' => $tag['name'],
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_code' => $journal['currency_code'],
|
||||
];
|
||||
$response[$key]['difference'] = bcadd($response[$key]['difference'], app('steam')->positive($journal['amount']));
|
||||
$response[$key]['difference_float'] = (float)$response[$key]['difference'];
|
||||
}
|
||||
|
||||
// on foreign ID
|
||||
if (0 !== $foreignCurrencyId) {
|
||||
$response[$foreignKey] = $journal[$foreignKey] ?? [
|
||||
'difference' => '0',
|
||||
'difference_float' => 0,
|
||||
'currency_id' => (string)$foreignCurrencyId,
|
||||
'currency_code' => $journal['foreign_currency_code'],
|
||||
];
|
||||
$response[$foreignKey]['difference'] = bcadd(
|
||||
$response[$foreignKey]['difference'],
|
||||
app('steam')->positive($journal['foreign_amount'])
|
||||
);
|
||||
$response[$foreignKey]['difference_float'] = (float)$response[$foreignKey]['difference']; // intentional float
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json(array_values($response));
|
||||
}
|
||||
}
|
@@ -40,7 +40,7 @@ class DestroyController extends Controller
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -56,16 +56,19 @@ class DestroyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/deleteAccount
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Account $account
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function destroy(Account $account): JsonResponse
|
||||
{
|
||||
$this->repository->destroy($account, null);
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Account;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
@@ -53,7 +54,7 @@ class ListController extends Controller
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -69,10 +70,13 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listAttachmentByAccount
|
||||
*
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function attachments(Account $account): JsonResponse
|
||||
{
|
||||
@@ -98,12 +102,13 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* List all piggies.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listPiggyBankByAccount
|
||||
*
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function piggyBanks(Account $account): JsonResponse
|
||||
{
|
||||
@@ -120,7 +125,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.accounts.piggy_banks', [$account->id]) . $this->buildParams());
|
||||
$paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]).$this->buildParams());
|
||||
|
||||
/** @var PiggyBankTransformer $transformer */
|
||||
$transformer = app(PiggyBankTransformer::class);
|
||||
@@ -130,19 +135,20 @@ class ListController extends Controller
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listTransactionByAccount
|
||||
*
|
||||
* Show all transaction groups related to the account.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Account $account): JsonResponse
|
||||
{
|
||||
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Account;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\AccountFilter;
|
||||
@@ -48,7 +50,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -64,12 +66,15 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listAccount
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
@@ -83,8 +88,12 @@ class ShowController extends Controller
|
||||
|
||||
// get list of accounts. Count it and split it.
|
||||
$this->repository->resetAccountOrder();
|
||||
$collection = $this->repository->getAccountsByType($types);
|
||||
$collection = $this->repository->getAccountsByType($types, $this->parameters->get('sort') ?? []);
|
||||
$count = $collection->count();
|
||||
|
||||
// continue sort:
|
||||
|
||||
|
||||
$accounts = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
|
||||
// make paginator:
|
||||
@@ -102,6 +111,9 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/getAccount
|
||||
*
|
||||
* Show single instance.
|
||||
*
|
||||
* @param Account $account
|
||||
@@ -122,5 +134,4 @@ class ShowController extends Controller
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
}
|
@@ -39,11 +39,10 @@ class StoreController extends Controller
|
||||
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -59,6 +58,9 @@ class StoreController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/storeAccount
|
||||
*
|
||||
* Store a new instance.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
@@ -80,5 +82,4 @@ class StoreController extends Controller
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@ use FireflyIII\Transformers\AccountTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Log;
|
||||
use Preferences;
|
||||
|
||||
/**
|
||||
* Class UpdateController
|
||||
@@ -41,11 +42,10 @@ class UpdateController extends Controller
|
||||
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* AccountController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -61,6 +61,9 @@ class UpdateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/updateAccount
|
||||
*
|
||||
* Update account.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
@@ -76,6 +79,7 @@ class UpdateController extends Controller
|
||||
$account = $this->repository->update($account, $data);
|
||||
$manager = $this->getManager();
|
||||
$account->refresh();
|
||||
Preferences::mark();
|
||||
|
||||
/** @var AccountTransformer $transformer */
|
||||
$transformer = app(AccountTransformer::class);
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Middleware\ApiDemoUser;
|
||||
@@ -36,11 +37,10 @@ class DestroyController extends Controller
|
||||
{
|
||||
private AttachmentRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* DestroyController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -53,16 +53,17 @@ class DestroyController extends Controller
|
||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/deleteAttachment
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
@@ -71,6 +72,7 @@ class DestroyController extends Controller
|
||||
public function destroy(Attachment $attachment): JsonResponse
|
||||
{
|
||||
$this->repository->destroy($attachment);
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Middleware\ApiDemoUser;
|
||||
@@ -43,11 +44,10 @@ class ShowController extends Controller
|
||||
{
|
||||
private AttachmentRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* ShowController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -60,18 +60,19 @@ class ShowController extends Controller
|
||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/downloadAttachment
|
||||
*
|
||||
* Download an attachment.
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
@@ -101,7 +102,7 @@ class ShowController extends Controller
|
||||
->header('Expires', '0')
|
||||
->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
|
||||
->header('Pragma', 'public')
|
||||
->header('Content-Length', strlen($content));
|
||||
->header('Content-Length', (string)strlen($content));
|
||||
|
||||
return $response;
|
||||
}
|
||||
@@ -109,10 +110,13 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/listAttachment
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
@@ -140,9 +144,10 @@ class ShowController extends Controller
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/getAttachment
|
||||
*
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Middleware\ApiDemoUser;
|
||||
@@ -43,11 +44,10 @@ class StoreController extends Controller
|
||||
{
|
||||
private AttachmentRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* StoreController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -60,15 +60,15 @@ class StoreController extends Controller
|
||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/uploadAttachment
|
||||
*
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
@@ -95,7 +95,6 @@ class StoreController extends Controller
|
||||
/**
|
||||
* Upload an attachment.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Attachment $attachment
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Attachment;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Middleware\ApiDemoUser;
|
||||
@@ -39,11 +40,10 @@ class UpdateController extends Controller
|
||||
{
|
||||
private AttachmentRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* UpdateController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -56,15 +56,15 @@ class UpdateController extends Controller
|
||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/attachments/updateAttachment
|
||||
*
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\AvailableBudget;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\AvailableBudget;
|
||||
use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface;
|
||||
use FireflyIII\Transformers\AvailableBudgetTransformer;
|
||||
@@ -43,7 +45,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
* AvailableBudgetController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -61,10 +63,13 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/available_budgets/getAvailableBudget
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
@@ -83,7 +88,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.available_budgets.index') . $this->buildParams());
|
||||
$paginator->setPath(route('api.v1.available-budgets.index').$this->buildParams());
|
||||
|
||||
/** @var AvailableBudgetTransformer $transformer */
|
||||
$transformer = app(AvailableBudgetTransformer::class);
|
||||
@@ -96,12 +101,14 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/available_budgets/getAvailableBudget
|
||||
*
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function show(AvailableBudget $availableBudget): JsonResponse
|
||||
{
|
||||
@@ -115,5 +122,4 @@ class ShowController extends Controller
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
}
|
@@ -1,97 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* StoreController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\AvailableBudget;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\AvailableBudget\Request;
|
||||
use FireflyIII\Factory\TransactionCurrencyFactory;
|
||||
use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface;
|
||||
use FireflyIII\Transformers\AvailableBudgetTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class StoreController
|
||||
*/
|
||||
class StoreController extends Controller
|
||||
{
|
||||
private AvailableBudgetRepositoryInterface $abRepository;
|
||||
|
||||
/**
|
||||
* AvailableBudgetController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$this->abRepository = app(AvailableBudgetRepositoryInterface::class);
|
||||
$this->abRepository->setUser($user);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function store(Request $request): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
$data['start']->startOfDay();
|
||||
$data['end']->endOfDay();
|
||||
|
||||
// currency is not mandatory:
|
||||
if (array_key_exists('currency_id', $data) || array_key_exists('currency_code', $data)) {
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$currency = $factory->find($data['currency_id'] ?? null, $data['currency_code'] ?? null);
|
||||
$data['currency_id'] = $currency->id;
|
||||
unset($data['currency_code']);
|
||||
}
|
||||
if (!array_key_exists('currency_id', $data)) {
|
||||
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
|
||||
$data['currency_id'] = $currency->id;
|
||||
}
|
||||
|
||||
$availableBudget = $this->abRepository->store($data);
|
||||
$manager = $this->getManager();
|
||||
|
||||
/** @var AvailableBudgetTransformer $transformer */
|
||||
$transformer = app(AvailableBudgetTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new Item($availableBudget, $transformer, 'available_budgets');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
}
|
@@ -1,97 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* UpdateController.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\AvailableBudget;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\AvailableBudget\Request;
|
||||
use FireflyIII\Factory\TransactionCurrencyFactory;
|
||||
use FireflyIII\Models\AvailableBudget;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Repositories\Budget\AvailableBudgetRepositoryInterface;
|
||||
use FireflyIII\Transformers\AvailableBudgetTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class UpdateController
|
||||
*/
|
||||
class UpdateController extends Controller
|
||||
{
|
||||
private AvailableBudgetRepositoryInterface $abRepository;
|
||||
|
||||
/**
|
||||
* AvailableBudgetController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$this->abRepository = app(AvailableBudgetRepositoryInterface::class);
|
||||
$this->abRepository->setUser($user);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, AvailableBudget $availableBudget): JsonResponse
|
||||
{
|
||||
$data = $request->getAll();
|
||||
|
||||
// find and validate currency ID
|
||||
if(array_key_exists('currency_id', $data) || array_key_exists('currency_code', $data)) {
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$currency = $factory->find($data['currency_id'] ?? null, $data['currency_code'] ?? null) ?? app('amount')->getDefaultCurrency();
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
unset($data['currency_code']);
|
||||
$data['currency_id'] = $currency->id;
|
||||
}
|
||||
|
||||
$this->abRepository->updateAvailableBudget($availableBudget, $data);
|
||||
$manager = $this->getManager();
|
||||
|
||||
/** @var AvailableBudgetTransformer $transformer */
|
||||
$transformer = app(AvailableBudgetTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new Item($availableBudget, $transformer, 'available_budgets');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
|
||||
}
|
||||
}
|
@@ -19,13 +19,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
@@ -38,39 +38,36 @@ class DestroyController extends Controller
|
||||
/**
|
||||
* BillController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
/** @var BillRepositoryInterface repository */
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->repository->setUser($admin);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/deleteBill
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function destroy(Bill $bill): JsonResponse
|
||||
{
|
||||
$this->repository->destroy($bill);
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
}
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
@@ -46,23 +48,18 @@ class ListController extends Controller
|
||||
|
||||
private BillRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* BillController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
/** @var BillRepositoryInterface repository */
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->repository->setUser($admin);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -70,12 +67,15 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/listAttachmentByBill
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function attachments(Bill $bill): JsonResponse
|
||||
{
|
||||
@@ -100,15 +100,16 @@ class ListController extends Controller
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/listRuleByBill
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function rules(Bill $bill): JsonResponse
|
||||
{
|
||||
@@ -129,18 +130,16 @@ class ListController extends Controller
|
||||
/** @var RuleTransformer $transformer */
|
||||
$transformer = app(RuleTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
|
||||
$resource = new FractalCollection($rules, $transformer, 'rules');
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/listTransactionByBill
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
@@ -148,7 +147,7 @@ class ListController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Bill $bill): JsonResponse
|
||||
{
|
||||
@@ -197,5 +196,4 @@ class ListController extends Controller
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
}
|
@@ -19,15 +19,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
@@ -44,19 +44,15 @@ class ShowController extends Controller
|
||||
/**
|
||||
* BillController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
/** @var BillRepositoryInterface repository */
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->repository->setUser($admin);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -64,10 +60,13 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/listBill
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
@@ -90,12 +89,14 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/getBill
|
||||
*
|
||||
* Show the specified bill.
|
||||
*
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function show(Bill $bill): JsonResponse
|
||||
{
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\Bill\StoreRequest;
|
||||
@@ -28,7 +29,6 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
@@ -41,23 +41,18 @@ class StoreController extends Controller
|
||||
|
||||
private BillRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* BillController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
/** @var BillRepositoryInterface repository */
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->repository->setUser($admin);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -65,6 +60,9 @@ class StoreController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/storeBill
|
||||
*
|
||||
* Store a bill.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
|
@@ -19,15 +19,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Bill;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\Bill\UpdateRequest;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Transformers\BillTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
@@ -38,23 +38,18 @@ class UpdateController extends Controller
|
||||
{
|
||||
private BillRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* BillController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
/** @var BillRepositoryInterface repository */
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
$this->repository->setUser($admin);
|
||||
$this->repository->setUser(auth()->user());
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -62,6 +57,9 @@ class UpdateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/bills/updateBill
|
||||
*
|
||||
* Update a bill.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
@@ -82,7 +80,5 @@ class UpdateController extends Controller
|
||||
$resource = new Item($bill, $transformer, 'bills');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Models\Budget;
|
||||
@@ -37,7 +38,7 @@ class DestroyController extends Controller
|
||||
/**
|
||||
* DestroyController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -53,16 +54,19 @@ class DestroyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/deleteBudget
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function destroy(Budget $budget): JsonResponse
|
||||
{
|
||||
$this->repository->destroy($budget);
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
@@ -51,7 +53,7 @@ class ListController extends Controller
|
||||
/**
|
||||
* ListController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -69,10 +71,13 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listAttachmentByBudget
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function attachments(Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -98,12 +103,15 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listBudgetLimitByBudget
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function budgetLimits(Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -114,13 +122,11 @@ class ListController extends Controller
|
||||
$count = $collection->count();
|
||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budgets.budget_limits', [$budget->id]) . $this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.budget-limits', [$budget->id]).$this->buildParams());
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
|
||||
$resource = new FractalCollection($budgetLimits, $transformer, 'budget_limits');
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
@@ -128,6 +134,9 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listTransactionByBudget
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
@@ -135,7 +144,7 @@ class ListController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -183,12 +192,72 @@ class ListController extends Controller
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
$transformer = app(TransactionGroupTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
|
||||
$resource = new FractalCollection($transactions, $transformer, 'transactions');
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listTransactionWithoutBudget
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function withoutBudget(Request $request): JsonResponse
|
||||
{
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
|
||||
// user can overrule page size with limit parameter.
|
||||
$limit = $this->parameters->get('limit');
|
||||
if (null !== $limit && $limit > 0) {
|
||||
$pageSize = $limit;
|
||||
}
|
||||
|
||||
$type = $request->get('type') ?? 'default';
|
||||
$this->parameters->set('type', $type);
|
||||
|
||||
$types = $this->mapTransactionTypes($this->parameters->get('type'));
|
||||
$manager = $this->getManager();
|
||||
|
||||
/** @var User $admin */
|
||||
$admin = auth()->user();
|
||||
|
||||
// use new group collector:
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector
|
||||
->setUser($admin)
|
||||
// filter on budget.
|
||||
->withoutBudget()
|
||||
// all info needed for the API:
|
||||
->withAPIInformation()
|
||||
// set page size:
|
||||
->setLimit($pageSize)
|
||||
// set page to retrieve
|
||||
->setPage($this->parameters->get('page'))
|
||||
// set types of transactions to return.
|
||||
->setTypes($types);
|
||||
|
||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
||||
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
|
||||
}
|
||||
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.budgets.without-budget').$this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
$transformer = app(TransactionGroupTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
$resource = new FractalCollection($transactions, $transformer, 'transactions');
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
}
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
@@ -44,7 +46,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
* ListController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -62,10 +64,13 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listBudget
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
@@ -99,7 +104,6 @@ class ShowController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function show(Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -113,5 +117,4 @@ class ShowController extends Controller
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\Budget\StoreRequest;
|
||||
@@ -37,11 +38,10 @@ class StoreController extends Controller
|
||||
{
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* StoreController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -57,6 +57,9 @@ class StoreController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/storeBudget
|
||||
*
|
||||
* Store a budget.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\Budget;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\Budget\UpdateRequest;
|
||||
@@ -40,7 +41,7 @@ class UpdateController extends Controller
|
||||
/**
|
||||
* UpdateController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -56,6 +57,9 @@ class UpdateController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/updateBudget
|
||||
*
|
||||
* Update a budget.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
@@ -76,6 +80,5 @@ class UpdateController extends Controller
|
||||
$resource = new Item($budget, $transformer, 'budgets');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
|
||||
}
|
||||
}
|
@@ -19,8 +19,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
@@ -37,11 +38,10 @@ class DestroyController extends Controller
|
||||
{
|
||||
private BudgetLimitRepositoryInterface $blRepository;
|
||||
|
||||
|
||||
/**
|
||||
* BudgetLimitController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -59,13 +59,16 @@ class DestroyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/deleteBudgetLimit
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function destroy(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
{
|
||||
@@ -73,6 +76,7 @@ class DestroyController extends Controller
|
||||
throw new FireflyException('20028: The budget limit does not belong to the budget.');
|
||||
}
|
||||
$this->blRepository->destroyBudgetLimit($budgetLimit);
|
||||
app('preferences')->mark();
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
@@ -19,10 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
@@ -44,11 +46,10 @@ class ListController extends Controller
|
||||
|
||||
private BudgetLimitRepositoryInterface $blRepository;
|
||||
|
||||
|
||||
/**
|
||||
* BudgetLimitController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -65,8 +66,9 @@ class ListController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listTransactionByBudgetLimit
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
@@ -74,7 +76,7 @@ class ListController extends Controller
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function transactions(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
{
|
||||
|
@@ -19,6 +19,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
@@ -48,7 +50,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
* BudgetLimitController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -68,12 +70,16 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the budget limits for this budget..
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listBudgetLimitByBudget
|
||||
*
|
||||
* Display a listing of the budget limits for this budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function index(Request $request, Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -97,37 +103,15 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listBudgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function show(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
{
|
||||
if ((int)$budget->id !== (int)$budgetLimit->budget_id) {
|
||||
throw new FireflyException('20028: The budget limit does not belong to the budget.');
|
||||
}
|
||||
// continue!
|
||||
$manager = $this->getManager();
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new Item($budgetLimit, $transformer, 'budget_limits');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display a listing of the budget limits for this budget..
|
||||
* Display a listing of the budget limits for this budget.
|
||||
*
|
||||
* @param DateRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @codeCoverageIgnore
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function indexAll(DateRequest $request): JsonResponse
|
||||
{
|
||||
@@ -150,4 +134,31 @@ class ShowController extends Controller
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/getBudgetLimit
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function show(Request $request, Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
{
|
||||
if ((int)$budget->id !== (int)$budgetLimit->budget_id) {
|
||||
throw new FireflyException('20028: The budget limit does not belong to the budget.');
|
||||
}
|
||||
// continue!
|
||||
$manager = $this->getManager();
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new Item($budgetLimit, $transformer, 'budget_limits');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
}
|
@@ -19,12 +19,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Models\BudgetLimit;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Models\BudgetLimit\StoreRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface;
|
||||
use FireflyIII\Transformers\BudgetLimitTransformer;
|
||||
@@ -39,11 +39,10 @@ class StoreController extends Controller
|
||||
{
|
||||
private BudgetLimitRepositoryInterface $blRepository;
|
||||
|
||||
|
||||
/**
|
||||
* BudgetLimitController constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
@@ -60,15 +59,16 @@ class StoreController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/storeBudgetLimit
|
||||
*
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*
|
||||
*/
|
||||
public function store(StoreRequest $request, Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -79,8 +79,6 @@ class StoreController extends Controller
|
||||
|
||||
$budgetLimit = $this->blRepository->store($data);
|
||||
$manager = $this->getManager();
|
||||
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user