Compare commits
933 Commits
main
...
produzione
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faa808ca11 | ||
|
|
98086453f5 | ||
|
|
64e59c7441 | ||
|
|
880d05506b | ||
|
|
5e64d8f136 | ||
|
|
266afbaf19 | ||
|
|
dfb8d3c92d | ||
|
|
9d64036519 | ||
|
|
89f44f02d9 | ||
|
|
4aa0c42128 | ||
|
|
9ae2cb9489 | ||
|
|
9454c7bcd2 | ||
|
|
593430b2b7 | ||
|
|
ff0ef1b43a | ||
|
|
01064314f7 | ||
|
|
69345cd0bd | ||
|
|
32883ec09d | ||
|
|
1a99d5b09e | ||
|
|
15dd790d29 | ||
|
|
f255001de3 | ||
|
|
7cfc77bfe6 | ||
|
|
31d21b361b | ||
|
|
d11b0b3583 | ||
|
|
918bd0e3a7 | ||
|
|
ba53925244 | ||
|
|
73cea8e169 | ||
|
|
f8f92ef191 | ||
|
|
796c9826fe | ||
|
|
9e96f7e8d0 | ||
|
|
6f8b598bb3 | ||
|
|
538e703465 | ||
|
|
eec81993e0 | ||
|
|
13037a8598 | ||
|
|
509116c614 | ||
|
|
275bb9e382 | ||
|
|
df3937764f | ||
|
|
dfbf0c7884 | ||
|
|
cc7246b0cc | ||
|
|
90953f314b | ||
|
|
37180b87c2 | ||
|
|
f6aed85d9e | ||
|
|
e9f2d1a47a | ||
|
|
24ba24c2ff | ||
|
|
c1aedbfd29 | ||
|
|
1cdcab5544 | ||
|
|
a393e5c15e | ||
|
|
43b234c43b | ||
|
|
8be5aa975c | ||
|
|
d4d98c9a4e | ||
|
|
8f661a471c | ||
|
|
4dd6388953 | ||
|
|
3d0cf6547b | ||
|
|
a8c5ad7018 | ||
|
|
e1a09fc316 | ||
|
|
bc1df11e04 | ||
|
|
45f0874d8d | ||
|
|
a23ba35f5c | ||
|
|
e1124cd00f | ||
|
|
4c4fd88a8d | ||
|
|
36b7852194 | ||
|
|
397f3bcfd9 | ||
|
|
918bedbb96 | ||
|
|
e1d40e4f25 | ||
|
|
9024d69782 | ||
|
|
b847537416 | ||
|
|
71fa796487 | ||
|
|
1c4e577e64 | ||
|
|
14f5b113e2 | ||
|
|
ca02150723 | ||
|
|
114cdf8ea5 | ||
|
|
0130ad9c92 | ||
|
|
64ecadce59 | ||
|
|
0b4ec86cba | ||
|
|
d58bd30263 | ||
|
|
01d5c039cf | ||
|
|
e922b25403 | ||
|
|
ad4e1c7578 | ||
|
|
8253850c38 | ||
|
|
e97eaeb0cd | ||
|
|
21f8eacaf5 | ||
|
|
7b0d6212ac | ||
|
|
e507d32452 | ||
|
|
694e027640 | ||
|
|
e128715bd9 | ||
|
|
d7df0f23d1 | ||
|
|
83202a4c24 | ||
|
|
7d3b2a6b5a | ||
|
|
71a6ea7a10 | ||
|
|
dd8687271b | ||
|
|
b64936289d | ||
|
|
9a85e72e79 | ||
|
|
e7de0e4bea | ||
|
|
d707cd28e8 | ||
|
|
cadd052cb0 | ||
|
|
1554f7845c | ||
|
|
dcf91b8814 | ||
|
|
bf6ddbff92 | ||
|
|
0d7993b546 | ||
|
|
97175176a5 | ||
|
|
952db1caf1 | ||
|
|
b6c667876a | ||
|
|
17d9a2d090 | ||
|
|
4553d438ae | ||
|
|
96a323b75d | ||
|
|
23731a78d1 | ||
|
|
d4629e0c74 | ||
|
|
7a5568dac6 | ||
|
|
c4517b50a4 | ||
|
|
3f53be52ab | ||
|
|
fcbafe3730 | ||
|
|
865e941139 | ||
|
|
f2b3c8d006 | ||
|
|
0f8359f61e | ||
|
|
3d86b1b450 | ||
|
|
406961ba43 | ||
|
|
0d3f76855f | ||
|
|
d86f7088b9 | ||
|
|
ede83da4aa | ||
|
|
ba80a79557 | ||
|
|
7a64b527b3 | ||
|
|
852e9838e2 | ||
|
|
c74580af4b | ||
|
|
ceacf59278 | ||
|
|
755abea3be | ||
|
|
35bcab2621 | ||
|
|
1234385d9c | ||
|
|
7c9f731b39 | ||
|
|
4496847ab8 | ||
|
|
f08c28b464 | ||
|
|
6dba1e665b | ||
|
|
d428266f37 | ||
|
|
3bd805b383 | ||
|
|
36647c97e1 | ||
|
|
5206d6e731 | ||
|
|
9026104cb8 | ||
|
|
b47c3c3bf2 | ||
|
|
da3f82b650 | ||
|
|
2311655fab | ||
|
|
f9378a2a45 | ||
|
|
a2e01a998a | ||
|
|
bfbbf0e42d | ||
|
|
2a1f6e827f | ||
|
|
be2fadd822 | ||
|
|
fedc25df3d | ||
|
|
a17aa01295 | ||
|
|
42340d6d13 | ||
|
|
8b4adb8170 | ||
|
|
eab57b77be | ||
|
|
b51cececcc | ||
|
|
fe79c80c45 | ||
|
|
087a61ef96 | ||
|
|
88959f70c3 | ||
|
|
14ee7bab4a | ||
|
|
cb0c6bf8ad | ||
|
|
a3aec3028b | ||
|
|
1491c89004 | ||
|
|
91b8b98dc0 | ||
|
|
02263181bd | ||
|
|
2a8b9fe4ce | ||
|
|
26475c1a26 | ||
|
|
53a6d6663f | ||
|
|
4836dd8487 | ||
|
|
3f361e4e0b | ||
|
|
efdedba34b | ||
|
|
c011885d7a | ||
|
|
666703d6c8 | ||
|
|
2bb4cd359f | ||
|
|
3814902df7 | ||
|
|
3d6dbac2ff | ||
|
|
f7c48b0d73 | ||
|
|
166ba2476f | ||
|
|
062fb9ee52 | ||
|
|
f444ee8c6c | ||
|
|
a9d418624f | ||
|
|
ecb7be99f2 | ||
|
|
565487bfe4 | ||
|
|
5abc4f6b85 | ||
|
|
7bda99800c | ||
|
|
05f5229dba | ||
|
|
ba437b5f30 | ||
|
|
6482e29b46 | ||
|
|
b34b4f039c | ||
|
|
12950c6976 | ||
|
|
5e6eb6487b | ||
|
|
eff14375c3 | ||
|
|
aedeff7ad2 | ||
|
|
991d455abb | ||
|
|
13cd9373dc | ||
|
|
297bdf1e0d | ||
|
|
f4e411b0ab | ||
|
|
f326ef3bb3 | ||
|
|
1631b32fc3 | ||
|
|
9e45e7695e | ||
|
|
2a67777f94 | ||
|
|
30f7267780 | ||
|
|
280a62b8d6 | ||
|
|
ea8b724e19 | ||
|
|
456fa7fe72 | ||
|
|
d2e7f13500 | ||
|
|
d3bee37a5b | ||
|
|
053bacad3e | ||
|
|
a1db5e1189 | ||
|
|
1f69c63248 | ||
|
|
6c6917ece0 | ||
|
|
264a05bbb8 | ||
|
|
ec9d3d83e5 | ||
|
|
79f2ff2e00 | ||
|
|
596a0d6fef | ||
|
|
adf56d7a29 | ||
|
|
37febf0c41 | ||
|
|
fcbcd4f338 | ||
|
|
0dc1d1f50c | ||
|
|
6704ad25fe | ||
|
|
9266bb4a22 | ||
|
|
7162958252 | ||
|
|
2e6d4b7251 | ||
|
|
14ed85e60e | ||
|
|
8b9a4fdddf | ||
|
|
3575a275de | ||
|
|
59539b2fab | ||
|
|
b641999fcd | ||
|
|
62e76d3613 | ||
|
|
68811f31b2 | ||
|
|
32eb5ac9b6 | ||
|
|
16a42d1ba8 | ||
|
|
42744fa7de | ||
|
|
6a6d95c9c0 | ||
|
|
d8d11377fc | ||
|
|
3ed63696c4 | ||
|
|
20e59f1156 | ||
|
|
947e3a1288 | ||
|
|
2c3aca157d | ||
|
|
a8cdad1825 | ||
|
|
d2d1273e3d | ||
|
|
8333a820e3 | ||
|
|
928de35282 | ||
|
|
ac5e6238aa | ||
|
|
08573ba1c0 | ||
|
|
e018cc8425 | ||
|
|
007388936a | ||
|
|
9b5875f022 | ||
|
|
076ded30f9 | ||
|
|
919b510f48 | ||
|
|
36e3eb3ede | ||
|
|
d00ac3f247 | ||
|
|
bf7d4e7196 | ||
|
|
6b1f4648ef | ||
|
|
81149f570a | ||
|
|
907dedfece | ||
|
|
6963e8bd6b | ||
|
|
7ab7eac4cd | ||
|
|
dca956239f | ||
|
|
7d7f7b8e37 | ||
|
|
70f32d19f2 | ||
|
|
fa5486e0e9 | ||
|
|
b58d168e85 | ||
|
|
378d200453 | ||
|
|
b9bb7749c7 | ||
|
|
027cc49c75 | ||
|
|
16d97e20eb | ||
|
|
0dd5032b8f | ||
|
|
82c49051cb | ||
|
|
56e6f3d4c5 | ||
|
|
edca31cbbc | ||
|
|
377714954b | ||
|
|
c05cf28ca9 | ||
|
|
e19e0252fb | ||
|
|
db3f46dfba | ||
|
|
255597a3f1 | ||
|
|
bafa5dbb2c | ||
|
|
6a7f99e967 | ||
|
|
a976a4a914 | ||
|
|
f0fca214e4 | ||
|
|
71729e2aed | ||
|
|
5601d9fad9 | ||
|
|
1de6f7127a | ||
|
|
acd626267a | ||
|
|
1b0d6a191c | ||
|
|
7cb131efb5 | ||
|
|
7e760e906b | ||
|
|
d9b67f5f7d | ||
|
|
07a0067daa | ||
|
|
235979f0ff | ||
|
|
f1a9640c46 | ||
|
|
8042151ee8 | ||
|
|
14ad79f5d2 | ||
|
|
ef7bb1eaa3 | ||
|
|
0803825806 | ||
|
|
68abd64bd9 | ||
|
|
4aa31ed09a | ||
|
|
5a8eb2ed55 | ||
|
|
b0d7e1e133 | ||
|
|
93d1bce2e4 | ||
|
|
8cd310792d | ||
|
|
c317f07b5f | ||
|
|
ec0892def9 | ||
|
|
4e285d2ebc | ||
|
|
82ae3bf2fc | ||
|
|
a323a2ffa7 | ||
|
|
a9c8c4e74a | ||
|
|
ce709a9836 | ||
|
|
da4f48b83c | ||
|
|
07da21eaa4 | ||
|
|
214514091e | ||
|
|
2f8546c7ca | ||
|
|
77540f1768 | ||
|
|
35aac62976 | ||
|
|
36846c02b2 | ||
|
|
135690c2a0 | ||
|
|
d0fcb0baa3 | ||
|
|
79b9052d83 | ||
|
|
293fc39a2a | ||
|
|
2fb25eab78 | ||
|
|
6a41cd641c | ||
|
|
fcfcfe78e3 | ||
|
|
75b28cd967 | ||
|
|
8b935f117e | ||
|
|
ee514d8e4b | ||
|
|
b22d303680 | ||
|
|
0c73a1181d | ||
|
|
01028f60f3 | ||
|
|
24cf266a03 | ||
|
|
201c70ca15 | ||
|
|
8c8f4fe8cc | ||
|
|
b7d131ed96 | ||
|
|
fa450fafe6 | ||
|
|
b40bb375aa | ||
|
|
64ce42de62 | ||
|
|
880a84ab69 | ||
|
|
88e638b146 | ||
|
|
5be4d71498 | ||
|
|
c5e76275e8 | ||
|
|
1dc4f2e7ba | ||
|
|
73de034024 | ||
|
|
be766fc888 | ||
|
|
0371df938a | ||
|
|
408c747372 | ||
|
|
cc8be8921a | ||
|
|
934fae779f | ||
|
|
b8ee13a297 | ||
|
|
f09c4550e7 | ||
|
|
f9ca2f927f | ||
|
|
83c88be38a | ||
|
|
54abae77d1 | ||
|
|
08622480e3 | ||
|
|
b95135f12b | ||
|
|
b30cf7d2e7 | ||
|
|
80c327e935 | ||
|
|
372e8ac3bf | ||
|
|
2e675bd295 | ||
|
|
5b939b32fe | ||
|
|
30cdeb75d5 | ||
|
|
79adc61efc | ||
|
|
39886b8131 | ||
|
|
371f10b8bb | ||
|
|
c3c41bd1e7 | ||
|
|
cdf3ed84f2 | ||
|
|
e159ecc527 | ||
|
|
eea736eaf2 | ||
|
|
ae2bb55f7c | ||
|
|
5f023c1e4e | ||
|
|
2d125c269a | ||
|
|
c563c06f89 | ||
|
|
88bd28ab3d | ||
|
|
b37b403e35 | ||
|
|
754842e004 | ||
|
|
6ebca7102d | ||
|
|
84b252b436 | ||
|
|
422a454ffd | ||
|
|
6afdec9747 | ||
|
|
d08403479d | ||
|
|
fea9b335c9 | ||
|
|
69729a07cf | ||
|
|
6a7ab3ec86 | ||
|
|
5aa5f1254d | ||
|
|
671173ecd4 | ||
|
|
e877e7096e | ||
|
|
46fafb5c78 | ||
|
|
946764f753 | ||
|
|
03eea7a609 | ||
|
|
42c0a51b7f | ||
|
|
cb10e07142 | ||
|
|
1661d07a1d | ||
|
|
239475afde | ||
|
|
886b42a681 | ||
|
|
9b84559466 | ||
|
|
b5e817d815 | ||
|
|
4729568474 | ||
|
|
0d57fd1b6f | ||
|
|
0636e17e11 | ||
|
|
4f8aa1917f | ||
|
|
c49cc5b2c3 | ||
|
|
9cad2e0f06 | ||
|
|
8db229021b | ||
|
|
869ce2b322 | ||
|
|
e19b2d748c | ||
|
|
9750e8d00d | ||
|
|
5202ad59a8 | ||
|
|
a6d456a064 | ||
|
|
20317dbf82 | ||
|
|
2f533fed74 | ||
|
|
7eb0b68f13 | ||
|
|
02df669d37 | ||
|
|
b9568c9517 | ||
|
|
c6380165fc | ||
|
|
19ff4dda48 | ||
|
|
bff846a77d | ||
|
|
04747b8b69 | ||
|
|
4f889d9330 | ||
|
|
c1678f9755 | ||
|
|
4828052224 | ||
|
|
ed314a2d93 | ||
|
|
9a0b9d69d1 | ||
|
|
f023b77c84 | ||
|
|
88f3efd668 | ||
|
|
30b975faab | ||
|
|
81b06cd2ad | ||
|
|
6912ff7ea3 | ||
|
|
88d417bf7a | ||
|
|
e92186c803 | ||
|
|
7cfeeb12b2 | ||
|
|
4d10166799 | ||
|
|
c943a355ef | ||
|
|
4c72444b17 | ||
|
|
a715862c68 | ||
|
|
c22fd7d3ed | ||
|
|
38e1d422dd | ||
|
|
12186e3ff7 | ||
|
|
2e4d958f6c | ||
|
|
e95a3a6a67 | ||
|
|
70360006d7 | ||
|
|
64e1cb8f37 | ||
|
|
b3a858866d | ||
|
|
5d7679f1fa | ||
|
|
25456127be | ||
|
|
ee1917ef61 | ||
|
|
8bb50657b5 | ||
|
|
e796d76612 | ||
|
|
deb8472fd3 | ||
|
|
3e480c5b7e | ||
|
|
a1ad996bf8 | ||
|
|
07840476c1 | ||
|
|
fe7fc8efbc | ||
|
|
43547d1e20 | ||
|
|
1bbb23088d | ||
|
|
9926562f03 | ||
|
|
92ead17e22 | ||
|
|
ff4ca1a7ae | ||
|
|
99bbc4ed13 | ||
|
|
58c759753d | ||
|
|
19bac3aebb | ||
|
|
59f114f167 | ||
|
|
4a433121b9 | ||
|
|
982308e102 | ||
|
|
d35c52a862 | ||
|
|
2c38001843 | ||
|
|
91e3cb9867 | ||
|
|
d148b92d1c | ||
|
|
487c19b6b2 | ||
|
|
3ac8f25ab9 | ||
|
|
c571be5104 | ||
|
|
38933e0e2b | ||
|
|
3690054e94 | ||
|
|
1d728ff5fd | ||
|
|
b127621b0b | ||
|
|
f856f4b1a4 | ||
|
|
63f28094bb | ||
|
|
8b9ae58e29 | ||
|
|
f4e8e34e88 | ||
|
|
f53172bdf8 | ||
|
|
79695e9046 | ||
|
|
355f86980b | ||
|
|
840226f0b8 | ||
|
|
9ba51299de | ||
|
|
5db23f1f7a | ||
|
|
a9749c92fe | ||
|
|
8eb2044cfd | ||
|
|
e4ddd4eae5 | ||
|
|
ea4e9afd04 | ||
|
|
165fabf13c | ||
|
|
bbe01cf1ab | ||
|
|
0c8bd8fb30 | ||
|
|
991760ef94 | ||
|
|
540ba0fb0b | ||
|
|
6552703945 | ||
|
|
451b6fdeed | ||
|
|
04ad951bc8 | ||
|
|
550712acb6 | ||
|
|
9df0e3a51b | ||
|
|
207886d042 | ||
|
|
77404771d9 | ||
|
|
ea5fb1c002 | ||
|
|
7126a806d0 | ||
|
|
576098d289 | ||
|
|
3e6cfb2d95 | ||
|
|
32cb2e4044 | ||
|
|
693e1ac6be | ||
|
|
fbd12b5f2c | ||
|
|
ea0e2dde26 | ||
|
|
b8e20f0ca6 | ||
|
|
ca912d34d7 | ||
|
|
91aadaa658 | ||
|
|
e769bff44a | ||
|
|
013e970ba0 | ||
|
|
392900e3d5 | ||
|
|
2c327ec959 | ||
|
|
cb7dbe484c | ||
|
|
7c4aa34315 | ||
|
|
a55616318d | ||
|
|
d3480ee6be | ||
|
|
8aa4b7c4da | ||
|
|
892c43d0f1 | ||
|
|
d2837b79cf | ||
|
|
664330cd13 | ||
|
|
bb7cabe962 | ||
|
|
ca8c01ed4c | ||
|
|
e4700e5eed | ||
|
|
b3fa2abd0f | ||
|
|
8240a2d659 | ||
|
|
56be10f567 | ||
|
|
56642083ee | ||
|
|
8db1126bb1 | ||
|
|
9d3ae826ae | ||
|
|
cb3a567e56 | ||
|
|
c11bebeed0 | ||
|
|
a672084641 | ||
|
|
81668e7e29 | ||
|
|
cbcba94734 | ||
|
|
ef63b91ea9 | ||
|
|
b2ea354975 | ||
|
|
f718b842cd | ||
|
|
0575425266 | ||
|
|
9163515df5 | ||
|
|
4a399caaf6 | ||
|
|
8c1b4460c4 | ||
|
|
f12c13dd5f | ||
|
|
911c3e0853 | ||
|
|
44de8a64d2 | ||
|
|
0f7ab9da34 | ||
|
|
60631d77fe | ||
|
|
109efb65e2 | ||
|
|
feccee7b9c | ||
|
|
a4857bc80e | ||
|
|
17b9ad0001 | ||
|
|
829f7f6153 | ||
|
|
fd0ebfe54e | ||
|
|
5c2db90c21 | ||
|
|
e10a882d59 | ||
|
|
40233f805e | ||
|
|
ca95344bcb | ||
|
|
b49048aba8 | ||
|
|
0323801388 | ||
|
|
cab2b51119 | ||
|
|
d92fbeb9fb | ||
|
|
d2991e5cfe | ||
|
|
14549d351d | ||
|
|
1d56bedd75 | ||
|
|
9d8159837e | ||
|
|
163c8abd5c | ||
|
|
bd65cad63f | ||
|
|
49a6e44363 | ||
|
|
a925a90605 | ||
|
|
6029c50d89 | ||
|
|
33299e6206 | ||
|
|
760b0da5fa | ||
|
|
8a8e444e30 | ||
|
|
ba91b1dfad | ||
|
|
3d6be4f700 | ||
|
|
9624eee376 | ||
|
|
e0f6e0340e | ||
|
|
d342ccc9a5 | ||
|
|
1f1e0afdeb | ||
|
|
9c6a94d76b | ||
|
|
4fc12d3e96 | ||
|
|
0b6e5f1af3 | ||
|
|
965c997d30 | ||
|
|
4a306f0c15 | ||
|
|
3fd13a7afb | ||
|
|
f3dffa2d11 | ||
|
|
c8a66e3274 | ||
|
|
cafa37c955 | ||
|
|
e31decc10b | ||
|
|
da8c6f1853 | ||
|
|
04f98608c3 | ||
|
|
ef2d1573e5 | ||
|
|
728848c202 | ||
|
|
571a8a923d | ||
|
|
ac3f552dfe | ||
|
|
7d56319173 | ||
|
|
1d076d87fb | ||
|
|
de23e4b4b1 | ||
|
|
ae8327800f | ||
|
|
ab1144c659 | ||
|
|
710a7ec101 | ||
|
|
d570b477a7 | ||
|
|
80c6c7518a | ||
|
|
ae63616f36 | ||
|
|
93d6aefc30 | ||
|
|
be52a2945b | ||
|
|
aef1e7665d | ||
|
|
861f64d047 | ||
|
|
741bd08392 | ||
|
|
d7ae2aa8cc | ||
|
|
cfedb20cf5 | ||
|
|
5eb6c08975 | ||
|
|
f6c6cf6448 | ||
|
|
4b3e1f0233 | ||
|
|
44f3bd3f5f | ||
|
|
e8410b0cf8 | ||
|
|
73bf0d22f3 | ||
|
|
2d87f80878 | ||
|
|
886366c587 | ||
|
|
61f99bf3e4 | ||
|
|
94e8da2f89 | ||
|
|
7f43ac18b5 | ||
|
|
ff5d57075c | ||
|
|
561fe8e3e5 | ||
|
|
1185df5769 | ||
|
|
bab1bd79ba | ||
|
|
00b7f61cab | ||
|
|
fa40de1340 | ||
|
|
bffa4ce00d | ||
|
|
d492b76d8f | ||
|
|
758afe83a0 | ||
|
|
b7ff7aed82 | ||
|
|
71a52093bd | ||
|
|
01e158edac | ||
|
|
e43df1496c | ||
|
|
097715de71 | ||
|
|
97ebf5331e | ||
|
|
60ec6d512e | ||
|
|
5514de2f82 | ||
|
|
24ec5dc21b | ||
|
|
d45ad25e06 | ||
|
|
c94330cadd | ||
|
|
846e569f32 | ||
|
|
e201146b7d | ||
|
|
865c0b8b9e | ||
|
|
41c108d1d2 | ||
|
|
0dd72f04a0 | ||
|
|
752599bde5 | ||
|
|
44e72306ba | ||
|
|
4d2495ec23 | ||
|
|
499f359c6e | ||
|
|
25c1b0ebb9 | ||
|
|
f14ca4a031 | ||
|
|
34aa2b26ef | ||
|
|
1824f30a94 | ||
|
|
0382fd15ab | ||
|
|
89e0bdb153 | ||
|
|
fe6fc93da6 | ||
|
|
8d8fa1d024 | ||
|
|
65ffbb7076 | ||
|
|
2e27f28607 | ||
|
|
1751a0e718 | ||
|
|
861d7b473e | ||
|
|
0b7d2d4dca | ||
|
|
0a8dfa73ee | ||
|
|
c90b12aef6 | ||
|
|
8feca4652b | ||
|
|
05e6e7113a | ||
|
|
bcd72f544e | ||
|
|
f903d2c7ad | ||
|
|
c5d22f24ac | ||
|
|
0fd3e067e4 | ||
|
|
cb3eb3e5ca | ||
|
|
7282d22b5a | ||
|
|
9641943abd | ||
|
|
5ba85587e9 | ||
|
|
041e1c1287 | ||
|
|
d102d6badd | ||
|
|
066953c7c3 | ||
|
|
7600fbf2dc | ||
|
|
3b078253db | ||
|
|
691df7f931 | ||
|
|
cdd053a624 | ||
|
|
6a5b237bf6 | ||
|
|
c6a7bf9102 | ||
|
|
6c3f2fb9ae | ||
|
|
c33d1d3573 | ||
|
|
5ddd43411e | ||
|
|
38e5e554a3 | ||
|
|
2216d5435a | ||
|
|
bdfb700c9d | ||
|
|
e9635e22a7 | ||
|
|
e64ab21835 | ||
|
|
fe56a63d0a | ||
|
|
838a3252dc | ||
|
|
8396110d2e | ||
|
|
e6caa57281 | ||
|
|
b51fa906ca | ||
|
|
186877b9ba | ||
|
|
4b47528ee5 | ||
|
|
d1f8d3fbe0 | ||
|
|
c53543f8d7 | ||
|
|
967408c39b | ||
|
|
6f2ee60f4b | ||
|
|
829c8c64cd | ||
|
|
41ac862eb6 | ||
|
|
24b77a2b99 | ||
|
|
d8b017f188 | ||
|
|
d85ba67350 | ||
|
|
62d4d75201 | ||
|
|
03f072d03b | ||
|
|
cfe41c93c5 | ||
|
|
1a11c06c7d | ||
|
|
249445766e | ||
|
|
24004e282e | ||
|
|
c36c900077 | ||
|
|
3d11f604a9 | ||
|
|
af9f5a2af2 | ||
|
|
7d6578e210 | ||
|
|
12202b8241 | ||
|
|
48130917c2 | ||
|
|
f2f39b6ace | ||
|
|
78d957cea5 | ||
|
|
46267efe74 | ||
|
|
dfa1e73135 | ||
|
|
758ff1fd1c | ||
|
|
04b485d19c | ||
|
|
79ae9c1573 | ||
|
|
94b65b3737 | ||
|
|
a569040149 | ||
|
|
6f38988eb9 | ||
|
|
8ee685e4a5 | ||
|
|
0ee373b2ce | ||
|
|
552bd169ee | ||
|
|
8bbe34fd0d | ||
|
|
86045b39dc | ||
|
|
367baa2673 | ||
|
|
ce8a68a727 | ||
|
|
72bdca9cf2 | ||
|
|
fd4daa0785 | ||
|
|
309892c7fb | ||
|
|
01f90df918 | ||
|
|
3153c155f8 | ||
|
|
e44cec7aa3 | ||
|
|
b08ba09c78 | ||
|
|
210806f35c | ||
|
|
39a5c120b8 | ||
|
|
be3c830afe | ||
|
|
3d72295adb | ||
|
|
65aac0a2c5 | ||
|
|
387ebe6e8b | ||
|
|
f88292dd34 | ||
|
|
c0129fde10 | ||
|
|
8f8cc98620 | ||
|
|
f1fd2e51fe | ||
|
|
4e3184c0f1 | ||
|
|
98c23ed2c6 | ||
|
|
5476198a1b | ||
|
|
fb687d0c4c | ||
|
|
f0e7a862b3 | ||
|
|
d878174cae | ||
|
|
efd137697f | ||
|
|
401b0d1e14 | ||
|
|
a72b9a9fe0 | ||
|
|
43e28a148a | ||
|
|
58e7c61a76 | ||
|
|
f9d362bad9 | ||
|
|
0b9f448fee | ||
|
|
0247b93466 | ||
|
|
764f906d2b | ||
|
|
9af652d62c | ||
|
|
95e0ace09f | ||
|
|
7faad73d8d | ||
|
|
3e6c059356 | ||
|
|
bca703a4f5 | ||
|
|
41320b5b36 | ||
|
|
4e95f7fef1 | ||
|
|
0b788c21b5 | ||
|
|
8afbfff154 | ||
|
|
43bddcaada | ||
|
|
abca889fc0 | ||
|
|
7ea01d7b35 | ||
|
|
024144a942 | ||
|
|
a983293991 | ||
|
|
da69735eda | ||
|
|
b3ceb38b85 | ||
|
|
6436fc04c8 | ||
|
|
e68d461b1b | ||
|
|
82c40bc5e0 | ||
|
|
829d274db2 | ||
|
|
03fa01a1bb | ||
|
|
ae36a4a2c1 | ||
|
|
dd707f446f | ||
|
|
954b5f46ab | ||
|
|
5707ad0fe2 | ||
|
|
9959248cc9 | ||
|
|
d8d1b4e8a8 | ||
|
|
e3c3d3889f | ||
|
|
5b3fbc27b8 | ||
|
|
b665cd4ba6 | ||
|
|
4504d81a61 | ||
|
|
1583700dec | ||
|
|
3ff6351bbd | ||
|
|
8af594ff7b | ||
|
|
fb0d20449c | ||
|
|
8cebb0e978 | ||
|
|
b41e42ed0a | ||
|
|
9569e9273a | ||
|
|
3a38c0fb16 | ||
|
|
e69f9d4b84 | ||
|
|
97699d9f54 | ||
|
|
5488460e3d | ||
|
|
ad49e1382b | ||
|
|
3fe5064991 | ||
|
|
b95667d8b0 | ||
|
|
35b6980b44 | ||
|
|
b7e1a5458c | ||
|
|
479ec7ed34 | ||
|
|
5dd1113f52 | ||
|
|
00d3ae6d55 | ||
|
|
9a3fc450f0 | ||
|
|
09b661e4fe | ||
|
|
f5c88ec54d | ||
|
|
d7de52814d | ||
|
|
e83b7d213e | ||
|
|
23c08749a0 | ||
|
|
86d8402954 | ||
|
|
2f69a4f182 | ||
|
|
efdd9a098c | ||
|
|
62153977b4 | ||
|
|
bfde61db35 | ||
|
|
85359d314b | ||
|
|
19bb990f5b | ||
|
|
f6cac2e839 | ||
|
|
f804828edc | ||
|
|
18d956fc87 | ||
|
|
f4bf1f5911 | ||
|
|
303a1269a7 | ||
|
|
06b0a02168 | ||
|
|
e3b0517f93 | ||
|
|
c00feb1ef9 | ||
|
|
8775422afc | ||
|
|
31326323c9 | ||
|
|
d9d66c705e | ||
|
|
9e8755a627 | ||
|
|
c02dd863a1 | ||
|
|
fc4d0d3924 | ||
|
|
242114a120 | ||
|
|
574c94e9e8 | ||
|
|
d8cee832c2 | ||
|
|
b773805b60 | ||
|
|
7d38d99ac1 | ||
|
|
1d0aa56569 | ||
|
|
9efa712761 | ||
|
|
63f0febaff | ||
|
|
a62b8ff112 | ||
|
|
627b50038e | ||
|
|
319153f125 | ||
|
|
501809f74a | ||
|
|
8c88310cad | ||
|
|
45dfb6af0e | ||
|
|
5952b5530b | ||
|
|
4fd4a46a09 | ||
|
|
9545c9ee43 | ||
|
|
38b41b6fe4 | ||
|
|
1b07b62e85 | ||
|
|
8eb99ef9f1 | ||
|
|
59d1812c36 | ||
|
|
761fa1ec49 | ||
|
|
e93e1f06ab | ||
|
|
ff3e978209 | ||
|
|
2c30a953b7 | ||
|
|
13d8f34c5f | ||
|
|
550e4f085c | ||
|
|
679fd174f0 | ||
|
|
81a90fdda7 | ||
|
|
6746cfec48 | ||
|
|
73e6e6f612 | ||
|
|
2bf5d24cf5 | ||
|
|
ec1c587556 | ||
|
|
fd4495cd63 | ||
|
|
575afc090a | ||
|
|
60ab435ac1 | ||
|
|
60735c9658 | ||
|
|
abe84bcd01 | ||
|
|
d4acaa6ddb | ||
|
|
5943ef969e | ||
|
|
7cb43e1a20 | ||
|
|
18de78ce93 | ||
|
|
23f5fcd25c | ||
|
|
4efadb137f | ||
|
|
17f3d02c64 | ||
|
|
f48954f32d | ||
|
|
046487062c | ||
|
|
a64db56f6b | ||
|
|
1b77e57224 | ||
|
|
21e590a301 | ||
|
|
6f83b4b68c | ||
|
|
ec201d75b2 | ||
|
|
7c5e892ead | ||
|
|
0fbf20deb9 | ||
|
|
4ac62108b5 | ||
|
|
197509e8f1 | ||
|
|
6086868f22 | ||
|
|
b8d8ff0f51 | ||
|
|
37cc797f2f | ||
|
|
a68547ec00 | ||
|
|
64f2935058 | ||
|
|
fd62bb9f86 | ||
|
|
5a0423e73c | ||
|
|
c4c9ee6f95 | ||
|
|
529128dc1a | ||
|
|
53abcd9d34 | ||
|
|
54ad5e8863 | ||
|
|
ada35fd5b3 | ||
|
|
788a25a74c | ||
|
|
1a008371ef | ||
|
|
30f5312e66 | ||
|
|
97edb40bee | ||
|
|
64e4de6a6a | ||
|
|
b0f9d83dca | ||
|
|
a00255d769 | ||
|
|
caec2d70f5 | ||
|
|
5ab0793d98 | ||
|
|
1f04085006 | ||
|
|
0ce4a72e9d | ||
|
|
2ac051eedb | ||
|
|
0a97b7fe3b | ||
|
|
dcf29f114b | ||
|
|
0ce8a96097 | ||
|
|
6796bcfcc4 | ||
|
|
6454d1b8ca | ||
|
|
ced0015046 | ||
|
|
8e5e9008e4 | ||
|
|
e36f1bd0c4 | ||
|
|
b7139981ba | ||
|
|
6dff459d4a | ||
|
|
6fbfc69558 | ||
|
|
ba11808781 | ||
|
|
bd791e780b |
@@ -2,10 +2,10 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
90
.env
Normal file
90
.env
Normal file
@@ -0,0 +1,90 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:In/xUaJmPeC1fPpefXi5jV14aHoyjaxVUgqGpJIobf4=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://apimacro.test
|
||||
|
||||
LOG_CHANNEL=daily
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlsrv
|
||||
DB_HOST=31.3.180.50
|
||||
DB_PORT=14338
|
||||
DB_DATABASE=ANAG_MACRO
|
||||
DB_USERNAME=woo
|
||||
DB_PASSWORD=4n4traPe@
|
||||
DB_ENCRYPT=no
|
||||
DB_TRUST_SERVER_CERTIFICATE=no
|
||||
|
||||
#DB_CONNECTION=sqlsrv
|
||||
DB_HOST_SQLSRVTEST=31.3.180.50
|
||||
DB_PORT_SQLSRVTEST=14338
|
||||
DB_DATABASE_SQLSRVTEST=ANAG_MACRO
|
||||
DB_USERNAME_SQLSRVTEST=woo
|
||||
DB_PASSWORD_SQLSRVTEST=4n4traPe@
|
||||
|
||||
DB_DATABASE_MYSQL=nimaia
|
||||
DB_USERNAME_MYSQL=vps_macro
|
||||
DB_PASSWORD_MYSQL=234ffGT-
|
||||
|
||||
DB_DATABASE_MYSQL1=test_order
|
||||
DB_USERNAME_MYSQL1=vps_macro
|
||||
DB_PASSWORD_MYSQL1=234ffGT-
|
||||
|
||||
DB_DATABASE_MYSQL2=appoggio
|
||||
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
#MAIL_MAILER=sendmail
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtps.aruba.it
|
||||
MAIL_PORT=465
|
||||
MAIL_USERNAME=log@fioredellavita.it
|
||||
MAIL_PASSWORD=Server@22
|
||||
MAIL_ENCRYPTION=ssl
|
||||
MAIL_FROM_ADDRESS=log@fioredellavita.it
|
||||
MAIL_FROM_NAME="Fiore della Vita"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
WORDPRESS_HOST="fioredellavitait.mydb-aruba.it"
|
||||
WORDPRESS_port="3306"
|
||||
WORDPRESS_DBNAME="Swp1583057-prod"
|
||||
WORDPRESS_USER="Swp1583057"
|
||||
WORDPRESS_PWD="7826702z21"
|
||||
|
||||
WOOCOMMERCE_STORE_URL=https://www.fioredellavita.it/
|
||||
#WOOCOMMERCE_STORE_URL=https://staging.fioredellavita.it/
|
||||
#OLD_WOOCOMMERCE_CONSUMER_KEY=ck_311bcafeda40fbfc2f6d4201c04274bd4584efdc
|
||||
#OLD_WOOCOMMERCE_CONSUMER_SECRET=cs_58d4c50f13eab05978ae6ca519b6ae434acf98e1
|
||||
WOOCOMMERCE_CONSUMER_KEY=ck_6ea08b2d1cd16883e8ec19f7ce31fc465e7cdec3
|
||||
WOOCOMMERCE_CONSUMER_SECRET=cs_c21f786163f49a3853e1c4e95d46e1d0f15761cd
|
||||
WOOCOMMERCE_WP_HEADER_TOTAL=x-wp-total
|
||||
WOOCOMMERCE_WP_HEADER_TOTAL_PAGES=x-wp-totalpages
|
||||
WOOCOMMERCE_TIMEOUT=0
|
||||
|
||||
API_KEY_MSSQL="m68yADSr123MIVIDA@154$DSAGVOK"
|
||||
46
.env.example
Normal file
46
.env.example
Normal file
@@ -0,0 +1,46 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
80
.env_prod
Normal file
80
.env_prod
Normal file
@@ -0,0 +1,80 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=base64:In/xUaJmPeC1fPpefXi5jV14aHoyjaxVUgqGpJIobf4=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://apimacro.test
|
||||
|
||||
LOG_CHANNEL=daily
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlsrv
|
||||
DB_HOST=31.3.180.50
|
||||
DB_PORT=14338
|
||||
DB_DATABASE=ANAG_MACRO
|
||||
DB_USERNAME=woo
|
||||
DB_PASSWORD=4n4traPe@
|
||||
DB_OPTIONS='{"Encrypt": true, "TrustServerCertificate": true}'
|
||||
|
||||
#DB_CONNECTION=sqlsrv
|
||||
DB_HOST_SQLSRVTEST=31.3.180.50
|
||||
DB_PORT_SQLSRVTEST=14338
|
||||
DB_DATABASE_SQLSRVTEST=ANAG_MACRO
|
||||
DB_USERNAME_SQLSRVTEST=woo
|
||||
DB_PASSWORD_SQLSRVTEST=4n4traPe@
|
||||
|
||||
DB_DATABASE_MYSQL=nimaia
|
||||
DB_USERNAME_MYSQL=vps_macro
|
||||
DB_PASSWORD_MYSQL=234ffGT-
|
||||
|
||||
DB_DATABASE_MYSQL1=test_order
|
||||
DB_USERNAME_MYSQL1=vps_macro
|
||||
DB_PASSWORD_MYSQL1=234ffGT-
|
||||
|
||||
DB_DATABASE_MYSQL2=appoggio
|
||||
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
#MAIL_MAILER=sendmail
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtps.aruba.it
|
||||
MAIL_PORT=465
|
||||
MAIL_USERNAME=log@fioredellavita.it
|
||||
MAIL_PASSWORD=Server@22
|
||||
MAIL_ENCRYPTION=ssl
|
||||
MAIL_FROM_ADDRESS=log@fioredellavita.it
|
||||
MAIL_FROM_NAME="Fiore della Vita"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
|
||||
WOOCOMMERCE_STORE_URL=https://www.fioredellavita.it/
|
||||
#WOOCOMMERCE_STORE_URL=https://staging.fioredellavita.it/
|
||||
WOOCOMMERCE_CONSUMER_KEY=ck_6ea08b2d1cd16883e8ec19f7ce31fc465e7cdec3
|
||||
WOOCOMMERCE_CONSUMER_SECRET=cs_c21f786163f49a3853e1c4e95d46e1d0f15761cd
|
||||
WOOCOMMERCE_WP_HEADER_TOTAL=x-wp-total
|
||||
WOOCOMMERCE_WP_HEADER_TOTAL_PAGES=x-wp-totalpages
|
||||
WOOCOMMERCE_TIMEOUT=0
|
||||
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
CHANGELOG.md export-ignore
|
||||
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/storage/logs/*
|
||||
/vendor
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
*.zip
|
||||
tests/.DS_Store
|
||||
resources/.DS_Store
|
||||
storage/.DS_Store
|
||||
database/.DS_Store
|
||||
app/.DS_Store
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
DEADJOE
|
||||
composer.lock
|
||||
13
.styleci.yml
Normal file
13
.styleci.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
php:
|
||||
preset: laravel
|
||||
disabled:
|
||||
- unused_use
|
||||
finder:
|
||||
not-name:
|
||||
- index.php
|
||||
- server.php
|
||||
js:
|
||||
finder:
|
||||
not-name:
|
||||
- webpack.mix.js
|
||||
css: true
|
||||
42
DEADJOE
Executable file
42
DEADJOE
Executable file
@@ -0,0 +1,42 @@
|
||||
|
||||
*** These modified files were found in JOE when it aborted on Fri May 10 17:33:06 2024
|
||||
*** JOE was aborted because the terminal closed
|
||||
|
||||
*** File '(Unnamed)'
|
||||
q
|
||||
|
||||
*** File '(Unnamed)'
|
||||
/var/www/html/apimacro/.git/COMMIT_EDITMSG
|
||||
|
||||
*** File '/var/www/html/apimacro/.git/COMMIT_EDITMSG'
|
||||
|
||||
# Please enterq!:Qq theqqqq commit message for your changes. Lines starting
|
||||
# with '#' will be ignored, and an empty message aborts the commit.
|
||||
#
|
||||
# Committer: root <root@vps-88271abb.vps.ovh.net>
|
||||
#
|
||||
# On branch produzione
|
||||
# Your branch is up to date with 'origin/produzione'.
|
||||
#
|
||||
# Changes to be committed:
|
||||
# modified: app/Console/Commands/ProductUpdateGm.php
|
||||
# modified: app/Console/Commands/ProductUpdateUsedGm.php
|
||||
# modified: routes/web.php
|
||||
# modified: server.php
|
||||
#
|
||||
# Untracked files:
|
||||
# .editorconfig
|
||||
# .env.example
|
||||
# .gitattributes
|
||||
# .gitignore
|
||||
# .styleci.yml
|
||||
# README.md
|
||||
# storage/
|
||||
#
|
||||
:q!
|
||||
|
||||
*** File '* Startup Log *'
|
||||
Processing '/etc/joe/editorrc'...
|
||||
Processing '/etc/joe/ftyperc'...
|
||||
Finished processing /etc/joe/ftyperc
|
||||
Finished processing /etc/joe/editorrc
|
||||
61
README.md
Executable file
61
README.md
Executable file
@@ -0,0 +1,61 @@
|
||||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[Many](https://www.many.co.uk)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- **[OP.GG](https://op.gg)**
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
10
aggiorna.sh
Executable file
10
aggiorna.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/apimacro
|
||||
|
||||
{
|
||||
echo "Output di git fetch:"
|
||||
sudo git fetch
|
||||
echo "Output di git pull:"
|
||||
sudo git pull
|
||||
} 2>&1 # Cattura anche gli errori
|
||||
113
app/Article.php
Normal file → Executable file
113
app/Article.php
Normal file → Executable file
@@ -8,74 +8,65 @@ class Article extends Model
|
||||
{
|
||||
protected $table = 'T_WEB_Articoli';
|
||||
|
||||
/*
|
||||
public function authors()
|
||||
{
|
||||
return $this->hasMany(Author::class);
|
||||
}
|
||||
*/
|
||||
|
||||
public function getAuthorsAttribute()
|
||||
{
|
||||
$authorId = $this->getRawOriginal('ListaAutori');
|
||||
$ids = explode(",",$authorId);
|
||||
$autori = [];
|
||||
foreach ($ids as $id)
|
||||
public function getAuthorsAttribute()
|
||||
{
|
||||
$authorId = $this->getRawOriginal('ListaAutori');
|
||||
$ids = explode(",", $authorId);
|
||||
$autori = [];
|
||||
foreach ($ids as $id) {
|
||||
|
||||
$autore = Author::where('IdAutore',$id)->orderBy('DataOra', 'desc')->first();
|
||||
if($autore){
|
||||
//$autori[] = ($autore->Nome != '' ? trim($autore->Nome) . " " : '') . trim($autore->Cognome);
|
||||
$autori[] = trim($autore->Nome) . "," . trim($autore->Cognome);
|
||||
$autore = Author::where('IdAutore', $id)->orderBy('DataOra', 'desc')->first();
|
||||
if ($autore) {
|
||||
//$autori[] = ($autore->Nome != '' ? trim($autore->Nome) . " " : '') . trim($autore->Cognome);
|
||||
$autori[] = trim($autore->Nome) . "," . trim($autore->Cognome);
|
||||
}
|
||||
}
|
||||
|
||||
return $autori;
|
||||
}
|
||||
|
||||
public function getStockAttribute()
|
||||
{
|
||||
$qtas = Stock::where('Codice', $this->IdArticolo)->orderBy('DataOra', 'desc');
|
||||
if ($qtas->count() > 0) {
|
||||
$qta = $qtas->first();
|
||||
$disponibilita = $qta->QtaDisponibile;
|
||||
} else {
|
||||
$disponibilita = 0;
|
||||
}
|
||||
return $disponibilita;
|
||||
}
|
||||
public function getStatoprodottoAttribute()
|
||||
{
|
||||
$status = Statusproduct::where('IdStatoProdotto', $this->IdStatoProdotto)->orderBy('DataOra', 'desc')->first();
|
||||
return $status->Descrizione;
|
||||
}
|
||||
|
||||
public function getEditoreAttribute()
|
||||
{
|
||||
if ($this->IdMarchioEditoriale > 0) {
|
||||
$editore = Publisher::where('IdMarchioEditoriale', $this->IdMarchioEditoriale)->orderBy('DataOra', 'desc')->first();
|
||||
return $editore->Descrizione;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return $autori;
|
||||
}
|
||||
|
||||
public function getStockAttribute()
|
||||
{
|
||||
$qtas = Stock::where('Codice', $this->IdArticolo)->orderBy('DataOra', 'desc');
|
||||
if($qtas->count() > 0 ){
|
||||
$qta = $qtas->first();
|
||||
$disponibilita = $qta->QtaDisponibile;
|
||||
} else {
|
||||
$disponibilita = 0;
|
||||
public function getArgomentoAttribute()
|
||||
{
|
||||
$argomenti = Category::where('IdArgomento', $this->ListaArgomenti)->orderBy('DataOra', 'desc');
|
||||
if ($argomenti->count() > 0) {
|
||||
$argomento = $argomenti->first();
|
||||
$descrizione = $argomento->Descrizione;
|
||||
} else {
|
||||
$descrizione = "Nessuna categoria";
|
||||
}
|
||||
return $descrizione;
|
||||
}
|
||||
return $disponibilita;
|
||||
}
|
||||
public function getStatoprodottoAttribute()
|
||||
{
|
||||
$status = Statusproduct::where('IdStatoProdotto', $this->IdStatoProdotto)->orderBy('DataOra', 'desc')->first();
|
||||
return $status->Descrizione;
|
||||
}
|
||||
|
||||
public function getEditoreAttribute()
|
||||
{
|
||||
if($this->IdMarchioEditoriale > 0){
|
||||
$editore = Publisher::where('IdMarchioEditoriale', $this->IdMarchioEditoriale)->orderBy('DataOra', 'desc')->first();
|
||||
return $editore->Descrizione;
|
||||
}
|
||||
else{
|
||||
return null;
|
||||
public function nimaia()
|
||||
{
|
||||
return $this->hasOne('App\Artnim', 'id_gm', 'IdArticolo');
|
||||
}
|
||||
}
|
||||
|
||||
public function getArgomentoAttribute()
|
||||
{
|
||||
$argomenti = Category::where('IdArgomento', $this->ListaArgomenti)->orderBy('DataOra', 'desc');
|
||||
if($argomenti->count() > 0){
|
||||
$argomento = $argomenti->first();
|
||||
$descrizione = $argomento->Descrizione;
|
||||
} else {
|
||||
$descrizione = "Nessuna categoria";
|
||||
}
|
||||
return $descrizione;
|
||||
}
|
||||
|
||||
public function nimaia()
|
||||
{
|
||||
return $this->hasOne('App\Artnim', 'id_gm', 'IdArticolo' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
16
app/ArticoliFatturati.php
Executable file
16
app/ArticoliFatturati.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ArticoliFatturati extends Model
|
||||
{
|
||||
protected $connection = 'sqlsrv_test';
|
||||
protected $table = 'T_WEB_ArticoliFatturati';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
0
app/Artnim.php
Normal file → Executable file
0
app/Artnim.php
Normal file → Executable file
0
app/Author.php
Normal file → Executable file
0
app/Author.php
Normal file → Executable file
0
app/Authornimaia.php
Normal file → Executable file
0
app/Authornimaia.php
Normal file → Executable file
0
app/Category.php
Normal file → Executable file
0
app/Category.php
Normal file → Executable file
0
app/Clientegmdest.php
Normal file → Executable file
0
app/Clientegmdest.php
Normal file → Executable file
39
app/Console/Commands/CheckProductBySku.php
Normal file
39
app/Console/Commands/CheckProductBySku.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Codexshaper\WooCommerce\Facades\WooCommerce;
|
||||
use Codexshaper\WooCommerce\Models\Product;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class CheckProductBySku extends Command
|
||||
{
|
||||
protected $signature = 'woocommerce:check-product {sku}'; // Accetta un argomento SKU
|
||||
protected $description = 'Check a product by SKU from WooCommerce and display its ID';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
// Ottieni lo SKU del prodotto dal parametro della riga di comando
|
||||
$sku = $this->argument('sku');
|
||||
|
||||
try {
|
||||
// Recupera i prodotti per lo SKU specificato
|
||||
$products = Product::where('sku', $sku)->get();
|
||||
|
||||
if ($products->isNotEmpty()) {
|
||||
// Mostra l'ID del primo prodotto se viene trovato
|
||||
$this->info('Connection successful! Product ID: ' . $products[0]->id);
|
||||
} else {
|
||||
$this->error('No products found with SKU: ' . $sku);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Gestisce eventuali errori di connessione
|
||||
$this->error('Error: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
47
app/Console/Commands/FixStoragePermissions.php
Executable file
47
app/Console/Commands/FixStoragePermissions.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class FixStoragePermissions extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'fix:storage-permissions';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Fix permissions for the storage/logs directory';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
// Esegui i comandi di shell
|
||||
exec('sudo chown -R debian:www-data /var/www/html/apimacro/storage/logs', $output, $returnVar);
|
||||
exec('sudo chmod -R 775 /var/www/html/apimacro/storage/logs', $output, $returnVar);
|
||||
|
||||
// Controlla se ci sono stati errori
|
||||
if ($returnVar !== 0) {
|
||||
$this->error('Errore nel fix dei permessi.');
|
||||
return 1; // Codice di errore
|
||||
}
|
||||
|
||||
$this->info('Permessi del storage/logs aggiornati con successo.');
|
||||
return 0; // Codice di successo
|
||||
} catch (\Exception $e) {
|
||||
$this->error('Errore durante l\'aggiornamento dei permessi: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
40
app/Console/Commands/GetFirstOrder.php
Normal file
40
app/Console/Commands/GetFirstOrder.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Codexshaper\WooCommerce\Facades\Order;
|
||||
use Codexshaper\WooCommerce\Facades\WooCommerce;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class GetFirstOrder extends Command
|
||||
{
|
||||
protected $signature = 'woocommerce:get-first-order';
|
||||
protected $description = 'Get the first order from WooCommerce and display its details';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
// Recupera la lista di ordini, limitando a 1 per ottenere solo il primo
|
||||
// $orders = WooCommerce::get('orders', ['per_page' => 1]);
|
||||
$orders = Order::all(['per_page' => 1]);
|
||||
|
||||
if (!empty($orders) && isset($orders[0]->id)) {
|
||||
// Mostra i dettagli del primo ordine
|
||||
$this->info('First Order ID: ' . $orders[0]->id);
|
||||
$this->info('Order Status: ' . $orders[0]->status);
|
||||
$this->info('Total: ' . $orders[0]->total);
|
||||
// Aggiungi altri dettagli se necessario
|
||||
} else {
|
||||
$this->error('No orders found.');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Gestisci eventuali errori di connessione
|
||||
$this->error('Error GetFirstOrder: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
106
app/Console/Commands/OrderUpdateGm.php
Normal file → Executable file
106
app/Console/Commands/OrderUpdateGm.php
Normal file → Executable file
@@ -2,10 +2,13 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Mylog;
|
||||
use App\Order as AppOrder;
|
||||
use App\Services\ProductLogger;
|
||||
use Codexshaper\WooCommerce\Facades\Order;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class OrderUpdateGm extends Command
|
||||
{
|
||||
@@ -34,42 +37,95 @@ class OrderUpdateGm extends Command
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
* Handles the order update process from GM.
|
||||
*
|
||||
* This command fetches orders from WooCommerce with a pending, processing, or on-hold status, and checks if they exist in the GM system. If an order is found in GM, it checks the status and updates the WooCommerce order accordingly. If an order is updated, an email is sent to the admin with the details.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$all_orderswoo = new Collection();
|
||||
echo "OrderUpdateGM... ";
|
||||
$productLogger = new ProductLogger(null, 'checkorders', true);
|
||||
$page = 1;
|
||||
do{
|
||||
$orderswoo = Order::all($options = ['per_page' => 100, 'page' => $page,'status'=> ["pending","processing","on-hold"]]);
|
||||
$all_orderswoo = $all_orderswoo->merge($orderswoo);
|
||||
$page++;
|
||||
} while($orderswoo->count() > 0);
|
||||
$orderupdated = 0;
|
||||
try {
|
||||
$all_orderswoo = new Collection(); // Assicurati che all_orderswoo sia inizializzato se non l'hai già fatto.
|
||||
$page = 1; // Inizializza la pagina
|
||||
|
||||
foreach($all_orderswoo as $orderwoo ){
|
||||
$ordergm = AppOrder::where('IdInternet', $orderwoo->id)->latest('DataOra')->first();
|
||||
if($ordergm){
|
||||
if($orderwoo->status == 'processing'){
|
||||
if($ordergm->EnabledWoo == 1){
|
||||
$data = [
|
||||
'status' => 'completed',
|
||||
];
|
||||
$orderwooupdate = Order::update($orderwoo->id,$data);
|
||||
}
|
||||
}
|
||||
elseif ($orderwoo->status == 'on-hold'){
|
||||
do {
|
||||
$options = ['per_page' => 100, 'page' => $page, 'status' => ["pending", "processing", "on-hold"]];
|
||||
$this->info('Fetching orders with options: ' . json_encode($options));
|
||||
$orderswoo = Order::get($options); // Usa 'get' invece di 'all'
|
||||
|
||||
if($ordergm->FlagSospeso == 0) {
|
||||
$data = [
|
||||
'status' => 'processing',
|
||||
];
|
||||
$orderwooupdate = Order::update($orderwoo->id,$data);
|
||||
// Controlla se il risultato è una collezione o un errore
|
||||
if (empty($orderswoo) || $orderswoo->isEmpty()) {
|
||||
$productLogger->addLog('Error', 'No orders returned.');
|
||||
break; // Esci dal ciclo in caso di errore
|
||||
}
|
||||
|
||||
}
|
||||
// Merge le nuove ordinazioni nella collezione esistente
|
||||
$all_orderswoo = $all_orderswoo->merge($orderswoo);
|
||||
$page++;
|
||||
} while ($orderswoo->count() > 0); // Continua finché ci sono ordini
|
||||
|
||||
} catch (\Exception $e) {
|
||||
if (isset($productLogger)) {
|
||||
$productLogger->addLog('Error', $e->getMessage());
|
||||
$productLogger->setLogandSendEmail('Ordini');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($all_orderswoo as $orderwoo) {
|
||||
$productLogger->addLog('', "Processing order #{$orderwoo->id}...");
|
||||
$ordergm = AppOrder::where('IdInternet', $orderwoo->id)->latest('DataOra')->first();
|
||||
if ($ordergm) {
|
||||
$productLogger->addLog('', "Order #{$orderwoo->id} found in GM, checking status...");
|
||||
if ($orderwoo->status == 'processing') {
|
||||
$this->info("Order #{$orderwoo->id} is processing, checking if it needs to be completed...");
|
||||
if ($ordergm->EnabledWoo == 1) {
|
||||
$productLogger->addLog('', "Order #{$orderwoo->id} needs to be completed, updating WooCommerce...");
|
||||
$data = [
|
||||
'status' => 'completed',
|
||||
];
|
||||
$orderwooupdate = Order::update($orderwoo->id, $data);
|
||||
|
||||
// sum the number updated of order to the log
|
||||
$orderupdated++;
|
||||
}
|
||||
} elseif ($orderwoo->status == 'on-hold') {
|
||||
$productLogger->addLog('', "Order #{$orderwoo->id} is on-hold, checking if it needs to be processed...");
|
||||
if ($ordergm->FlagSospeso == 0) {
|
||||
$productLogger->addLog('', "Order #{$orderwoo->id} needs to be processed, updating WooCommerce...");
|
||||
$data = [
|
||||
'status' => 'processing',
|
||||
];
|
||||
$orderwooupdate = Order::update($orderwoo->id, $data);
|
||||
|
||||
// sum the number updated of order to the log
|
||||
$orderupdated++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$productLogger->addLog('', "Order #{$orderwoo->id} not found in GM, skipping...");
|
||||
}
|
||||
}
|
||||
|
||||
// get the directory actual name and put in the log file
|
||||
|
||||
$log = ' Ordini aggiornati' . "\n";
|
||||
|
||||
// check if there are orders to log
|
||||
if ($orderupdated > 0) {
|
||||
// Send the email to the admin with the details of the order log
|
||||
Mail::raw($log, function ($message, $orderupdated) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Ordini Aggiornati su GM:" . $orderupdated));
|
||||
});
|
||||
|
||||
if ($productLogger) {
|
||||
$productLogger->setLogandSendEmail('Aggiornamento Ordini');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
170
app/Console/Commands/ProductUpdateAllQta.php
Executable file
170
app/Console/Commands/ProductUpdateAllQta.php
Executable file
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use App\Stock;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
use App\Helpers\MyConfig;
|
||||
|
||||
MyConfig::init();
|
||||
|
||||
class ProductUpdateAllQta extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'product:updateallqta';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Aggiorna qta prodotti da GM di TUTTI';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$aggiornato = false;
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$ora_update = Carbon::now();
|
||||
$settingora = Setting::where('key', 'update_products_qta')->first();
|
||||
$fromtime = str_replace('-', '', $settingora->value);
|
||||
|
||||
|
||||
$loginizio = 'Inizio da ' . $ora_update . "\n";
|
||||
|
||||
Log::channel('updateproductsqta')->notice($loginizio);
|
||||
|
||||
/* $stocks = Stock::join(DB::raw('(SELECT Codice, MAX(DataOra) as data1 from T_WEB_Disponibile GROUP BY Codice ) b'), function($join)
|
||||
{
|
||||
$join->on('T_WEB_Disponibile.Codice', '=', 'b.Codice')
|
||||
->on('T_WEB_Disponibile.DataOra', '=', 'b.data1');
|
||||
} )
|
||||
->where('data1','>=',$fromtime)
|
||||
->orderBy('DataOra')
|
||||
->get();
|
||||
*/
|
||||
// Sottoquery per trovare l'ultima data/ora per ogni Codice a partire da $fromtime
|
||||
$subQuery = Stock::select('Codice', DB::raw('MAX(DataOra) as max_data'))
|
||||
->where('DataOra', '>=', $fromtime)
|
||||
->groupBy('Codice');
|
||||
|
||||
// Aggiorna solo i record corrispondenti all'ultima data/ora per ogni Codice
|
||||
$updatedRecords = Stock::joinSub($subQuery, 'latest', function ($join) {
|
||||
$join->on('T_WEB_Disponibile.Codice', '=', 'latest.Codice')
|
||||
->on('T_WEB_Disponibile.DataOra', '=', 'latest.max_data');
|
||||
})
|
||||
->where('T_WEB_Disponibile.DataOra', '>=', $fromtime)
|
||||
->get(); // Recupera i record da aggiornare
|
||||
|
||||
$nrprodotti = $updatedRecords->count();
|
||||
|
||||
$log = "";
|
||||
|
||||
foreach ($updatedRecords as $stock) {
|
||||
|
||||
try {
|
||||
|
||||
$productsku = Product::where('sku', $stock->Codice)->first();
|
||||
|
||||
if ($productsku->count() > 0) {
|
||||
$aggiorna = true;
|
||||
|
||||
$inprevendita = isArticleInPrevendita($stock->Codice, false);
|
||||
$inprevendita_qtaneg = isArticleInPrevendita($stock->Codice, true);
|
||||
$qtyinstock = intval($productsku['stock_quantity']);
|
||||
if (isset($productsku['name'])) {
|
||||
$titolo = $productsku['name'];
|
||||
} else {
|
||||
$titolo = '';
|
||||
}
|
||||
// Se il libro è ancora in Prevendita e la quantità è > MyConfig::$qtaMinima, allora non aggiornare la QTA
|
||||
// deve rimanere a > MyConfig::$qtaMinima per poter vedere "In Preordine"
|
||||
if ($inprevendita && $qtyinstock > MyConfig::$qtaInPrevendita) {
|
||||
$aggiorna = false;
|
||||
}
|
||||
|
||||
if ($aggiorna) {
|
||||
$data1 = [
|
||||
|
||||
'stock_quantity' => $stock->QtaDisponibile,
|
||||
|
||||
];
|
||||
$idprodotto = $productsku['parent_id'];
|
||||
if ($idprodotto > 0) {
|
||||
$variation = Variation::update($idprodotto, $productsku['id'], $data1);
|
||||
} else {
|
||||
Product::update($productsku['id'], $data1);
|
||||
}
|
||||
|
||||
$log .= ' *** ' . $stock->Codice . ' ' . $titolo . ' QTA=' . $stock->QtaDisponibile . "\n";
|
||||
|
||||
if ($inprevendita_qtaneg && ($qtyinstock < MyConfig::$qtaMinima)) {
|
||||
setPreOrder($stock->Codice, "1", false);
|
||||
$log .= ' SETTATO IN PREVENDITA ! <br>';
|
||||
}
|
||||
|
||||
$aggiornato = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($log) {
|
||||
Log::channel('updateproductsqta')->notice($log);
|
||||
$log = "";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
$log = "Errore: " . $e->getMessage() . "\n";
|
||||
Log::channel('updateproductsqta')->error($log);
|
||||
$log = "";
|
||||
|
||||
}
|
||||
}
|
||||
$ora_fine = Carbon::now();
|
||||
|
||||
$lognrprodotti = ' Prodotti qta aggiornati di TUTTI ' . $nrprodotti . "\n";
|
||||
$logfine = 'Terminato il ' . $ora_fine . "\n";
|
||||
$settingora->value = $ora_update;
|
||||
$settingora->save();
|
||||
|
||||
if ($aggiornato) {
|
||||
Log::channel('updateproductsqta')->notice($lognrprodotti . $logfine);
|
||||
Mail::raw($loginizio . $lognrprodotti . $logfine, function ($message) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Aggiornam. Qtà Prodotti:"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
102
app/Console/Commands/ProductUpdateDataPubb.php
Executable file
102
app/Console/Commands/ProductUpdateDataPubb.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Services\ProductLogger;
|
||||
|
||||
class ProductUpdateDataPubb extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'product:datepubb';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Aggiorna la Data di Pubblicazione';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$productLogger = new ProductLogger(null, '', true);
|
||||
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
|
||||
->where(function ($query) {
|
||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
|
||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
||||
})
|
||||
->orderBy('Titolo')
|
||||
->take(1)
|
||||
->get();
|
||||
|
||||
|
||||
foreach ($articles as $article) {
|
||||
$aggiornato = setDataPubblicazione($article, false);
|
||||
if ($aggiornato) {
|
||||
$productLogger->setAggiornato(true);
|
||||
}
|
||||
}
|
||||
|
||||
$productLogger->setLogandSendEmail('Aggiornamento Data Pubblicazione');
|
||||
|
||||
echo "************** Finito **************";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
|
||||
if ($productLogger) {
|
||||
$productLogger->addLog('Error', $e->getMessage());
|
||||
$productLogger->setLogandSendEmail('Aggiornamento Prodotti');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1085
app/Console/Commands/ProductUpdateGm.php
Normal file → Executable file
1085
app/Console/Commands/ProductUpdateGm.php
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
116
app/Console/Commands/ProductUpdateISBN.php
Executable file
116
app/Console/Commands/ProductUpdateISBN.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Services\ProductLogger;
|
||||
|
||||
class ProductUpdateISBN extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'product:isbn';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Aggiorna i codici ISBN da GM';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$settingora = Setting::where('key', 'testpao')->first();
|
||||
$productLogger = new ProductLogger($settingora, 'testpao', true);
|
||||
|
||||
$debug = true;
|
||||
|
||||
try {
|
||||
$productLogger->addLog('updated', 'PRODOTTI AGGIORNATI AD ISBN' . "\n");
|
||||
|
||||
echo "SettingOra: " . $settingora;
|
||||
$fromtime = str_replace('-', '', $settingora->value);
|
||||
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
/*
|
||||
->leftJoin(DB::raw('(SELECT o.Codice, o.QtaDisponibile FROM T_WEB_Disponibile o JOIN (SELECT Codice, MAX(DataOra) as data1 from T_WEB_Disponibile GROUP BY Codice) p ON o.Codice = p.Codice AND o.DataOra = p.data1 ) q'), function($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.Codice');
|
||||
})
|
||||
*/
|
||||
|
||||
->where('data', '>=', $fromtime)
|
||||
->where(function ($query) {
|
||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
|
||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
||||
})
|
||||
->orderBy('Titolo')
|
||||
->get();
|
||||
|
||||
|
||||
foreach ($articles as $article) {
|
||||
// setProductFromGM($article, false, $productLogger);
|
||||
$sku = $article->IdProdotto;
|
||||
|
||||
$ris = setISBN_GTIN($sku, $article, $debug);
|
||||
if ($ris) {
|
||||
$productLogger->addLog('updated', 'prod: ' . $sku . ' ISBN: ' . $article->Titolo);
|
||||
}
|
||||
}
|
||||
|
||||
$productLogger->setLogandSendEmail('Aggiornamento ISBN');
|
||||
|
||||
echo "************** Finito **************";
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
|
||||
if ($productLogger) {
|
||||
$productLogger->addLog('Error', $e->getMessage());
|
||||
$productLogger->setLogandSendEmail('Aggiornamento ISBN');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
112
app/Console/Commands/ProductUpdateQta.php
Normal file → Executable file
112
app/Console/Commands/ProductUpdateQta.php
Normal file → Executable file
@@ -7,6 +7,7 @@ use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use App\Stock;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
@@ -17,6 +18,10 @@ use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
use App\Helpers\MyConfig;
|
||||
|
||||
MyConfig::init();
|
||||
|
||||
class ProductUpdateQta extends Command
|
||||
{
|
||||
/**
|
||||
@@ -50,17 +55,19 @@ class ProductUpdateQta extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$aggiornato = false;
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$ora_update = Carbon::now();
|
||||
$settingora = Setting::where('key','update_products_qta')->first();
|
||||
$fromtime = str_replace('-','',$settingora->value);
|
||||
$settingora = Setting::where('key', 'update_products_qta')->first();
|
||||
$fromtime = str_replace('-', '', $settingora->value);
|
||||
|
||||
|
||||
$loginizio = 'Inizio da '.$ora_update."\n";
|
||||
$loginizio = 'Inizio da ' . $ora_update . "\n";
|
||||
|
||||
Log::channel('updateproductsqta')->notice($loginizio);
|
||||
|
||||
/* $stocks = Stock::join(DB::raw('(SELECT Codice, MAX(DataOra) as data1 from T_WEB_Disponibile GROUP BY Codice ) b'), function($join)
|
||||
/* $stocks = Stock::join(DB::raw('(SELECT Codice, MAX(DataOra) as data1 from T_WEB_Disponibile GROUP BY Codice ) b'), function($join)
|
||||
{
|
||||
$join->on('T_WEB_Disponibile.Codice', '=', 'b.Codice')
|
||||
->on('T_WEB_Disponibile.DataOra', '=', 'b.data1');
|
||||
@@ -68,52 +75,87 @@ class ProductUpdateQta extends Command
|
||||
->where('data1','>=',$fromtime)
|
||||
->orderBy('DataOra')
|
||||
->get();
|
||||
*/
|
||||
$stocks = Stock::select('Codice', 'QtaDisponibile', DB::raw('MAX(DataOra) as data_recente'))
|
||||
->where('DataOra', '>=' , $fromtime)
|
||||
->groupBy('Codice','QtaDisponibile')
|
||||
->get();
|
||||
$nrprodotti = $stocks->count();
|
||||
*/
|
||||
$stocks = Stock::select('Codice', 'QtaDisponibile', DB::raw('MAX(DataOra) as data_recente'))
|
||||
->where('DataOra', '>=', $fromtime)
|
||||
->groupBy('Codice', 'QtaDisponibile')
|
||||
->get();
|
||||
$nrprodotti = $stocks->count();
|
||||
|
||||
foreach($stocks as $stock){
|
||||
$log = "";
|
||||
|
||||
try {
|
||||
foreach ($stocks as $stock) {
|
||||
|
||||
$productsku = Product::where('sku' , $stock->Codice)->first();
|
||||
try {
|
||||
|
||||
if($productsku->count() > 0)
|
||||
{
|
||||
$data1 = [
|
||||
$productsku = Product::where('sku', $stock->Codice)->first();
|
||||
|
||||
if ($productsku->count() > 0) {
|
||||
$aggiorna = true;
|
||||
|
||||
'stock_quantity' => $stock->QtaDisponibile,
|
||||
$inprevendita = isArticleInPrevendita($stock->Codice, false);
|
||||
$inprevendita_qtaneg = isArticleInPrevendita($stock->Codice, true);
|
||||
$qtyinstock = intval($productsku['stock_quantity']);
|
||||
if (isset($productsku['name'])) {
|
||||
$titolo = $productsku['name'];
|
||||
} else {
|
||||
$titolo = '';
|
||||
}
|
||||
// Se il libro è ancora in Prevendita e la quantità è > MyConfig::$qtaMinima, allora non aggiornare la QTA
|
||||
// deve rimanere a > MyConfig::$qtaMinima per poter vedere "In Preordine"
|
||||
if ($inprevendita && $qtyinstock > MyConfig::$qtaInPrevendita) {
|
||||
$aggiorna = false;
|
||||
}
|
||||
|
||||
];
|
||||
$idprodotto = $productsku['parent_id'];
|
||||
if($idprodotto > 0){
|
||||
$variation = Variation::update($idprodotto,$productsku['id'], $data1);
|
||||
if ($aggiorna) {
|
||||
$data1 = [
|
||||
|
||||
'stock_quantity' => $stock->QtaDisponibile,
|
||||
|
||||
} else {
|
||||
Product::update($productsku['id'], $data1);
|
||||
];
|
||||
$idprodotto = $productsku['parent_id'];
|
||||
if ($idprodotto > 0) {
|
||||
$variation = Variation::update($idprodotto, $productsku['id'], $data1);
|
||||
} else {
|
||||
Product::update($productsku['id'], $data1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$log .= ' *** ' . $stock->Codice . ' ' . $titolo . ' QTA=' . $stock->QtaDisponibile . "\n";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
//code error
|
||||
if ($inprevendita_qtaneg && ($qtyinstock < MyConfig::$qtaMinima)) {
|
||||
setPreOrder($stock->Codice, "1", false);
|
||||
$log .= ' SETTATO IN PREVENDITA ! <br>';
|
||||
}
|
||||
|
||||
$aggiornato = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($log) {
|
||||
Log::channel('updateproductsqta')->notice($log);
|
||||
$log = "";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
$log = "Errore: " . $e->getMessage() . "\n";
|
||||
Log::channel('updateproductsqta')->error($log);
|
||||
$log = "";
|
||||
|
||||
}
|
||||
}
|
||||
$ora_fine = Carbon::now();
|
||||
$lognrprodotti = 'Prodotti qta aggiornati '.$nrprodotti."\n";
|
||||
$logfine = 'Terminato il '.$ora_fine."\n";
|
||||
|
||||
$lognrprodotti = ' Prodotti qta aggiornati ' . $nrprodotti . "\n";
|
||||
$logfine = 'Terminato il ' . $ora_fine . "\n";
|
||||
$settingora->value = $ora_update;
|
||||
$settingora->save();
|
||||
|
||||
Log::channel('updateproductsqta')->notice($loginizio . $lognrprodotti . $logfine);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($aggiornato) {
|
||||
Log::channel('updateproductsqta')->notice($lognrprodotti . $logfine);
|
||||
Mail::raw($loginizio . $lognrprodotti . $logfine, function ($message) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Aggiornam. Qtà Prodotti:"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
407
app/Console/Commands/ProductUpdateUsedGm.php
Normal file → Executable file
407
app/Console/Commands/ProductUpdateUsedGm.php
Normal file → Executable file
@@ -7,6 +7,7 @@ use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
@@ -16,6 +17,7 @@ use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
|
||||
class ProductUpdateUsedGm extends Command
|
||||
{
|
||||
/**
|
||||
@@ -49,245 +51,244 @@ class ProductUpdateUsedGm extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$ora_update = Carbon::now();
|
||||
$settingora = Setting::where('key','update_products_used')->first();
|
||||
$fromtime = str_replace('-','',$settingora->value);
|
||||
try {
|
||||
Log::channel('updateproductsused')->notice('Inizio... ' . "\n");
|
||||
|
||||
$aggiornato = false;
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$ora_update = Carbon::now();
|
||||
$settingora = Setting::where('key', 'update_products_used')->first();
|
||||
$fromtime = str_replace('-', '', $settingora->value);
|
||||
|
||||
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function($join)
|
||||
{
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
/*
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
/*
|
||||
->leftJoin(DB::raw('(SELECT o.Codice, o.QtaDisponibile FROM T_WEB_Disponibile o JOIN (SELECT Codice, MAX(DataOra) as data1 from T_WEB_Disponibile GROUP BY Codice) p ON o.Codice = p.Codice AND o.DataOra = p.data1 ) q'), function($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.Codice');
|
||||
})
|
||||
*/
|
||||
//->groupBy('T_WEB_Articoli.IdArticolo')
|
||||
->where('data','>=',$fromtime)
|
||||
->where('EAN13','LIKE','usato%')
|
||||
//->where(function($query){
|
||||
// $query->where('DescrizioneStatoProdotto','Usato')
|
||||
//->orWhere('DescrizioneStatoProdotto','In Commercio')
|
||||
//->orWhere('DescrizioneStatoProdotto','Remainder');
|
||||
//})
|
||||
//->where(DB::raw('CONVERT(INT, QtaDisponibile)'),'>',0)
|
||||
//->where('DescrizioneFormato','brossura')
|
||||
->where('DescrizioneTipologia','Libri')
|
||||
->orderBy('data')
|
||||
//->groupBy('T_WEB_Articoli.IdArticolo')
|
||||
->where('data', '>=', $fromtime)
|
||||
->where('EAN13', 'LIKE', 'usato%')
|
||||
//->where(function($query){
|
||||
// $query->where('DescrizioneStatoProdotto','Usato')
|
||||
//->orWhere('DescrizioneStatoProdotto','In Commercio')
|
||||
//->orWhere('DescrizioneStatoProdotto','Remainder');
|
||||
//})
|
||||
//->where(DB::raw('CONVERT(INT, QtaDisponibile)'),'>',0)
|
||||
//->where('DescrizioneFormato','brossura')
|
||||
->where('DescrizioneTipologia', 'Libri')
|
||||
->orderBy('data')
|
||||
|
||||
//->take(5)
|
||||
//->orderBy('ListaAutori')
|
||||
->get();
|
||||
Log::channel('updateproductsused')->notice('Inizio da '.$settingora->value."\n");
|
||||
$loginizio = 'Inizio da '.$settingora->value."\n";
|
||||
$logfine = 'Fino a '.$ora_update."\n";
|
||||
$log = 'PRODOTTI USATI INSERITI'."\n";
|
||||
$log1 = 'EVENTUALI PRODOTTI USATI NON INSERITI'."\n";
|
||||
$log2 = 'PRODOTTI USATI AGGIORNATI' . "\n";
|
||||
$log3 = 'PRODOTTI USATI NON INSERITI PER PROBLEMI SERVER' . "\n";
|
||||
//->take(5)
|
||||
//->orderBy('ListaAutori')
|
||||
->get();
|
||||
Log::channel('updateproductsused')->notice('Inizio da ' . $settingora->value . "\n");
|
||||
$loginizio = 'Inizio da ' . $settingora->value . "\n";
|
||||
$logfine = 'Fino a ' . $ora_update . "\n";
|
||||
$log = ' PRODOTTI USATI INSERITI' . "\n";
|
||||
$log1 = 'EVENTUALI PRODOTTI USATI NON INSERITI' . "\n";
|
||||
$log2 = 'PRODOTTI USATI AGGIORNATI' . "\n";
|
||||
$log3 = 'PRODOTTI USATI NON INSERITI PER PROBLEMI SERVER' . "\n";
|
||||
|
||||
|
||||
foreach($articles as $article)
|
||||
{ try {
|
||||
/*
|
||||
foreach ($articles as $article) {
|
||||
try {
|
||||
/*
|
||||
$settingdata = Setting::where('key','data_product_used')->first();
|
||||
$settingdata->value = $article->data;
|
||||
$settingdata->save();
|
||||
*/
|
||||
$productsku = Product::where('sku' , $article->IdArticolo)->first();
|
||||
if($productsku->count() == 0)
|
||||
{
|
||||
$productsku = Product::where('sku', $article->IdArticolo)->first();
|
||||
if ($productsku->count() == 0) {
|
||||
|
||||
$titolo = null;
|
||||
$formato = null;
|
||||
$titolo = $article->Titolo;
|
||||
$titolo = rtrim($titolo);
|
||||
$titolo = rtrim(str_ireplace('USATO','',$titolo));
|
||||
$titolo = rtrim($titolo);
|
||||
$titolo = null;
|
||||
$formato = null;
|
||||
$titolo = $article->Titolo;
|
||||
$titolo = rtrim($titolo);
|
||||
$titolo = rtrim(str_ireplace('USATO', '', $titolo));
|
||||
$titolo = rtrim($titolo);
|
||||
|
||||
$page = 1;
|
||||
$page = 1;
|
||||
|
||||
$all_products = new Collection();
|
||||
do{
|
||||
$products = Product::all($options = ['per_page' => 100, 'page' => $page,'search' => $titolo]);
|
||||
$all_products = $all_products->merge($products);
|
||||
$page++;
|
||||
} while ($products->count() > 0);
|
||||
$all_products = new Collection();
|
||||
do {
|
||||
$products = Product::all($options = ['per_page' => 100, 'page' => $page, 'search' => $titolo]);
|
||||
$all_products = $all_products->merge($products);
|
||||
$page++;
|
||||
} while ($products->count() > 0);
|
||||
|
||||
foreach ($all_products as $product) {
|
||||
$variations = Variation::all($product->id);
|
||||
$target_usato = substr($article->Ean13, strlen('USATO'));
|
||||
foreach ($all_products as $product) {
|
||||
$variations = Variation::all($product->id);
|
||||
$target_usato = substr($article->Ean13, strlen('USATO'));
|
||||
|
||||
foreach ($variations as $variation) {
|
||||
foreach ($variation->meta_data as $meta_data) {
|
||||
foreach ($variations as $variation) {
|
||||
foreach ($variation->meta_data as $meta_data) {
|
||||
|
||||
if ($meta_data->key === 'ISBN') {
|
||||
// Estrai gli ultimi caratteri dell'ISBN
|
||||
if ($meta_data->key === 'ISBN') {
|
||||
// Estrai gli ultimi caratteri dell'ISBN
|
||||
|
||||
$isbn_value = substr($meta_data->value, -strlen($target_usato));
|
||||
//dd($isbn_value);
|
||||
// Confronta gli ultimi caratteri con il valore desiderato
|
||||
if ($isbn_value === $target_usato) {
|
||||
$meta_data->value;
|
||||
$data1 = [
|
||||
$isbn_value = substr($meta_data->value, -strlen($target_usato));
|
||||
//dd($isbn_value);
|
||||
// Confronta gli ultimi caratteri con il valore desiderato
|
||||
if ($isbn_value === $target_usato) {
|
||||
$meta_data->value;
|
||||
$data1 = [
|
||||
|
||||
'regular_price' => $article->PrezzoIvato,
|
||||
'sku' => $article->IdArticolo,
|
||||
'sale_price' => $article->PrezzoIvatoScontatoCampagna,
|
||||
'date_on_sale_from' => $article->DataInizioCampagna,
|
||||
'date_on_sale_to' => $article->DataFineCampagna,
|
||||
'manage_stock' => true,
|
||||
'stock_quantity' => $article->stock,
|
||||
'purchasable' => false,
|
||||
'regular_price' => $article->PrezzoIvato,
|
||||
'sku' => $article->IdArticolo,
|
||||
'sale_price' => $article->PrezzoIvatoScontatoCampagna,
|
||||
'date_on_sale_from' => $article->DataInizioCampagna,
|
||||
'date_on_sale_to' => $article->DataFineCampagna,
|
||||
'manage_stock' => true,
|
||||
'stock_quantity' => $article->stock,
|
||||
'purchasable' => false,
|
||||
|
||||
'attributes' => [
|
||||
[
|
||||
//'id' => 1,
|
||||
'id' => 6,
|
||||
'option' => 'Usato'
|
||||
]
|
||||
'attributes' => [
|
||||
[
|
||||
//'id' => 1,
|
||||
'id' => 6,
|
||||
'option' => 'Usato'
|
||||
]
|
||||
|
||||
],
|
||||
'meta_data' => [
|
||||
[
|
||||
'key' => 'ISBN',
|
||||
'value' => $article->Ean13
|
||||
],
|
||||
[
|
||||
'key' => 'misure',
|
||||
'value' => $article->Misure
|
||||
],
|
||||
[
|
||||
'key' => 'formato',
|
||||
'value' => $article->DescrizioneFormato
|
||||
],
|
||||
[
|
||||
'key' => 'pagine',
|
||||
'value' => $article->Pagine
|
||||
],
|
||||
[
|
||||
'key' => 'edizione',
|
||||
'value' => $article->Edizione
|
||||
],
|
||||
[
|
||||
'key' => 'ristampa',
|
||||
'value' => $article->Ristampa
|
||||
],
|
||||
],
|
||||
'meta_data' => [
|
||||
[
|
||||
'key' => 'ISBN',
|
||||
'value' => $article->Ean13
|
||||
],
|
||||
[
|
||||
'key' => 'misure',
|
||||
'value' => $article->Misure
|
||||
],
|
||||
[
|
||||
'key' => 'formato',
|
||||
'value' => $article->DescrizioneFormato
|
||||
],
|
||||
[
|
||||
'key' => 'pagine',
|
||||
'value' => $article->Pagine
|
||||
],
|
||||
[
|
||||
'key' => 'edizione',
|
||||
'value' => $article->Edizione
|
||||
],
|
||||
[
|
||||
'key' => 'ristampa',
|
||||
'value' => $article->Ristampa
|
||||
],
|
||||
[
|
||||
'key' => 'DataPubblicazione',
|
||||
'value' => $article->DataPubblicazione
|
||||
],
|
||||
|
||||
]
|
||||
];
|
||||
]
|
||||
];
|
||||
|
||||
$old_attributes = $product->attributes;
|
||||
$attributes = [];
|
||||
foreach($old_attributes as $old_attribute)
|
||||
{
|
||||
if($old_attribute->id <> 6)
|
||||
{
|
||||
$old_attributes = $product->attributes;
|
||||
$attributes = [];
|
||||
foreach ($old_attributes as $old_attribute) {
|
||||
if ($old_attribute->id <> 6) {
|
||||
|
||||
$attributes[] = [
|
||||
'id' => $old_attribute->id,
|
||||
'variation' => $old_attribute->variation,
|
||||
'visible' => $old_attribute->visible,
|
||||
'options' => $old_attribute->options
|
||||
];
|
||||
}
|
||||
}
|
||||
$attributes[] = [
|
||||
'id' => $old_attribute->id,
|
||||
'variation' => $old_attribute->variation,
|
||||
'visible' => $old_attribute->visible,
|
||||
'options' => $old_attribute->options
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$attributes[] = [
|
||||
//'id' => 1,
|
||||
'id' => 6,
|
||||
'position' => 0,
|
||||
'visible' => true,
|
||||
'variation' => true,
|
||||
'options' => [
|
||||
'Nuovo',
|
||||
'Usato',
|
||||
'PDF',
|
||||
'Epub',
|
||||
'Mobi',
|
||||
'DVD',
|
||||
'Streaming',
|
||||
'Download'
|
||||
]
|
||||
];
|
||||
//dd($attributes);
|
||||
$attributes[] = [
|
||||
//'id' => 1,
|
||||
'id' => 6,
|
||||
'position' => 0,
|
||||
'visible' => true,
|
||||
'variation' => true,
|
||||
'options' => [
|
||||
'Nuovo',
|
||||
'Usato',
|
||||
'PDF',
|
||||
'Epub',
|
||||
'Mobi',
|
||||
'DVD',
|
||||
'Streaming',
|
||||
'Download'
|
||||
]
|
||||
];
|
||||
//dd($attributes);
|
||||
|
||||
$data = [
|
||||
$data = [
|
||||
|
||||
'attributes' => $attributes
|
||||
'attributes' => $attributes
|
||||
|
||||
|
||||
];
|
||||
Product::update($product->id, $data);
|
||||
$variation = Variation::create($product->id, $data1);
|
||||
];
|
||||
Product::update($product->id, $data);
|
||||
$variation = Variation::create($product->id, $data1);
|
||||
|
||||
$log .= $article->Titolo . ' - ' . $article->Ean13 . " - " . $variation['permalink']."\n";
|
||||
$log .= $article->Titolo . ' - ' . $article->Ean13 . " - " . $variation['permalink'] . "\n";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$aggiornato = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$data1 = [
|
||||
|
||||
'regular_price' => $article->PrezzoIvato,
|
||||
'sale_price' => $article->PrezzoIvatoScontatoCampagna,
|
||||
'date_on_sale_from' => $article->DataInizioCampagna,
|
||||
'date_on_sale_to' => $article->DataFineCampagna,
|
||||
'stock_quantity' => $article->stock,
|
||||
|
||||
];
|
||||
|
||||
$idprodotto = $productsku['parent_id'];
|
||||
//if($idprodotto > 0){
|
||||
$variation = Variation::update($idprodotto, $productsku['id'], $data1);
|
||||
//echo "Modificato " . $article->Titolo ."<br>";
|
||||
$log2 .= $article->Titolo . ' - ' . $article->Ean13 . " - Articolo aggiornato - " . $variation['permalink'] . "\n";
|
||||
|
||||
$aggiornato = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
$data1 = [
|
||||
|
||||
'regular_price' => $article->PrezzoIvato,
|
||||
'sale_price' => $article->PrezzoIvatoScontatoCampagna,
|
||||
'date_on_sale_from' => $article->DataInizioCampagna,
|
||||
'date_on_sale_to' => $article->DataFineCampagna,
|
||||
'stock_quantity' => $article->stock,
|
||||
|
||||
];
|
||||
|
||||
$idprodotto = $productsku['parent_id'];
|
||||
//if($idprodotto > 0){
|
||||
$variation = Variation::update($idprodotto,$productsku['id'], $data1);
|
||||
//echo "Modificato " . $article->Titolo ."<br>";
|
||||
$log2 .= $article->Titolo . ' - ' . $article->Ean13 . " - Articolo aggiornato - " . $variation['permalink']."\n";
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
//$log3 .= $article->IdArticolo . ' - '. $article->Titolo ."\n" ;
|
||||
}
|
||||
|
||||
}
|
||||
$settingora->value = $ora_update;
|
||||
$settingora->save();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
//$log3 .= $article->IdArticolo . ' - '. $article->Titolo ."\n" ;
|
||||
}
|
||||
}
|
||||
$settingora->value = $ora_update;
|
||||
$settingora->save();
|
||||
if ($aggiornato) {
|
||||
Log::channel('updateproductsused')->notice($log . $log2 . $log1 . $log3);
|
||||
Log::channel('updateproductsused')->notice('Fino a '.$ora_update."\n");
|
||||
Mail::raw($loginizio. $log . $log2 . $log1 . $log3 . $logfine, function ($message) {
|
||||
$message->to("fioredellavitamacro@gmail.com");
|
||||
//$message->bcc('luca@pecos.it');
|
||||
$message->subject("Inserimento nuovi prodotti usati");
|
||||
|
||||
});
|
||||
|
||||
Log::channel('updateproductsused')->notice('Fino a ' . $ora_update . "\n");
|
||||
Mail::raw($loginizio . $log . $log2 . $log1 . $log3 . $logfine, function ($message) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("Inserim. nuovi prodotti Usati"));
|
||||
});
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
Log::channel('updateproductsused')->notice($log . $log2 . $log1 . $log3);
|
||||
Log::channel('updateproductsused')->error('Errore ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
76
app/Console/Commands/StartDay.php
Executable file
76
app/Console/Commands/StartDay.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use App\Stock;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class StartDay extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'product:startday';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'STARTDAY:';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
$log = "*** STARTDAY: ";
|
||||
|
||||
// Select all the fields of the Stock table
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$log .= $e->getMessage();
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
echo $log;
|
||||
|
||||
Log::channel('testpao')->notice($log);
|
||||
|
||||
if (true) {
|
||||
// Send the email
|
||||
Mail::raw($log, function ($message) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("STARTDAY"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
0
app/Console/Commands/Test.php
Normal file → Executable file
0
app/Console/Commands/Test.php
Normal file → Executable file
280
app/Console/Commands/TestPao.php
Executable file
280
app/Console/Commands/TestPao.php
Executable file
@@ -0,0 +1,280 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use App\Mylog;
|
||||
use App\Services\ProductLogger;
|
||||
use App\Stock;
|
||||
use Codexshaper\WooCommerce\Models\Product as ModelsProduct;
|
||||
use Codexshaper\WooCommerce\Facades\Variation;
|
||||
use Codexshaper\WooCommerce\Facades\Category;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class TestPao extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'product:testpao';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'TESTPAO: Aggiorna qta prodotti da GM';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
try {
|
||||
$mostra_solo_qta_negative = true;
|
||||
|
||||
$log = "";
|
||||
echo "\n*** INIZIO ***";
|
||||
$aggiornato = false;
|
||||
set_time_limit(0);
|
||||
ini_set("memory_limit", "512M");
|
||||
$settingora = Setting::where('key', 'update_products_qta')->first();
|
||||
$productLogger = new ProductLogger($settingora, 'testpao');
|
||||
$fromtime = str_replace('-', '', $settingora->value);
|
||||
|
||||
$productLogger->addLog('info', "Articoli: \n");
|
||||
|
||||
echo "\nArticoli: \n";
|
||||
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
->where('data', '>=', $fromtime)
|
||||
->where(function ($query) {
|
||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
|
||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
||||
})
|
||||
//->where('DescrizioneTipologia','Video Streaming')
|
||||
->orderBy('Titolo')
|
||||
->take(2)
|
||||
->get();
|
||||
|
||||
|
||||
if ($articles) {
|
||||
// log the count of the articles
|
||||
echo "Num Articoli: " . $articles->count();
|
||||
$productLogger->addLog('info', "Quanti Articoli: " . $articles->count());
|
||||
|
||||
|
||||
$ind = 0;
|
||||
foreach ($articles as $article) {
|
||||
try {
|
||||
$ind++;
|
||||
echo "\nArticolo " . $ind . " " . $article->Titolo . " qta = " . $article->stock;
|
||||
|
||||
$mostra = false;
|
||||
if ($mostra_solo_qta_negative) {
|
||||
if ($article->stock < 0) {
|
||||
$mostra = true;
|
||||
}
|
||||
} else {
|
||||
$mostra = true;
|
||||
}
|
||||
if ($mostra) {
|
||||
if (is_object($article)) {
|
||||
$strarticolo = json_encode($article, JSON_PRETTY_PRINT);
|
||||
if ($strarticolo !== false) {
|
||||
echo $strarticolo;
|
||||
$productLogger->addLog('info', $strarticolo);
|
||||
}
|
||||
}
|
||||
|
||||
if ($article->stock)
|
||||
echo "\r\n QTA = " . $article->stock . "\r\n";
|
||||
}
|
||||
|
||||
$productsku = Product::where('sku', $article->IdArticolo)->first();
|
||||
//if(Gm_product::where('id_gm',$article->IdArticolo)->doesntExist())
|
||||
if ($productsku->count() == 0) {
|
||||
$titolo = null;
|
||||
$formato = null;
|
||||
$prodotti = null;
|
||||
$prodotti = new ModelsProduct();
|
||||
$titolo = $article->Titolo;
|
||||
switch ($article->DescrizioneTipologia) {
|
||||
|
||||
case 'Libri':
|
||||
|
||||
$prodotti = $prodotti->where('name', $titolo)->get();
|
||||
|
||||
$id = 0;
|
||||
|
||||
if (!is_null($prodotti) && $prodotti->count() > 0) {
|
||||
foreach ($prodotti as $prodotto) {
|
||||
if (strtolower($prodotto->name) === strtolower($titolo)) {
|
||||
$found_key = array_search('Autore libro', array_column($prodotto->attributes, 'name'));
|
||||
if (array_diff($prodotto->attributes[$found_key]->options, $article->authors) === array_diff($article->authors, $prodotto->attributes[$found_key]->options)) {
|
||||
$id = $prodotto->id;
|
||||
$variations = Variation::all($prodotto->id);
|
||||
foreach ($variations as $variation) {
|
||||
$found_key_version = array_search('Versione', array_column($variation->attributes, 'name'));
|
||||
if ($variation->attributes[$found_key_version]->option == 'Nuovo') {
|
||||
$id = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$data1 = [
|
||||
|
||||
'regular_price' => $article->PrezzoIvato,
|
||||
'sku' => $article->IdArticolo,
|
||||
'sale_price' => $article->PrezzoIvatoScontatoCampagna,
|
||||
'date_on_sale_from' => $article->DataInizioCampagna,
|
||||
'date_on_sale_to' => $article->DataFineCampagna,
|
||||
'manage_stock' => true,
|
||||
'stock_quantity' => $article->stock,
|
||||
'purchasable' => false,
|
||||
|
||||
'attributes' => [
|
||||
[
|
||||
//'id' => 1,
|
||||
'id' => 6,
|
||||
'option' => 'Nuovo'
|
||||
]
|
||||
|
||||
],
|
||||
'meta_data' => [
|
||||
[
|
||||
'key' => 'ISBN',
|
||||
'value' => $article->Ean13
|
||||
],
|
||||
[
|
||||
'key' => 'misure',
|
||||
'value' => $article->Misure
|
||||
],
|
||||
[
|
||||
'key' => 'formato',
|
||||
'value' => $article->DescrizioneFormato
|
||||
],
|
||||
[
|
||||
'key' => 'pagine',
|
||||
'value' => $article->Pagine
|
||||
],
|
||||
[
|
||||
'key' => 'edizione',
|
||||
'value' => $article->Edizione
|
||||
],
|
||||
[
|
||||
'key' => 'ristampa',
|
||||
'value' => $article->Ristampa
|
||||
],
|
||||
[
|
||||
'key' => 'DataPubblicazione',
|
||||
'value' => $article->DataPubblicazione
|
||||
],
|
||||
|
||||
]
|
||||
];
|
||||
if ($id == 0) {
|
||||
$versione = 'Nuova versione';
|
||||
$category = Category::where('name', $article->argomento);
|
||||
if ($category->count() > 0) {
|
||||
$categoria = $category->first();
|
||||
$categoriaid = $categoria['id'];
|
||||
} else {
|
||||
$categoriaid = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "Error: " . $e->getMessage();
|
||||
|
||||
$productLogger->addLog('info', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get the last record of Stock
|
||||
echo "\nLast record Stock ...";
|
||||
|
||||
$lastrecordStock = Stock::latest('DataOra')->take(1)->get();
|
||||
|
||||
$productLogger->addLog('info', '\n');
|
||||
|
||||
foreach ($lastrecordStock as $stock) {
|
||||
$productLogger->addLog('info', "Codice: " . $stock->Codice);
|
||||
$productLogger->addLog('info', " QtaDisp: " . $stock->QtaDisponibile);
|
||||
$productLogger->addLog('info', " DataOra: " . $stock->DataOra);
|
||||
|
||||
// Get the productsku record by $stock->Codice
|
||||
$productsku = Product::where('sku', $stock->Codice)->first();
|
||||
|
||||
if ($productsku->count() > 0) {
|
||||
// log the productsku record
|
||||
$productskustr = json_encode($productsku, JSON_PRETTY_PRINT);
|
||||
echo $productskustr;
|
||||
$productLogger->addLog('info', "\n" . $productskustr);
|
||||
}
|
||||
|
||||
$productLogger->addLog('info', "\n");
|
||||
}
|
||||
|
||||
echo "************** FINE *********** ";
|
||||
|
||||
// Select all the fields of the Stock table
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$productLogger->addLog('info', $e->getMessage());
|
||||
echo "Error: " . $e->getMessage();
|
||||
}
|
||||
|
||||
$productLogger->setLogandSendEmail('Test Paolo');
|
||||
|
||||
if (true) {
|
||||
// Send the email
|
||||
Mail::raw($log, function ($message) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail("TESTPAO"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
46
app/Console/Kernel.php
Normal file → Executable file
46
app/Console/Kernel.php
Normal file → Executable file
@@ -4,6 +4,7 @@ namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
@@ -13,7 +14,8 @@ class Kernel extends ConsoleKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
Commands\CheckProductBySku::class,
|
||||
Commands\GetFirstOrder::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -24,14 +26,40 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
|
||||
// Log::info('Controllo schedule...');
|
||||
// $schedule->command('inspire')->hourly();
|
||||
$schedule->command('backup:clean')->daily()->at('02:00');
|
||||
$schedule->command('backup:run')->daily()->at('07:00');
|
||||
$schedule->command('order:gmupdate')->everyTenMinutes();
|
||||
$schedule->command('product:gmupdate')->daily()->at('02:00');
|
||||
$schedule->command('product:used:gmupdate')->daily()->at('04:30');
|
||||
//$schedule->command('product:updateqta')->hourly()->between('8:00', '00:00')->withoutOverlapping();
|
||||
$schedule->command('product:updateqta')->everyFiveMinutes()->between('8:00', '00:00')->withoutOverlapping();
|
||||
|
||||
$schedule->command('backup:clean')->daily()->at('02:00')->before(function () {
|
||||
Log::info('Running backup:clean command');
|
||||
});
|
||||
$schedule->command('backup:run')->daily()->at('07:00')->before(function () {
|
||||
Log::info('Running backup:run command');
|
||||
});
|
||||
$schedule->command('order:gmupdate')->everyTwoHours()->before(function () {
|
||||
Log::info('Running order:gmupdate command');
|
||||
});
|
||||
$schedule->command('product:gmupdate')->daily()->at('02:00')->before(function () {
|
||||
Log::info('Running product:gmupdate command');
|
||||
});
|
||||
$schedule->command('product:used:gmupdate')->daily()->at('04:30')->before(function () {
|
||||
Log::info('Running product:used:gmupdate command');
|
||||
});
|
||||
$schedule->command('product:updateqta')->everyFiveMinutes()->between('8:00', '00:00')->withoutOverlapping()->before(function () {
|
||||
Log::info('Running product:updateqta command');
|
||||
});
|
||||
/*$schedule->command('product:startday')
|
||||
->daily()->at('08:00')
|
||||
->before(function () {
|
||||
Log::info('Running product:startday command');
|
||||
});
|
||||
|
||||
|
||||
// Pianifica l'esecuzione del comando ogni giorno a mezzanotte
|
||||
$schedule->command('fix:storage-permissions')->everyFiveMinutes()->before(function () {
|
||||
Log::info('Running fix:storage-permissions');
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +69,7 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
$this->load(__DIR__ . '/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
|
||||
2661
app/CustomFuncPao.php
Normal file
2661
app/CustomFuncPao.php
Normal file
File diff suppressed because it is too large
Load Diff
0
app/Exceptions/Handler.php
Normal file → Executable file
0
app/Exceptions/Handler.php
Normal file → Executable file
0
app/Gm_product.php
Normal file → Executable file
0
app/Gm_product.php
Normal file → Executable file
18
app/Helpers/MyConfig.php
Normal file
18
app/Helpers/MyConfig.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
class MyConfig
|
||||
{
|
||||
static public $qtaInPrevendita;
|
||||
static public $qtaMinima;
|
||||
static public $campoPreordine;
|
||||
|
||||
// Metodo statico per inizializzare i valori
|
||||
public static function init()
|
||||
{
|
||||
self::$qtaInPrevendita = config('preordini.QTA_IN_PREVENDITA');
|
||||
self::$qtaMinima = config('preordini.QTA_MINIMA_PER_PREVENDITA');
|
||||
self::$campoPreordine = config('preordini.CAMPO_PREORDINE');
|
||||
}
|
||||
}
|
||||
728
app/Http/Controllers/ArticleController.php
Executable file
728
app/Http/Controllers/ArticleController.php
Executable file
@@ -0,0 +1,728 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Article;
|
||||
use DateTime;
|
||||
|
||||
class ArticleController extends Controller
|
||||
{
|
||||
private function convDate($data_italiana)
|
||||
{
|
||||
return DateTime::createFromFormat('Y-m-d', $data_italiana)->format('Y-d-m');
|
||||
}
|
||||
private function articoliByDataStart($data_start)
|
||||
{
|
||||
$data_start = $this->convDate($data_start);
|
||||
$data_start = $data_start . ' 00:00:00';
|
||||
ini_set("memory_limit", "512M");
|
||||
try {
|
||||
$articoli = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, SUM(Qta) as totVen, MAX(DataOra) as ultimaDataOra FROM T_WEB_Ordini WHERE DataOra > \'' . $data_start . '\' GROUP BY CodArticoloGM) O'), 'T_WEB_Articoli.IdArticolo', '=', 'O.CodArticoloGM')
|
||||
// ->leftJoin(DB::raw('(SELECT CodArticolo, SUM(Qta) as totVen, MAX(DataOra) as ultimaDataOra FROM T_WEB_ArticoliFatturati WHERE DataOra > \'' . $data_start . '\' GROUP BY CodArticolo) O'), 'T_WEB_Articoli.IdArticolo', '=', 'O.CodArticolo')
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->select('T_WEB_Articoli.*', 'ultimaDataOra', DB::raw('COALESCE(O.totVen, 0) as totVen'))
|
||||
->where('totVen', '>', 0)
|
||||
->where('DescrizioneTipologia', 'Libri')
|
||||
->orderBy('totVen', 'desc')
|
||||
->get();
|
||||
|
||||
// var_dump($articoli->toArray());
|
||||
|
||||
if ($articoli->isEmpty()) {
|
||||
return ['error' => 'Nessun articolo'];
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return ['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()];
|
||||
}
|
||||
|
||||
return $articoli;
|
||||
|
||||
}
|
||||
private function queryOrdini($numrec)
|
||||
{
|
||||
ini_set("memory_limit", "512M");
|
||||
try {
|
||||
$ordini = DB::table('T_WEB_Ordini as O')
|
||||
->leftJoin(DB::raw('(
|
||||
SELECT
|
||||
IdArticolo,
|
||||
MAX(DataOra) as data
|
||||
FROM T_WEB_Articoli
|
||||
GROUP BY IdArticolo
|
||||
) b'), 'O.CodArticoloGM', '=', 'b.IdArticolo')
|
||||
->join('T_WEB_Articoli as A', function ($join) {
|
||||
$join->on('O.CodArticoloGM', '=', 'A.IdArticolo')
|
||||
->on('b.data', '=', 'A.DataOra');
|
||||
})
|
||||
->select(
|
||||
DB::raw('ROW_NUMBER() OVER (ORDER BY O.DataOra DESC) AS progressivo'),
|
||||
'O.DataOra',
|
||||
'O.Qta',
|
||||
'A.Titolo',
|
||||
'O.CodArticoloGM',
|
||||
'A.Ean13'
|
||||
)
|
||||
->orderBy('O.DataOra', 'desc')
|
||||
->take($numrec)
|
||||
->get();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
return $ordini;
|
||||
|
||||
}
|
||||
private function queryOrdiniByIdArticolo($idArticolo)
|
||||
{
|
||||
ini_set("memory_limit", "512M");
|
||||
try {
|
||||
$ordini = DB::table('T_WEB_Ordini as O')
|
||||
->leftJoin(DB::raw('(
|
||||
SELECT
|
||||
IdArticolo,
|
||||
MAX(DataOra) as data
|
||||
FROM T_WEB_Articoli
|
||||
GROUP BY IdArticolo
|
||||
) b'), 'O.CodArticoloGM', '=', 'b.IdArticolo')
|
||||
->join('T_WEB_Articoli as A', function ($join) {
|
||||
$join->on('O.CodArticoloGM', '=', 'A.IdArticolo')
|
||||
->on('b.data', '=', 'A.DataOra');
|
||||
})
|
||||
->select(
|
||||
DB::raw('ROW_NUMBER() OVER (ORDER BY O.DataOra DESC) AS progressivo'),
|
||||
'O.DataOra',
|
||||
'O.Qta',
|
||||
'A.Titolo',
|
||||
'O.CodArticoloGM',
|
||||
'A.Ean13'
|
||||
)
|
||||
->orderBy('O.DataOra', 'desc')
|
||||
->where('O.CodArticoloGM', '=', $idArticolo)
|
||||
->get();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
return $ordini;
|
||||
|
||||
}
|
||||
private function queryFatturatiByIdArticolo($idArticolo)
|
||||
{
|
||||
ini_set("memory_limit", "512M");
|
||||
try {
|
||||
$ordini = DB::table('T_WEB_ArticoliFatturati as O')
|
||||
->leftJoin(DB::raw('(
|
||||
SELECT
|
||||
IdArticolo,
|
||||
MAX(DataOra) as data
|
||||
FROM T_WEB_Articoli
|
||||
GROUP BY IdArticolo
|
||||
) b'), 'O.CodArticolo', '=', 'b.IdArticolo')
|
||||
->join('T_WEB_Articoli as A', function ($join) {
|
||||
$join->on('O.CodArticolo', '=', 'A.IdArticolo')
|
||||
->on('b.data', '=', 'A.DataOra');
|
||||
})
|
||||
->select(
|
||||
DB::raw('ROW_NUMBER() OVER (ORDER BY O.DataOra DESC) AS progressivo'),
|
||||
'O.DataOra',
|
||||
'O.Qta',
|
||||
'A.Titolo',
|
||||
'O.CodArticolo',
|
||||
'A.Ean13'
|
||||
)
|
||||
->orderBy('O.DataOra', 'desc')
|
||||
->where('O.CodArticolo', '=', $idArticolo)
|
||||
->get();
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
return $ordini;
|
||||
|
||||
}
|
||||
private function queryshowInfoArticolo($idArticolo)
|
||||
{
|
||||
try {
|
||||
ini_set("memory_limit", "512M");
|
||||
|
||||
$articoli = Article::where('IdArticolo', $idArticolo)
|
||||
->get(); // Usa
|
||||
|
||||
if ($articoli->isEmpty()) {
|
||||
return ['error' => 'Nessun articolo'];
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return ['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()];
|
||||
}
|
||||
|
||||
return $articoli;
|
||||
}
|
||||
private function queryArticlesSales()
|
||||
{
|
||||
try {
|
||||
ini_set("memory_limit", "512M");
|
||||
|
||||
$articoliVenduti = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1 from T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1 ) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g JOIN (SELECT IdTipologia, MAX(DataOra) as data1 from T_WEB_Tipologie GROUP BY IdTipologia) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1 ) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1 from T_WEB_TipiFormato GROUP BY IdTipoFormato) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1 ) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, SUM(Qta) as totVen FROM T_WEB_Ordini GROUP BY CodArticoloGM) o'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'o.CodArticoloGM');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, SUM(Qta) as venduti3mesi, RANK() OVER (ORDER BY SUM(Qta) DESC) as rank3M
|
||||
FROM T_WEB_Ordini
|
||||
WHERE DataOra >= DATEADD(MONTH, -3, GETDATE())
|
||||
GROUP BY CodArticoloGM) p'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'p.CodArticoloGM');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, SUM(Qta) as venduti6mesi, RANK() OVER (ORDER BY SUM(Qta) DESC) as rank6M
|
||||
FROM T_WEB_Ordini
|
||||
WHERE DataOra >= DATEADD(MONTH, -6, GETDATE())
|
||||
GROUP BY CodArticoloGM) q'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.CodArticoloGM');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, SUM(Qta) as venduti1anno, RANK() OVER (ORDER BY SUM(Qta) DESC) as rank1Y
|
||||
FROM T_WEB_Ordini
|
||||
WHERE DataOra >= DATEADD(MONTH, -12, GETDATE())
|
||||
GROUP BY CodArticoloGM) r'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'r.CodArticoloGM');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticoloGM, MAX(DataOra) as ultimoOrdine
|
||||
FROM T_WEB_Ordini
|
||||
GROUP BY CodArticoloGM) s'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 's.CodArticoloGM');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as fat3mesi, RANK() OVER (ORDER BY SUM(TRY_CAST(Qta AS INT)) DESC) as fatrank3M
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE DataOra >= DATEADD(MONTH, -3, GETDATE())
|
||||
GROUP BY CodArticolo) t'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 't.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as fat6mesi, RANK() OVER (ORDER BY SUM(TRY_CAST(Qta AS INT)) DESC) as fatrank6M
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE DataOra >= DATEADD(MONTH, -6, GETDATE())
|
||||
GROUP BY CodArticolo) t2'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 't2.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS BIGINT)) as totFat
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE TRY_CAST(Qta AS BIGINT) IS NOT NULL
|
||||
GROUP BY CodArticolo) u'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'u.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(
|
||||
SELECT v.IdCollana, v.Descrizione as DescrizioneCollana
|
||||
FROM T_WEB_Collane v
|
||||
INNER JOIN (
|
||||
SELECT IdCollana, MAX(ID) as MaxID
|
||||
FROM T_WEB_Collane
|
||||
GROUP BY IdCollana
|
||||
) x ON v.IdCollana = x.IdCollana AND v.ID = x.MaxID
|
||||
) y'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdCollana', '=', 'y.IdCollana');
|
||||
})
|
||||
->leftJoin(DB::raw('(
|
||||
SELECT g2.IdArgomento, g2.Descrizione as DescrArgomento
|
||||
FROM T_WEB_Argomenti g2
|
||||
JOIN (SELECT IdArgomento, MAX(DataOra) as data12 from T_WEB_Argomenti
|
||||
GROUP BY IdArgomento) h2
|
||||
ON g2.IdArgomento = h2.IdArgomento AND g2.DataOra = h2.data12 ) i2'
|
||||
), function ($join) {
|
||||
$join->on('T_WEB_Articoli.ListaArgomenti', '=', 'i2.IdArgomento');
|
||||
})
|
||||
|
||||
|
||||
->select(
|
||||
'T_WEB_Articoli.*'
|
||||
,
|
||||
'f.DescrizioneStatoProdotto',
|
||||
'i.DescrizioneTipologia',
|
||||
'n.DescrizioneFormato',
|
||||
'y.DescrizioneCollana',
|
||||
'i2.DescrArgomento',
|
||||
DB::raw('COALESCE(o.totVen, 0) as totVen'),
|
||||
DB::raw('COALESCE(u.totFat, 0) as totFat'),
|
||||
DB::raw('COALESCE(p.venduti3mesi, 0) as venduti3mesi'),
|
||||
DB::raw('COALESCE(t.fat3mesi, 0) as fat3mesi'),
|
||||
DB::raw('COALESCE(t2.fat6mesi, 0) as fat6mesi'),
|
||||
DB::raw('COALESCE(p.rank3M, 0) as rank3M'),
|
||||
DB::raw('COALESCE(t.fatrank3M, 0) as fatrank3M'),
|
||||
DB::raw('COALESCE(t2.fatrank6M, 0) as fatrank6M'),
|
||||
DB::raw('COALESCE(q.venduti6mesi, 0) as venduti6mesi'),
|
||||
DB::raw('COALESCE(q.rank6M, 0) as rank6M'),
|
||||
DB::raw('COALESCE(r.venduti1anno, 0) as venduti1anno'),
|
||||
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
|
||||
DB::raw('s.ultimoOrdine')
|
||||
)
|
||||
->where(function ($query) {
|
||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
|
||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
||||
})
|
||||
->where('DescrizioneTipologia', 'Libri')
|
||||
->orderBy('totVen', 'desc')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
if ($articoliVenduti->isEmpty()) {
|
||||
return response()->json(['message' => 'Nessun articolo trovato.'], 404);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
// Restituisci una risposta JSON con i dati
|
||||
return $articoliVenduti;
|
||||
|
||||
}
|
||||
private function queryArticlesFatturati()
|
||||
{
|
||||
try {
|
||||
ini_set("memory_limit", "512M");
|
||||
|
||||
$articoliVenduti = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e
|
||||
JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1
|
||||
FROM T_WEB_StatiProdotto GROUP BY IdStatoProdotto) c
|
||||
ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1) f'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia FROM T_WEB_Tipologie g
|
||||
JOIN (SELECT IdTipologia, MAX(DataOra) as data1
|
||||
FROM T_WEB_Tipologie GROUP BY IdTipologia) h
|
||||
ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1) i'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipologia', '=', 'i.IdTipologia');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato FROM T_WEB_TipiFormato l
|
||||
JOIN (SELECT IdTipoFormato, MAX(DataOra) as data1
|
||||
FROM T_WEB_TipiFormato GROUP BY IdTipoFormato) m
|
||||
ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1) n'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdTipoFormato', '=', 'n.IdTipoFormato');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) AS totFat FROM T_WEB_ArticoliFatturati
|
||||
GROUP BY CodArticolo) o'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'o.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as venduti3mesi,
|
||||
RANK() OVER (ORDER BY SUM(TRY_CAST(Qta AS INT)) DESC) as rank3M
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE DataOra >= DATEADD(MONTH, -3, GETDATE())
|
||||
GROUP BY CodArticolo) p'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'p.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as venduti6mesi,
|
||||
RANK() OVER (ORDER BY SUM(TRY_CAST(Qta AS INT)) DESC) as rank6M
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE DataOra >= DATEADD(MONTH, -6, GETDATE())
|
||||
GROUP BY CodArticolo) q'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.CodArticolo');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as venduti1anno,
|
||||
RANK() OVER (ORDER BY SUM(TRY_CAST(Qta AS INT)) DESC) as rank1Y
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE DataOra >= DATEADD(MONTH, -12, GETDATE())
|
||||
GROUP BY CodArticolo) r'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'r.CodArticolo');
|
||||
})
|
||||
->addSelect(DB::raw('(
|
||||
SELECT MAX(DataOra)
|
||||
FROM T_WEB_ArticoliFatturati
|
||||
WHERE ISNUMERIC(Qta) = 1
|
||||
AND CodArticolo = T_WEB_Articoli.IdArticolo
|
||||
) as ultimoOrdine'))
|
||||
->leftJoin(DB::raw('(SELECT v.IdCollana, v.Descrizione as DescrizioneCollana
|
||||
FROM T_WEB_Collane v
|
||||
INNER JOIN (SELECT IdCollana, MAX(ID) as MaxID
|
||||
FROM T_WEB_Collane GROUP BY IdCollana) x
|
||||
ON v.IdCollana = x.IdCollana AND v.ID = x.MaxID) y'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdCollana', '=', 'y.IdCollana');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g2.IdArgomento, g2.Descrizione as DescrArgomento
|
||||
FROM T_WEB_Argomenti g2
|
||||
JOIN (SELECT IdArgomento, MAX(DataOra) as data12
|
||||
FROM T_WEB_Argomenti
|
||||
GROUP BY IdArgomento) h
|
||||
ON g2.IdArgomento = h.IdArgomento AND g2.DataOra = h.data12) i2'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.ListaArgomenti', '=', 'i2.IdArgomento');
|
||||
})
|
||||
->select(
|
||||
'T_WEB_Articoli.*',
|
||||
'f.DescrizioneStatoProdotto',
|
||||
'i.DescrizioneTipologia',
|
||||
'n.DescrizioneFormato',
|
||||
'y.DescrizioneCollana',
|
||||
'i2.DescrArgomento',
|
||||
DB::raw('COALESCE(o.totFat, 0) as totFat'),
|
||||
DB::raw('COALESCE(p.venduti3mesi, 0) as venduti3mesi'),
|
||||
DB::raw('COALESCE(p.rank3M, 0) as rank3M'),
|
||||
DB::raw('COALESCE(q.venduti6mesi, 0) as venduti6mesi'),
|
||||
DB::raw('COALESCE(q.rank6M, 0) as rank6M'),
|
||||
DB::raw('COALESCE(r.venduti1anno, 0) as venduti1anno'),
|
||||
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
|
||||
DB::raw('s.ultimoOrdine')
|
||||
)
|
||||
->where(function ($query) {
|
||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
|
||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
||||
})
|
||||
->where('DescrizioneTipologia', 'Libri')
|
||||
//->orderBy('rank1Y', 'asc')
|
||||
->orderBy('totFat', 'desc')
|
||||
->get();
|
||||
|
||||
if ($articoliVenduti->isEmpty()) {
|
||||
return response()->json(['message' => 'Nessun articolo fatturato trovato.'], 404);
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Registrazione dell'errore
|
||||
return response()->json(['error' => 'Si è verificato un errore durante il recupero dei dati: ' . $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
return $articoliVenduti;
|
||||
|
||||
}
|
||||
|
||||
public function showArticlesSales(Request $request)
|
||||
{
|
||||
try {
|
||||
|
||||
$articoliVenduti = $this->queryArticlesSales();
|
||||
|
||||
return view('export_articles_sales', ['articoliVenduti' => $articoliVenduti]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showArticlesSales: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function showArticlesFatturati(Request $request)
|
||||
{
|
||||
try {
|
||||
|
||||
$articoliVenduti = $this->queryArticlesFatturati();
|
||||
|
||||
return view('export_articles_fatturati', ['articoliVenduti' => $articoliVenduti]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showArticlesFatturati: ' . $e->getMessage() .
|
||||
'Articoli Fatturati ' . json_encode($articoliVenduti), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function showArticoliByDataStart($data_start)
|
||||
{
|
||||
try {
|
||||
$this->validateDate($data_start);
|
||||
|
||||
$articoliVenduti = $this->articoliByDataStart($data_start);
|
||||
|
||||
if ($articoliVenduti && isset($articoliVenduti['error'])) {
|
||||
return view('error', ['message' => $articoliVenduti['error']]);
|
||||
}
|
||||
|
||||
return view('view-lista-ordini-totale', ['articoli' => $articoliVenduti]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showArticoliByDataStart: ' . $e->getMessage(), 500);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
protected function validateDate($date)
|
||||
{
|
||||
$validator = \Validator::make(['data_start' => $date], [
|
||||
'data_start' => 'required|date_format:Y-m-d'
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
throw new ValidationException($validator);
|
||||
}
|
||||
}
|
||||
|
||||
public function showOrdini($numrec)
|
||||
{
|
||||
try {
|
||||
|
||||
$ordini = $this->queryOrdini($numrec);
|
||||
|
||||
return view('ordini_test', ['ordini' => $ordini]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showOrdini: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function showOrdiniByIdArticolo($idArticolo)
|
||||
{
|
||||
try {
|
||||
|
||||
$ordini = $this->queryOrdiniByIdArticolo($idArticolo);
|
||||
|
||||
return view('ordini_test', ['ordini' => $ordini]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showOrdiniByIdArticolo: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function showFatturatiByIdArticolo($idArticolo)
|
||||
{
|
||||
try {
|
||||
|
||||
$ordini = $this->queryFatturatiByIdArticolo($idArticolo);
|
||||
|
||||
return view('fatturati', ['ordini' => $ordini]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showFatturatiByIdArticolo: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function showInfoArticolo($idArticolo)
|
||||
{
|
||||
try {
|
||||
|
||||
$articoli = $this->queryshowInfoArticolo($idArticolo);
|
||||
|
||||
if ($articoli && isset($articoli['error'])) {
|
||||
return view('error', ['message' => $articoli['error']]);
|
||||
}
|
||||
|
||||
return view('info-articolo', ['articoli' => $articoli]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting showInfoArticolo: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function exportArticlesSales(Request $request): Response
|
||||
{
|
||||
try {
|
||||
|
||||
$articoliVenduti = $this->queryArticlesSales();
|
||||
|
||||
$filename = 'articoli_venduti_' . date('Y-m-d') . '.csv';
|
||||
$response = new Response();
|
||||
$response->headers->set('Content-Type', 'text/csv');
|
||||
$response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '"');
|
||||
|
||||
|
||||
$csvContent = "IdArticolo,Titolo,DataPubblicazione,Ean13,rank3M,rank6M,rank1Y,totVen,totVenUltimoMese,totVenUltimi6Mesi,totVenUltimoAnno,totVenUltimi2Anni,UltimoOrdine,misure\n";
|
||||
|
||||
foreach ($articoliVenduti as $articoloVenduto) {
|
||||
$csvContent .= "{$articoloVenduto->idArticolo},{$articoloVenduto->Titolo},{$articoloVenduto->DataPubblicazione},{$articoloVenduto->rank3M},{$articoloVenduto->rank6M},{$articoloVenduto->rank1Y},{$articoloVenduto->totVen},{$articoloVenduto->venduti3mesi},{$articoloVenduto->venduti6mesi},{$articoloVenduto->venduti1anno},{$articoloVenduto->ultimoOrdine},{$articoloVenduto->misure}\n";
|
||||
}
|
||||
|
||||
$response->setContent($csvContent);
|
||||
return $response;
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Error exporting exportArticlesSales: ' . $e->getMessage(), 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function exportArticlesSalesByJSON_Base($cosa, Request $request): Response
|
||||
{
|
||||
try {
|
||||
if ($cosa === 'fatturati') {
|
||||
$articoliVenduti = $this->queryArticlesFatturati();
|
||||
} else {
|
||||
$articoliVenduti = $this->queryArticlesSales();
|
||||
}
|
||||
|
||||
if ($articoliVenduti->isEmpty()) {
|
||||
return response()->json(['message' => 'Nessun articolo trovato.'], 404);
|
||||
} else {
|
||||
|
||||
// return response()->json($articoliVenduti);
|
||||
|
||||
$result = $articoliVenduti->map(function ($articoloVenduto) {
|
||||
return [
|
||||
'IdArticolo' => $articoloVenduto->IdArticolo,
|
||||
'title' => $articoloVenduto->Titolo,
|
||||
'DataPubblicazione' => $articoloVenduto->DataPubblicazione,
|
||||
'isbn' => $articoloVenduto->Ean13,
|
||||
'IdCollana' => $articoloVenduto->IdCollana,
|
||||
'DescrizioneCollana' => $articoloVenduto->DescrizioneCollana,
|
||||
'DescrArgomento' => $articoloVenduto->DescrArgomento,
|
||||
'ListaArgomenti' => $articoloVenduto->ListaArgomenti,
|
||||
'Pagine' => $articoloVenduto->Pagine,
|
||||
'IdTipoFormato' => $articoloVenduto->IdTipoFormato,
|
||||
'Misure' => $articoloVenduto->Misure,
|
||||
'totVen' => $articoloVenduto->totVen,
|
||||
'totFat' => $articoloVenduto->totFat,
|
||||
'rank3M' => $articoloVenduto->rank3M,
|
||||
'fatrank3M' => $articoloVenduto->fatrank3M,
|
||||
'fatrank6M' => $articoloVenduto->fatrank6M,
|
||||
'rank6M' => $articoloVenduto->rank6M,
|
||||
'rank1Y' => $articoloVenduto->rank1Y,
|
||||
'fatLast3M' => $articoloVenduto->fat3mesi,
|
||||
'fatLast6M' => $articoloVenduto->fat6mesi,
|
||||
'vLast3M' => $articoloVenduto->venduti3mesi,
|
||||
'vLast6M' => $articoloVenduto->venduti6mesi,
|
||||
'vLastY' => $articoloVenduto->venduti1anno,
|
||||
'dataUltimoOrdine' => $articoloVenduto->ultimoOrdine,
|
||||
];
|
||||
});
|
||||
|
||||
// Imposta il contenuto della risposta come JSON
|
||||
$response = new Response($result->toJson(), 200);
|
||||
$response->headers->set('Content-Type', 'application/json');
|
||||
$response->headers->set('Content-Disposition', 'attachment; filename="ranking_' . $cosa . '_' . date('Y-m-d') . '.json"');
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return new Response('Error exporting exportArticlesSalesByJSON_Base: ' . $e->getMessage() . '<br>Articoli: ' . json_decode($articoliVenduti), 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function exportArticlesSalesByJSON(Request $request): Response
|
||||
{
|
||||
return $this->exportArticlesSalesByJSON_Base('', $request);
|
||||
}
|
||||
|
||||
public function exportArticlesFatturatiByJSON(Request $request): Response
|
||||
{
|
||||
return $this->exportArticlesSalesByJSON_Base('fatturati', $request);
|
||||
}
|
||||
|
||||
public function test(Request $request)
|
||||
{
|
||||
try {
|
||||
|
||||
$articoli = $this->queryTest2();
|
||||
|
||||
dd($articoli);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
// Potresti considerare di registrare l'errore per debugging
|
||||
return new Response('Erroe test: ' . $e->getMessage(), 500);
|
||||
|
||||
}
|
||||
}
|
||||
public function queryTest2()
|
||||
{
|
||||
try {
|
||||
$duplicati = DB::table('T_WEB_Articoli')
|
||||
->select('idArticolo', 'Titolo', 'DataPubblicazione', 'Ean13', DB::raw('count(*) as total'))
|
||||
->groupBy('idArticolo', 'Titolo', 'DataPubblicazione', 'Ean13')
|
||||
->having('total', '>', 0) // Filtra duplicati
|
||||
->get();
|
||||
|
||||
|
||||
return $duplicati;
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return new Response('Errore: ' . $e->getMessage(), 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function showTableContent($tableName, $recordCount)
|
||||
{
|
||||
// Verifica se la tabella esiste
|
||||
if (!Schema::hasTable($tableName)) {
|
||||
return "La tabella '$tableName' non esiste.";
|
||||
}
|
||||
|
||||
// Ottieni tutti i campi della tabella
|
||||
$columns = Schema::getColumnListing($tableName);
|
||||
|
||||
// Recupera i record dalla tabella
|
||||
$records = DB::table($tableName)->take($recordCount)->get();
|
||||
|
||||
// Se non ci sono record, restituisci un messaggio
|
||||
if ($records->isEmpty()) {
|
||||
return "Nessun record trovato nella tabella '$tableName'.";
|
||||
}
|
||||
|
||||
// Prepara l'output in formato tabellare
|
||||
$output = "<table border='1'><thead><tr>";
|
||||
|
||||
// Intestazioni della tabella
|
||||
foreach ($columns as $column) {
|
||||
$output .= "<th>$column</th>";
|
||||
}
|
||||
$output .= "</tr></thead><tbody>";
|
||||
|
||||
// Righe dei dati
|
||||
foreach ($records as $record) {
|
||||
$output .= "<tr>";
|
||||
foreach ($columns as $column) {
|
||||
$output .= "<td>" . ($record->$column ?? 'NULL') . "</td>";
|
||||
}
|
||||
$output .= "</tr>";
|
||||
}
|
||||
|
||||
$output .= "</tbody></table>";
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
public function showTableByName($tableName, $numrec)
|
||||
{
|
||||
|
||||
// Usa la funzione showTableContent per ottenere i dati in formato tabellare
|
||||
$tableContent = $this->showTableContent($tableName, $numrec);
|
||||
|
||||
// Passa i dati alla vista
|
||||
return view('article.info', [
|
||||
'tableName' => $tableName,
|
||||
'tableContent' => $tableContent
|
||||
]);
|
||||
}
|
||||
}
|
||||
0
app/Http/Controllers/Controller.php
Normal file → Executable file
0
app/Http/Controllers/Controller.php
Normal file → Executable file
41
app/Http/Controllers/TestPaoController.php
Executable file
41
app/Http/Controllers/TestPaoController.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Codexshaper\WooCommerce\Facades\Product;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class TestPaoController extends Controller
|
||||
{
|
||||
public function runTestPao()
|
||||
{
|
||||
try {
|
||||
echo "run";
|
||||
Artisan::call('product:testpao', []);
|
||||
} catch (\Exception $e) {
|
||||
// Log or handle the exception here
|
||||
}
|
||||
}
|
||||
|
||||
public function provapao()
|
||||
{
|
||||
$this->runTestPao();
|
||||
echo "Test OK!";
|
||||
}
|
||||
|
||||
public function getProductBySku($sku)
|
||||
{
|
||||
echo "getProductBySku:" . $sku;
|
||||
$product = Product::where('sku', $sku)->first();
|
||||
|
||||
// Estrai il prodotto utilizzando il codice SKU
|
||||
|
||||
if ($product) {
|
||||
// Ritorna il prodotto trovato come JSON
|
||||
return response()->json($product);
|
||||
} else {
|
||||
// Ritorna un errore se il prodotto non è trovato
|
||||
return response()->json(['error' => 'Product not found'], 404);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
app/Http/Controllers/WooCommerceController.php
Normal file
31
app/Http/Controllers/WooCommerceController.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Codexshaper\WooCommerce\Facades\WooCommerce;
|
||||
use Illuminate\Http\Request;
|
||||
use Codexshaper\WooCommerce\Models\Product;
|
||||
|
||||
class WooCommerceController extends Controller
|
||||
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
try {
|
||||
// Esegui una richiesta per ottenere i primi prodotti
|
||||
// $products = WooCommerce::get('products', ['per_page' => 1]);
|
||||
$products = Product::where('sku','16670')->get();
|
||||
|
||||
if (!empty($products)) {
|
||||
// Stampa l'ID del primo prodotto
|
||||
echo 'Connection successful! First product ID: ' . $products[0]->id;
|
||||
} else {
|
||||
echo 'No products found.';
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Gestisce eventuali errori di connessione
|
||||
echo 'Error: ' . $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
0
app/Http/Kernel.php
Normal file → Executable file
0
app/Http/Kernel.php
Normal file → Executable file
0
app/Http/Middleware/Authenticate.php
Normal file → Executable file
0
app/Http/Middleware/Authenticate.php
Normal file → Executable file
0
app/Http/Middleware/CheckForMaintenanceMode.php
Normal file → Executable file
0
app/Http/Middleware/CheckForMaintenanceMode.php
Normal file → Executable file
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/EncryptCookies.php
Normal file → Executable file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
0
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file → Executable file
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/TrimStrings.php
Normal file → Executable file
0
app/Http/Middleware/TrustHosts.php
Normal file → Executable file
0
app/Http/Middleware/TrustHosts.php
Normal file → Executable file
0
app/Http/Middleware/TrustProxies.php
Normal file → Executable file
0
app/Http/Middleware/TrustProxies.php
Normal file → Executable file
0
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
0
app/Http/Middleware/VerifyCsrfToken.php
Normal file → Executable file
11
app/Models/Post.php
Executable file
11
app/Models/Post.php
Executable file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Post extends Model
|
||||
{
|
||||
protected $table = 'wp_posts'; // Nome della tabella di WordPress
|
||||
protected $connection = 'wordpress'; // Connessione al database di WordPress
|
||||
}
|
||||
11
app/Models/PostMeta.php
Executable file
11
app/Models/PostMeta.php
Executable file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PostMeta extends Model
|
||||
{
|
||||
protected $table = 'wp_postmeta';
|
||||
protected $connection = 'wordpress';
|
||||
}
|
||||
21
app/Mylog.php
Executable file
21
app/Mylog.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Mylog extends Model
|
||||
{
|
||||
public static $subject = '';
|
||||
|
||||
public static $email = 'log@fioredellavita.it';
|
||||
|
||||
public static function getSubjectEmail(string $subject) {
|
||||
return self::$subject . " " . $subject;
|
||||
}
|
||||
|
||||
public static function getEmail() {
|
||||
return self::$email;
|
||||
}
|
||||
|
||||
}
|
||||
0
app/Newproduct.php
Normal file → Executable file
0
app/Newproduct.php
Normal file → Executable file
0
app/Order.php
Normal file → Executable file
0
app/Order.php
Normal file → Executable file
15
app/OrderWeb.php
Executable file
15
app/OrderWeb.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OrderWeb extends Model
|
||||
{
|
||||
//protected $connection = 'mysql_test';
|
||||
protected $connection = 'sqlsrv_test';
|
||||
protected $table = 'T_WEB_TestateOrdini';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
}
|
||||
1
app/Orderdetail.php
Normal file → Executable file
1
app/Orderdetail.php
Normal file → Executable file
@@ -13,4 +13,5 @@ class Orderdetail extends Model
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
17
app/OrderdetailWeb.php
Executable file
17
app/OrderdetailWeb.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OrderdetailWeb extends Model
|
||||
{
|
||||
//protected $connection = 'mysql_test';
|
||||
protected $connection = 'sqlsrv_test';
|
||||
protected $table = 'T_WEB_Ordini';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
0
app/Providers/AppServiceProvider.php
Normal file → Executable file
0
app/Providers/AppServiceProvider.php
Normal file → Executable file
0
app/Providers/AuthServiceProvider.php
Normal file → Executable file
0
app/Providers/AuthServiceProvider.php
Normal file → Executable file
0
app/Providers/BroadcastServiceProvider.php
Normal file → Executable file
0
app/Providers/BroadcastServiceProvider.php
Normal file → Executable file
0
app/Providers/EventServiceProvider.php
Normal file → Executable file
0
app/Providers/EventServiceProvider.php
Normal file → Executable file
0
app/Providers/RouteServiceProvider.php
Normal file → Executable file
0
app/Providers/RouteServiceProvider.php
Normal file → Executable file
0
app/Publisher.php
Normal file → Executable file
0
app/Publisher.php
Normal file → Executable file
101
app/Services/ProductLogger.php
Executable file
101
app/Services/ProductLogger.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use App\Setting;
|
||||
use App\Article;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use App\Mylog;
|
||||
|
||||
class ProductLogger
|
||||
{
|
||||
public $logs = [];
|
||||
protected $settingOra = null;
|
||||
|
||||
protected $channel = "";
|
||||
|
||||
protected $aggiornato = false;
|
||||
|
||||
protected $scrivisoloseaggiornato = false;
|
||||
|
||||
public function __construct($settingOra, $channel, $scrivisoloseaggiornato = false)
|
||||
{
|
||||
$this->settingOra = $settingOra;
|
||||
$this->channel = $channel;
|
||||
$this->scrivisoloseaggiornato = $scrivisoloseaggiornato;
|
||||
$this->init();
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
$oraUpdate = Carbon::now();
|
||||
if ($this->settingOra) {
|
||||
$this->logs['start'] = 'Inizio da ' . $this->settingOra->value . "\n<br>";
|
||||
$this->logs['end'] = 'Fino a ' . $oraUpdate->toDateTimeString() . "\n<br>";
|
||||
} else {
|
||||
$this->logs['start'] = 'Iniziato: ' . $oraUpdate->toDateTimeString() . "\n<br>";
|
||||
}
|
||||
$this->logs['custom'] = ""; // for custom log messages
|
||||
}
|
||||
|
||||
public function updateSettingOra($newOra)
|
||||
{
|
||||
$this->settingOra = $newOra;
|
||||
}
|
||||
|
||||
public function setLogandSendEmail($descr)
|
||||
{
|
||||
if (is_object($this->settingOra) && method_exists($this->settingOra, 'save')) {
|
||||
$ora_update = Carbon::now();
|
||||
$this->settingOra->value = $ora_update->toDateTimeString();
|
||||
$this->settingOra->save();
|
||||
} else {
|
||||
// Gestisci il caso in cui $this->settingOra non è un oggetto o non ha il metodo save
|
||||
// Log::warning('Impossibile eseguire il metodo save() su $this->settingOra, non è un oggetto o il metodo non esiste.');
|
||||
}
|
||||
|
||||
if (($this->scrivisoloseaggiornato && $this->aggiornato) || !$this->scrivisoloseaggiornato) {
|
||||
Log::channel($this->channel)->notice($this->concatenateLogs());
|
||||
|
||||
Mail::raw($this->concatenateLogs(), function ($message) use ($descr) {
|
||||
$message->to(Mylog::getEmail());
|
||||
$message->subject(Mylog::getSubjectEmail($descr));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function addLog($type, $message)
|
||||
{
|
||||
if ($type === '') {
|
||||
$type = 'LOG';
|
||||
}
|
||||
if (!isset($this->logs[$type])) {
|
||||
$this->logs[$type] = "";
|
||||
}
|
||||
if (isset($this->logs[$type])) {
|
||||
$this->logs[$type] .= $message . "\n<br>";
|
||||
}
|
||||
}
|
||||
|
||||
public function getLogs()
|
||||
{
|
||||
return $this->logs;
|
||||
}
|
||||
|
||||
public function concatenateLogs()
|
||||
{
|
||||
return implode("", $this->logs);
|
||||
}
|
||||
|
||||
public function setAggiornato($aggiornato)
|
||||
{
|
||||
$this->aggiornato = $aggiornato;
|
||||
}
|
||||
|
||||
public function getAggiornato()
|
||||
{
|
||||
return $this->aggiornato;
|
||||
}
|
||||
}
|
||||
0
app/Setting.php
Normal file → Executable file
0
app/Setting.php
Normal file → Executable file
0
app/Statusproduct.php
Normal file → Executable file
0
app/Statusproduct.php
Normal file → Executable file
0
app/Stock.php
Normal file → Executable file
0
app/Stock.php
Normal file → Executable file
0
app/User.php
Normal file → Executable file
0
app/User.php
Normal file → Executable file
0
bootstrap/app.php
Normal file → Executable file
0
bootstrap/app.php
Normal file → Executable file
@@ -8,13 +8,13 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.2.5|^8.0",
|
||||
"codexshaper/laravel-woocommerce": "^3.0",
|
||||
"php": "^7.3|^8.0",
|
||||
"codexshaper/laravel-woocommerce": "^3.0.4",
|
||||
"fideloper/proxy": "^4.4",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"fruitcake/laravel-cors": "^2.2",
|
||||
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
|
||||
"laravel/framework": "^7.29",
|
||||
"laravel/tinker": "^2.5",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/tinker": "^2.9.0",
|
||||
"spatie/laravel-backup": "^6"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -41,6 +41,9 @@
|
||||
"classmap": [
|
||||
"database/seeds",
|
||||
"database/factories"
|
||||
],
|
||||
"files": [
|
||||
"app/Helpers/MyConfig.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
||||
2692
composer.lock
generated
2692
composer.lock
generated
File diff suppressed because it is too large
Load Diff
2
composer_update.sh
Executable file
2
composer_update.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
/usr/bin/php8.2 /usr/local/bin/composer update
|
||||
|
||||
0
config/app.php
Normal file → Executable file
0
config/app.php
Normal file → Executable file
0
config/auth.php
Normal file → Executable file
0
config/auth.php
Normal file → Executable file
0
config/backup.php
Normal file → Executable file
0
config/backup.php
Normal file → Executable file
0
config/broadcasting.php
Normal file → Executable file
0
config/broadcasting.php
Normal file → Executable file
0
config/cache.php
Normal file → Executable file
0
config/cache.php
Normal file → Executable file
0
config/cors.php
Normal file → Executable file
0
config/cors.php
Normal file → Executable file
21
config/database.php
Normal file → Executable file
21
config/database.php
Normal file → Executable file
@@ -83,7 +83,7 @@ return [
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'mysql_appoggio' => [
|
||||
'mysql_appoggio' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL_MYSQL2'),
|
||||
'host' => env('DB_HOST_MYSQL1', '127.0.0.1'),
|
||||
@@ -130,9 +130,11 @@ return [
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||
'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'true'),
|
||||
],
|
||||
|
||||
'sqlsrv_test' => [
|
||||
'sqlsrv_test' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL_SQLSRVTEST'),
|
||||
'host' => env('DB_HOST_SQLSRVTEST', 'localhost'),
|
||||
@@ -145,6 +147,19 @@ return [
|
||||
'prefix_indexes' => true,
|
||||
],
|
||||
|
||||
/*
|
||||
'wordpress' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('WORDPRESS_HOST'),
|
||||
'port' => env('WORDPRESS_port'),
|
||||
'database' => env('WORDPRESS_DBNAME'),
|
||||
'username' => env('WORDPRESS_USER'),
|
||||
'password' => env('WORDPRESS_PWD'),
|
||||
'charset' => 'utf8',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '', // Prefix della tabella di WordPress
|
||||
]*/
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -177,7 +192,7 @@ return [
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
|
||||
0
config/filesystems.php
Normal file → Executable file
0
config/filesystems.php
Normal file → Executable file
0
config/hashing.php
Normal file → Executable file
0
config/hashing.php
Normal file → Executable file
18
config/logging.php
Normal file → Executable file
18
config/logging.php
Normal file → Executable file
@@ -106,6 +106,18 @@ return [
|
||||
'level' => 'info',
|
||||
'days' => 30,
|
||||
],
|
||||
'neworders' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/neworders/orders.log'),
|
||||
'level' => 'info',
|
||||
'days' => 30,
|
||||
],
|
||||
'checkorders' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/checkorders.log'),
|
||||
'level' => 'info',
|
||||
'days' => 30,
|
||||
],
|
||||
'updateproductsused' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/updateproductsused/update.log'),
|
||||
@@ -117,6 +129,12 @@ return [
|
||||
'path' => storage_path('logs/updateproductsqta/updateqta.log'),
|
||||
'level' => 'info',
|
||||
'days' => 30,
|
||||
],
|
||||
'testpao' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/testpao.log'),
|
||||
'level' => 'info',
|
||||
'days' => 30,
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
0
config/mail.php
Normal file → Executable file
0
config/mail.php
Normal file → Executable file
7
config/preordini.php
Normal file
7
config/preordini.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'QTA_IN_PREVENDITA' => 10000,
|
||||
'QTA_MINIMA_PER_PREVENDITA' => 9000,
|
||||
'CAMPO_PREORDINE' => '_ywpo_preorder',
|
||||
];
|
||||
0
config/queue.php
Normal file → Executable file
0
config/queue.php
Normal file → Executable file
0
config/services.php
Normal file → Executable file
0
config/services.php
Normal file → Executable file
0
config/session.php
Normal file → Executable file
0
config/session.php
Normal file → Executable file
0
config/view.php
Normal file → Executable file
0
config/view.php
Normal file → Executable file
@@ -53,7 +53,7 @@ return [
|
||||
* Default WP timeout
|
||||
*================================================================================.
|
||||
*/
|
||||
'timeout' => env('WOOCOMMERCE_WP_TIMEOUT', 15),
|
||||
'timeout' => env('WOOCOMMERCE_WP_TIMEOUT', 30),
|
||||
|
||||
/**
|
||||
*================================================================================
|
||||
|
||||
0
database/.gitignore
vendored
Normal file → Executable file
0
database/.gitignore
vendored
Normal file → Executable file
0
database/factories/UserFactory.php
Normal file → Executable file
0
database/factories/UserFactory.php
Normal file → Executable file
0
database/migrations/2014_10_12_000000_create_users_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_000000_create_users_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_100000_create_password_resets_table.php
Normal file → Executable file
0
database/migrations/2014_10_12_100000_create_password_resets_table.php
Normal file → Executable file
0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Normal file → Executable file
0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php
Normal file → Executable file
0
database/seeds/DatabaseSeeder.php
Normal file → Executable file
0
database/seeds/DatabaseSeeder.php
Normal file → Executable file
14
launch.json
Executable file
14
launch.json
Executable file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "LARAVEL Listen for Xdebug (PROD)",
|
||||
"type": "php",
|
||||
"request": "launch",
|
||||
"port": 9003,
|
||||
"pathMappings": {
|
||||
"/var/www/html": "${workspaceFolder}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
0
package.json
Normal file → Executable file
0
package.json
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user