mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-23 21:34:24 +01:00
Compare commits
882 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff146c4713 | ||
|
|
3d88e03c88 | ||
|
|
6041233c4b | ||
|
|
f919a83721 | ||
|
|
c8111f9726 | ||
|
|
472665c038 | ||
|
|
06e67ee3da | ||
|
|
f15efe2ca8 | ||
|
|
08feb72c6c | ||
|
|
dd3709be29 | ||
|
|
dad5f55081 | ||
|
|
717f315551 | ||
|
|
be46c48f55 | ||
|
|
79c6f82841 | ||
|
|
ff7e2c4292 | ||
|
|
7de8680a37 | ||
|
|
cbdeebd338 | ||
|
|
e31e6371e3 | ||
|
|
095f72a3a7 | ||
|
|
9560eb00bd | ||
|
|
e52c212a81 | ||
|
|
1a8f540dc8 | ||
|
|
de8f15ce38 | ||
|
|
fe4648657e | ||
|
|
2d5b6ea490 | ||
|
|
f810a89977 | ||
|
|
cea9183889 | ||
|
|
3fa9d82ca5 | ||
|
|
95e941dd23 | ||
|
|
68385e59d0 | ||
|
|
e3e15e5df1 | ||
|
|
0ca643dffb | ||
|
|
e728453b7a | ||
|
|
c73820a931 | ||
|
|
2821d18720 | ||
|
|
0eeac1817d | ||
|
|
3d2c20193f | ||
|
|
cdbd56c0ba | ||
|
|
bb8290ef23 | ||
|
|
7df18dbad8 | ||
|
|
63ed00fdba | ||
|
|
ac8af31c51 | ||
|
|
7728f8c895 | ||
|
|
acc5f754e6 | ||
|
|
9e3f3e70d6 | ||
|
|
829ea724cd | ||
|
|
c1db001cd8 | ||
|
|
4f17908c59 | ||
|
|
12f0351deb | ||
|
|
8efce11329 | ||
|
|
80d48a0d52 | ||
|
|
9a9784238c | ||
|
|
97dcd936df | ||
|
|
a2fb7eea1b | ||
|
|
38ca2ddefe | ||
|
|
a318ee912b | ||
|
|
b2fc785985 | ||
|
|
e8a053f1df | ||
|
|
2c6a346811 | ||
|
|
89634f83da | ||
|
|
d6b780eab3 | ||
|
|
3c531d2058 | ||
|
|
4fb2746e6f | ||
|
|
a4d5990c2e | ||
|
|
4a212daf49 | ||
|
|
9738ce853a | ||
|
|
11d4fafca0 | ||
|
|
dec4b2b0a2 | ||
|
|
0250d5de8a | ||
|
|
e6cb968eff | ||
|
|
970b07f646 | ||
|
|
5bf181adf7 | ||
|
|
5033716755 | ||
|
|
b0489d32ab | ||
|
|
35caafadb7 | ||
|
|
23da8b6934 | ||
|
|
aac5629f55 | ||
|
|
9b7afdcbbd | ||
|
|
b986f2f1a7 | ||
|
|
74157e15d2 | ||
|
|
fb70814412 | ||
|
|
c295e97f9c | ||
|
|
8478c38477 | ||
|
|
f6db26a21d | ||
|
|
3b9f0d9ce6 | ||
|
|
ca41760a68 | ||
|
|
483523e24c | ||
|
|
935374d368 | ||
|
|
5ea91b5399 | ||
|
|
e09180ce0c | ||
|
|
de56758859 | ||
|
|
cc6b3f968c | ||
|
|
70d711e083 | ||
|
|
10beb6cfc6 | ||
|
|
f72245353f | ||
|
|
cc88462e1a | ||
|
|
22a1340ba9 | ||
|
|
2faa32b9c8 | ||
|
|
1a3662176b | ||
|
|
177c5eb51f | ||
|
|
dff4b0077b | ||
|
|
f1c47cf536 | ||
|
|
233865da21 | ||
|
|
30e1fc6c9f | ||
|
|
de0832bcea | ||
|
|
6cf4969100 | ||
|
|
bebc6fbb78 | ||
|
|
589fe1215a | ||
|
|
cfedd3b485 | ||
|
|
d2a78ce515 | ||
|
|
b1aefa13d7 | ||
|
|
9d0a2c0978 | ||
|
|
2328de8e7c | ||
|
|
c205803687 | ||
|
|
b595f8468d | ||
|
|
9c837750a5 | ||
|
|
769b1935e3 | ||
|
|
da3edf38ed | ||
|
|
8f0d1d4e25 | ||
|
|
8dbdf910f9 | ||
|
|
d0c80f3228 | ||
|
|
22391f32dd | ||
|
|
16542692d5 | ||
|
|
fbc9934e62 | ||
|
|
125d97cf5d | ||
|
|
a544af5d02 | ||
|
|
8fde66127c | ||
|
|
45483a6fd9 | ||
|
|
ecf01bacd7 | ||
|
|
d66612eb55 | ||
|
|
cc9f0e5bcf | ||
|
|
87fc31fa7c | ||
|
|
1a2813e13c | ||
|
|
904dbef1b2 | ||
|
|
db521258ea | ||
|
|
adc251a053 | ||
|
|
a8675af65b | ||
|
|
66a9b7b7c3 | ||
|
|
7f06c6b326 | ||
|
|
f9b19c8336 | ||
|
|
549fa27308 | ||
|
|
b31ff84b11 | ||
|
|
1dbf850bf1 | ||
|
|
bc9ce0c208 | ||
|
|
4655321e82 | ||
|
|
7328aeacf9 | ||
|
|
1d8e24660c | ||
|
|
252811d116 | ||
|
|
dad0061495 | ||
|
|
75a54088fc | ||
|
|
160f061326 | ||
|
|
51bd610f0c | ||
|
|
ebe7aacf54 | ||
|
|
03c3218a0c | ||
|
|
59a51cc3ed | ||
|
|
15b9cab91c | ||
|
|
7e8e7a24c3 | ||
|
|
414ea91137 | ||
|
|
0a172228f9 | ||
|
|
f36f7c62a5 | ||
|
|
b5260fc0cc | ||
|
|
0dda1f9a3e | ||
|
|
055add5503 | ||
|
|
2ec81d9a18 | ||
|
|
0152770cfe | ||
|
|
310cad4455 | ||
|
|
454f381e11 | ||
|
|
717d769009 | ||
|
|
77b557e954 | ||
|
|
dd08c92f2a | ||
|
|
6bd194b3fa | ||
|
|
061ebaf0b9 | ||
|
|
9529bd2f3a | ||
|
|
f5d90ef9c0 | ||
|
|
6a6a24ee3c | ||
|
|
b313d7c0fd | ||
|
|
793bfde2a6 | ||
|
|
4d319bc2e1 | ||
|
|
8978367505 | ||
|
|
b416748451 | ||
|
|
961989d149 | ||
|
|
0463e210d8 | ||
|
|
e9b064b7f0 | ||
|
|
efd79201dc | ||
|
|
3bc7eb5c59 | ||
|
|
f022de3ff2 | ||
|
|
c47998522a | ||
|
|
56618e0c59 | ||
|
|
e1c499bbe7 | ||
|
|
0fdb91548f | ||
|
|
c0911e55c8 | ||
|
|
2f584530ce | ||
|
|
7f38769d62 | ||
|
|
6a9d4c5ca9 | ||
|
|
f8e609b3b3 | ||
|
|
d5cc1d7754 | ||
|
|
b1d60ec82b | ||
|
|
bada2c29df | ||
|
|
7b453994d8 | ||
|
|
8436004ce6 | ||
|
|
ed0b3a6f4d | ||
|
|
d092852768 | ||
|
|
de948fad37 | ||
|
|
b6f9a62a65 | ||
|
|
09b69a178b | ||
|
|
e199ef7cae | ||
|
|
358a4883c6 | ||
|
|
ff63da5fac | ||
|
|
bd65974d56 | ||
|
|
411a18ec9f | ||
|
|
00136cf9e3 | ||
|
|
67c9853cd2 | ||
|
|
4bf8b3097f | ||
|
|
ca854a434e | ||
|
|
8a8a7f4e95 | ||
|
|
3623872851 | ||
|
|
55c33edeec | ||
|
|
602bcc5361 | ||
|
|
b699b3f9b9 | ||
|
|
92562150ec | ||
|
|
9ac93e1e98 | ||
|
|
8a52b78f3d | ||
|
|
89698730d0 | ||
|
|
9f9ca3faf7 | ||
|
|
019e17c040 | ||
|
|
448bd21195 | ||
|
|
9d14dd25c4 | ||
|
|
b6f714fe44 | ||
|
|
89d15ac306 | ||
|
|
52de478d6a | ||
|
|
7601198799 | ||
|
|
830fdbdaca | ||
|
|
23780ad765 | ||
|
|
72a2510b46 | ||
|
|
1774bca857 | ||
|
|
8150d06abe | ||
|
|
7715579d71 | ||
|
|
db7a02f33d | ||
|
|
16cec77d5b | ||
|
|
0341d1b961 | ||
|
|
0cda79c2d9 | ||
|
|
8f32564580 | ||
|
|
249feb265f | ||
|
|
9b7fb5e28f | ||
|
|
6d26cec36c | ||
|
|
fb39d0973d | ||
|
|
36108255e3 | ||
|
|
acb45dd61c | ||
|
|
2353b94eb7 | ||
|
|
1090494e90 | ||
|
|
fd0b21a5a6 | ||
|
|
f7db0d6cb7 | ||
|
|
b6980ebb8f | ||
|
|
3429546116 | ||
|
|
14180b3a40 | ||
|
|
6251540dc9 | ||
|
|
a7f13f59c1 | ||
|
|
4075db8df5 | ||
|
|
7221f0a8ef | ||
|
|
fd9f4484fa | ||
|
|
34f1ec1f94 | ||
|
|
853f09ccef | ||
|
|
1c59868e79 | ||
|
|
45abf7643c | ||
|
|
cec0c2086c | ||
|
|
332fb8c3ef | ||
|
|
233a70b5e2 | ||
|
|
4c4a3d23eb | ||
|
|
414337e358 | ||
|
|
a2822764e5 | ||
|
|
426f13d495 | ||
|
|
22c824642a | ||
|
|
616ba86bb8 | ||
|
|
5321c29a00 | ||
|
|
eaa146293e | ||
|
|
9da14a6eb2 | ||
|
|
71e4553504 | ||
|
|
a84271f339 | ||
|
|
776fed3834 | ||
|
|
ed03a6f1f8 | ||
|
|
f921204bd4 | ||
|
|
8eda44e96a | ||
|
|
822bc7ffef | ||
|
|
a25d4e0e22 | ||
|
|
8eb76e4da8 | ||
|
|
900b28b97a | ||
|
|
9ab084cee2 | ||
|
|
0e27ee5643 | ||
|
|
7e1fb745b5 | ||
|
|
1025c6798a | ||
|
|
9d52c129e4 | ||
|
|
138c571c75 | ||
|
|
67a598d0be | ||
|
|
1c435e2a67 | ||
|
|
102b65364c | ||
|
|
fe3314d07a | ||
|
|
b74c6d3ee0 | ||
|
|
b560a05e68 | ||
|
|
938f8b2d46 | ||
|
|
8c5fe25137 | ||
|
|
48254ef6d0 | ||
|
|
f4dc5dfee9 | ||
|
|
de71085394 | ||
|
|
1166dd305b | ||
|
|
2b1d0e1012 | ||
|
|
8a8ba06698 | ||
|
|
f70eaae6f5 | ||
|
|
28a7c69f11 | ||
|
|
d15f196249 | ||
|
|
f6ec5b44fe | ||
|
|
7496ec701c | ||
|
|
1cd73239fc | ||
|
|
aa36309755 | ||
|
|
c939f56b56 | ||
|
|
3f412cf745 | ||
|
|
ce50e32a71 | ||
|
|
5e960ae089 | ||
|
|
04c72eea0f | ||
|
|
eeae12ed63 | ||
|
|
9fa2fd0b92 | ||
|
|
5c6bc657f4 | ||
|
|
02d0b6524c | ||
|
|
61ece3d5c5 | ||
|
|
9369f4aea3 | ||
|
|
192e181d8a | ||
|
|
b82f488c54 | ||
|
|
7cd3abb9f8 | ||
|
|
ebce799bdb | ||
|
|
f20eb01d0e | ||
|
|
fd6ecb3901 | ||
|
|
43034bfc30 | ||
|
|
ee0df74f83 | ||
|
|
e364607856 | ||
|
|
5078e42330 | ||
|
|
712b4ce5c4 | ||
|
|
a781d91469 | ||
|
|
e5b2243565 | ||
|
|
1ec65e0589 | ||
|
|
d03e1bd940 | ||
|
|
a1bc833c3f | ||
|
|
5b0b22fe28 | ||
|
|
0ee93311e9 | ||
|
|
8ba58b33ae | ||
|
|
2f023619e9 | ||
|
|
eaab8a8242 | ||
|
|
fbd92432b1 | ||
|
|
bbba60fa3f | ||
|
|
e907abd201 | ||
|
|
5bde9c7b56 | ||
|
|
38690cd872 | ||
|
|
92e05a521d | ||
|
|
d909b6cb75 | ||
|
|
53045c7377 | ||
|
|
4721d852bf | ||
|
|
954233c67d | ||
|
|
f4b7ce7f20 | ||
|
|
5728e44c3d | ||
|
|
7c20573ef2 | ||
|
|
22e7100281 | ||
|
|
5e206952f4 | ||
|
|
920627e75f | ||
|
|
2dada142ba | ||
|
|
26aabf9e2d | ||
|
|
9d68bebac4 | ||
|
|
4112213431 | ||
|
|
7bc2523f57 | ||
|
|
7773c2504f | ||
|
|
b74e50d7e6 | ||
|
|
c9b270b035 | ||
|
|
efb61ca449 | ||
|
|
86a913d5b1 | ||
|
|
feca86b812 | ||
|
|
16fe32f908 | ||
|
|
a798501af3 | ||
|
|
77a033999d | ||
|
|
7b33e1c752 | ||
|
|
ccdcee471b | ||
|
|
e79416c801 | ||
|
|
15658c56d5 | ||
|
|
c681071c65 | ||
|
|
5ed012c6e5 | ||
|
|
d75499d076 | ||
|
|
2905b6096e | ||
|
|
5453a7a79b | ||
|
|
af7f01750b | ||
|
|
7b96c31789 | ||
|
|
5b20b70b66 | ||
|
|
3399db3471 | ||
|
|
0ca6f7366b | ||
|
|
09a840b6c3 | ||
|
|
f3aa82e4ba | ||
|
|
d6bff9f364 | ||
|
|
e3b3a8bbec | ||
|
|
8bca07597d | ||
|
|
5fa75e981b | ||
|
|
e22ba4a3d2 | ||
|
|
624407afcc | ||
|
|
34f7bf1e68 | ||
|
|
96a9d1f4e5 | ||
|
|
89c40d9be6 | ||
|
|
1a26f9a42e | ||
|
|
80f9839253 | ||
|
|
82d4bb9df6 | ||
|
|
d45ed9d78e | ||
|
|
00b04e9691 | ||
|
|
1cfb3dfaa3 | ||
|
|
85687d5d88 | ||
|
|
8b920938de | ||
|
|
70d522a6d4 | ||
|
|
11241cd8da | ||
|
|
4b3a8ff24f | ||
|
|
fdce9453bc | ||
|
|
ca7e4346f0 | ||
|
|
3a6bd97fc8 | ||
|
|
9d8314a65a | ||
|
|
2faa3a0ae2 | ||
|
|
62384bedb4 | ||
|
|
fd41237049 | ||
|
|
faa60854f9 | ||
|
|
0a247c57ca | ||
|
|
95da49edf3 | ||
|
|
3ff9722903 | ||
|
|
b5d5087550 | ||
|
|
84592e1f5d | ||
|
|
f8d8abd70b | ||
|
|
d02b05f1a7 | ||
|
|
73273a48da | ||
|
|
079f0565d7 | ||
|
|
5b8eeba33d | ||
|
|
e2206a5849 | ||
|
|
d3dbfd8c6e | ||
|
|
1395b5f66c | ||
|
|
429aff6991 | ||
|
|
4e8b6dc21d | ||
|
|
c5582f5085 | ||
|
|
a84b9cf89d | ||
|
|
d02dfe0966 | ||
|
|
3ac710d260 | ||
|
|
20186dd991 | ||
|
|
9bb2ae7772 | ||
|
|
892f49ffb2 | ||
|
|
296372cf5f | ||
|
|
1e5a12708d | ||
|
|
09ded05029 | ||
|
|
47089ec3e1 | ||
|
|
93c1013eff | ||
|
|
d74cbcb26d | ||
|
|
2e21b1d596 | ||
|
|
d4f68f8986 | ||
|
|
84774abc2c | ||
|
|
e444abc3d1 | ||
|
|
1ac1cbf8de | ||
|
|
73ec501b20 | ||
|
|
f64c0136d7 | ||
|
|
66746b7e18 | ||
|
|
4ec7c5c3f6 | ||
|
|
003c22e772 | ||
|
|
5ae622fb28 | ||
|
|
611188e32c | ||
|
|
08b55f54c5 | ||
|
|
a02afa7641 | ||
|
|
2f76d0bc5a | ||
|
|
51c6165983 | ||
|
|
1f77162fef | ||
|
|
764f23c1b8 | ||
|
|
a8cbcd7150 | ||
|
|
dd7906a1d9 | ||
|
|
fd71ba3fec | ||
|
|
adec349442 | ||
|
|
842b09b2f5 | ||
|
|
8882c5e79a | ||
|
|
c9dee9bcd1 | ||
|
|
965fa8da72 | ||
|
|
22ef8998fb | ||
|
|
b5d1f8d569 | ||
|
|
001755285b | ||
|
|
3fef69e9bf | ||
|
|
ab0395e8c9 | ||
|
|
bb5a37e0ef | ||
|
|
63e4f2305f | ||
|
|
8befaf1ae6 | ||
|
|
736c269790 | ||
|
|
9140024505 | ||
|
|
01d715053a | ||
|
|
2af5a71c91 | ||
|
|
a1662ed122 | ||
|
|
be86aa3c37 | ||
|
|
16bdaa5b50 | ||
|
|
f30acef13a | ||
|
|
bb833f7641 | ||
|
|
225eda7d18 | ||
|
|
07a2920ef6 | ||
|
|
252ac1e008 | ||
|
|
eed9d743c1 | ||
|
|
d9910be2ea | ||
|
|
8abe26fde8 | ||
|
|
2b1a2e1357 | ||
|
|
a746d9b122 | ||
|
|
c1456e9db9 | ||
|
|
48791de235 | ||
|
|
ac8c35fa9d | ||
|
|
cde20fd1b9 | ||
|
|
0e86d0c33a | ||
|
|
758ee4bef7 | ||
|
|
5cf7b54c41 | ||
|
|
234607a3dd | ||
|
|
c23b58d416 | ||
|
|
c07ac38ddb | ||
|
|
183451c607 | ||
|
|
aa451769ce | ||
|
|
ffc5ee41f9 | ||
|
|
ec69a624e0 | ||
|
|
42751b532e | ||
|
|
3a80f4296f | ||
|
|
863b5e4303 | ||
|
|
de7190eb24 | ||
|
|
72a13b8586 | ||
|
|
2ed9107dc0 | ||
|
|
d9ee7a6b5e | ||
|
|
4682a9bbfa | ||
|
|
4f2d91d30b | ||
|
|
6323e09ba9 | ||
|
|
0ccb67c2ef | ||
|
|
fdaff88ff7 | ||
|
|
49589ab9b1 | ||
|
|
568e69d537 | ||
|
|
2890d4a196 | ||
|
|
35305eb56e | ||
|
|
0ccc9c2802 | ||
|
|
71cb371a1a | ||
|
|
9c832c58ad | ||
|
|
11c2feb486 | ||
|
|
27db2c8169 | ||
|
|
d3bb30c1d5 | ||
|
|
882200d897 | ||
|
|
fa800c532a | ||
|
|
2977297582 | ||
|
|
58709579cc | ||
|
|
f403a0c705 | ||
|
|
06e328eb0b | ||
|
|
afc22d2ba0 | ||
|
|
1819296689 | ||
|
|
8710651e45 | ||
|
|
1bcc8e7fbd | ||
|
|
35b74ef7d6 | ||
|
|
3646b8cbe7 | ||
|
|
f23394dd53 | ||
|
|
18e7d44790 | ||
|
|
58ee81186f | ||
|
|
8d6e02c373 | ||
|
|
0a98a5ca44 | ||
|
|
3ff33915c0 | ||
|
|
6808e132f3 | ||
|
|
1212f640c0 | ||
|
|
8fbb1afae9 | ||
|
|
5efcd7652f | ||
|
|
9ab11b497e | ||
|
|
c1cb839d7d | ||
|
|
801fcfbf34 | ||
|
|
375fb90bed | ||
|
|
45b15db4c6 | ||
|
|
d3a1bd58eb | ||
|
|
00e19d474e | ||
|
|
fab5a769e4 | ||
|
|
ba3df067f3 | ||
|
|
22ffe7f645 | ||
|
|
0b7dfad2cf | ||
|
|
28ce9c657c | ||
|
|
a3c8a832a2 | ||
|
|
8ef582eaf5 | ||
|
|
4b2ca3bd28 | ||
|
|
619fb3a590 | ||
|
|
156828ac1f | ||
|
|
57950b25fd | ||
|
|
6318b1a836 | ||
|
|
e79c8d0b87 | ||
|
|
1da17070f5 | ||
|
|
82cf80cbc3 | ||
|
|
57be3472a2 | ||
|
|
3a61d3f2c9 | ||
|
|
7f13a3035c | ||
|
|
06e2e60364 | ||
|
|
6b8214ea6a | ||
|
|
27026eced9 | ||
|
|
c8e755e5a8 | ||
|
|
101b0d7e12 | ||
|
|
bb28eed850 | ||
|
|
88a1b168ad | ||
|
|
7b17ceeefa | ||
|
|
e18220e8eb | ||
|
|
0e51a7a529 | ||
|
|
0029d891a6 | ||
|
|
b6c9c42144 | ||
|
|
237d623d31 | ||
|
|
639e75b8ae | ||
|
|
455f91c215 | ||
|
|
eed0f219a1 | ||
|
|
de877188c1 | ||
|
|
818dea526b | ||
|
|
4c07ef386e | ||
|
|
61c913dff0 | ||
|
|
bf9f0e6eb8 | ||
|
|
e1b48219df | ||
|
|
b75383670c | ||
|
|
4f15a2e408 | ||
|
|
037ba0212a | ||
|
|
a92cd402d6 | ||
|
|
21102855a7 | ||
|
|
6d03ec417a | ||
|
|
237d8d5b90 | ||
|
|
fd44a5f0e8 | ||
|
|
ec04a1bbbd | ||
|
|
35f3c56b96 | ||
|
|
ca56cbdaf7 | ||
|
|
cc222b3ca7 | ||
|
|
1fd2674795 | ||
|
|
f848220c59 | ||
|
|
0ae23ec0d1 | ||
|
|
7ad0874162 | ||
|
|
3cbe24ad8c | ||
|
|
a3e6bbb862 | ||
|
|
1edf2a6ae1 | ||
|
|
508cf6fba9 | ||
|
|
3a3a20e537 | ||
|
|
e72345334a | ||
|
|
7f3a6a5a40 | ||
|
|
b14bae17ae | ||
|
|
c89d710fdd | ||
|
|
a79d80e11a | ||
|
|
ad092a37f3 | ||
|
|
d4030302c9 | ||
|
|
fba2a97ab6 | ||
|
|
a2555bab6b | ||
|
|
eff943bbcf | ||
|
|
47ae685061 | ||
|
|
9a75f66e29 | ||
|
|
5672008258 | ||
|
|
5ecc8fe61e | ||
|
|
01c2c563fb | ||
|
|
c570b91c96 | ||
|
|
fb7232dc82 | ||
|
|
60dcff1475 | ||
|
|
0698c3316b | ||
|
|
db49600983 | ||
|
|
33c51e3704 | ||
|
|
8d388632cf | ||
|
|
106ffcfbd6 | ||
|
|
38f6c4bce1 | ||
|
|
53231470fc | ||
|
|
715aeb91d9 | ||
|
|
d77fe3afe8 | ||
|
|
b93aacbba2 | ||
|
|
618ef9925b | ||
|
|
6549f135d1 | ||
|
|
8da132d4ce | ||
|
|
d8a146d6f3 | ||
|
|
a6c11e27b1 | ||
|
|
275b82e51e | ||
|
|
6f8a8834b8 | ||
|
|
d51a5a9068 | ||
|
|
4ee6eb2e2d | ||
|
|
7d13c12252 | ||
|
|
3913f4418e | ||
|
|
ff4b7c54d8 | ||
|
|
1e8fdd41c9 | ||
|
|
7b9a485f17 | ||
|
|
8af405a3e8 | ||
|
|
ae52d75335 | ||
|
|
20dfc743e0 | ||
|
|
6571096107 | ||
|
|
6e6779f401 | ||
|
|
b79ade4c1f | ||
|
|
61f90ab20c | ||
|
|
9c899899f3 | ||
|
|
3401bd6249 | ||
|
|
92048de0f5 | ||
|
|
01e37657a6 | ||
|
|
f7e688f580 | ||
|
|
566aec36c6 | ||
|
|
eeaa02390e | ||
|
|
2893311770 | ||
|
|
9790bf61c6 | ||
|
|
13d872a265 | ||
|
|
94217e800d | ||
|
|
3b23e76237 | ||
|
|
7b12b10f9b | ||
|
|
68d92e59d2 | ||
|
|
76a2945d88 | ||
|
|
99f5ede0ec | ||
|
|
3a01cd9002 | ||
|
|
60fbdb1bc9 | ||
|
|
76399298dc | ||
|
|
b79aaf99d7 | ||
|
|
27aa36b537 | ||
|
|
a7e54c5e36 | ||
|
|
f2455704d2 | ||
|
|
354559aa19 | ||
|
|
820f3f44c7 | ||
|
|
47c4ebeb14 | ||
|
|
e26c965b7c | ||
|
|
3ba8daab0c | ||
|
|
f99df3ddc8 | ||
|
|
2e3d1b0ccd | ||
|
|
ec27124e24 | ||
|
|
c3e043d656 | ||
|
|
06a5ea19c4 | ||
|
|
3cc2f1b146 | ||
|
|
7dee283762 | ||
|
|
949c111f68 | ||
|
|
d07ce2bd08 | ||
|
|
8838ad7636 | ||
|
|
5180d59fc3 | ||
|
|
723df03c0d | ||
|
|
b5394f763a | ||
|
|
9c04379799 | ||
|
|
7f6966ee06 | ||
|
|
0aa629cfe0 | ||
|
|
bd4b90eadf | ||
|
|
b6a49cb4bd | ||
|
|
d770d37e29 | ||
|
|
2c5be593c4 | ||
|
|
5929de443e | ||
|
|
7b9a878af2 | ||
|
|
d37d84b66e | ||
|
|
a994dbf674 | ||
|
|
f1b4379a0e | ||
|
|
200c88a55b | ||
|
|
417bdc88ce | ||
|
|
35602c6ff4 | ||
|
|
4255228273 | ||
|
|
c39939fb21 | ||
|
|
263cba5c0e | ||
|
|
4cffb37310 | ||
|
|
e2cd37a178 | ||
|
|
4d65ce61d6 | ||
|
|
e9ac39c031 | ||
|
|
cb99921d7c | ||
|
|
b02d1e0ada | ||
|
|
7a93278cb7 | ||
|
|
750e1ccc90 | ||
|
|
72b746ddd3 | ||
|
|
4abad0b347 | ||
|
|
f1e45a3f69 | ||
|
|
f373c65b08 | ||
|
|
5c43f8a2cf | ||
|
|
8531f6a2aa | ||
|
|
509e93e425 | ||
|
|
6ca16f700d | ||
|
|
8ed5f73a71 | ||
|
|
98a179f638 | ||
|
|
9464f88162 | ||
|
|
1d37667947 | ||
|
|
84ac2a32ee | ||
|
|
9f151233be | ||
|
|
c92b7874a3 | ||
|
|
91c35d4e40 | ||
|
|
15054810ba | ||
|
|
8dd0aeb1c8 | ||
|
|
041f50a438 | ||
|
|
fb99d6e736 | ||
|
|
8d1cb356c3 | ||
|
|
9403eb5aab | ||
|
|
94c75d399d | ||
|
|
d280468216 | ||
|
|
c019159f05 | ||
|
|
a303b97330 | ||
|
|
382a211962 | ||
|
|
a4852508e3 | ||
|
|
d803fc5f28 | ||
|
|
4d23bfbffa | ||
|
|
3fbee82d99 | ||
|
|
ca52029551 | ||
|
|
9fa9d395dc | ||
|
|
cf621642fb | ||
|
|
5662bfad31 | ||
|
|
dcbccdc0eb | ||
|
|
489197f1a5 | ||
|
|
984e3d88d8 | ||
|
|
e8d12c8448 | ||
|
|
03099babed | ||
|
|
8f12d3d0de | ||
|
|
8e58606559 | ||
|
|
089800e477 | ||
|
|
0f48d5badf | ||
|
|
9469ba672b | ||
|
|
2208c49082 | ||
|
|
e69290ee22 | ||
|
|
a32c92c8ad | ||
|
|
d24cb36841 | ||
|
|
5d07856182 | ||
|
|
82ee93e2c2 | ||
|
|
f47c6bbce8 | ||
|
|
08c909195a | ||
|
|
4eeb3cfaae | ||
|
|
6d48c9f36f | ||
|
|
f66ba35226 | ||
|
|
3a0c8114f9 | ||
|
|
2e064b4015 | ||
|
|
235725b157 | ||
|
|
c26a10fbb8 | ||
|
|
52e3830618 | ||
|
|
41de9c48c6 | ||
|
|
e46a31a6ab | ||
|
|
95d18194f3 | ||
|
|
16506899eb | ||
|
|
74f3cedaf5 | ||
|
|
48fab7528f | ||
|
|
ca387ab576 | ||
|
|
aeeb88ac19 | ||
|
|
c4dc8b9276 | ||
|
|
a35d180c16 | ||
|
|
b4b602cdbc | ||
|
|
76f6048ba4 | ||
|
|
adf788b38e | ||
|
|
b493ed7f96 | ||
|
|
2ff2ee02ed | ||
|
|
515e095e27 | ||
|
|
fda736be6f | ||
|
|
5509203cef | ||
|
|
bf8575698d | ||
|
|
b369576a9d | ||
|
|
55ba9fc1f9 | ||
|
|
192b5525af | ||
|
|
3a1892e0cd | ||
|
|
76cebeca39 | ||
|
|
7f73d92dc8 | ||
|
|
925381937a | ||
|
|
c4ca165970 | ||
|
|
a8ec96baf5 | ||
|
|
4d2c86aa8d | ||
|
|
619a2a6d65 | ||
|
|
23930ca58e | ||
|
|
eecc4a901d | ||
|
|
9f7a5da7c2 | ||
|
|
d88730174c | ||
|
|
7f06060592 | ||
|
|
007f8d6ea8 | ||
|
|
8734fb9f3b | ||
|
|
67e4c0e72b | ||
|
|
993f74ac3e | ||
|
|
0b172e0d27 | ||
|
|
a22d481f9e | ||
|
|
6af3e5f278 | ||
|
|
a833788378 | ||
|
|
86e6baf1cf | ||
|
|
676e27d32b | ||
|
|
07efadaa86 | ||
|
|
3a09c7cfd9 | ||
|
|
ebd018a476 | ||
|
|
a18a544ca2 | ||
|
|
f5aff05704 | ||
|
|
e7a6f779de | ||
|
|
f6ca154c4a | ||
|
|
670dde1074 | ||
|
|
aacf34b3b5 | ||
|
|
32ed90740c | ||
|
|
b474c07d48 | ||
|
|
a5d95ae8e6 | ||
|
|
99b685ce2a | ||
|
|
0953156549 | ||
|
|
a009bf4ef7 | ||
|
|
60c98ddc30 | ||
|
|
61188c10c0 | ||
|
|
219cd50c17 | ||
|
|
de83d6b1c8 | ||
|
|
7d89635c5b | ||
|
|
bd2ff84a95 | ||
|
|
af872c27f7 | ||
|
|
753fbda91e | ||
|
|
48391fdbfa | ||
|
|
d213cc82f0 | ||
|
|
043e1520a6 | ||
|
|
2aa45a3897 | ||
|
|
8558744df1 | ||
|
|
60ed6ed3ca | ||
|
|
da1ea959cb | ||
|
|
7786bfcd0a | ||
|
|
aef5a5ee91 | ||
|
|
0f397ece1c | ||
|
|
26aefd139e | ||
|
|
26a78801d5 | ||
|
|
37a67f6fa6 |
@@ -18,6 +18,8 @@ insert_final_newline = true
|
||||
indent_style = tab
|
||||
[*.css]
|
||||
indent_style = tab
|
||||
[*.sh]
|
||||
indent_style = tab
|
||||
[*.xml]
|
||||
indent_style = tab
|
||||
[*.md]
|
||||
|
||||
13
.github/workflows/ci-on-pull_request.yml
vendored
13
.github/workflows/ci-on-pull_request.yml
vendored
@@ -8,12 +8,13 @@ jobs:
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
#phan:
|
||||
# uses: ./.github/workflows/phan.yml
|
||||
# secrets: inherit
|
||||
# needs: [pre-commit]
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
# if: false # Uncommenting this line disables phan
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
|
||||
12
.github/workflows/ci-on-push.yml
vendored
12
.github/workflows/ci-on-push.yml
vendored
@@ -8,12 +8,12 @@ jobs:
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
#phan:
|
||||
# uses: ./.github/workflows/phan.yml
|
||||
# secrets: inherit
|
||||
# needs: [pre-commit]
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
|
||||
47
.github/workflows/phan.yml
vendored
47
.github/workflows/phan.yml
vendored
@@ -49,17 +49,50 @@ jobs:
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phan:5.5.2
|
||||
tools: cs2pr,phan:5.5.2
|
||||
|
||||
|
||||
- name: Run Phan analysis
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
# Proceed when:
|
||||
# - the action is not cancelled
|
||||
# AND
|
||||
# - the branch is an integration branch (no merge), or,
|
||||
# - the merge from branch contains 'phan_full', or,
|
||||
# - there are changes in PHP files.
|
||||
# Note: --output-mode=github does not provide file:line, so using checkstyle and cs2pr
|
||||
if: ${{ ! cancelled() && (github.ref_name == 'develop' || github.ref_name == 'refs/heads/develop' || endsWith(github.ref_name, '.0') || contains(github.head_ref, 'phan_full') || steps.changed-php.outputs.any_changed == 'true') }}
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
|
||||
# shellcheck disable=2086
|
||||
FILE_CHANGED_LIST: /tmp/phan-changed.lst
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
> /tmp/phpstan-files.txt
|
||||
for f in $ALL_CHANGED_FILES; do echo "$f" >> /tmp/phan-files.txt; done
|
||||
cat /tmp/phan-files.txt
|
||||
echo phan --file-list /tmp/phan-files.txt $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=github
|
||||
phan --file-list /tmp/phan-files.txt $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=github
|
||||
if [ "${{ github.ref_name }}" == "develop" ] || [[ "${{ github.ref_name }}" == *.0 ]]|| [[ "${{ github.head_ref }}" == *"phan_full"* ]] ; then
|
||||
echo phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
|
||||
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
|
||||
else
|
||||
echo -n "" > "$FILE_CHANGED_LIST"
|
||||
for f in $ALL_CHANGED_FILES; do echo "$f" >> "$FILE_CHANGED_LIST"; done
|
||||
# Must exclude same files as in phan configuration
|
||||
grep -v -E '^htdocs/(custom/|.*/canvas/.*/tpl/.*.tpl.php|admin/tools/ui/|includes/(nusoap/|restler/|stripe/)|conf/conf.php)$' "$FILE_CHANGED_LIST"> "$FILE_CHANGED_LIST".tmp || true
|
||||
mv "$FILE_CHANGED_LIST".tmp "$FILE_CHANGED_LIST"
|
||||
if [ ! -s "$FILE_CHANGED_LIST" ] ; then
|
||||
echo "All changed files are excluded for phan"
|
||||
else
|
||||
echo phan --file-list "$FILE_CHANGED_LIST" $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
|
||||
phan --file-list "$FILE_CHANGED_LIST" $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Add results to PR as Github notices
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
|
||||
|
||||
- name: Provide phan log as artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: phan-srcrt
|
||||
path: ${{ github.workspace }}/_phan.xml
|
||||
retention-days: 2
|
||||
|
||||
20
.github/workflows/phpstan.yml
vendored
20
.github/workflows/phpstan.yml
vendored
@@ -89,16 +89,28 @@ jobs:
|
||||
# Run PHPStan
|
||||
- name: Run PHPStan
|
||||
id: phpstan
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
# Proceed when:
|
||||
# - the action is not cancelled
|
||||
# AND
|
||||
# - the branch is an integration branch (no merge), or,
|
||||
# - the merge from branch contains 'phpstan_full', or,
|
||||
# - there are changes in PHP files.
|
||||
if: ${{ ! cancelled() && (github.ref_name == 'develop' || github.ref_name == 'refs/heads/develop' || endsWith(github.ref_name, '.0') || contains(github.head_ref, 'phpstan_full') || steps.changed-php.outputs.any_changed == 'true') }}
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
|
||||
# shellcheck disable=2086
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
> /tmp/phpstan-files.txt
|
||||
echo "$ALL_CHANGED_FILES" >> /tmp/phpstan-files.txt
|
||||
cat /tmp/phpstan-files.txt
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php ${ALL_CHANGED_FILES} | tee _stan.xml | cs2pr --graceful-warnings
|
||||
if [ "${{ github.ref_name }}" == "develop" ] || [[ "${{ github.ref_name }}" == *.0 ]]|| [[ "${{ github.head_ref }}" == *"phpstan_full"* ]] ; then
|
||||
# Run on all files in integration branch
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
|
||||
|
||||
else
|
||||
echo "$ALL_CHANGED_FILES" >> /tmp/phpstan-files.txt
|
||||
cat /tmp/phpstan-files.txt
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php ${ALL_CHANGED_FILES} | tee _stan.xml | cs2pr --graceful-warnings
|
||||
fi
|
||||
# continue-on-error: true
|
||||
|
||||
# Save cache
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.*|htdocs/public/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.*|htdocs/public/includes/ckeditor/.*|htdocs/public/includes/jquery/.*|(\.(?!github/workflows)[^/]*/.*))$
|
||||
repos:
|
||||
# Several miscellaneous checks and fix (on yaml files, end of files fix)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
@@ -60,23 +60,26 @@ repos:
|
||||
|
||||
# Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos
|
||||
- repo: https://github.com/gitleaks/gitleaks.git
|
||||
rev: v8.29.0
|
||||
rev: v8.30.0
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
|
||||
# Check github actions
|
||||
#- repo: https://github.com/rhysd/actionlint
|
||||
# rev: v1.7.8
|
||||
# hooks:
|
||||
# - id: actionlint
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: v1.7.11
|
||||
hooks:
|
||||
- id: actionlint
|
||||
stages: [manual] # To run: pre-commit run -a --hook-stage=manual actionlint
|
||||
|
||||
# Beautify shell scripts
|
||||
#- repo: https://github.com/lovesegfault/beautysh.git
|
||||
# rev: v6.2.1
|
||||
# rev: v6.4.2
|
||||
# hooks:
|
||||
# - id: beautysh
|
||||
# exclude: |
|
||||
# (?x)^(dev/setup/git/hooks/pre-commit
|
||||
# |dev/initdemo/initdemo.sh # indent/outdent mismatch
|
||||
# |dev/build/debian/dolibarr.postrm # indent/outdent mismatch
|
||||
# )$
|
||||
# args: [--tab]
|
||||
|
||||
@@ -193,7 +196,7 @@ repos:
|
||||
|
||||
# Check format of yaml files
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.37.1
|
||||
rev: v1.38.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args:
|
||||
@@ -245,15 +248,16 @@ repos:
|
||||
- ned
|
||||
|
||||
# Check some shell scripts
|
||||
#- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
# rev: v0.11.0.1
|
||||
# hooks:
|
||||
# - id: shellcheck
|
||||
# args: [-W, "100"]
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.11.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
stages: [manual] # To run: `pre-commit run -a --hook-stage=manual shellcheck`
|
||||
args: [-W, "100"]
|
||||
|
||||
# Check sql file syntax
|
||||
- repo: https://github.com/sqlfluff/sqlfluff
|
||||
rev: 3.3.1
|
||||
rev: 4.0.4
|
||||
hooks:
|
||||
- id: sqlfluff-lint
|
||||
stages: [pre-commit, manual] # manual needed for ci
|
||||
@@ -292,4 +296,4 @@ repos:
|
||||
# # virtualmin excluded - reason https://github.com/Dolibarr/dolibarr/pull/36370#issuecomment-3565101823
|
||||
# exclude: (?x)^
|
||||
# (dev/build/perl/virtualmin/dolibarr.pl
|
||||
# )$
|
||||
# across all file typese )$
|
||||
|
||||
@@ -531,6 +531,9 @@ script:
|
||||
php upgrade.php 22.0.0 23.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade22002300.log || cat $TRAVIS_BUILD_DIR/upgrade22002300.log
|
||||
php upgrade2.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-2.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-2.log
|
||||
php step5.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-3.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-3.log
|
||||
php upgrade.php 23.0.0 24.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade23002400.log || cat $TRAVIS_BUILD_DIR/upgrade23002400.log
|
||||
php upgrade2.php 23.0.0 24.0.0 > $TRAVIS_BUILD_DIR/upgrade23002400-2.log || cat $TRAVIS_BUILD_DIR/upgrade23002400-2.log
|
||||
php step5.php 23.0.0 24.0.0 > $TRAVIS_BUILD_DIR/upgrade23002400-3.log || cat $TRAVIS_BUILD_DIR/upgrade23002400-3.log
|
||||
set +e
|
||||
echo
|
||||
|
||||
@@ -571,6 +574,8 @@ script:
|
||||
# Execute phpunit, check its exit status and that the phpunit output shows a test summary
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php | tee /dev/tty | grep -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" ; phpunitresult=$((PIPESTATUS[0]?PIPESTATUS[0]:PIPESTATUS[2]))
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
echo "Content of end of apache error.log"
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
# Comment next line if you want to go to the end to see the dolibarr.log file.
|
||||
[ $phpunitresult == 0 ] || exit $phpunitresult
|
||||
echo
|
||||
|
||||
@@ -299,12 +299,12 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
|
||||
|
||||
* Edit orig.tar.gz file to remove
|
||||
- debian
|
||||
- htdocs/includes/ckeditor
|
||||
- htdocs/includes/jquery/css
|
||||
- htdocs/includes/jquery/js
|
||||
- htdocs/includes/jquery/plugins/flot
|
||||
- htdocs/includes/jquery/plugins/multiselect
|
||||
- htdocs/includes/jquery/plugins/datatables
|
||||
- htdocs/public/includes/ckeditor
|
||||
- htdocs/public/includes/jquery/css
|
||||
- htdocs/public/includes/jquery/js
|
||||
- htdocs/public/includes/jquery/plugins/flot
|
||||
- htdocs/public/includes/jquery/plugins/multiselect
|
||||
- htdocs/public/includes/jquery/plugins/datatables
|
||||
- htdocs/includes/jszip
|
||||
- htdocs/includes/mike42
|
||||
- htdocs/includes/phpoffice
|
||||
|
||||
@@ -61,7 +61,7 @@ License: GPL-3+
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Files: htdocs/public/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is triple licensed under the GNU General Public License (GPL),
|
||||
@@ -190,7 +190,7 @@ License: CC-By-SA
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/jquery/*
|
||||
Files: htdocs/public/includes/jquery/*
|
||||
Copyright: JQuery team
|
||||
https://www.jquery.com
|
||||
License: GPL-2+ or MIT
|
||||
|
||||
@@ -97,10 +97,9 @@ override_dh_install:
|
||||
# rm -fr htdocs/includes/nusoap
|
||||
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
# clean from all JS-CSS embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/ckeditor
|
||||
# rm -fr htdocs/includes/jquery/js
|
||||
# rm -fr htdocs/includes/jquery/css
|
||||
# rm -fr htdocs/includes/jquery/plugins/flot
|
||||
# rm -fr htdocs/public/includes/ckeditor
|
||||
# rm -fr htdocs/public/includes/jquery/js
|
||||
# rm -fr htdocs/public/includes/jquery/css
|
||||
# clean from all embedded fonts (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/fonts
|
||||
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
# Remove warning, we want to keep both standard and minified sources.
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/public/includes/jquery/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
|
||||
# Those are false positives, the files are their own sources since
|
||||
# they are not minified
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/specialchar/dialogs/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/dialogs/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/filter/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/templates/templates/default.js
|
||||
source-is-missing htdocs/public/includes/ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/*.js
|
||||
source-is-missing htdocs/public/includes/ckeditor/ckeditor/plugins/specialchar/dialogs/lang/*.js
|
||||
source-is-missing htdocs/public/includes/ckeditor/ckeditor/lang/*.js
|
||||
|
||||
@@ -44,6 +44,7 @@ define('DOL_DOCUMENT_ROOT', dirname(dirname($path)).'/htdocs');
|
||||
$algo = 'sha256';
|
||||
|
||||
require_once $path."../../htdocs/master.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/blockedlog/versionmod.inc.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||
|
||||
|
||||
@@ -128,7 +129,10 @@ if ($tmpver[0] == 'auto') {
|
||||
$release .= '-'.$tmpver[1];
|
||||
}
|
||||
}
|
||||
// If release is auto, we take current version
|
||||
|
||||
$releaseblockedlog = DOLCERT_VERSION;
|
||||
|
||||
// If release is auto, we take current version to read checklock file
|
||||
$tmpver = explode('-', $checklock, 2);
|
||||
if ($tmpver[0] == 'auto') {
|
||||
$checklock = DOL_VERSION;
|
||||
@@ -183,6 +187,7 @@ if ($checklock && empty($checksource)) {
|
||||
if ($release) {
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Version of target release : ".$release."\n";
|
||||
print "Version of blockedlog module : ".$releaseblockedlog."\n";
|
||||
print "Algo : ".$algo."\n";
|
||||
print "Include custom dir in signature : ".(empty($includecustom) ? 'no' : 'yes')."\n";
|
||||
print "Include constants in signature : ".(empty($includeconstants) ? 'none' : '');
|
||||
@@ -338,13 +343,13 @@ if ($release) {
|
||||
|
||||
$checksumconcat = array();
|
||||
|
||||
if ($release) {
|
||||
fputs($fp, '<dolibarr_unalterable_files version="'.$release.'">'."\n");
|
||||
if ($release && $releaseblockedlog) {
|
||||
fputs($fp, '<dolibarr_unalterable_files version="'.$releaseblockedlog.'">'."\n");
|
||||
}
|
||||
|
||||
// Array of dir/files to include in the section
|
||||
$arrayofunalterablefiles = array(
|
||||
array('dir' => dirname(__FILE__).'/../../htdocs/', 'file' => 'version.inc.php'),
|
||||
//array('dir' => dirname(__FILE__).'/../../htdocs/', 'file' => 'version.inc.php'),
|
||||
array('dir' => dirname(__FILE__).'/../../htdocs/blockedlog', 'file' => 'all', 'regextoinclude' => '(\.php|\.sql)$', 'regextoexclude' => ''),
|
||||
array('dir' => dirname(__FILE__).'/../../htdocs/install/mysql/tables', 'file' => 'all', 'regextoinclude' => 'llx_blockedlog.*(\.php|\.sql)$', 'regextoexclude' => ''),
|
||||
array('dir' => dirname(__FILE__).'/../../htdocs/core/triggers', 'file' => 'interface_50_modBlockedlog_ActionsBlockedLog.class.php'),
|
||||
@@ -428,6 +433,7 @@ foreach ($arrayofunalterablefiles as $entry) {
|
||||
}
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
|
||||
$hashunalterable_files = hash($algo, join(',', $checksumconcat));
|
||||
|
||||
if ($release) {
|
||||
|
||||
@@ -816,19 +816,19 @@ if ($nboftargetok) {
|
||||
$ret = `rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret = `rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`
|
||||
`rm -fr $BUILDROOT/$PROJECT/htdocs/public/includes/ckeditor/ckeditor/adapters`
|
||||
; # Keep this removal in case we embed libraries
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`
|
||||
`rm -fr $BUILDROOT/$PROJECT/htdocs/public/includes/ckeditor/ckeditor/samples`
|
||||
; # Keep this removal in case we embed libraries
|
||||
$ret = `rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`
|
||||
$ret = `rm -fr $BUILDROOT/$PROJECT/htdocs/public/includes/ckeditor/_source`
|
||||
; # _source must be kept into tarball for official debian, not for the rest
|
||||
$ret = `rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`;
|
||||
$ret = `rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`;
|
||||
$ret =
|
||||
`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
`rm -f $BUILDROOT/$PROJECT/htdocs/public/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret =
|
||||
`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
|
||||
`rm -f $BUILDROOT/$PROJECT/htdocs/public/includes/jquery/plugins/select2/release.sh`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
|
||||
$ret =
|
||||
@@ -934,7 +934,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret = `rm -fr $BUILDROOT/$FILENAMETGZ/dev/build/exe`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`
|
||||
`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/public/includes/ckeditor/_source`
|
||||
; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
|
||||
@@ -971,7 +971,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret = `rm -fr $BUILDROOT/$FILENAMEXZ/dev/build/exe`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/includes/ckeditor/_source`
|
||||
`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/public/includes/ckeditor/_source`
|
||||
; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
|
||||
@@ -1010,7 +1010,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret = `rm -fr $BUILDROOT/$FILENAMEZIP/dev/build/exe`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$FILENAMEZIP/htdocs/includes/ckeditor/_source`
|
||||
`rm -fr $BUILDROOT/$FILENAMEZIP/htdocs/public/includes/ckeditor/_source`
|
||||
; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMEZIP into $FILENAMEZIP.zip...\n";
|
||||
@@ -1062,7 +1062,7 @@ if ($nboftargetok) {
|
||||
$ret = `$cmd`;
|
||||
|
||||
# Removed files we don't need (already removed before)
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/public/includes/ckeditor/_source`;
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret = `chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||
@@ -1261,17 +1261,17 @@ if ($nboftargetok) {
|
||||
|
||||
# Removed duplicate license files
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/_source/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/scayt/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/_source/plugins/scayt/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/wsc/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/_source/plugins/wsc/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md`;
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md`;
|
||||
$ret =
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/php-iban/LICENSE`;
|
||||
$ret =
|
||||
@@ -1294,7 +1294,7 @@ if ($nboftargetok) {
|
||||
`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
|
||||
|
||||
# Removed files we don't need (already removed)
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/public/includes/ckeditor/ckeditor/_source`;
|
||||
$ret = `rm -fr $BUILDROOT/$PROJECT.tmp/.codeclimate.yml`;
|
||||
$ret = `rm -fr $BUILDROOT/$PROJECT.tmp/.pre-commit-config.yaml`;
|
||||
$ret = `rm -fr $BUILDROOT/$PROJECT.tmp/.vscode`;
|
||||
@@ -1378,61 +1378,41 @@ if ($nboftargetok) {
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret = `chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.dpatch' -type f -exec chmod 755 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.dpatch' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.pl' -type f -exec chmod 755 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/dev/build -name '*.pl' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/dev -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/dev -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$ret = `chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_mymodule.class.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
|
||||
$ret =
|
||||
`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
|
||||
$ret =
|
||||
`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/mymodule.php`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_mymodule.class.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
|
||||
$ret = `chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
|
||||
$ret = `chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/mymodule.php`;
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
$cmd =
|
||||
"find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
|
||||
$cmd = "find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
|
||||
$ret = `$cmd`;
|
||||
|
||||
print
|
||||
"Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
$cmd =
|
||||
"mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
print "Rename directory $BUILDROOT/$PROJECT.tmp into $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
|
||||
$cmd = "mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$ret = `$cmd`;
|
||||
|
||||
print "Go into directory $BUILDROOT\n";
|
||||
chdir("$BUILDROOT");
|
||||
|
||||
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
|
||||
print
|
||||
"Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
|
||||
$cmd =
|
||||
"tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/dev/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
|
||||
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
|
||||
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
|
||||
$cmd = "tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/dev/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
|
||||
print $cmd. "\n";
|
||||
$ret = `$cmd`;
|
||||
|
||||
@@ -1449,10 +1429,8 @@ if ($nboftargetok) {
|
||||
|
||||
chdir("$olddir");
|
||||
|
||||
print
|
||||
"You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||
print
|
||||
"You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
|
||||
print "You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||
print "You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
|
||||
|
||||
# Move to final dir
|
||||
print "Move *_all.deb *.dsc *.orig.tar.gz *.changes to $NEWDESTI\n";
|
||||
@@ -1460,7 +1438,7 @@ if ($nboftargetok) {
|
||||
$ret = `mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
||||
$ret = `mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
|
||||
|
||||
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
|
||||
#$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`; # xz file is generated when build/debian/sources/option
|
||||
$ret = `mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
|
||||
$ret = `mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
||||
next;
|
||||
@@ -1482,17 +1460,15 @@ if ($nboftargetok) {
|
||||
print "Check that ISCC.exe is in your PATH.\n";
|
||||
}
|
||||
else {
|
||||
print
|
||||
"Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
|
||||
}
|
||||
|
||||
$SOURCEBACK = $SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
|
||||
print
|
||||
"Prepare file \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
print "Prepare file \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
|
||||
#$ret=`cat "$SOURCE/dev/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
#$ret=`cat "$SOURCE/dev/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
open( my $IN3, '<',
|
||||
$SOURCE . "/dev/build/exe/doliwamp/doliwamp.iss" )
|
||||
or die $!;
|
||||
@@ -1506,40 +1482,35 @@ if ($nboftargetok) {
|
||||
close($IN3);
|
||||
close($OUT);
|
||||
|
||||
print
|
||||
"Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
|
||||
|
||||
if ( $OS eq 'windows' ) {
|
||||
$cmd =
|
||||
"ISCC.exe \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
$cmd = "ISCC.exe \"$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
}
|
||||
else {
|
||||
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\dev\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
}
|
||||
print "$cmd\n";
|
||||
$ret = `$cmd`;
|
||||
print "ret=$ret\n";
|
||||
|
||||
# Move to final dir
|
||||
print
|
||||
"Move \"$SOURCE\\dev\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
print "Move \"$SOURCE\\dev\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
rename(
|
||||
"$SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe",
|
||||
"$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"
|
||||
);
|
||||
print
|
||||
"Move $SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
print "Move $SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
|
||||
use File::Copy;
|
||||
|
||||
#$ret=`mv "$SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
#$ret=`mv "$SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
$ret = move(
|
||||
"$SOURCE/dev/build/$FILENAMEEXEDOLIWAMP.exe",
|
||||
"$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"
|
||||
);
|
||||
|
||||
print
|
||||
"Remove tmp file $SOURCE/dev/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||
print "Remove tmp file $SOURCE/dev/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||
|
||||
#$ret=`rm "$SOURCE/dev/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
$ret = unlink("$SOURCE/dev/build/exe/doliwamp/doliwamp.tmp.iss");
|
||||
@@ -1558,7 +1529,7 @@ if ($nboftargetok) {
|
||||
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml" =>
|
||||
'none', # none means it won't be published on SF
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM" =>
|
||||
'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||
'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPMSRC" =>
|
||||
'none', # none means it won't be published on SF
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb" =>
|
||||
@@ -1589,8 +1560,7 @@ if ($nboftargetok) {
|
||||
'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc" =>
|
||||
'package_debian-ubuntu',
|
||||
|
||||
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
|
||||
#"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz" =>
|
||||
'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz" =>
|
||||
@@ -1652,8 +1622,7 @@ if ($nboftargetok) {
|
||||
$NUM_SCRIPT = <STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
|
||||
print
|
||||
"Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
|
||||
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
|
||||
$ret = `mkdir -p "/tmp/emptydir/"`;
|
||||
|
||||
%filestoscan = %filestoscansf;
|
||||
@@ -1697,13 +1666,13 @@ if ($nboftargetok) {
|
||||
#use String::ShellQuote qw( shell_quote );
|
||||
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
|
||||
|
||||
#use Net::SFTP::Foreign;
|
||||
#my $sftp = Net::SFTP::Foreign->new($ip, user => $user, password => $pass, autodie => 1);
|
||||
#$sftp->mkdir($destFolder)
|
||||
#use Net::SFTP::Foreign;
|
||||
#my $sftp = Net::SFTP::Foreign->new($ip, user => $user, password => $pass, autodie => 1);
|
||||
#$sftp->mkdir($destFolder)
|
||||
|
||||
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
|
||||
#print "$command\n";
|
||||
#my $ret=`$command 2>&1`;
|
||||
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
|
||||
#print "$command\n";
|
||||
#my $ret=`$command 2>&1`;
|
||||
|
||||
$command = "rsync -s -e 'ssh' --recursive /tmp/emptydir/ \""
|
||||
. $destFolder . "\"";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -103,7 +103,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr dev/build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/dev/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/public/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr dev/build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/dev/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/public/includes/ckeditor/_source
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr dev/build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/dev/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/public/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
|
||||
@@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr dev/build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/dev/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/public/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
|
||||
@@ -263,7 +263,7 @@ with
|
||||
|
||||
PHP JQUERYFILETREE:
|
||||
-------------------
|
||||
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
* Remove directory htdocs/public/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"npm": ">=5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"zapier-platform-core": "17.5.0"
|
||||
"zapier-platform-core": "18.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^5.2.0",
|
||||
|
||||
1
dev/initdemo/.gitignore
vendored
1
dev/initdemo/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/initdemopostsql.sql
|
||||
/mysqldump_dolibarr_24.0.0.sql2
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
BEGIN - regnumber=7dd3b63bd8… - date=2025-02-05T11:54:50Z - period=2025-01 - entity=1 - formatexport=VE1 - user=Alice Adminson;Id;Date création;Action;Origine;Montant HT;Montant TTC;Réf.;Date;Utilisateur;Lier à;Type de lien;Données complètes;Version;Version de la signature;Signature dans la base de données;État;NOTE - previoushash=b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b
|
||||
;"411";"1736932388";"MODULE_SET";"";"0";"0";"systemevent";"1736932388";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""id"":0,""ref"":""systemevent"",""entity"":1,""date"":1736932388}";"24.0.0-alpha";"V2";"2031b54f7017f18227cbee83d2e0c3beec2cf2169e472719dd6b920f143ed94e";"Valid";
|
||||
;"413";"1736932630";"BLOCKEDLOG_EXPORT";"";"0";"0";"systemevent";"1736932630";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""id"":0,""ref"":""systemevent"",""entity"":1,""date"":1736932630,""fullname"":""Alice Adminson"",""label"":""Export unalterable logs"",""period"":""year=2024 month=1""}";"24.0.0-alpha";"V2";"b850352ef955c0b8133386b79f88dd347e2c625ed133e30e49314f502ace54fc";"Valid";
|
||||
;"414";"1736932963";"BILL_VALIDATE";"";"9";"9";"FA2501-0037";"1736895600";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""FA2501-0037"",""module_source"":"""",""pos_source"":"""",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""PINKDRESS"",""product_type"":""0"",""product_label"":""Pink dress"",""qty"":""1"",""subprice"":""9.00000000"",""tva_tx"":""0.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""9.00000000"",""total_tva"":""0.00000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""9.00000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""9.00000000"",""multicurrency_total_tva"":""0.00000000"",""multicurrency_total_ttc"":""9.00000000""}},""type"":""0"",""date"":1736895600,""total_ht"":9,""total_tva"":0,""total_ttc"":9,""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"1e43eda5e73678c9275d0137cbf5684d12a79b3d0d32eafa79583b8e21ae4869";"Valid";
|
||||
;"415";"1737018433";"BILL_VALIDATE";"";"11";"11";"FA2501-0038";"1737018433";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""FA2501-0038"",""module_source"":"""",""pos_source"":"""",""pos_print_counter"":0,""email_sent_counter"":0,""invoiceline"":{""1"":{""product_type"":""1"",""product_label"":""Adh\u00e9sion \/ cotisation 2025"",""qty"":""1"",""subprice"":""11.00000000"",""tva_tx"":""0.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""11.00000000"",""total_tva"":""0.00000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""11.00000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""11.00000000"",""multicurrency_total_tva"":""0.00000000"",""multicurrency_total_ttc"":""11.00000000""}},""type"":0,""date"":1737018433,""total_ht"":11,""total_tva"":0,""total_ttc"":11}";"24.0.0-alpha";"V2";"20ea65b804e7250ef18a4c4bb40c0dc66362c0b1bf3a2055a596920f808a15ae";"Valid";
|
||||
;"416";"1737018433";"PAYMENT_CUSTOMER_CREATE";"";"";"11";"PAY2501-0001";"1736982000";"Alice Adminson";"FA2501-0038";"payment";"{""thirdparty"":{""name"":""test test"",""email"":""test@test.com"",""idprof1"":"""",""idprof2"":"""",""tva_assuj"":""1"",""tva_intra"":"""",""code_client"":""CU2501-00037"",""country_code"":""FR""},""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""PAY2501-0001"",""date"":1736982000,""type_code"":""CHQ"",""payment_part"":{""1"":{""amount"":""11"",""invoice"":{""ref"":""FA2501-0038"",""module_source"":"""",""pos_source"":"""",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""type"":""0"",""date"":1736982000,""total_ht"":""11.00000000"",""total_tva"":""0.00000000"",""total_ttc"":""11.00000000"",""revenuestamp"":""0.00000000""}}},""amount"":11}";"24.0.0-alpha";"V2";"af79bb9344a27868825a1c22b2c9ab6d2f7db2aef315541f049490ea620daae5";"Valid";
|
||||
;"417";"1737018535";"BILL_VALIDATE";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":1.25,""total_tva"":0.25,""total_ttc"":1.5,""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"b9c58af18960660e2d98b7ca5539677ee0b611f2f49c2ce3ddcd2a7fff06e2b8";"Valid";
|
||||
;"418";"1737018536";"PAYMENT_CUSTOMER_CREATE";"takepos";"";"1.5";"PAY2501-0002";"1737018535";"Alice Adminson";"TC1-2501-0009";"payment";"{""thirdparty"":{""name"":""Generic customer"",""email"":""ttt@ttt.com"",""idprof1"":"""",""idprof2"":"""",""tva_assuj"":""1"",""tva_intra"":"""",""capital"":""0.00000000"",""typent_code"":""TE_PRIVATE"",""code_client"":""CU1302-0011"",""country_code"":""GB""},""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""PAY2501-0002"",""date"":1737018535,""type_code"":""LIQ"",""payment_part"":{""1"":{""amount"":""1.5"",""invoice"":{""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}}},""amount"":1.5}";"24.0.0-alpha";"V2";"bb3ffec5b8e04ceb0f1a469b882487aadd6f5e1e04244f5e7ddf1cc2f2f2e3c4";"Valid";
|
||||
;"419";"1737019049";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":1,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"17a3c6170409b72a5fedf853abb00581877b18320a207e479c42d77b3d07c4d6";"Valid";
|
||||
;"420";"1737019181";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":2,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"d8770dd062220b8332d304039a53565de2d2d5f917f0aa5620dbcb634e75462e";"Valid";
|
||||
;"421";"1737019353";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":3,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"dbb2d0f11a6ed01566b69717ddb1c08cee10f6964c47cd6b5f0da213027fd1be";"Valid";
|
||||
;"422";"1737019636";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":4,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"e6e65a101521cb8b3921ae31d9565be3432ac94703f2e055e8f1229cb2abee6b";"Valid";
|
||||
;"423";"1737020016";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":5,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"24e0d354f83b5e216414930cfa0b07923725a98a0457969df3f962111932baa2";"Valid";
|
||||
;"424";"1737024079";"DOC_PREVIEW";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":6,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"f1daed6d4977aed9427b2f6530c340b2613e0d9dbfc748d68cf5320af1def9ea";"Valid";
|
||||
;"431";"1737028500";"BILL_SENTBYMAIL";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":""8"",""email_sent_counter"":5,""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000"",""action_email_sent"":{""email_from"":""myemail@mybigcompany.com"",""email_to"":""ttt@ttt.com"",""email_msgid"":""6788f3948bc635.10121388.phpmail@cc385f40e47e5be82815b1fa583939f749c7f86e""}}";"24.0.0-alpha";"V2";"749dbdedc18a10087649f00ee3e6b27ce8d092c513450174dc54503959d8a2f8";"Valid";
|
||||
;"432";"1737028654";"BILL_SENTBYMAIL";"takepos";"1.25";"1.5";"TC1-2501-0009";"1736982000";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC1-2501-0009"",""module_source"":""takepos"",""pos_source"":""1"",""pos_print_counter"":""6"",""email_sent_counter"":2,""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""}},""type"":""0"",""date"":1736982000,""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_ttc"":""1.50000000"",""revenuestamp"":""0.00000000"",""action_email_sent"":{""email_from"":""aaaa <aaaa@aa.com>"",""email_to"":""test@test.com"",""email_msgid"":""6788f42ecbbfd9.77578037.phpmail-dolibarr-inv460@cc385f40e47e5be82815b1fa583939f749c7f86e""}}";"24.0.0-alpha";"V2";"2456751468d90ed6cdd06da34cf8a392585eb152db6a9d457c8f6f97539a77ae";"Valid";
|
||||
;"433";"1737102950";"DOC_PREVIEW";"takepos";"2.33";"2.8";"(PROV-POS2-0)";"1737068400";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""(PROV-POS2-0)"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""},""2"":{""ref"":""POS-KIWI"",""product_type"":""0"",""product_label"":""Kiwi"",""qty"":""1"",""subprice"":""1.08333000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.08000000"",""total_tva"":""0.22000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.30000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.08000000"",""multicurrency_total_tva"":""0.22000000"",""multicurrency_total_ttc"":""1.30000000""}},""type"":""0"",""date"":1737068400,""total_ht"":""2.33000000"",""total_tva"":""0.47000000"",""total_ttc"":""2.80000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"451b90f983512fa095ef9475876d130084489f3e2cb89464ad522391dc1b06a2";"Valid";
|
||||
;"434";"1737102963";"BILL_VALIDATE";"takepos";"2.33";"2.8";"TC2-2501-0001";"1737068400";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC2-2501-0001"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""},""2"":{""ref"":""POS-KIWI"",""product_type"":""0"",""product_label"":""Kiwi"",""qty"":""1"",""subprice"":""1.08333000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.08000000"",""total_tva"":""0.22000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.30000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.08000000"",""multicurrency_total_tva"":""0.22000000"",""multicurrency_total_ttc"":""1.30000000""}},""type"":""0"",""date"":1737068400,""total_ht"":2.33,""total_tva"":0.47,""total_ttc"":2.8,""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"a4f51205e87339187636bd26df2b330dba86c404204144a69711ec4e0e0cc58f";"Valid";
|
||||
;"435";"1737102963";"PAYMENT_CUSTOMER_CREATE";"takepos";"";"2.8";"PAY2501-0003";"1737102963";"Alice Adminson";"TC2-2501-0001";"payment";"{""thirdparty"":{""name"":""Generic customer"",""email"":""ttt@ttt.com"",""idprof1"":"""",""idprof2"":"""",""tva_assuj"":""1"",""tva_intra"":"""",""capital"":""0.00000000"",""typent_code"":""TE_PRIVATE"",""code_client"":""CU1302-0011"",""country_code"":""GB""},""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""PAY2501-0003"",""date"":1737102963,""type_code"":""LIQ"",""payment_part"":{""1"":{""amount"":""2.8"",""invoice"":{""ref"":""TC2-2501-0001"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":""0"",""email_sent_counter"":""0"",""type"":""0"",""date"":1737068400,""total_ht"":""2.33000000"",""total_tva"":""0.47000000"",""total_ttc"":""2.80000000"",""revenuestamp"":""0.00000000""}}},""amount"":2.8}";"24.0.0-alpha";"V2";"e095af5c7eec1f1d0272d1ab633c9f9b78d5f9ee44f425f3fed5ed844ea700b2";"Valid";
|
||||
;"436";"1737102971";"DOC_PREVIEW";"takepos";"2.33";"2.8";"TC2-2501-0001";"1737068400";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC2-2501-0001"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":1,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""},""2"":{""ref"":""POS-KIWI"",""product_type"":""0"",""product_label"":""Kiwi"",""qty"":""1"",""subprice"":""1.08333000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.08000000"",""total_tva"":""0.22000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.30000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.08000000"",""multicurrency_total_tva"":""0.22000000"",""multicurrency_total_ttc"":""1.30000000""}},""type"":""0"",""date"":1737068400,""total_ht"":""2.33000000"",""total_tva"":""0.47000000"",""total_ttc"":""2.80000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"fc5c19832334b5c00d7cc3a4414a5ca37867fa9ee5c367c921324aaebd0f81de";"Valid";
|
||||
;"437";"1737102993";"DOC_PREVIEW";"takepos";"2.33";"2.8";"TC2-2501-0001";"1737068400";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC2-2501-0001"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":2,""email_sent_counter"":""0"",""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""},""2"":{""ref"":""POS-KIWI"",""product_type"":""0"",""product_label"":""Kiwi"",""qty"":""1"",""subprice"":""1.08333000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.08000000"",""total_tva"":""0.22000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.30000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.08000000"",""multicurrency_total_tva"":""0.22000000"",""multicurrency_total_ttc"":""1.30000000""}},""type"":""0"",""date"":1737068400,""total_ht"":""2.33000000"",""total_tva"":""0.47000000"",""total_ttc"":""2.80000000"",""revenuestamp"":""0.00000000""}";"24.0.0-alpha";"V2";"91cf7545174270befeb93fcefb67acb2f07525c7d73a190eee76936cfa7dfd7d";"Valid";
|
||||
;"438";"1737104486";"BILL_SENTBYMAIL";"takepos";"2.33";"2.8";"TC2-2501-0001";"1737068400";"Alice Adminson";"";"";"{""mycompany"":{""name"":""MyBigCompany"",""phone"":""09123123"",""fax"":""09123124"",""email"":""myemail@mybigcompany.com"",""idprof1"":""123456"",""idprof2"":""ABC-DEF"",""idprof3"":""15E-45-8D"",""tva_assuj"":1,""tva_intra"":""FR12345678"",""localtax1_assuj"":0,""localtax2_assuj"":0,""managers"":""Zack Zeceo"",""capital"":10000,""forme_juridique_code"":0,""country_code"":""FR"",""address"":""21 Jump street."",""zip"":""75500"",""town"":""MyTown""},""ref"":""TC2-2501-0001"",""module_source"":""takepos"",""pos_source"":""2"",""pos_print_counter"":""2"",""email_sent_counter"":1,""invoiceline"":{""1"":{""ref"":""POS-APPLE"",""product_type"":""0"",""product_label"":""Apple"",""qty"":""1"",""subprice"":""1.25000000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.25000000"",""total_tva"":""0.25000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.50000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.25000000"",""multicurrency_total_tva"":""0.25000000"",""multicurrency_total_ttc"":""1.50000000""},""2"":{""ref"":""POS-KIWI"",""product_type"":""0"",""product_label"":""Kiwi"",""qty"":""1"",""subprice"":""1.08333000"",""tva_tx"":""20.000"",""localtax1_tx"":""0.000"",""localtax2_tx"":""0.000"",""total_ht"":""1.08000000"",""total_tva"":""0.22000000"",""total_localtax1"":""0.00000000"",""total_localtax2"":""0.00000000"",""total_ttc"":""1.30000000"",""info_bits"":""0"",""special_code"":""0"",""multicurrency_code"":""EUR"",""multicurrency_total_ht"":""1.08000000"",""multicurrency_total_tva"":""0.22000000"",""multicurrency_total_ttc"":""1.30000000""}},""type"":""0"",""date"":1737068400,""total_ht"":""2.33000000"",""total_tva"":""0.47000000"",""total_ttc"":""2.80000000"",""revenuestamp"":""0.00000000"",""action_email_sent"":{""email_from"":""Alice Adminson <laurent@destailleur.fr>"",""email_to"":""Generic customer <ttt@ttt.com>"",""email_msgid"":""678a1c6608cdb4.28637446.phpmail-dolibarr-inv461@cc385f40e47e5be82815b1fa583939f749c7f86e""}}";"24.0.0-alpha";"V2";"7ebd906d6133f5526411664bc637ad88fc5d30bd147d4e6dcfc460520144411f";"Valid";
|
||||
END - sha256=14290f951be42f11da5b36274cdbb9d018ea1787855c19c92f317152bf7bb9e6 - hmac_sha256=851ac6dc40c60faf69efeb4ef6712abacfffe5a986c674ca478f8c1525a126eb
|
||||
|
Can't render this file because it has a wrong number of fields in line 23.
|
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
# Copyright (C) 2010-2026 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
#------------------------------------------------------
|
||||
# Script to purge and initialize a database with demo values.
|
||||
@@ -11,8 +12,8 @@
|
||||
# Regis Houssin - regis.houssin@inodbox.com
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: initdemo.sh confirm
|
||||
# usage: initdemo.sh confirm mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||
# Usage: initdemo.sh confirm|confirmresetblockedlog
|
||||
# usage: initdemo.sh confirm|confirmresetblockedlog mysqldump_dolibarr_x.x.x.sql database port login pass
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
@@ -43,12 +44,12 @@ admin=$5
|
||||
passwd=$6
|
||||
|
||||
# ----------------------------- check params
|
||||
if [ "$confirm" != "confirm" ]
|
||||
if [ "$confirm" != "confirm" ] && [ "$confirm" != "confirmresetblockedlog" ]
|
||||
then
|
||||
echo "----- $0 -----"
|
||||
echo "Usage: initdemo.sh confirm "
|
||||
echo "Usage: initdemo.sh confirm|confirmresetblockedlog "
|
||||
echo " or"
|
||||
echo "Usage: initdemo.sh confirm [mysqldump_dolibarr_x.x.x.sql database port login pass]"
|
||||
echo "Usage: initdemo.sh confirm|confirmresetblockedlog [mysqldump_dolibarr_x.x.x.sql database port login pass]"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -91,7 +92,7 @@ then
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Mysql database name :" 16 55 $base 2> "$fichtemp"
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Mysql database name :" 16 55 "$base" 2> "$fichtemp"
|
||||
valret=$?
|
||||
case $valret in
|
||||
0)
|
||||
@@ -107,7 +108,7 @@ then
|
||||
fichtemp=$(mktemp 2>/dev/null) || fichtemp=/tmp/test$$
|
||||
# shellcheck disable=2064,2172
|
||||
trap "rm -f '$fichtemp'" 0 1 2 5 15
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Mysql port (ex: 3306):" 16 55 $port 2> "$fichtemp"
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --inputbox "Mysql port (ex: 3306):" 16 55 "$port" 2> "$fichtemp"
|
||||
valret=$?
|
||||
|
||||
case $valret in
|
||||
@@ -161,7 +162,7 @@ then
|
||||
|
||||
|
||||
# ---------------------------- confirmation
|
||||
$DIALOG --title "Init Dolibarr with demo values" --clear --yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : --hidden--" 15 55
|
||||
$DIALOG --title "Erase Dolibarr with demo values" --clear --yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Document dir : '$documentdir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : --hidden--" 15 55
|
||||
|
||||
case $? in
|
||||
0) echo "Ok, start process..." ;;
|
||||
@@ -172,7 +173,7 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# ---------------------------- run sql file
|
||||
# ---------------------------- Run sql file
|
||||
if [ "$passwd" != "" ]
|
||||
then
|
||||
export passwd="-p$passwd"
|
||||
@@ -181,8 +182,11 @@ fi
|
||||
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
||||
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
#echo "drop old table"
|
||||
echo "drop table"
|
||||
echo "drop table if exists llx_accounting_account;"
|
||||
echo "drop table if exists llx_accounting_account;" | mysql "-P$port" "-u$admin" "$passwd" "$base"
|
||||
echo "drop table if exists llx_accounting_system;"
|
||||
echo "drop table if exists llx_accounting_system;" | mysql "-P$port" "-u$admin" "$passwd" "$base"
|
||||
|
||||
echo "mysql -P$port -u$admin $passwdshown $base < '$mydir/$dumpfile'"
|
||||
mysql "-P$port" "-u$admin" "$passwd" "$base" < "$mydir/$dumpfile"
|
||||
export res=$?
|
||||
@@ -192,10 +196,24 @@ if [ $res -ne 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
# ---------------------------- Run update of demo data
|
||||
echo
|
||||
echo Run script updatedemo.php confirm
|
||||
"$mydir/updatedemo.php" confirm
|
||||
export res=$?
|
||||
|
||||
# ---------------------------- copy demo files
|
||||
|
||||
# ---------------------------- Run update of demo data
|
||||
if [ "$confirm" == "confirmresetblockedlog" ]; then
|
||||
echo
|
||||
echo Run script updatedemo.php confirmresetblockedlog
|
||||
"$mydir/updatedemo.php" confirmresetblockedlog
|
||||
export res=$?
|
||||
fi
|
||||
|
||||
|
||||
# ---------------------------- Copy demo files
|
||||
export documentdir
|
||||
# shellcheck disable=2016
|
||||
documentdir=$(< "$mydir/../../htdocs/conf/conf.php" grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g')
|
||||
@@ -246,8 +264,8 @@ fi
|
||||
|
||||
if [ "$res" = "0" ]
|
||||
then
|
||||
echo "Success, file successfully loaded."
|
||||
echo "Success, file successfully loaded: Note that crypted data need to have dolibarr_main_instance_unique_id=11f3c81e86fc9e3b3fd11d81c9a31bd0 with this data set to be readable."
|
||||
else
|
||||
echo "Error, load failed."
|
||||
echo "Error, 1 step of script has failed."
|
||||
fi
|
||||
echo
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2010-2026 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
|
||||
#------------------------------------------------------
|
||||
# Script to extract a database with demo values.
|
||||
# Note: "dialog" tool need to be available if no parameter provided.
|
||||
@@ -11,26 +13,28 @@
|
||||
#------------------------------------------------------
|
||||
# shellcheck disable=2012,2006,2034,2046,2064,2086,2155,2166,2186,2172,2268
|
||||
|
||||
export mydir=`echo "$0" | sed -e 's/savedemo.sh//'`;
|
||||
if [ "x$mydir" = "x" ]
|
||||
export mydir
|
||||
mydir=${0//savedemo.sh/}
|
||||
if [ "$mydir" = "" ] || [ "$mydir" = "./" ]
|
||||
then
|
||||
export mydir="."
|
||||
fi
|
||||
export id=`id -u`;
|
||||
export id
|
||||
id=$(id -u)
|
||||
|
||||
|
||||
# ----------------------------- check if root
|
||||
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
|
||||
if [ "$id" != "0" ] && [ "$id" != "1001" ]
|
||||
then
|
||||
echo "Script must be ran as root"
|
||||
echo "Script must be executed as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------- command line params
|
||||
dumpfile=$1;
|
||||
base=$2;
|
||||
port=$3;
|
||||
base="${2:-dolibarrdemo}"
|
||||
port="${3:-3306}"
|
||||
admin=$4;
|
||||
passwd=$5;
|
||||
|
||||
@@ -54,7 +58,7 @@ then
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Save Dolibarr with demo values" --clear \
|
||||
--inputbox "Output dump file :" 16 55 $dumpfile 2> $fichtemp
|
||||
--inputbox "Output dump file :" 16 55 "$dumpfile" 2> $fichtemp
|
||||
valret=$?
|
||||
case $valret in
|
||||
0)
|
||||
@@ -71,7 +75,7 @@ then
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Save Dolibarr with demo values" --clear \
|
||||
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
|
||||
--inputbox "Mysql database name :" 16 55 "$base" 2> $fichtemp
|
||||
valret=$?
|
||||
case $valret in
|
||||
0)
|
||||
@@ -87,7 +91,7 @@ then
|
||||
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
||||
trap "rm -f $fichtemp" 0 1 2 5 15
|
||||
$DIALOG --title "Save Dolibarr with demo values" --clear \
|
||||
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
|
||||
--inputbox "Mysql port (ex: 3306):" 16 55 "$port" 2> $fichtemp
|
||||
|
||||
valret=$?
|
||||
|
||||
@@ -172,6 +176,7 @@ fi
|
||||
if [ "x$passwd" != "x" ]
|
||||
then
|
||||
export passwd="-p$passwd"
|
||||
export passwdshown="-p*****"
|
||||
fi
|
||||
export list="
|
||||
--ignore-table=$base.llx_abonne
|
||||
@@ -347,20 +352,24 @@ export list="
|
||||
--ignore-table=$base.llx_ultimatepdf
|
||||
--ignore-table=$base.llx_update_modules
|
||||
--ignore-table=$base.llx_ventilation_achat
|
||||
--ignore-table=$base.llx_verifactudolibarr_add_tpls
|
||||
--ignore-table=$base.llx_verifactudolibarr_facture_log
|
||||
--ignore-table=$base.llx_verifactudolibarr_messages
|
||||
--ignore-table=$base.llx_verifactudolibarr_tax_type
|
||||
--ignore-table=$base.tmp_llx_accouting_account
|
||||
--ignore-table=$base.tmp_llx_product_batch
|
||||
--ignore-table=$base.tmp_llx_product_batch2
|
||||
--ignore-table=$base.tmp_tmp
|
||||
--ignore-table=$base.tmp_user
|
||||
"
|
||||
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
|
||||
echo "mysqldump -P$port -u$admin $passwdshown $list $base > $mydir/$dumpfile"
|
||||
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile
|
||||
export res=$?
|
||||
|
||||
if [ "x$res" = "x0" ]
|
||||
then
|
||||
echo "Success, file successfully loaded."
|
||||
echo "Success, file successfully dumped."
|
||||
else
|
||||
echo "Error, load failed."
|
||||
echo "Error, dump failed."
|
||||
fi
|
||||
echo
|
||||
|
||||
@@ -65,6 +65,7 @@ if (!$res) {
|
||||
* @var DoliDB $db
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||
|
||||
|
||||
/*
|
||||
@@ -101,6 +102,115 @@ $tables = array(
|
||||
);
|
||||
|
||||
|
||||
if ($confirm == 'regenerate') {
|
||||
$entity = 1;
|
||||
$fromrowid = 0;
|
||||
//$fromrowid = 442;
|
||||
|
||||
$block_static = new BlockedLog($db);
|
||||
$block_static->loadTrackedEvents();
|
||||
|
||||
print "TZ=".date_default_timezone_get()."\n";
|
||||
|
||||
$db->begin();
|
||||
|
||||
// Now restart request with all data, so without the limit(1) in sql request
|
||||
$sql = "SELECT rowid, entity, date_creation, tms, user_fullname, action, module_source, amounts_taxexcl, amounts, element, fk_object, date_object, ref_object,";
|
||||
$sql .= " linktoref, linktype, signature, fk_user, object_data, object_version, object_format, debuginfo";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."blockedlog";
|
||||
$sql .= " WHERE entity = ".((int) $entity);
|
||||
$sql .= " AND rowid >= ".((int) $fromrowid);
|
||||
$sql .= " ORDER BY date_creation ASC, rowid ASC"; // Required so later we can use the parameter $previoushash of checkSignature()
|
||||
|
||||
$i = 0;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
// Make the first fetch to get first line and then get the previous hash.
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
// We set here all data used into signature calculation (see checkSignature method) and more
|
||||
|
||||
// IMPORTANT: We must have here, the same rule for transformation of data than into
|
||||
// the blockedlog->fetch() method (db->jdate for date, ...)
|
||||
|
||||
$block_static->id = $obj->rowid;
|
||||
$block_static->entity = $obj->entity;
|
||||
|
||||
if ($i == 0) {
|
||||
$tmparray = $block_static->getPreviousHash(0, $block_static->id);
|
||||
$previoushash = $tmparray['previoushash'];
|
||||
}
|
||||
|
||||
$tz = 'gmt';
|
||||
if (empty($obj->object_format) || $obj->object_format == 'V1') {
|
||||
$tz = 'tzserver';
|
||||
}
|
||||
|
||||
$block_static->date_creation = $db->jdate($obj->date_creation, $tz); // jdate(date_creation) is UTC
|
||||
$block_static->date_modification = $db->jdate($obj->tms, $tz); // jdate(tms) is UTC
|
||||
|
||||
$block_static->action = $obj->action;
|
||||
$block_static->module_source = $obj->module_source;
|
||||
|
||||
$block_static->amounts_taxexcl = is_null($obj->amounts_taxexcl) ? null : (float) $obj->amounts_taxexcl; // Database store value with 8 digits, we cut ending 0 them with (flow)
|
||||
$block_static->amounts = (float) $obj->amounts; // Database store value with 8 digits, we cut ending 0 them with (flow)
|
||||
|
||||
$block_static->fk_object = $obj->fk_object; // Not in signature
|
||||
$block_static->date_object = $db->jdate($obj->date_object, $tz); // jdate(date_object) is UTC
|
||||
$block_static->ref_object = $obj->ref_object;
|
||||
|
||||
$block_static->linktoref = $obj->linktoref;
|
||||
$block_static->linktype = $obj->linktype;
|
||||
|
||||
$block_static->fk_user = $obj->fk_user; // Not in signature
|
||||
$block_static->user_fullname = $obj->user_fullname;
|
||||
|
||||
$block_static->object_data = $block_static->dolDecodeBlockedData($obj->object_data);
|
||||
|
||||
// Old hash + Previous fields concatenated = signature
|
||||
$block_static->signature = $obj->signature;
|
||||
|
||||
$block_static->element = $obj->element; // Not in signature
|
||||
|
||||
$block_static->object_format = $obj->object_format; // Not in signature.
|
||||
$block_static->object_version = $obj->object_version; // Not in signature
|
||||
|
||||
//$block_static->certified = ($obj->certified == 1); // Not in signature
|
||||
|
||||
//var_dump($obj->date_creation, $tz, $block_static->date_creation);
|
||||
|
||||
// Build/Check the string for the signature
|
||||
$signature = $block_static->checkSignature($previoushash, 2);
|
||||
|
||||
print "For ROWID ".$obj->rowid." - Previous hash = ".$previoushash."\n";
|
||||
print "Signature in db: ".$obj->signature." - New calculated: ".$signature['calculatedsignature']."\n";
|
||||
if ($obj->signature != $signature['calculatedsignature']) {
|
||||
$tmpsql = "UPDATE ".MAIN_DB_PREFIX."blockedlog SET signature = '".$db->escape($signature['calculatedsignature'])."'";
|
||||
$tmpsql .= " WHERE rowid = ".((int) $obj->rowid);
|
||||
|
||||
print "Update for ROWID ".$obj->rowid." with ".$tmpsql."\n";
|
||||
$tmpresult = $db->query($tmpsql);
|
||||
}
|
||||
|
||||
$previoushash = $signature['calculatedsignature'];
|
||||
|
||||
|
||||
// Set new previous hash for next fetch
|
||||
|
||||
$i++;
|
||||
|
||||
// Uncomment to proceed one only
|
||||
//break;
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
setEventMessages($db->lasterror, null, 'errors');
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
}
|
||||
|
||||
|
||||
if ($confirm == 'confirm') {
|
||||
print "Update dates to current year for database name = ".$db->database_name."\n";
|
||||
|
||||
@@ -236,7 +346,7 @@ if ($confirm == 'confirmresetblockedlog') {
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET datef = datec WHERE datef >= NOW()";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET datef = datec";
|
||||
print $sql;
|
||||
print "\n";
|
||||
$db->query($sql);
|
||||
@@ -252,6 +362,12 @@ if ($confirm == 'confirmresetblockedlog') {
|
||||
print "\n";
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'MAIN_FIRST_REGISTRATION_OK_DATE'";
|
||||
print $sql;
|
||||
print "\n";
|
||||
$db->query($sql);
|
||||
|
||||
|
||||
/*
|
||||
// Delete corrupted record no more used that still exists in demo image but can't exist in a production env
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."blockedlog WHERE action LIKE 'PAYMENT_VARIOUS_%'";
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace codesniffer\Sniffs\Dolibarr;
|
||||
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
|
||||
/**
|
||||
* CheckIsModEnabledArgumentSniff
|
||||
*/
|
||||
class CheckIsModEnabledArgumentSniff implements Sniff
|
||||
{
|
||||
// Nom de la fonction cible
|
||||
protected $targetFunction = 'ismodenabled';
|
||||
|
||||
protected $deprecatedModulesNames = [
|
||||
'actioncomm' => 'agenda',
|
||||
'adherent' => 'member',
|
||||
'adherent_type' => 'member_type',
|
||||
'banque' => 'bank',
|
||||
'categorie' => 'category',
|
||||
'commande' => 'order',
|
||||
'contrat' => 'contract',
|
||||
'entrepot' => 'stock',
|
||||
'expedition' => 'shipping',
|
||||
'facture' => 'invoice',
|
||||
'ficheinter' => 'intervention',
|
||||
'product_fournisseur_price' => 'productsupplierprice',
|
||||
'product_price' => 'productprice',
|
||||
'projet' => 'project',
|
||||
'propale' => 'propal',
|
||||
'socpeople' => 'contact',
|
||||
];
|
||||
|
||||
/**
|
||||
* register
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
// We are listening function calls (T_STRING)
|
||||
return [T_STRING];
|
||||
}
|
||||
|
||||
/**
|
||||
* process
|
||||
*
|
||||
* @param File $phpcsFile file to process
|
||||
* @param mixed $stackPtr pointer
|
||||
* @return void
|
||||
*/
|
||||
public function process(File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
if (strtolower($tokens[$stackPtr]['content']) !== strtolower($this->targetFunction)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check that it is a function call (followed by '(')
|
||||
$openParen = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true);
|
||||
if ($tokens[$openParen]['code'] !== T_OPEN_PARENTHESIS) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We are looking for the first 'useful' token after the parenthesis
|
||||
$firstArgTokenPtr = $phpcsFile->findNext(T_WHITESPACE, $openParen + 1, null, true);
|
||||
|
||||
// If the function is called without arguments (isModEnabled()), we stop
|
||||
if ($tokens[$firstArgTokenPtr]['code'] === T_CLOSE_PARENTHESIS) {
|
||||
return;
|
||||
}
|
||||
|
||||
// check value of argument
|
||||
$argContent = str_replace(["'", '"'], '', $tokens[$firstArgTokenPtr]['content']);
|
||||
$argCode = $tokens[$firstArgTokenPtr]['code'];
|
||||
|
||||
if (array_key_exists($argContent, $this->deprecatedModulesNames)) {
|
||||
$phpcsFile->addError(
|
||||
'The function "%s" has deprecated argument ("%s") to replace with "%s".',
|
||||
$firstArgTokenPtr,
|
||||
'DeprecatedArgument',
|
||||
[$tokens[$stackPtr]['content'], $argContent, $this->deprecatedModulesNames[$argContent]]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
namespace codesniffer\Sniffs\Dolibarr;
|
||||
|
||||
use PHP_CodeSniffer\Sniffs\Sniff;
|
||||
use PHP_CodeSniffer\Files\File;
|
||||
|
||||
/**
|
||||
* LanguageOfCommentsSniff
|
||||
*/
|
||||
class LanguageOfCommentsSniff implements Sniff
|
||||
{
|
||||
// List of words that betray a comment in French
|
||||
public $frenchWords = [
|
||||
' additionner ',
|
||||
' arrondir ',
|
||||
' avec ',
|
||||
' calculer ',
|
||||
' chaine ',
|
||||
' chaîne ',
|
||||
' chercher ',
|
||||
' chiffre ',
|
||||
' chiffres ',
|
||||
// ' commande ',
|
||||
' commandes ',
|
||||
' compteur ',
|
||||
' compteurs ',
|
||||
' contrats ',
|
||||
' depuis ',
|
||||
' diviser ',
|
||||
' donnée ',
|
||||
' entier ',
|
||||
// ' facture ', // avoid french name of dolibarr object
|
||||
' factures ',
|
||||
' ligne ',
|
||||
' lignes ',
|
||||
' modèle ',
|
||||
' niveau ',
|
||||
' niveaux ',
|
||||
' nombre ',
|
||||
' parametrage ',
|
||||
' paramétrage ',
|
||||
' pourcentage ',
|
||||
' produit ',
|
||||
' produits ',
|
||||
' quand ',
|
||||
' rechercher ',
|
||||
' sinon ',
|
||||
' stocker ',
|
||||
' soustraire ',
|
||||
' sujet ',
|
||||
' sujets ',
|
||||
' suppression ',
|
||||
' utilisateur ',
|
||||
' utilisateurs ',
|
||||
' valeur ',
|
||||
' valeurs ',
|
||||
];
|
||||
|
||||
/**
|
||||
* Which tokens to listen ?
|
||||
* T_COMMENT = comments // or #
|
||||
* T_DOC_COMMENT_STRING = text in block comments
|
||||
* @return int[]
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return [
|
||||
T_COMMENT,
|
||||
T_DOC_COMMENT_STRING,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* process
|
||||
*
|
||||
* @param File $phpcsFile file to process
|
||||
* @param mixed $stackPtr pointer
|
||||
* @return void
|
||||
*/
|
||||
public function process(File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
$content = $tokens[$stackPtr]['content'];
|
||||
|
||||
// Basic cleanup (lowercase for comparison)
|
||||
$contentLower = strtolower($content);
|
||||
|
||||
foreach ($this->frenchWords as $word) {
|
||||
if (strpos($contentLower, $word) !== false) {
|
||||
$error = "The comment appears to be in French (word detected: '%s'). Please write in English.";
|
||||
$data = [trim($word)];
|
||||
$phpcsFile->addWarning($error, $stackPtr, 'FrenchDetected', $data);
|
||||
return; // We stop at the first occurrence.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,11 @@
|
||||
<exclude-pattern>/\.git/</exclude-pattern>
|
||||
<exclude-pattern>/\.cache/</exclude-pattern>
|
||||
|
||||
<!-- Custom rules -->
|
||||
<config name="installed_paths" value="/dev/setup/codesniffer" />
|
||||
<rule ref="codesniffer.Dolibarr.LanguageOfComments"/>
|
||||
<rule ref="codesniffer.Dolibarr.CheckIsModEnabledArgument"/>
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
|
||||
@@ -31,12 +36,12 @@
|
||||
<!-- Rules from Generic Standard -->
|
||||
<!--
|
||||
<rule ref="PSR12.Files.OpenTag">
|
||||
<properties>
|
||||
<property name="ignoreIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<properties>
|
||||
<property name="ignoreIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<exclude name="PSR12.WhiteSpace.ScopeIndent"/>
|
||||
-->
|
||||
-->
|
||||
|
||||
<!-- We want to allow empty statement: It allows to put some code comments into the else for examples -->
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement">
|
||||
@@ -76,16 +81,16 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Lower severity on warnings we do not want to show in the pre-commit reports -->
|
||||
<rule ref="Generic.Files.LineLength.TooLong">
|
||||
<!-- Lower severity on warnings we do not want to show in the pre-commit reports -->
|
||||
<rule ref="Generic.Files.LineLength.TooLong">
|
||||
<severity>4</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity.TooHigh">
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity.TooHigh">
|
||||
<severity>4</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel.TooHigh">
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel.TooHigh">
|
||||
<severity>4</severity>
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- Warnings on TODO -->
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# Fail2Ban configuration file
|
||||
#
|
||||
# Regexp to detect try to check a couple login/password so we can add mitigation
|
||||
# on IP making too much tries.
|
||||
# Regexp to detect try to check a couple login/password so we can add mitigation on IPs making too much tries.
|
||||
|
||||
[Definition]
|
||||
|
||||
# To test, you can inject this example into log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 1234567 33 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log
|
||||
#
|
||||
# then
|
||||
# fail2ban-client status web-dol-bruteforce
|
||||
# fail2ban-client status web-dolibarr-bruteforce
|
||||
#
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf --print-all-matched
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+functions_.*::check_user_.* Authentication KO
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s.*functions_.*::check_user_.* Authentication KO
|
||||
ignoreregex =
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
# To test, you can inject this example into log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 Hack attempt detected - xxx" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 1234567 33 Hack attempt detected - xxx" >> /mypath/documents/dolibarr.log
|
||||
#
|
||||
# then
|
||||
# fail2ban-client status web-dolibarr-hackattempt
|
||||
@@ -14,5 +15,5 @@
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-hackattempt.conf --print-all-matched
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+Hack attempt detected
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s.*Hack attempt detected
|
||||
ignoreregex =
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
[Definition]
|
||||
|
||||
# To test, you can inject this example into log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" NOTICE 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" NOTICE 1.2.3.4 1234567 33 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log
|
||||
#
|
||||
# then
|
||||
# fail2ban-client status web-dolibarr-limitpublic
|
||||
@@ -14,5 +15,5 @@
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf --print-all-matched
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/public/
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s.*--- Access to .*/public/
|
||||
ignoreregex =
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
[Definition]
|
||||
|
||||
# To test, you can inject this example into log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" NOTICE 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log
|
||||
# echo `date +'%Y-%m-%d %H:%M:%S'`" NOTICE 1.2.3.4 1234567 33 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log
|
||||
#
|
||||
# then
|
||||
# fail2ban-client status web-dolibarr-passf
|
||||
@@ -14,5 +15,5 @@
|
||||
# To test rule file on a existing log file
|
||||
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-passf.conf --print-all-matched
|
||||
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s+--- Access to .*/passwordforgotten.php - action=buildnewpassword
|
||||
failregex = ^ [A-Z\s]+ <HOST>\s.*--- Access to .*/passwordforgotten.php - action=buildnewpassword
|
||||
ignoreregex =
|
||||
|
||||
@@ -883,7 +883,7 @@ foreach ($arrayofalerts as $key => $alert) {
|
||||
// VDP ID
|
||||
$html .= '<td style="white-space: nowrap">';
|
||||
if (!empty($alert['issueidvdp'])) {
|
||||
$html .= '#vdp'.$alert['issueidvdp'];
|
||||
$html .= '#'.$alert['issueidvdp'];
|
||||
$arrayofalerts[$key]['description'] .= "\n<br>".'VDP ID #'.$alert['issueidvdp'];
|
||||
} else {
|
||||
//$html .= '<span class="opacitymedium">public issue</span>';
|
||||
@@ -1158,11 +1158,11 @@ function cleanVal2($val)
|
||||
if (preg_match('/CVE([0-9\-\s]+)/', $tmpval['title'], $reg)) {
|
||||
$tmpval['issueidcve'] = preg_replace('/^\-/', '', preg_replace('/\s+/', '-', trim($reg[1])));
|
||||
}
|
||||
if (preg_match('/#yogosha(\d+)/i', $tmpval['title'], $reg)) {
|
||||
$tmpval['issueidvdp'] = $reg[1];
|
||||
if (preg_match('/#(yogosha\d+)/i', $tmpval['title'], $reg)) {
|
||||
$tmpval['issueidvdp'] = strtolower($reg[1]);
|
||||
}
|
||||
if (preg_match('/#ghsa([a-z\-\d]+)/i', $tmpval['title'], $reg)) {
|
||||
$tmpval['issueidvdp'] = $reg[1];
|
||||
if (preg_match('/#(ghsa[a-z\-\d]+)/i', $tmpval['title'], $reg)) {
|
||||
$tmpval['issueidvdp'] = strtolower($reg[1]);
|
||||
}
|
||||
|
||||
return $tmpval;
|
||||
|
||||
@@ -9,19 +9,18 @@
|
||||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanUndeclaredProperty : 410+ occurrences
|
||||
// PhanTypeMismatchArgument : 65+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 60+ occurrences
|
||||
// PhanTypeMismatchArgumentNullable : 20+ occurrences
|
||||
// PhanUndeclaredProperty : 400+ occurrences
|
||||
// PhanTypeMismatchArgument : 60+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 50+ occurrences
|
||||
// PhanTypeMismatchProperty : 20+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 15+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 10+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 10+ occurrences
|
||||
// PhanTypeMismatchArgumentNullable : 7 occurrences
|
||||
// PhanTypeArraySuspiciousNull : 5 occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 5 occurrences
|
||||
// PhanUndeclaredMethod : 5 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 4 occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 2 occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 2 occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 2 occurrences
|
||||
// PhanParamTooMany : 1 occurrence
|
||||
// PhanPossiblyUndeclaredVariable : 1 occurrence
|
||||
@@ -30,7 +29,6 @@ return [
|
||||
|
||||
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
|
||||
'file_suppressions' => [
|
||||
'htdocs/categories/viewcat.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/comm/action/index.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/action/pertype.php' => ['PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/comm/action/peruser.php' => ['PhanTypeMismatchArgument'],
|
||||
@@ -41,16 +39,12 @@ return [
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/list.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/list_det.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/class/account.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/bank/line.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/various_payment/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/various_payment/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/bank/various_payment/info.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/clients.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/facture/card-rec.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/facture/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/localtax/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
@@ -59,7 +53,6 @@ return [
|
||||
'htdocs/compta/paiement/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/paiement/cheque/list.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement/rapport.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/prelevement/card.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/resultat/clientfourn.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/resultat/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/compta/resultat/projects.php' => ['PhanTypeMismatchArgument'],
|
||||
@@ -76,7 +69,7 @@ return [
|
||||
'htdocs/core/class/CMailFile.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/class/canvas.class.php' => ['PhanUndeclaredMethod'],
|
||||
'htdocs/core/class/cgenericdic.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonobject.class.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/conf.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/core/class/ctyperesource.class.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -101,38 +94,32 @@ return [
|
||||
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/holiday/mod_holiday_immaculate.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/member/modules_cards.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginDuplicateArrayKey'],
|
||||
'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/multicompany_page.php' => ['PhanTypeMismatchArgument'],
|
||||
@@ -146,7 +133,6 @@ return [
|
||||
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/card.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -235,16 +221,15 @@ return [
|
||||
'htdocs/salaries/virement_request.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/societe/ajax/company.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/societe/class/societe.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/paymentmodes.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/societe/paymentmodes.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/supplier_proposal/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/invoice.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/takepos/invoice.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/ticket/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/actions_ticket.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/ticket.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/user/class/user.class.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/user/class/usergroup.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -253,7 +238,6 @@ return [
|
||||
'htdocs/webhook/target_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/webportal/admin/setup.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_project.php' => ['PhanUndeclaredProperty'],
|
||||
],
|
||||
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
|
||||
|
||||
@@ -227,6 +227,24 @@ return [
|
||||
'backward_compatibility_checks' => false,
|
||||
'simplify_ast' => true,
|
||||
'analyzed_file_extensions' => ['php','inc'],
|
||||
/*'included_extension_subset' => [
|
||||
'curl',
|
||||
'dom',
|
||||
'filter',
|
||||
'gd',
|
||||
'imap',
|
||||
'intl',
|
||||
'json',
|
||||
'libxml',
|
||||
'mbstring',
|
||||
'mysqli',
|
||||
'opcache',
|
||||
'openssl',
|
||||
'session',
|
||||
'sqlite3',
|
||||
'xml',
|
||||
'zip'
|
||||
],*/
|
||||
'globals_type_map' => [
|
||||
'_Avery_Labels' => 'array<string,array{name:string,paper-size:string|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:int,custom_x:float,custom_y:float}>',
|
||||
'action' => 'string',
|
||||
@@ -439,6 +457,7 @@ return [
|
||||
'PhanTypeObjectUnsetDeclaredProperty',
|
||||
'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
// 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
'PhanTypeMismatchArgumentSuperType', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
|
||||
'PhanPluginWhitespaceTab', // Dolibarr uses tabs
|
||||
'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility
|
||||
|
||||
@@ -74,6 +74,7 @@ $config['suppress_issue_types'] = [
|
||||
'PhanTypeObjectUnsetDeclaredProperty',
|
||||
'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
'PhanTypeMismatchArgumentSuperType', // a lot of false positive, in most cases, we want to keep the code as it is
|
||||
|
||||
'PhanPluginWhitespaceTab', // Dolibarr used tabs
|
||||
'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility
|
||||
|
||||
@@ -76,6 +76,8 @@ parameters:
|
||||
- '#Empty array passed to foreach#'
|
||||
- '#Unable to resolve the template type T#'
|
||||
- '#in empty\(\) always exists and is always falsy#'
|
||||
- '#in empty\(\) always exists and is not falsy#'
|
||||
- '#in isset\(\) is not nullable#'
|
||||
- '#is always#'
|
||||
internalErrorsCountLimit: 50
|
||||
cache:
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# - Some side effects from translations on variables.
|
||||
# - Some other minors side effects to be examined (#, %).
|
||||
#
|
||||
# Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
# Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
LANG_DIR=htdocs/langs/en_US/
|
||||
MYDIR=$(dirname "$(realpath "$0")")
|
||||
@@ -141,10 +141,10 @@ sed -n 's@< \(.*\)@^\1\\s*=@p' \
|
||||
#
|
||||
REPL_STR=""
|
||||
for t in trans transnoentities transnoentitiesnoconv newItem buttonsSaveCancel; do
|
||||
REPL_STR="${REPL_STR}\n->${t}(\"\\1\","
|
||||
REPL_STR="${REPL_STR}\n->${t}('\\1',"
|
||||
REPL_STR="${REPL_STR}\n->${t}(\"\\1\")"
|
||||
REPL_STR="${REPL_STR}\n->${t}('\\1')"
|
||||
REPL_STR="${REPL_STR}\n->${t}(\"\\1\","
|
||||
REPL_STR="${REPL_STR}\n->${t}('\\1',"
|
||||
REPL_STR="${REPL_STR}\n->${t}(\"\\1\")"
|
||||
REPL_STR="${REPL_STR}\n->${t}('\\1')"
|
||||
done
|
||||
|
||||
rm -f "${MISSING_FILE}.grep" >/dev/null 2>&1
|
||||
|
||||
@@ -100,7 +100,7 @@ if (!$sortorder) {
|
||||
$object = new AccountingAccount($db);
|
||||
|
||||
$arrayfields = array(
|
||||
'aa.account_number' => array('label' => "AccountNumber", 'checked' => '1', 'csslist' => 'maxwidth50'),
|
||||
'aa.account_number' => array('label' => "AccountNumber", 'checked' => '1'),
|
||||
'aa.label' => array('label' => "Label", 'checked' => '1'),
|
||||
'aa.labelshort' => array('label' => "ShortLabel", 'checked' => '1'),
|
||||
'aa.account_parent' => array('label' => "Accountparent", 'checked' => '1'),
|
||||
@@ -527,10 +527,10 @@ if ($resql) {
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['aa.account_number']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat width75" name="search_account" value="'.$search_account.'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat width100" name="search_account" value="'.$search_account.'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['aa.label']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat width100" name="search_label" value="'.$search_label.'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$search_label.'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['aa.labelshort']['checked'])) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat width100" name="search_labelshort" value="'.$search_labelshort.'"></td>';
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* Copyright (C) 2011-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -196,7 +196,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors');
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
// In case of 'actionadd' and with valid parameters, add the line
|
||||
if ($ok && GETPOST('actionadd', 'alpha')) {
|
||||
$newid = 0;
|
||||
|
||||
@@ -241,11 +241,11 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
// In case of 'actionmodify' and with valid parameters, modify the line
|
||||
if ($ok && GETPOST('actionmodify', 'alpha')) {
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET ";
|
||||
// Modifie valeur des champs
|
||||
// Change field's value
|
||||
|
||||
$i = 0;
|
||||
foreach ($listfieldmodify as $field) {
|
||||
@@ -268,7 +268,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
$sql .= " WHERE rowid = ".((int) $rowid);
|
||||
|
||||
dol_syslog("actionmodify", LOG_DEBUG);
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
setEventMessages($db->error(), null, 'errors');
|
||||
@@ -327,13 +326,13 @@ $linkback = '';
|
||||
print load_fiche_titre($titre, $linkback, 'title_accountancy');
|
||||
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
// Confirmation of line deletion
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['page'=> $page, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'rowid' => $rowid, 'code' => $code, 'id' => $id]), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
|
||||
// Complete requete recherche valeurs avec critere de tri
|
||||
// Complete the values search query with the sort order
|
||||
$sql = $tabsql[$id];
|
||||
|
||||
if ($search_country_id > 0) {
|
||||
@@ -351,7 +350,6 @@ if ($sortfield == 'country') {
|
||||
}
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
$sql .= $db->plimit($listlimit + 1, $offset);
|
||||
//print $sql;
|
||||
|
||||
$fieldlist = explode(',', $tabfield[$id]);
|
||||
|
||||
@@ -368,8 +366,8 @@ $fieldlist = explode(',', $tabfield[$id]);
|
||||
// Line for title
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
$class = "left";
|
||||
@@ -393,7 +391,6 @@ foreach ($fieldlist as $field => $value) {
|
||||
if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') {
|
||||
$valuetoshow = $langs->trans("Pcg_version");
|
||||
}
|
||||
//var_dump($value);
|
||||
|
||||
if ($valuetoshow != '') {
|
||||
print '<td class="'.$class.'">';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -209,7 +209,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
setEventMessages($langs->transnoentities('ErrorFieldMustBeANumeric', $langs->transnoentities("Position")), null, 'errors');
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
// In case of 'actionadd' and with valid parameters, add the line
|
||||
if ($ok && GETPOST('actionadd', 'alpha')) {
|
||||
$newid = 0;
|
||||
|
||||
@@ -280,7 +280,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET ";
|
||||
// Modifie valeur des champs
|
||||
// Modify field values
|
||||
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
|
||||
$sql .= $db->sanitize($tabrowid[$id])." = ";
|
||||
$sql .= "'".$db->escape($rowid)."', ";
|
||||
@@ -493,8 +493,8 @@ if ($tabname[$id]) {
|
||||
print '<td></td>';
|
||||
}
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries.
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
$class = "left";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -194,7 +194,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
$ok = 0;
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
// In case of 'actionadd' and with valid parameters, add the line
|
||||
if ($ok && GETPOST('actionadd', 'alpha')) {
|
||||
$newid = 0; // Initialise before if for static analysis
|
||||
if ($tabrowid[$id]) {
|
||||
@@ -251,7 +251,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
// If check ok and action modify, we modify the line
|
||||
if ($ok && GETPOST('actionmodify', 'alpha')) {
|
||||
if ($tabrowid[$id]) {
|
||||
$rowidcol = $tabrowid[$id];
|
||||
@@ -261,7 +261,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET ";
|
||||
// Modifie valeur des champs
|
||||
// Modify the field values
|
||||
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
|
||||
$sql .= $db->sanitize($tabrowid[$id])." = ";
|
||||
$sql .= "'".$db->escape($rowid)."', ";
|
||||
@@ -373,7 +373,7 @@ $titlepicto = 'title_accountancy';
|
||||
print load_fiche_titre($titre, $linkback, $titlepicto);
|
||||
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
// Generate a form to confirm the deletion of the row
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
@@ -382,7 +382,7 @@ if ($action == 'delete') {
|
||||
* Show a dictionary
|
||||
*/
|
||||
|
||||
// Complete requete recherche valeurs avec critere de tri
|
||||
// Complete the search query with sort criteria
|
||||
$sql = $tabsql[$id];
|
||||
$sql .= " WHERE a.entity = ".((int) $conf->entity);
|
||||
|
||||
@@ -409,8 +409,8 @@ if ($tabname[$id]) {
|
||||
// Line for title
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries.
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
$class = "left";
|
||||
@@ -522,8 +522,8 @@ if ($resql) {
|
||||
// Title of lines
|
||||
print '<tr class="liste_titre liste_titre_add">';
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries.
|
||||
$class = "left";
|
||||
$sortable = 1;
|
||||
$valuetoshow = '';
|
||||
|
||||
@@ -552,10 +552,12 @@ if ($resql) {
|
||||
|
||||
if ($massaction == 'set_default_account') {
|
||||
$formquestion = array();
|
||||
$formquestion[] = array('type' => 'other',
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'set_default_account',
|
||||
'label' => $langs->trans("AccountancyCode"),
|
||||
'value' => $form->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
|
||||
'value' => $form->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone')
|
||||
);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmPreselectAccount"), $langs->trans("ConfirmPreselectAccountQuestion", $nbselected), "confirm_set_default_account", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
@@ -662,7 +664,7 @@ if ($resql) {
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
// Ref produit as link
|
||||
// Product ref as link
|
||||
$product_static->ref = $obj->ref;
|
||||
$product_static->id = $obj->rowid;
|
||||
$product_static->type = $obj->product_type;
|
||||
@@ -907,49 +909,48 @@ if ($resql) {
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_savebutton() {
|
||||
console.log("We check if at least one line is checked")
|
||||
|
||||
print '<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_savebutton()
|
||||
{
|
||||
console.log("We check if at least one line is checked")
|
||||
atleastoneselected = 0;
|
||||
jQuery(".checkforselect").each(function(index) {
|
||||
/* console.log( index + ": " + $( this ).text() ); */
|
||||
if ($(this).is(':checked')) atleastoneselected++;
|
||||
});
|
||||
|
||||
atleastoneselected=0;
|
||||
jQuery(".checkforselect").each(function( index ) {
|
||||
/* console.log( index + ": " + $( this ).text() ); */
|
||||
if ($(this).is(\':checked\')) atleastoneselected++;
|
||||
});
|
||||
if (atleastoneselected) jQuery("#changeaccount").removeAttr('disabled');
|
||||
else jQuery("#changeaccount").attr('disabled', 'disabled');
|
||||
if (atleastoneselected) jQuery("#changeaccount").attr('class', 'button');
|
||||
else jQuery("#changeaccount").attr('class', 'button');
|
||||
}
|
||||
|
||||
if (atleastoneselected) jQuery("#changeaccount").removeAttr(\'disabled\');
|
||||
else jQuery("#changeaccount").attr(\'disabled\',\'disabled\');
|
||||
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'button\');
|
||||
else jQuery("#changeaccount").attr(\'class\',\'button\');
|
||||
}
|
||||
|
||||
jQuery(".checkforselect").change(function() {
|
||||
init_savebutton();
|
||||
});
|
||||
jQuery(".productforselect").change(function() {
|
||||
console.log($(this).attr("id")+" "+$(this).val());
|
||||
jQuery(".checkforselect").change(function() {
|
||||
init_savebutton();
|
||||
});
|
||||
jQuery(".productforselect").change(function() {
|
||||
console.log($(this).attr("id") + " " + $(this).val());
|
||||
if ($(this).val() && $(this).val() != -1) {
|
||||
$(".productforselect"+$(this).attr("id")).prop(\'checked\', true);
|
||||
$(".productforselect"+$(this).attr("id")).prop('checked', true);
|
||||
} else {
|
||||
$(".productforselect"+$(this).attr("id")).prop(\'checked\', false);
|
||||
$(".productforselect"+$(this).attr("id")).prop('checked', false);
|
||||
}
|
||||
init_savebutton();
|
||||
});
|
||||
init_savebutton();
|
||||
});
|
||||
|
||||
init_savebutton();
|
||||
init_savebutton();
|
||||
|
||||
jQuery("#search_current_account").keyup(function() {
|
||||
if (jQuery("#search_current_account").val() != \'\')
|
||||
{
|
||||
console.log("We set a value of account to search "+jQuery("#search_current_account").val()+", so we disable the other search criteria on account");
|
||||
jQuery("#search_current_account_valid").val(-1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
jQuery("#search_current_account").keyup(function() {
|
||||
if (jQuery("#search_current_account").val() != '') {
|
||||
console.log("We set a value of account to search " + jQuery("#search_current_account").val() + ", so we disable the other search criteria on account");
|
||||
jQuery("#search_current_account_valid").val(-1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -183,7 +184,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
// In case of 'actionadd' and with valid parameters, add the line
|
||||
if ($ok && GETPOST('actionadd', 'alpha')) {
|
||||
$newid = 0;
|
||||
|
||||
@@ -254,7 +255,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$db->sanitize($tabname[$id])." SET ";
|
||||
// Modifie valeur des champs
|
||||
// Modify field values
|
||||
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
|
||||
$sql .= $db->sanitize($tabrowid[$id])." = ";
|
||||
$sql .= "'".$db->escape($rowid)."', ";
|
||||
@@ -427,8 +428,8 @@ if ($tabname[$id]) {
|
||||
print '<td></td>';
|
||||
}
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries.
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // By default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
$class = "left";
|
||||
|
||||
@@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
|
||||
@@ -738,7 +739,38 @@ if ($action == 'create') {
|
||||
print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->doc_ref;
|
||||
// Get information of an element
|
||||
if ($object->doc_type === 'customer_invoice' && !empty($object->fk_doc)) {
|
||||
$invoicestatic = new Facture($db);
|
||||
$result = $invoicestatic->fetch($object->fk_doc);
|
||||
|
||||
if ($result > 0) {
|
||||
$label_element = $invoicestatic->getNomUrl(1);
|
||||
} else {
|
||||
$label_element = $object->doc_ref;
|
||||
}
|
||||
} elseif ($object->doc_type === 'supplier_invoice' && !empty($object->fk_doc)) {
|
||||
$supplierinvoicestatic = new FactureFournisseur($db);
|
||||
$result = $supplierinvoicestatic->fetch($object->fk_doc);
|
||||
|
||||
if ($result > 0) {
|
||||
$label_element = $supplierinvoicestatic->getNomUrl(1);
|
||||
} else {
|
||||
$label_element = $object->doc_ref;
|
||||
}
|
||||
} elseif ($object->doc_type === 'expense_report' && !empty($object->fk_doc)) {
|
||||
$expensereportstatic = new ExpenseReport($db);
|
||||
$result = $expensereportstatic->fetch($object->fk_doc);
|
||||
|
||||
if ($result > 0) {
|
||||
$label_element = $expensereportstatic->getNomUrl(1);
|
||||
} else {
|
||||
$label_element = $object->doc_ref;
|
||||
}
|
||||
} else {
|
||||
$label_element = $object->doc_ref;
|
||||
}
|
||||
print $label_element;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@@ -804,7 +836,13 @@ if ($action == 'create') {
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->code_journal;
|
||||
// Get information of a journal
|
||||
$accountingjournalstatic = new AccountingJournal($db);
|
||||
$accountingjournalstatic->fetch(0, $object->code_journal);
|
||||
$journal = $accountingjournalstatic->code;
|
||||
$journal_label = $accountingjournalstatic->label;
|
||||
|
||||
print $accountingjournalstatic->getNomUrl(1, 1, 1);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Copyright (C) 2020 Guillaume Alexandre <guillaume@tag-info.fr>
|
||||
* Copyright (C) 2022 Joachim Kueter <jkueter@gmx.de>
|
||||
* Copyright (C) 2022 Progiseize <a.bisotti@progiseize.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1391,7 +1391,7 @@ class AccountancyExport
|
||||
$separator = ';';
|
||||
$end_line = "\n";
|
||||
|
||||
// parcours du tableau pour recuperation des numero de compte des tiers pour pouvoir les fournir dans la bonne ligne pour istea
|
||||
// Extract the Third party account numbers from the table to provide the correct line for ISTEA
|
||||
$tiers = [];
|
||||
foreach ($objectLines as $line) {
|
||||
if ($line->subledger_account && substr($line->subledger_account, 0, 1) == '4') {
|
||||
@@ -2752,7 +2752,7 @@ class AccountancyExport
|
||||
$tab[] = substr($date, 3, 2);
|
||||
$tab[] = substr($date, 0, 2);
|
||||
$tab[] = $line->doc_ref;
|
||||
//Conversion de chaine UTF8 en Latin9
|
||||
// Convert the UTF-8 string in latin9
|
||||
$tab[] = mb_convert_encoding(str_replace(' - Compte auxiliaire', '', $line->label_operation), "Windows-1252", 'UTF-8');
|
||||
|
||||
//Calcul de la longueur des numéros de comptes
|
||||
|
||||
@@ -72,6 +72,11 @@ class AccountingAccount extends CommonObject
|
||||
*/
|
||||
public $rowid;
|
||||
|
||||
/**
|
||||
* @var string Ref
|
||||
*/
|
||||
public $ref;
|
||||
|
||||
/**
|
||||
* Date creation record (datec)
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017-2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Janniaux <alexandre.janniaux@gmail.com>
|
||||
* Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
@@ -1323,7 +1323,7 @@ class AccountingJournal extends CommonObject
|
||||
$element['blocks'][] = $lines_book;
|
||||
}
|
||||
} else {
|
||||
// si TVA = 0, pousser les 2 lignes view/bookkeeping déjà constituées
|
||||
// When VAT = 0, push the 2 lines view/bookkeeping already prepared
|
||||
if ($type == 'view') {
|
||||
$element['blocks'][] = $lines_view;
|
||||
} elseif ($type == 'bookkeeping') {
|
||||
|
||||
@@ -1963,7 +1963,7 @@ class BookKeeping extends CommonObject
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT piece_num, ref, doc_date, code_journal, journal_label, doc_ref, doc_type,";
|
||||
$sql = "SELECT piece_num, ref, doc_date, code_journal, journal_label, doc_ref, doc_type, fk_doc,";
|
||||
$sql .= " date_creation, tms as date_modification, date_validated as date_validation, date_lim_reglement, import_key";
|
||||
// In llx_accounting_bookkeeping_tmp, field date_export doesn't exist
|
||||
if ($mode != "_tmp") {
|
||||
@@ -1985,6 +1985,7 @@ class BookKeeping extends CommonObject
|
||||
$this->doc_date = $this->db->jdate($obj->doc_date);
|
||||
$this->doc_ref = $obj->doc_ref;
|
||||
$this->doc_type = $obj->doc_type;
|
||||
$this->fk_doc = $obj->fk_doc;
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||
if ($mode != "_tmp") {
|
||||
@@ -2522,7 +2523,7 @@ class BookKeeping extends CommonObject
|
||||
$alias = !empty($alias) && strpos($alias, '.') === false ? $alias . "." : $alias;
|
||||
|
||||
if (!isset(self::$can_modify_bookkeeping_sql_cached[$alias]) || $force) {
|
||||
$result = $this->loadFiscalPeriods($force, 'active');
|
||||
$result = $this->loadFiscalPeriods($force, 'active'); // This set $conf->cache['active_fiscal_period_cached']
|
||||
if ($result < 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -2533,9 +2534,10 @@ class BookKeeping extends CommonObject
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
$sql_list[$i] = "(";
|
||||
$sql_list[$i] .= "'".$this->db->idate($fiscal_period['date_start']) . "' <= ".$this->db->sanitize($alias)."doc_date";
|
||||
// @phan-suppress-next-line PhanTypeMismatchDimAssignment
|
||||
if (!empty($fiscal_period['date_end'])) {
|
||||
$sql_list[$i] .= " AND ";
|
||||
$sql_list[$i] .= $this->db->sanitize($alias)."doc_date <= '" . $this->db->idate($fiscal_period['date_end'])."'";
|
||||
$sql_list[$i] .= $this->db->sanitize($alias)."doc_date <= '" . $this->db->idate((int) $fiscal_period['date_end'])."'";
|
||||
}
|
||||
$sql_list[$i] .= ")";
|
||||
$i++;
|
||||
@@ -2595,6 +2597,7 @@ class BookKeeping extends CommonObject
|
||||
}
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
// @phan-suppress-next-line PhanTypeMismatchDimAssignment
|
||||
if (!empty($fiscal_period['date_start']) && $fiscal_period['date_start'] <= $bookkeeping->doc_date && (empty($fiscal_period['date_end']) || $bookkeeping->doc_date <= $fiscal_period['date_end'])) {
|
||||
return 1;
|
||||
}
|
||||
@@ -2693,6 +2696,7 @@ class BookKeeping extends CommonObject
|
||||
|
||||
if (!empty($conf->cache['active_fiscal_period_cached']) && is_array($conf->cache['active_fiscal_period_cached'])) {
|
||||
foreach ($conf->cache['active_fiscal_period_cached'] as $fiscal_period) {
|
||||
// @phan-suppress-next-line PhanTypeMismatchDimAssignment
|
||||
if (!empty($fiscal_period['date_start']) && $fiscal_period['date_start'] <= $date && (empty($fiscal_period['date_end']) || $date <= $fiscal_period['date_end'])) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -824,7 +824,7 @@ class Lettering extends BookKeeping
|
||||
*
|
||||
* @param int[] $document_ids List of document id
|
||||
* @param string $doc_type Type of document ('customer_invoice' or 'supplier_invoice', ...)
|
||||
* @return array<int,array<int,int>>|int<-1,-1> Return integer <0 if error otherwise all linked document ids by group and type [ [ 'doc_type' => [ doc_id, ... ], ... ], ... ]
|
||||
* @return array<int,array<int,int>>|int<-1,-1> Return integer <0 if error otherwise all linked document ids by group and type [ [ 'doc_type' => [ doc_id, ... ], ... ], ... ]
|
||||
*/
|
||||
public function getLinkedDocumentByGroup($document_ids, $doc_type)
|
||||
{
|
||||
@@ -910,7 +910,7 @@ class Lettering extends BookKeeping
|
||||
/**
|
||||
* Get element ids grouped by link or element in common
|
||||
*
|
||||
* @param array<int,array<string,int>> $link_by_element List of payment ids by link key
|
||||
* @param array<int,array<string,int|string>> $link_by_element List of payment ids by link key
|
||||
* @param array<string,array<int,int>> $element_by_link List of element ids by link key
|
||||
* @param string $link_key Link key (used for recursive function)
|
||||
* @param array<int,int> $current_group Current group (used for recursive function)
|
||||
|
||||
@@ -2191,7 +2191,7 @@ class Adherent extends CommonObject
|
||||
$now = dol_now();
|
||||
|
||||
// Check parameters
|
||||
if ($this->statut == self::STATUS_VALIDATED) {
|
||||
if ($this->status == self::STATUS_VALIDATED) {
|
||||
dol_syslog(get_class($this)."::validate statut of member does not allow this", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
@@ -2208,6 +2208,7 @@ class Adherent extends CommonObject
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$this->statut = self::STATUS_VALIDATED;
|
||||
$this->status = self::STATUS_VALIDATED;
|
||||
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('MEMBER_VALIDATE', $user);
|
||||
@@ -2231,7 +2232,7 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Fonction qui resilie un adherent
|
||||
* Function that terminates a member
|
||||
*
|
||||
* @param User $user User making change
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
@@ -2243,7 +2244,7 @@ class Adherent extends CommonObject
|
||||
$error = 0;
|
||||
|
||||
// Check parameters
|
||||
if ($this->statut == self::STATUS_RESILIATED) {
|
||||
if ($this->status == self::STATUS_RESILIATED) {
|
||||
dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
@@ -2258,6 +2259,7 @@ class Adherent extends CommonObject
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$this->statut = self::STATUS_RESILIATED;
|
||||
$this->status = self::STATUS_RESILIATED;
|
||||
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('MEMBER_RESILIATE', $user);
|
||||
@@ -2291,7 +2293,7 @@ class Adherent extends CommonObject
|
||||
$error = 0;
|
||||
|
||||
// Check parameters
|
||||
if ($this->statut == self::STATUS_EXCLUDED) {
|
||||
if ($this->status == self::STATUS_EXCLUDED) {
|
||||
dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
@@ -2306,6 +2308,7 @@ class Adherent extends CommonObject
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$this->statut = self::STATUS_EXCLUDED;
|
||||
$this->status = self::STATUS_EXCLUDED;
|
||||
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('MEMBER_EXCLUDE', $user);
|
||||
@@ -2515,7 +2518,7 @@ class Adherent extends CommonObject
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $addlinktonotes 1=Add link to notes
|
||||
* @return string Chaine avec URL
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
|
||||
{
|
||||
@@ -2746,7 +2749,7 @@ class Adherent extends CommonObject
|
||||
global $conf, $langs;
|
||||
|
||||
if ($user->socid) {
|
||||
return -1; // protection pour eviter appel par utilisateur externe
|
||||
return -1; // Protection to prevent calls by external users
|
||||
}
|
||||
|
||||
$now = dol_now();
|
||||
@@ -2921,7 +2924,7 @@ class Adherent extends CommonObject
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
* Returns the complete DN (Distinguished Name) string in the LDAP directory for the object
|
||||
*
|
||||
* @param array<string,mixed> $info Info array loaded by _load_ldap_info
|
||||
* @param int<0,2> $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb)
|
||||
@@ -3147,7 +3150,7 @@ class Adherent extends CommonObject
|
||||
$sql = "SELECT count(mc.email) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
|
||||
$sql .= " WHERE mc.email = '".$this->db->escape($this->email)."'";
|
||||
$sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec success
|
||||
$sql .= " AND mc.statut NOT IN (-1,0)"; // -1 error, 0 not sent, 1 sent with success
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2018-2019 Thibault Foucart <support@ptibogxiv.net>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -111,8 +111,10 @@ class AdherentType extends CommonObject
|
||||
"rowid" => array("type" => "integer", "label" => "Ref", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "1",),
|
||||
"libelle" => array("type" => "varchar(50)", "label" => "Label", "enabled" => "1", 'position' => 30, 'notnull' => 1, "visible" => "1", "showoncombobox" => 1),
|
||||
"subscription" => array("type" => "varchar(3)", "label" => "Subscription", "enabled" => "1", 'position' => 35, 'notnull' => 1, "visible" => "1",),
|
||||
"amount" => array("type" => "double(24,8)", "label" => "Amount", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "1",),
|
||||
"caneditamount" => array("type" => "integer", "label" => "Caneditamount", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "1",),
|
||||
"caneditamount" => array("type" => "integer", "label" => "Caneditamount", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "1",),
|
||||
"minimumamount" => array("type" => "double(24,8)", "label" => "MinimumAmount", "enabled" => "1", 'position' => 42, 'notnull' => 0, "visible" => "1",),
|
||||
"amount" => array("type" => "double(24,8)", "label" => "Amount", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "1",),
|
||||
"amountformuladescription" => array("type" => "longtext", "label" => "AmountFormulaDescription", "enabled" => "1", 'position' => 46, 'notnull' => 0, "visible" => "1",),
|
||||
"vote" => array("type" => "varchar(3)", "label" => "Vote", "enabled" => "1", 'position' => 50, 'notnull' => 1, "visible" => "-1",),
|
||||
"mail_valid" => array("type" => "longtext", "label" => "MailValidation", "enabled" => "1", 'position' => 60, 'notnull' => 0, "visible" => "-3",),
|
||||
"morphy" => array("type" => "varchar(3)", "label" => "MembersNature", "enabled" => "1", 'position' => 65, 'notnull' => 0, "visible" => "1",),
|
||||
@@ -160,15 +162,25 @@ class AdherentType extends CommonObject
|
||||
*/
|
||||
public $subscription;
|
||||
|
||||
/**
|
||||
* @var int Amount can be chosen by the visitor during subscription (0 or 1)
|
||||
*/
|
||||
public $caneditamount;
|
||||
|
||||
/**
|
||||
* @var float|string Minimum Amount for subscription (null or '' means not defined)
|
||||
*/
|
||||
public $minimumamount;
|
||||
|
||||
/**
|
||||
* @var float|string Amount for subscription (null or '' means not defined)
|
||||
*/
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
* @var int Amount can be chosen by the visitor during subscription (0 or 1)
|
||||
* @var string Describe the subscription amount formula to follow
|
||||
*/
|
||||
public $caneditamount;
|
||||
public $amountformuladescription;
|
||||
|
||||
/**
|
||||
* @var string Public note
|
||||
@@ -273,7 +285,7 @@ class AdherentType extends CommonObject
|
||||
if ($result) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
//print 'lang='.$obj->lang.' current='.$current_lang.'<br>';
|
||||
if ($obj->lang == $current_lang) { // si on a les traduct. dans la langue courante on les charge en infos principales.
|
||||
if ($obj->lang == $current_lang) { // if we have the translations in the current language, we load them as main information.
|
||||
$this->label = $obj->label;
|
||||
$this->description = $obj->description;
|
||||
$this->email = $obj->email;
|
||||
@@ -495,8 +507,10 @@ class AdherentType extends CommonObject
|
||||
$sql .= "libelle = '".$this->db->escape($this->label)."',";
|
||||
$sql .= "morphy = '".$this->db->escape($this->morphy)."',";
|
||||
$sql .= "subscription = '".$this->db->escape((string) $this->subscription)."',";
|
||||
$sql .= "amount = ".((empty($this->amount) && $this->amount == '') ? "null" : ((float) $this->amount)).",";
|
||||
$sql .= "caneditamount = ".((int) $this->caneditamount).",";
|
||||
$sql .= "minimumamount = ".((empty($this->minimumamount) && $this->minimumamount == '') ? "null" : ((float) $this->minimumamount)).",";
|
||||
$sql .= "amount = ".((empty($this->amount) && $this->amount == '') ? "null" : ((float) $this->amount)).",";
|
||||
$sql .= "amountformuladescription = '".$this->db->escape($this->amountformuladescription)."',";
|
||||
$sql .= "duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."',";
|
||||
$sql .= "note = '".$this->db->escape($this->note_public)."',";
|
||||
$sql .= "vote = ".(int) $this->db->escape((string) $this->vote).",";
|
||||
@@ -586,7 +600,7 @@ class AdherentType extends CommonObject
|
||||
*/
|
||||
public function fetch($rowid)
|
||||
{
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.amount, d.caneditamount, d.mail_valid, d.note as note_public, d.vote";
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.caneditamount, d.minimumamount, d.amount, d.amountformuladescription, d.mail_valid, d.note as note_public, d.vote";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
$sql .= " WHERE d.rowid = ".(int) $rowid;
|
||||
|
||||
@@ -606,8 +620,10 @@ class AdherentType extends CommonObject
|
||||
$this->duration_value = (int) substr($obj->duration, 0, dol_strlen($obj->duration) - 1);
|
||||
$this->duration_unit = substr($obj->duration, -1);
|
||||
$this->subscription = $obj->subscription;
|
||||
$this->amount = $obj->amount;
|
||||
$this->caneditamount = $obj->caneditamount;
|
||||
$this->minimumamount = $obj->minimumamount;
|
||||
$this->amount = $obj->amount;
|
||||
$this->amountformuladescription = $obj->amountformuladescription;
|
||||
$this->mail_valid = $obj->mail_valid;
|
||||
$this->note = $obj->note_public; // deprecated
|
||||
$this->note_public = $obj->note_public;
|
||||
@@ -782,6 +798,80 @@ class AdherentType extends CommonObject
|
||||
return $caneditamountbytype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the array of all minimum amounts per membership type id
|
||||
*
|
||||
* @param int $status Filter on status of type
|
||||
* @return array<int,float> Array of membership type
|
||||
*/
|
||||
public function minimumAmountByType($status = null)
|
||||
{
|
||||
$minimumamountbytype = array();
|
||||
|
||||
$sql = "SELECT rowid, minimumamount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql .= " WHERE entity IN (".getEntity('member_type').")";
|
||||
if ($status !== null) {
|
||||
$sql .= " AND statut = ".((int) $status);
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$nump = $this->db->num_rows($resql);
|
||||
|
||||
if ($nump) {
|
||||
$i = 0;
|
||||
while ($i < $nump) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$minimumamountbytype[$obj->rowid] = (float) $obj->minimumamount;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print $this->db->error();
|
||||
}
|
||||
|
||||
return $minimumamountbytype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the array of all amount formula's descriptions per membership type id
|
||||
*
|
||||
* @param int $status Filter on status of type
|
||||
* @return array<int,float> Array of membership type
|
||||
*/
|
||||
public function amountFormulaDescriptionByType($status = null)
|
||||
{
|
||||
$amountformuladescriptionbytype = array();
|
||||
|
||||
$sql = "SELECT rowid, amountformuladescription";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql .= " WHERE entity IN (".getEntity('member_type').")";
|
||||
if ($status !== null) {
|
||||
$sql .= " AND statut = ".((int) $status);
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$nump = $this->db->num_rows($resql);
|
||||
|
||||
if ($nump) {
|
||||
$i = 0;
|
||||
while ($i < $nump) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$amountformuladescriptionbytype[$obj->rowid] = $obj->amountformuladescription;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print $this->db->error();
|
||||
}
|
||||
|
||||
return $amountformuladescriptionbytype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array of Member objects for member type this->id (or all if this->id not defined)
|
||||
*
|
||||
@@ -1002,7 +1092,7 @@ class AdherentType extends CommonObject
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
* Returns full DN description in LDAP directory format for the object
|
||||
*
|
||||
* @param array<string,mixed> $info Info array loaded by _load_ldap_info
|
||||
* @param int<0,2> $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb)
|
||||
|
||||
@@ -431,7 +431,7 @@ class Subscription extends CommonObject
|
||||
* @param string $option Page for link ('', 'nolink', ...)
|
||||
* @param string $morecss Add more css on link
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string Chaine avec URL
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018-2024 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
@@ -503,7 +503,7 @@ if ($search_filter == 'outofdate') {
|
||||
$sql .= " AND (datefin < '".$db->idate($now)."')";
|
||||
}
|
||||
if ($search_status != '') {
|
||||
// Peut valoir un nombre ou liste de nombre separates par virgules
|
||||
// Can be a number or comma separated list of numbers
|
||||
$sql .= " AND d.statut in (".$db->sanitize($db->escape($search_status)).")";
|
||||
}
|
||||
if ($search_morphy != '' && $search_morphy != '-1') {
|
||||
|
||||
@@ -149,7 +149,9 @@ if (empty($reshook) && $action == 'confirm_create_thirdparty' && $confirm == 'ye
|
||||
$langs->load("errors");
|
||||
setEventMessages($company->error, $company->errors, 'errors');
|
||||
} else {
|
||||
$action = 'addsubscription';
|
||||
$object->socid = $result;
|
||||
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@@ -248,14 +250,14 @@ if (empty($reshook) && $user->hasRight('adherent', 'cotisation', 'creer') && $ac
|
||||
$langs->load("errors");
|
||||
$errmsg = $langs->trans("ErrorBadDateFormat", $langs->transnoentitiesnoconv("DateSubscription"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
if (GETPOST('end') && !$datesubend) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg = $langs->trans("ErrorBadDateFormat", $langs->transnoentitiesnoconv("DateEndSubscription"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
if (!$datesubend) {
|
||||
$datesubend = dol_time_plus_duree(dol_time_plus_duree($datesubscription, $defaultdelay, $defaultdelayunit), -1, 'd');
|
||||
@@ -264,7 +266,7 @@ if (empty($reshook) && $user->hasRight('adherent', 'cotisation', 'creer') && $ac
|
||||
$error++;
|
||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
|
||||
// Check if a payment is mandatory or not
|
||||
@@ -274,7 +276,7 @@ if (empty($reshook) && $user->hasRight('adherent', 'cotisation', 'creer') && $ac
|
||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
} else {
|
||||
// If an amount has been provided, we check also fields that becomes mandatory when amount is not null.
|
||||
if (isModEnabled('bank') && GETPOST("paymentsave") != 'none') {
|
||||
@@ -283,26 +285,26 @@ if (empty($reshook) && $user->hasRight('adherent', 'cotisation', 'creer') && $ac
|
||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
if (GETPOST("paymentsave") != 'invoiceonly' && !GETPOST("operation")) {
|
||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
if (GETPOST("paymentsave") != 'invoiceonly' && !(GETPOSTINT("accountid") > 0)) {
|
||||
$errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("FinancialAccount"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
} else {
|
||||
if (GETPOSTINT("accountid")) {
|
||||
$errmsg = $langs->trans("ErrorDoNotProvideAccountsIfNullAmount");
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,7 +337,7 @@ if (empty($reshook) && $user->hasRight('adherent', 'cotisation', 'creer') && $ac
|
||||
$db->commit();
|
||||
} else {
|
||||
$db->rollback();
|
||||
$action = 'addsubscription';
|
||||
$action = 'createsubscription';
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
@@ -695,11 +697,11 @@ print dol_get_fiche_end();
|
||||
|
||||
// Button to create a new subscription if member no draft (-1) neither resiliated (0) neither excluded (-2)
|
||||
if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||
if ($action != 'addsubscription' && $action != 'create_thirdparty') {
|
||||
if ($action != 'createsubscription' && $action != 'create_thirdparty') {
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($object->status > 0) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=addsubscription&token='.newToken().'">'.$langs->trans("AddSubscription")."</a></div>";
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$rowid.'&action=createsubscription">'.$langs->trans("AddSubscription")."</a></div>";
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("AddSubscription").'</a></div>';
|
||||
}
|
||||
@@ -711,7 +713,7 @@ if ($user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||
/*
|
||||
* List of subscriptions
|
||||
*/
|
||||
if ($action != 'addsubscription' && $action != 'create_thirdparty') {
|
||||
if ($action != 'createsubscription' && $action != 'create_thirdparty') {
|
||||
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.fk_adherent_type as type,";
|
||||
$sql .= " c.rowid as crowid, c.subscription,";
|
||||
$sql .= " c.datec, c.fk_type as cfk_type,";
|
||||
@@ -820,7 +822,7 @@ if ($action != 'addsubscription' && $action != 'create_thirdparty') {
|
||||
}
|
||||
|
||||
|
||||
if (($action != 'addsubscription' && $action != 'create_thirdparty')) {
|
||||
if (($action != 'createsubscription' && $action != 'create_thirdparty')) {
|
||||
// Show online payment link
|
||||
// The list can be complete by the hook 'doValidatePayment' executed inside getValidOnlinePaymentMethods()
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
@@ -839,7 +841,7 @@ if (($action != 'addsubscription' && $action != 'create_thirdparty')) {
|
||||
/*
|
||||
* Add new subscription form
|
||||
*/
|
||||
if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||
if (($action == 'createsubscription' || $action == 'create_thirdparty') && $user->hasRight('adherent', 'cotisation', 'creer')) {
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewCotisation"));
|
||||
@@ -932,7 +934,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
|
||||
// If customer code was forced to "required", we ask it at creation to avoid error later
|
||||
if (getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) {
|
||||
$tmpcompany = new Societe($db);
|
||||
$tmpcompany->name = $companyname;
|
||||
$tmpcompany->name = (string) $companyname;
|
||||
$tmpcompany->get_codeclient($tmpcompany, 0);
|
||||
$customercode = $tmpcompany->code_client;
|
||||
$formquestion[] = array(
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2007-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -344,7 +345,7 @@ if ($rowid && $action != 'edit') {
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur"><span class="amount">'.price($object->amount).'</span></td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur sensiblehtmlcontent">'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_public)).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur sensiblehtmlcontent">'.dol_string_onlythesehtmltags(dol_htmlentitiesbr((string) $object->note_public)).'</td></tr>';
|
||||
|
||||
// Bank line
|
||||
if (isModEnabled("bank") && (getDolGlobalString('ADHERENT_BANK_USE') || $object->fk_bank)) {
|
||||
|
||||
@@ -91,13 +91,15 @@ $label = GETPOST("label", "alpha");
|
||||
$morphy = GETPOST("morphy", "alpha");
|
||||
$status = GETPOST("status", "intcomma");
|
||||
$subscription = GETPOSTINT("subscription");
|
||||
$caneditamount = GETPOSTINT("caneditamount");
|
||||
$minimumamount = GETPOST('minimumamount', 'alpha');
|
||||
$amount = GETPOST('amount', 'alpha');
|
||||
$amountformuladescription = GETPOST("amountformuladescription", 'restricthtml');
|
||||
$duration_value = GETPOSTINT('duration_value');
|
||||
$duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
$vote = GETPOSTINT("vote");
|
||||
$comment = GETPOST("comment", 'restricthtml');
|
||||
$mail_valid = GETPOST("mail_valid", 'restricthtml');
|
||||
$caneditamount = GETPOSTINT("caneditamount");
|
||||
|
||||
// Initialize a technical object
|
||||
$object = new AdherentType($db);
|
||||
@@ -172,8 +174,10 @@ if ($action == 'add' && $user->hasRight('adherent', 'configurer')) {
|
||||
$object->morphy = trim($morphy);
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (string) (int) $subscription;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->caneditamount = $caneditamount;
|
||||
$object->minimumamount = ($minimumamount == '' ? '' : price2num($minimumamount, 'MT'));
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->amountformuladescription = trim($amountformuladescription);
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note_public = trim($comment);
|
||||
@@ -233,8 +237,10 @@ if ($action == 'update' && $user->hasRight('adherent', 'configurer')) {
|
||||
$object->morphy = trim($morphy);
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (string) (int) $subscription;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->caneditamount = $caneditamount;
|
||||
$object->minimumamount = $minimumamount;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->amountformuladescription = trim($amountformuladescription);
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note_public = trim($comment);
|
||||
@@ -296,7 +302,7 @@ $totalarray = [
|
||||
if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
//print dol_get_fiche_head([]);
|
||||
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.amount, d.caneditamount, d.vote,";
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.caneditamount, d.minimumamount, d.amount, d.amountformuladescription, d.vote,";
|
||||
$sql .= " d.statut as status, d.morphy, d.duration,";
|
||||
$sql .= " d.tms";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
@@ -380,12 +386,20 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
print '<th class="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['t.caneditamount']['checked'])) {
|
||||
print '<th class="center">'.$langs->trans("CanEditAmountShort").'</th>';
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['t.minimumamount']['checked'])) {
|
||||
print '<th class="center">'.$langs->trans("MinimumAmountShort").'</th>';
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
print '<th class="center">'.$langs->trans("Amount").'</th>';
|
||||
print '<th class="center">'.$langs->trans("RecommendedAmount").'</th>';
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['t.caneditamount']['checked'])) {
|
||||
print '<th class="center">'.$langs->trans("CanEditAmountShort").'</th>';
|
||||
if (!empty($arrayfields['t.amountformuladescription']['checked'])) {
|
||||
print '<th class="center">'.$langs->trans("AmountFormulaDescription").'</th>';
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['t.vote']['checked'])) {
|
||||
@@ -423,8 +437,10 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
$membertype->label = $objp->rowid;
|
||||
$membertype->status = $objp->status;
|
||||
$membertype->subscription = $objp->subscription;
|
||||
$membertype->amount = $objp->amount;
|
||||
$membertype->caneditamount = $objp->caneditamount;
|
||||
$membertype->minimumamount = $objp->minimumamount;
|
||||
$membertype->amount = $objp->amount;
|
||||
$membertype->amountformuladescription = $objp->amountformuladescription;
|
||||
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
@@ -483,17 +499,27 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
|
||||
if (!empty($arrayfields['t.subscription']['checked'])) {
|
||||
print '<td class="center">'.yn($objp->subscription).'</td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.caneditamount']['checked'])) {
|
||||
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.minimumamount']['checked'])) {
|
||||
print '<td class="center">'.price($objp->minimumamount).'</td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
print '<td class="center">';
|
||||
$amount = (is_null($objp->amount) || $objp->amount === '' ? '' : price($objp->amount));
|
||||
$minimumamount = (is_null($objp->minimumamount) || $objp->minimumamount === '' ? '' : price($objp->minimumamount));
|
||||
print '<span class="amount">'.$amount.'</span>';
|
||||
if ($amount && $amount < (float) getDolGlobalInt("MEMBER_MIN_AMOUNT")) {
|
||||
print img_warning('Amount lower than minimum of '.price(getDolGlobalInt("MEMBER_MIN_AMOUNT")).' defined in setup');
|
||||
}
|
||||
if ($amount && $minimumamount && $amount < $minimumamount) {
|
||||
print img_warning('Amount lower than minimum of '.price($minimumamount).' defined in setup');
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.caneditamount']['checked'])) {
|
||||
print '<td class="center">'.yn($objp->caneditamount).'</td>';
|
||||
if (!empty($arrayfields['t.amountformuladescription']['checked'])) {
|
||||
print '<td class="center">'.dol_escape_htmltag($objp->amountformuladescription).'</td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.vote']['checked'])) {
|
||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||
@@ -572,14 +598,23 @@ if ($action == 'create') {
|
||||
print $form->selectyesno("subscription", 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
||||
print '<input name="amount" size="5" value="'.(GETPOSTISSET('amount') ? GETPOST('amount') : '').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmount")).'</td><td>';
|
||||
print $form->selectyesno("caneditamount", GETPOSTISSET('caneditamount') ? GETPOST('caneditamount') : 0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("MinimumAmountShort").'</td><td>';
|
||||
print '<input name="minimumamount" size="5" value="'.(GETPOSTISSET('minimumamount') ? GETPOST('minimumamount') : price($minimumamount)).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("RecommendedAmount").'</td><td>';
|
||||
print '<input name="amount" size="5" value="'.(GETPOSTISSET('amount') ? GETPOST('amount') : '').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("AmountFormulaDescription").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('amountformuladescription', (GETPOSTISSET('amountformuladescription') ? GETPOST('amountformuladescription', 'restricthtml') : $object->amountformuladescription), '', 100, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
print $form->selectyesno("vote", GETPOSTISSET("vote") ? GETPOST('vote', 'aZ09') : 1, 1);
|
||||
print '</td></tr>';
|
||||
@@ -649,17 +684,29 @@ if ($rowid > 0) {
|
||||
print '</tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Amount").'</td><td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmount")).'</td><td>';
|
||||
print yn($object->caneditamount);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MinimumAmountShort").'</td><td>';
|
||||
$minimumamount = ((is_null($object->minimumamount) || $object->minimumamount === '') ? '' : price($object->minimumamount));
|
||||
print $minimumamount;
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("RecommendedAmount").'</td><td>';
|
||||
$amount = ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
||||
print '<span class="amount">'.$amount.'</span>';
|
||||
if ($amount && $amount < (float) getDolGlobalInt("MEMBER_MIN_AMOUNT")) {
|
||||
print ' '.img_warning('Amount lower than minimum of '.price(getDolGlobalInt("MEMBER_MIN_AMOUNT")).' defined in setup');
|
||||
}
|
||||
if ($amount && $minimumamount && $amount < $minimumamount) {
|
||||
print ' '.img_warning('Amount lower than minimum of '.price($minimumamount).' defined in setup');
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmount")).'</td><td>';
|
||||
print yn($object->caneditamount);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("AmountFormulaDescription").'</td><td><div class="longmessagecut">';
|
||||
print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->amountformuladescription));
|
||||
print "</div></td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
print yn($object->vote);
|
||||
@@ -681,7 +728,7 @@ if ($rowid > 0) {
|
||||
|
||||
// Description
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td><div class="longmessagecut">';
|
||||
print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_public));
|
||||
print dol_string_onlythesehtmltags(dol_htmlentitiesbr((string) $object->note_public));
|
||||
print "</div></td></tr>";
|
||||
|
||||
// Welcome email content
|
||||
@@ -1096,15 +1143,28 @@ if ($rowid > 0) {
|
||||
print $form->selectyesno("subscription", $object->subscription, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>';
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmountDetail")).'</td><td>';
|
||||
print $form->selectyesno("caneditamount", $object->caneditamount, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("MinimumAmountShort").'</td><td>';
|
||||
$minimumamount = ((is_null($object->minimumamount) || $object->minimumamount === '') ? '' : price($object->minimumamount));
|
||||
print '<input name="minimumamount" size="5" value="';
|
||||
print $minimumamount;
|
||||
print '">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("RecommendedAmount").'</td><td>';
|
||||
$amount = ((is_null($object->amount) || $object->amount === '') ? '' : price($object->amount));
|
||||
print '<input name="amount" size="5" value="';
|
||||
print $amount;
|
||||
print '">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$form->textwithpicto($langs->trans("CanEditAmountShort"), $langs->transnoentities("CanEditAmountDetail")).'</td><td>';
|
||||
print $form->selectyesno("caneditamount", $object->caneditamount, 1);
|
||||
print '<tr><td class="tdtop">'.$langs->trans("AmountFormulaDescription").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('amountformuladescription', $object->amountformuladescription, '', 220, 'dolibarr_notes', '', false, true, isModEnabled('fckeditor'), 15, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("VoteAllowed").'</td><td>';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -430,9 +430,9 @@ if (getDolGlobalString('BARCODE_USE_ON_PRODUCT') || getDolGlobalString('BARCODE_
|
||||
print dol_escape_htmltag($obj->label);
|
||||
print "</td><td>\n";
|
||||
print $langs->trans('BarcodeDesc'.$obj->encoding);
|
||||
//print "L'EAN se compose de 8 characters, 7 chiffres plus une cle de verification.<br>";
|
||||
//print "L'utilisation des symbologies EAN8 impose la souscription et l'abonnement aupres d'organismes comme GENCOD.<br>";
|
||||
//print "Codes numeriques utilises exclusivement a l'identification des produits susceptibles d'etre vendus au grand public.";
|
||||
// print "The EAN consists of 8 characters, 7 digits plus a control digit.";
|
||||
// print "The use of EAN8 symbols requires subscription to organizations such as GENCOD.";
|
||||
// print "Numeric codes are used exclusively for the identification of products that are likely to be sold to the general public.";
|
||||
print '</td>';
|
||||
|
||||
// Show example
|
||||
@@ -520,7 +520,7 @@ if (getDolGlobalString('BARCODE_USE_ON_PRODUCT') || getDolGlobalString('BARCODE_
|
||||
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
|
||||
print '<td width="60" class="center">';
|
||||
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.getDolGlobalString('GENBARCODE_LOCATION').'">';
|
||||
if (getDolGlobalString('GENBARCODE_LOCATION') && !@file_exists($conf->global->GENBARCODE_LOCATION)) {
|
||||
if (getDolGlobalString('GENBARCODE_LOCATION') && !@file_exists(getDolGlobalString('GENBARCODE_LOCATION'))) {
|
||||
$langs->load("errors");
|
||||
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", getDolGlobalString('GENBARCODE_LOCATION')).'</span>';
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* Copyright (C) 2011-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020-2022 Open-Dsi <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
@@ -1053,7 +1053,7 @@ if (empty($reshook)) {
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$tablename." SET ";
|
||||
// Modifie value of fields
|
||||
// Update fields value
|
||||
if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) {
|
||||
$sql .= $tabrowid[$id]."=";
|
||||
$sql .= "'".$db->escape($rowid)."', ";
|
||||
@@ -1378,6 +1378,7 @@ if (empty($reshook)) {
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
$title = $langs->trans("DictionarySetup");
|
||||
|
||||
@@ -2625,6 +2626,8 @@ if ($id > 0) {
|
||||
$valuetoshow = price2num($valuetoshow);
|
||||
} elseif ($value == 'type' && $id == DICT_ACTIONCOMM && !empty($obj->module)) {
|
||||
$titletoshow = $langs->trans("Module").' '.$obj->module;
|
||||
} elseif ($value == 'color') {
|
||||
$valuetoshow = $formother->showColor($obj->{$value}, '');
|
||||
}
|
||||
|
||||
|
||||
@@ -2829,14 +2832,13 @@ $db->close();
|
||||
function dictFieldList($fieldlist, $obj = null, $tabname = '', $context = '')
|
||||
{
|
||||
global $langs, $db, $mysoc;
|
||||
global $form;
|
||||
global $form, $formother;
|
||||
global $region_id;
|
||||
global $elementList, $sourceList, $localtax_typeList, $type_vatList;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
$withentity = '';
|
||||
|
||||
|
||||
@@ -662,6 +662,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
'cc' => array('label' => 'Cc', 'data-placeholder' => $langs->trans('SearchString')),
|
||||
'bcc' => array('label' => 'Bcc', 'data-placeholder' => $langs->trans('SearchString')),
|
||||
'replyto' => array('label' => 'ReplyTo', 'data-placeholder' => $langs->trans('SearchString')),
|
||||
'excludeemail' => array('label' => 'EmailCollectorExcludeEmails', 'data-placeholder' => $langs->trans('EmailCollectorExcludeEmailsPlaceholder')),
|
||||
'excludedomain' => array('label' => 'EmailCollectorExcludeDomains', 'data-placeholder' => $langs->trans('EmailCollectorExcludeDomainsPlaceholder')),
|
||||
'subject' => array('label' => 'Subject', 'data-placeholder' => $langs->trans('SearchString')),
|
||||
'body' => array('label' => 'Body', 'data-placeholder' => $langs->trans('SearchString')),
|
||||
// disabled because PHP imap_search is not compatible IMAPv4, only IMAPv2
|
||||
|
||||
@@ -788,7 +788,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_IMAP_USE_PHPIMAP');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_IMAP_USE_PHPIMAP", $arrval, $conf->global->MAIN_IMAP_USE_PHPIMAP);
|
||||
print $form->selectarray("MAIN_IMAP_USE_PHPIMAP", $arrval, getDolGlobalString("MAIN_IMAP_USE_PHPIMAP"));
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -61,7 +61,7 @@ if (!$user->admin) {
|
||||
*/
|
||||
$error = 0;
|
||||
|
||||
// positionne la variable pour le nombre de rss externes
|
||||
// Set the variable for the number of external RSS
|
||||
$sql = "SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const";
|
||||
$sql .= " WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'";
|
||||
//print $sql;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -193,7 +193,8 @@ if ($action == 'updatesocialnetwork') {
|
||||
$paramsKey = GETPOST('paramsKey', 'array');
|
||||
$paramsVal = GETPOST('paramsVal', 'array');
|
||||
|
||||
$result = dolibarr_get_const($db, "SOCIAL_NETWORKS_DATA_".$name, $conf->entity);
|
||||
$result = getDolGlobalString("SOCIAL_NETWORKS_DATA_".$name);
|
||||
|
||||
$socialNetworkData = json_decode($result, true);
|
||||
|
||||
foreach ($paramsKey as $index => $key) {
|
||||
@@ -244,7 +245,9 @@ if ($action == 'editsocialnetwork' && GETPOST('confirm') == 'yes') {
|
||||
$paramKey = GETPOST('paramkey', 'alpha');
|
||||
$key = GETPOST('key', 'alpha');
|
||||
$name = GETPOST('name');
|
||||
$result = dolibarr_get_const($db, "SOCIAL_NETWORKS_DATA_".$name, $conf->entity);
|
||||
|
||||
$result = getDolGlobalString("SOCIAL_NETWORKS_DATA_".$name);
|
||||
|
||||
$socialNetworkData = json_decode($result, true);
|
||||
|
||||
unset($socialNetworkData[$paramKey]);
|
||||
@@ -349,7 +352,7 @@ foreach ($oauthservices as $key => $value) {
|
||||
|
||||
/** @phan-var-force array<string, array{label:string, data-html:string, disable?:int, css?:string}> $oauthservices */
|
||||
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||
print $form->selectarray('OAUTH_SERVICE_SOCIAL_NETWORK', $oauthservicesStringKeys, (string) $conf->global->OAUTH_SERVICE_SOCIAL_NETWORK);
|
||||
print $form->selectarray('OAUTH_SERVICE_SOCIAL_NETWORK', $oauthservicesStringKeys, (string) getDolGlobalString("OAUTH_SERVICE_SOCIAL_NETWORK"));
|
||||
} else {
|
||||
$selectedKey = (string) getDolGlobalString('OAUTH_SERVICE_SOCIAL_NETWORK');
|
||||
$text = isset($oauthservicesStringKeys[$selectedKey]) ? $oauthservicesStringKeys[$selectedKey]['label'] : '';
|
||||
@@ -387,17 +390,17 @@ print '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
function toggleOAuthServiceDisplay() {
|
||||
if ($("#radio_oauth").is(":checked")) {
|
||||
$("#oauth_service_div").show(); // Afficher le sélecteur OAuth
|
||||
$("#oauth_service_div").show(); // Show the OAuth selector
|
||||
} else {
|
||||
$("#oauth_service_div").hide(); // Cacher le sélecteur OAuth
|
||||
$("#oauth_service_div").hide(); // Hide the OAuth selector
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAddParamRow() {
|
||||
if ($("#radio_oauth").is(":checked")) {
|
||||
$("#add_param_row").hide(); // Cacher toute la ligne
|
||||
$("#add_param_row").hide(); // Hide the entire line
|
||||
} else {
|
||||
$("#add_param_row").show(); // Afficher toute la ligne
|
||||
$("#add_param_row").show(); // Show the entire line
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ $langs->loadLangs(array("admin", "errors"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
if (!isset($conf->global->GEOIP_VERSION)) {
|
||||
if (!getDolGlobalString("GEOIP_VERSION")) {
|
||||
$conf->global->GEOIP_VERSION = '2';
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ if ($action == 'update') {
|
||||
$dirforimage = $conf->mycompany->dir_output . '/logos/';
|
||||
if ($_FILES[$varforimage]["tmp_name"]) {
|
||||
$reg = array();
|
||||
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
|
||||
if (preg_match('/([^\\/:]+)$/i', (string) $_FILES[$varforimage]["name"], $reg)) {
|
||||
$original_file = $reg[1];
|
||||
|
||||
$isimage = image_format_supported($original_file);
|
||||
|
||||
@@ -875,14 +875,16 @@ print '<input type="submit" class="button button-edit reposition" value="'.$lang
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("InvoiceCheckPosteriorDate"). ' ' ;
|
||||
print $form->textwithpicto('', $langs->trans("InvoiceCheckPosteriorDateHelp"), 1, 'help') . '</td>';
|
||||
print '<td class="left" colspan="2">';
|
||||
//if (!getDolGlobalInt('FAC_FORCE_DATE_VALIDATION')) { // If date is forced, this option to check become useless (it should be if you male import manually, it may be not)
|
||||
print ajax_constantonoff('INVOICE_CHECK_POSTERIOR_DATE');
|
||||
/*} else {
|
||||
print img_picto($langs->trans("PreviousOptionGuaranteeThatDateIsAlwaysHigher"), 'switch_off', 'class="opacitymedium"');
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Allow external download
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
|
||||
|
||||
@@ -118,7 +118,7 @@ $form->load_cache_conditions_paiements();
|
||||
if (getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID') && isset($form->cache_conditions_paiements[getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')]['label'])) {
|
||||
$item->fieldOutputOverride = $form->cache_conditions_paiements[getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')]['label'];
|
||||
}
|
||||
$item->fieldInputOverride = $form->getSelectConditionsPaiements($conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID, 'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID', -1, 1);
|
||||
$item->fieldInputOverride = $form->getSelectConditionsPaiements(getDolGlobalInt("INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID"), 'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID', -1, 1);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -298,11 +298,11 @@ if (function_exists("ldap_connect")) {
|
||||
if (getDolGlobalString('LDAP_ADMIN_DN') && getDolGlobalString('LDAP_ADMIN_PASS')) {
|
||||
if ($result == 2) {
|
||||
print img_picto('', 'info').' ';
|
||||
print '<span class="ok">'.$langs->trans("LDAPBindOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<span class="ok">'.$langs->trans("LDAPBindOK", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', getDolGlobalString("LDAP_ADMIN_PASS"))).'</span>';
|
||||
print '<br>';
|
||||
} else {
|
||||
print img_picto('', 'error').' ';
|
||||
print '<span class="error">'.$langs->trans("LDAPBindKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).'</span>';
|
||||
print '<span class="error">'.$langs->trans("LDAPBindKO", $ldap->connectedServer, getDolGlobalString('LDAP_SERVER_PORT'), getDolGlobalString('LDAP_ADMIN_DN'), preg_replace('/./i', '*', getDolGlobalString("LDAP_ADMIN_PASS"))).'</span>';
|
||||
print '<br>';
|
||||
print $langs->trans("Error").' '.$ldap->error;
|
||||
print '<br>';
|
||||
|
||||
@@ -208,14 +208,14 @@ if ($action == 'edit') {
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
||||
print '</td><td align="right">'.(isset($conf->global->$mainmaxdecimalsunit) ? $conf->global->$mainmaxdecimalsunit : $conf->global->MAIN_MAX_DECIMALS_UNIT).'</td></tr>';
|
||||
print '</td><td align="right">'.(isset($conf->global->$mainmaxdecimalsunit) ? $conf->global->$mainmaxdecimalsunit : getDolGlobalString("MAIN_MAX_DECIMALS_UNIT")).'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
||||
print '</td><td align="right">'.(isset($conf->global->$mainmaxdecimalstot) ? $conf->global->$mainmaxdecimalstot : $conf->global->MAIN_MAX_DECIMALS_TOT).'</td></tr>';
|
||||
print '</td><td align="right">'.(isset($conf->global->$mainmaxdecimalstot) ? $conf->global->$mainmaxdecimalstot : getDolGlobalString("MAIN_MAX_DECIMALS_TOT")).'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'</td>';
|
||||
print '<td align="right">'.(isset($conf->global->$mainmaxdecimalsshown) ? $conf->global->$mainmaxdecimalsshown : $conf->global->MAIN_MAX_DECIMALS_SHOWN).'</td></tr>';
|
||||
print '<td align="right">'.(isset($conf->global->$mainmaxdecimalsshown) ? $conf->global->$mainmaxdecimalsshown : getDolGlobalString("MAIN_MAX_DECIMALS_SHOWN")).'</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
||||
|
||||
@@ -162,7 +162,7 @@ print '<tr class="oddeven"><td>';
|
||||
$help = img_help(1, $langs->trans("EMailHelpMsgSPFDKIM"));
|
||||
print $langs->trans("MailingEMailFrom") . ' ' . $help . '</td><td>';
|
||||
print '<input class="minwidth100" type="text" name="MAILING_EMAIL_FROM" value="' . getDolGlobalString('MAILING_EMAIL_FROM') . '">';
|
||||
if (getDolGlobalString('MAILING_EMAIL_FROM') && !isValidEmail($conf->global->MAILING_EMAIL_FROM)) {
|
||||
if (getDolGlobalString('MAILING_EMAIL_FROM') && !isValidEmail(getDolGlobalString('MAILING_EMAIL_FROM'))) {
|
||||
print ' ' . img_warning($langs->trans("BadEMail"));
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -40,6 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
|
||||
|
||||
@@ -570,7 +570,21 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_emailing', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print $langs->trans("MAIN_DISABLE_ALL_MAILS");
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('MAIN_DISABLE_ALL_MAILS', array(), null, 0, 0, 1, 2, 0, 0, '_red').'</a>';
|
||||
} else {
|
||||
print yn(getDolGlobalString('MAIN_DISABLE_ALL_MAILS'));
|
||||
if (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
|
||||
print img_warning($langs->trans("Disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@@ -589,7 +589,21 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_passwordreset', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print $langs->trans("MAIN_DISABLE_ALL_MAILS");
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('MAIN_DISABLE_ALL_MAILS', array(), null, 0, 0, 1, 2, 0, 0, '_red').'</a>';
|
||||
} else {
|
||||
print yn(getDolGlobalString('MAIN_DISABLE_ALL_MAILS'));
|
||||
if (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
|
||||
print img_warning($langs->trans("Disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015-2024 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Vincent Maury <vmaury@timgroup.fr>
|
||||
* Copyright (C) 2025 Jon Bendtsen <jon.bendtsen.github@jonb.dk>
|
||||
@@ -790,8 +790,8 @@ if ($action == 'create') {
|
||||
// Line to enter new values (title)
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value) {
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
// Determine the field name based on the possible names
|
||||
// in the data dictionaries.
|
||||
$valuetoshow = ucfirst($fieldlist[$field]); // Par default
|
||||
$valuetoshow = $langs->trans($valuetoshow); // try to translate
|
||||
$css = "left";
|
||||
|
||||
@@ -564,7 +564,21 @@ if ($action == 'edit') {
|
||||
print dol_get_fiche_head($head, 'common_ticket', '', -1);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("EMailsDesc")."</span><br>\n";
|
||||
print "<br><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print $langs->trans("MAIN_DISABLE_ALL_MAILS");
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('MAIN_DISABLE_ALL_MAILS', array(), null, 0, 0, 1, 2, 0, 0, '_red').'</a>';
|
||||
} else {
|
||||
print yn(getDolGlobalString('MAIN_DISABLE_ALL_MAILS'));
|
||||
if (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
|
||||
print img_warning($langs->trans("Disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
@@ -196,7 +196,7 @@ print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuSmartphoneManager").'
|
||||
print '<td>';
|
||||
$formadmin->select_menu(getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED', getDolGlobalString('MAIN_MENU_SMARTPHONE')), 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard, $dirsmartphone), !getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') ? '' : ' disabled');
|
||||
|
||||
if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', $conf->global->MAIN_MENU_SMARTPHONE_FORCED)
|
||||
if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED'))
|
||||
|| (!getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', getDolGlobalString('MAIN_MENU_SMARTPHONE')))) {
|
||||
print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme"));
|
||||
}
|
||||
@@ -205,7 +205,7 @@ print '</td>';
|
||||
print '<td>';
|
||||
$formadmin->select_menu(getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED', getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE')), 'MAIN_MENUFRONT_SMARTPHONE', array_merge($dirstandard, $dirsmartphone), !getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED') ? '' : ' disabled');
|
||||
|
||||
if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', $conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)
|
||||
if (getDolGlobalString('MAIN_MENU_SMARTPHONE_FORCED') && preg_match('/smartphone/', getDolGlobalString("MAIN_MENUFRONT_SMARTPHONE_FORCED"))
|
||||
|| (!getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE_FORCED') && getDolGlobalString('MAIN_MENU_SMARTPHONE') && preg_match('/smartphone/', getDolGlobalString('MAIN_MENUFRONT_SMARTPHONE')))) {
|
||||
print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme"));
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -513,7 +513,7 @@ if ($action == 'create') {
|
||||
print ', <span class="opacitymedium">'.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Niveau
|
||||
// Level
|
||||
//print '<tr><td>'.$langs->trans('Level').'</td><td>'.$menu->level.'</td><td>'.$langs->trans('DetailLevel').'</td></tr>';
|
||||
|
||||
// Title
|
||||
|
||||
@@ -207,8 +207,8 @@ if ($action == 'up') {
|
||||
$form = new Form($db);
|
||||
$formadmin = new FormAdmin($db);
|
||||
|
||||
$arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
$arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||
$arrayofjs = array('/public/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/public/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
$arrayofcss = array('/public/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||
|
||||
llxHeader('', $langs->trans("Menus"), '', '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-admin page-menus_index');
|
||||
|
||||
|
||||
@@ -414,7 +414,9 @@ if ($action == 'set' && $user->admin) {
|
||||
// We made some check against evil eternal modules that try to low security options.
|
||||
$checkOldValue = getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE');
|
||||
$csrfCheckOldValue = getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN');
|
||||
$resarray = activateModule($value);
|
||||
|
||||
$resarray = activateModule($value, 1, 0, 'acceptredirect');
|
||||
|
||||
if ($checkOldValue != getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE')) {
|
||||
setEventMessage($langs->trans('WarningModuleHasChangedLastVersionCheckParameter', $value), 'warnings');
|
||||
}
|
||||
@@ -458,8 +460,11 @@ if ($action == 'set' && $user->admin) {
|
||||
if ($result) {
|
||||
setEventMessages($result, null, 'errors');
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y ? '&page_y='.$page_y : ''));
|
||||
exit;
|
||||
}
|
||||
$resarray = activateModule($value, 0, 1);
|
||||
|
||||
$resarray = activateModule($value, 0, 1, 'acceptredirect');
|
||||
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1), 'chaine', 0, '', $conf->entity);
|
||||
if (!empty($resarray['errors'])) {
|
||||
setEventMessages('', $resarray['errors'], 'errors');
|
||||
@@ -515,6 +520,7 @@ $filename = array();
|
||||
$modules = array();
|
||||
$orders = array();
|
||||
$categ = array();
|
||||
$timestoinit = [];
|
||||
//$publisherlogoarray = array();
|
||||
|
||||
$i = 0; // is a sequencer of modules found
|
||||
@@ -528,6 +534,7 @@ foreach ($modulesdir as $dir) {
|
||||
//print $dir."\n<br>";
|
||||
dol_syslog("Scan directory ".$dir." for module descriptor files (modXXX.class.php)");
|
||||
$handle = @opendir($dir);
|
||||
$timestart = microtime(true);
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
//print "$i ".$file."\n<br>";
|
||||
@@ -595,6 +602,7 @@ foreach ($modulesdir as $dir) {
|
||||
// Define an array $categ with categ with at least one qualified module
|
||||
$filename[$i] = $modName;
|
||||
$modules[$modName] = $objMod;
|
||||
$timestoinit[$modName] = round((microtime(true) - $timestart) * 1000, 3);
|
||||
|
||||
// Gives the possibility to the module, to provide his own family info and position of this family
|
||||
if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
|
||||
@@ -671,7 +679,7 @@ if ($action == 'reset_confirm' && $user->admin) {
|
||||
}
|
||||
|
||||
$form = new Form($db);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?value='.$value.'&mode='.$mode.$param, $langs->trans('ConfirmUnactivation'), $langs->trans(GETPOST('confirm_message_code')), 'reset', '', 'no', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?value='.$value.'&mode='.$mode.$param, $langs->trans('ConfirmUnactivation'), $langs->trans(GETPOST('confirm_message_code')), 'reset', '', 'no', 1, 300, 550);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1223,6 +1231,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
print '<a href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $objMod->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">';
|
||||
print img_picto(($objMod->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo, '', 0, 0, 0, '', 'purple');
|
||||
print '</a>';
|
||||
print ($timestoinit[$modName] > 500 ? img_picto($langs->trans('InitModuleIsSlow'), 'fa-exclamation-circle') : '');
|
||||
print '</td>';
|
||||
|
||||
// Version
|
||||
|
||||
@@ -219,7 +219,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE", $arrval, $conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE);
|
||||
print $form->selectarray("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE", $arrval, getDolGlobalInt("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE"));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -232,7 +232,7 @@ if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX', array(), null, 0, 0, 0, 2, 0, 1);
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, $conf->global->MULTICURRENCY_USE_ORIGIN_TX);
|
||||
print $form->selectarray("MULTICURRENCY_USE_ORIGIN_TX", $arrval, getDolGlobalInt("MULTICURRENCY_USE_ORIGIN_TX"));
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -245,7 +245,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT", $arrval, $conf->global->MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT);
|
||||
print $form->selectarray("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT", $arrval, getDolGlobalInt("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT"));
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/openid_connect.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/openid_connect.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/openid_connect.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/openid_connect.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
@@ -111,6 +111,13 @@ if ($action == 'set') {
|
||||
$errors[] = $db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
|
||||
$openid_url_img = GETPOST('MAIN_AUTHENTICATION_OPENID_URL_IMG', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'MAIN_AUTHENTICATION_OPENID_URL_IMG', $openid_url_img, 'chaine', 0, '', 0);
|
||||
if (!$res > 0) {
|
||||
$errors[] = $db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($action != '') {
|
||||
@@ -133,14 +140,14 @@ llxHeader('', $langs->trans("Miscellaneous"), $wikihelp, '', 0, 0, '', '', '', '
|
||||
|
||||
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("OpenIDDesc")."</span><br>\n";
|
||||
print '<span class="opacitymedium">' . $langs->trans("OpenIDDesc") . "</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$head = security_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'openid', '', -1);
|
||||
|
||||
$urlforwikidoc = img_picto('', 'url', 'class="pictofixedwidth"').'<a target="_blank" href="https://wiki.dolibarr.org/index.php?title=Authentication,_SSO_and_SSL#Mode_openid_connect">';
|
||||
$urlforwikidoc = img_picto('', 'url', 'class="pictofixedwidth"') . '<a target="_blank" href="https://wiki.dolibarr.org/index.php?title=Authentication,_SSO_and_SSL#Mode_openid_connect">';
|
||||
$urlforwikidoc .= $langs->trans("SeeHere");
|
||||
$urlforwikidoc .= '</a>';
|
||||
/*
|
||||
@@ -156,9 +163,9 @@ if (!empty($conf->use_javascript_ajax)) {
|
||||
print ajax_constantonoff('MAIN_AUTHENTICATION_OIDC_ON', array(), null, 0, 0, 1);
|
||||
} else {
|
||||
if (!getDolGlobalString('MAIN_AUTHENTICATION_OIDC_ON')) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_MAIN_AUTHENTICATION_OIDC_ON&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MAIN_AUTHENTICATION_OIDC_ON&token=' . newToken() . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_MAIN_AUTHENTICATION_OIDC_ON&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MAIN_AUTHENTICATION_OIDC_ON&token=' . newToken() . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,111 +175,137 @@ print '<br><br>';
|
||||
if (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_ON')) {
|
||||
if (!preg_match('/openid_connect/', $dolibarr_main_authentication)) {
|
||||
$langs->load("errors");
|
||||
print info_admin($langs->trans("ErrorOpenIDSetupConfNotComplete").': '.$urlforwikidoc, 0, 0, 1, 'warning');
|
||||
print info_admin($langs->trans("ErrorOpenIDSetupConfNotComplete") . ': ' . $urlforwikidoc, 0, 0, 1, 'warning');
|
||||
} else {
|
||||
print info_admin('In conf.php file: dolibarr_main_authentication is '.$dolibarr_main_authentication);
|
||||
print info_admin('In conf.php file: dolibarr_main_authentication is ' . $dolibarr_main_authentication);
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<form method="post" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="tagtable noborder liste nobottomiftotal">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th class="liste_titre" colspan="3">' . $langs->trans("Parameters") . '</th>' . "\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcAutofillWithWellknowUrl") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="oidc_wellknow_url" id="oidc_wellknow_url" class="minwidth400 centpercent" value="">';
|
||||
print '</td><td>' . "\n";
|
||||
print '<input type="button" class="button smallpaddingimp reposition" id="oidc_wellknow_populate" value="'.$langs->trans("MainAuthenticationOidcAutofillButton").'"';
|
||||
print '</td></tr>' . "\n";
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<form method="post" action="' . dolBuildUrl($_SERVER["PHP_SELF"]) . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="tagtable noborder liste nobottomiftotal">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th class="liste_titre">'.$langs->trans("Parameters").'</th>'."\n";
|
||||
print '<th class="liste_titre"></th>'."\n";
|
||||
print '<th class="liste_titre"></th>'."\n";
|
||||
print '<th class="liste_titre">' . $langs->trans("Parameters") . '</th>' . "\n";
|
||||
print '<th class="liste_titre"></th>' . "\n";
|
||||
print '<th class="liste_titre"></th>' . "\n";
|
||||
print "</tr>\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLoginClaimDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLoginClaimName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLoginClaimDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" id="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" id="MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGIN_CLAIM") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_CLIENT_ID
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientIdName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientIdDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcClientIdName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcClientIdDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" id="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_ID', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_ID") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" id="MAIN_AUTHENTICATION_OIDC_CLIENT_ID" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_ID', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_ID') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_ID") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcClientSecretDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcClientSecretName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcClientSecretDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input type="password" name="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" id="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET") : ''))).'"></td></tr>';
|
||||
print '<input type="password" name="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" id="MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? GETPOST('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_CLIENT_SECRET") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_SCOPES
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcScopesName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcScopesDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcScopesName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcScopesDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_SCOPES" id="MAIN_AUTHENTICATION_OIDC_SCOPES" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_SCOPES') ? GETPOST('MAIN_AUTHENTICATION_OIDC_SCOPES', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_SCOPES') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_SCOPES") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_SCOPES" id="MAIN_AUTHENTICATION_OIDC_SCOPES" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_SCOPES') ? GETPOST('MAIN_AUTHENTICATION_OIDC_SCOPES', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_SCOPES') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_SCOPES") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcAuthorizeUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcAuthorizeUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcAuthorizeUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" id="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" id="MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_TOKEN_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcTokenUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcTokenUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcTokenUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" id="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_TOKEN_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_TOKEN_URL") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" id="MAIN_AUTHENTICATION_OIDC_TOKEN_URL" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_TOKEN_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_TOKEN_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_TOKEN_URL") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_USERINFO_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcUserinfoUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcUserinfoUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcUserinfoUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" id="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_USERINFO_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_USERINFO_URL") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" id="MAIN_AUTHENTICATION_OIDC_USERINFO_URL" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_USERINFO_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_USERINFO_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_USERINFO_URL") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// MAIN_AUTHENTICATION_OIDC_LOGOUT_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLogoutUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLogoutUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" id="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" class="minwidth400" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGOUT_URL") : ''))).'"></td></tr>';
|
||||
print '<input name="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" id="MAIN_AUTHENTICATION_OIDC_LOGOUT_URL" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? GETPOST('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OIDC_LOGOUT_URL') ? getDolGlobalString("MAIN_AUTHENTICATION_OIDC_LOGOUT_URL") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// REDIRECT_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcRedirectUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcRedirectUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcRedirectUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input class="minwidth400" value="'.dol_escape_htmltag(openid_connect_get_redirect_url()).'" disabled></td></tr>';
|
||||
print '<input class="minwidth400 centpercent" value="' . dol_escape_htmltag(openid_connect_get_redirect_url()) . '" disabled>';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// LOGOUT_URL
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlName").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("MainAuthenticationOidcLogoutRedirectUrlDesc").'</td>'."\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLogoutRedirectUrlName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOidcLogoutRedirectUrlDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input class="minwidth400" value="'.dol_escape_htmltag(getDolGlobalString('MAIN_LOGOUT_GOTO_URL', DOL_MAIN_URL_ROOT . "/index.php")).'" disabled></td></tr>';
|
||||
print '<input class="minwidth400 centpercent" value="' . dol_escape_htmltag(getDolGlobalString('MAIN_LOGOUT_GOTO_URL', DOL_MAIN_URL_ROOT . "/index.php")) . '" disabled>';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
print '</table>'."\n";
|
||||
// OPENID_URL_IMG
|
||||
print '<tr class="oddeven">' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOpenIDUrlImgName") . '</td>' . "\n";
|
||||
print '<td>' . $langs->trans("MainAuthenticationOpenIDUrlImgDesc") . '</td>' . "\n";
|
||||
print '<td align="right">' . "\n";
|
||||
print '<input name="MAIN_AUTHENTICATION_OPENID_URL_IMG" id="MAIN_AUTHENTICATION_OPENID_URL_IMG" class="minwidth400 centpercent" value="' . dol_escape_htmltag((GETPOSTISSET('MAIN_AUTHENTICATION_OPENID_URL_IMG') ? GETPOST('MAIN_AUTHENTICATION_OPENID_URL_IMG', 'nohtml') : (getDolGlobalString('MAIN_AUTHENTICATION_OPENID_URL_IMG') ? getDolGlobalString("MAIN_AUTHENTICATION_OPENID_URL_IMG") : ''))) . '">';
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<div align="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
@@ -282,3 +315,41 @@ print '<br>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#oidc_wellknow_populate').on('click', function() {
|
||||
const url = $('#oidc_wellknow_url').val().trim();
|
||||
if (!url) return;
|
||||
|
||||
// Ensure URL ends with /.well-known/openid-configuration
|
||||
let wellKnownUrl = url;
|
||||
if (!wellKnownUrl.endsWith('/.well-known/openid-configuration')) {
|
||||
if (!wellKnownUrl.endsWith('/')) wellKnownUrl += '/';
|
||||
wellKnownUrl += '.well-known/openid-configuration';
|
||||
}
|
||||
|
||||
$.getJSON(wellKnownUrl)
|
||||
.done(function(data) {
|
||||
if (data.authorization_endpoint) {
|
||||
$('#MAIN_AUTHENTICATION_OIDC_AUTHORIZE_URL').val(data.authorization_endpoint);
|
||||
}
|
||||
if (data.token_endpoint) {
|
||||
$('#MAIN_AUTHENTICATION_OIDC_TOKEN_URL').val(data.token_endpoint);
|
||||
}
|
||||
if (data.userinfo_endpoint) {
|
||||
$('#MAIN_AUTHENTICATION_OIDC_USERINFO_URL').val(data.userinfo_endpoint);
|
||||
}
|
||||
if (data.end_session_endpoint) {
|
||||
$('#MAIN_AUTHENTICATION_OIDC_LOGOUT_URL').val(data.end_session_endpoint);
|
||||
}
|
||||
if (data.scopes_supported) {
|
||||
$('#MAIN_AUTHENTICATION_OIDC_SCOPES').val(data.scopes_supported.join(' '));
|
||||
}
|
||||
})
|
||||
.fail(function() {
|
||||
alert('Failed to fetch OIDC well-known configuration from: ' + wellKnownUrl);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
@@ -47,6 +42,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('admin', 'errors', 'orders', 'other'));
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Nick Fragoulis
|
||||
* Copyright (C) 2025 William Mead <william@m34d.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -67,6 +68,10 @@ if ($modulepart == 'order') {
|
||||
$diroffile = $conf->order->dir_output;
|
||||
$varname = 'MAIN_INFO_ORDER_TERMSOFSALE';
|
||||
}
|
||||
if ($modulepart == 'contrat') {
|
||||
$diroffile = $conf->contract->dir_output;
|
||||
$varname = 'MAIN_INFO_CONTRACT_TERMSOFSALE';
|
||||
}
|
||||
if ($modulepart == 'invoice') {
|
||||
$diroffile = $conf->invoice->dir_output;
|
||||
$varname = 'MAIN_INFO_INVOICE_TERMSOFSALE';
|
||||
@@ -118,6 +123,9 @@ if ($action == 'update') {
|
||||
if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_ORDER", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_ORDER", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_CONTRACT')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_ADD_TERMSOFSALE_INVOICE", GETPOST("MAIN_PDF_ADD_TERMSOFSALE_INVOICE", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
@@ -166,19 +174,27 @@ if ($action == 'update') {
|
||||
if (GETPOSTISSET('BARCODE_ON_STOCKTRANSFER_PDF')) {
|
||||
dolibarr_set_const($db, "BARCODE_ON_STOCKTRANSFER_PDF", GETPOSTINT("BARCODE_ON_STOCKTRANSFER_PDF"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
// add file to concat
|
||||
foreach (array('MAIN_INFO_PROPAL_TERMSOFSALE', 'MAIN_INFO_ORDER_TERMSOFSALE', 'MAIN_INFO_INVOICE_TERMSOFSALE') as $varname) {
|
||||
// add a file to concat
|
||||
$concat_options = array('MAIN_INFO_PROPAL_TERMSOFSALE', 'MAIN_INFO_ORDER_TERMSOFSALE', 'MAIN_INFO_CONTRACT_TERMSOFSALE', 'MAIN_INFO_INVOICE_TERMSOFSALE');
|
||||
foreach ($concat_options as $varname) {
|
||||
if (isset($_FILES[$varname]) && $_FILES[$varname]["name"]) {
|
||||
if (!preg_match('/(\.pdf)$/i', $_FILES[$varname]["name"])) { // Document can be used on a lot of different places. Only pdf can be supported.
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors');
|
||||
} else {
|
||||
if ($varname == 'MAIN_INFO_PROPAL_TERMSOFSALE') {
|
||||
$diroffile = $conf->propal->dir_output;
|
||||
} elseif ($varname == 'MAIN_INFO_ORDER_TERMSOFSALE') {
|
||||
$diroffile = $conf->order->dir_output;
|
||||
} elseif ($varname == 'MAIN_INFO_INVOICE_TERMSOFSALE') {
|
||||
$diroffile = $conf->invoice->dir_output;
|
||||
switch ($varname) {
|
||||
case 'MAIN_INFO_PROPAL_TERMSOFSALE':
|
||||
$diroffile = $conf->propal->dir_output;
|
||||
break;
|
||||
case 'MAIN_INFO_ORDER_TERMSOFSALE':
|
||||
$diroffile = $conf->order->dir_output;
|
||||
break;
|
||||
case 'MAIN_INFO_CONTRACT_TERMSOFSALE':
|
||||
$diroffile = $conf->contract->dir_output;
|
||||
break;
|
||||
case 'MAIN_INFO_INVOICE_TERMSOFSALE':
|
||||
$diroffile = $conf->invoice->dir_output;
|
||||
break;
|
||||
}
|
||||
if ($diroffile) {
|
||||
$dirforterms = $diroffile.'/';
|
||||
@@ -413,6 +429,49 @@ if (isModEnabled('order')) {
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
if (isModEnabled('contract')) {
|
||||
print '<div id="contrat" class="undertopmenu"></div>';
|
||||
|
||||
print load_fiche_titre($langs->trans("Contract"), '', 'contract');
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td width="200px"></td></tr>';
|
||||
|
||||
// Concat PDF
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT"), $tooltipconcatpdf);
|
||||
print '</td><td>';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_PDF_ADD_TERMSOFSALE_CONTRACT', array(), null, 0, 0, 1);
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT", $arrval, getDolGlobalString('MAIN_PDF_ADD_TERMSOFSALE_CONTRACT'));
|
||||
}
|
||||
|
||||
if (getDolGlobalString("MAIN_PDF_ADD_TERMSOFSALE_CONTRACT")) {
|
||||
$modulepart = 'contrat';
|
||||
print '<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
|
||||
print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_CONTRACT_TERMSOFSALE" id="MAIN_INFO_CONTRACT_TERMSOFSALE" accept="application/pdf">';
|
||||
print '</div>';
|
||||
if (getDolGlobalString("MAIN_INFO_CONTRACT_TERMSOFSALE")) {
|
||||
$termofsale = getDolGlobalString("MAIN_INFO_CONTRACT_TERMSOFSALE");
|
||||
if (file_exists($conf->contract->dir_output.'/'.$termofsale)) {
|
||||
$file = dol_dir_list($conf->contract->dir_output, 'files', 0, $termofsale);
|
||||
print ' ';
|
||||
print '<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($termofsale).'">'.$termofsale.'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0, '').'</div>';
|
||||
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removetermsofsale&modulepart='.$modulepart.'&token='.newToken().'">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
|
||||
}
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
|
||||
if (isModEnabled('invoice')) {
|
||||
print '<div id="invoice" class="undertopmenu"></div>';
|
||||
|
||||
@@ -38,7 +38,7 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/receiptprinter.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/takepos/class/dolreceiptprinter.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "receiptprinter"));
|
||||
@@ -487,7 +487,7 @@ if ($mode == 'template') {
|
||||
print '<input type="hidden" name="templateid" value="'.($printer->listprinterstemplates[$line]['rowid'] ?? '').'">';
|
||||
print '<td><input type="text" class="minwidth200" name="templatename" value="'.($printer->listprinterstemplates[$line]['name'] ?? '').'"></td>';
|
||||
print '<td class="wordbreak">';
|
||||
print '<textarea name="template" wrap="soft" cols="120" rows="12">'.($printer->listprinterstemplates[$line]['template'] ?? '').'</textarea>';
|
||||
print '<textarea name="template" wrap="soft" cols="90" rows="12">'.($printer->listprinterstemplates[$line]['template'] ?? '').'</textarea>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
@@ -516,7 +516,7 @@ if ($mode == 'template') {
|
||||
print '<tr>';
|
||||
print '<td><input type="text" class="minwidth200" name="templatename" value="'.($printer->listprinterstemplates[$line]['name'] ?? '').'"></td>';
|
||||
print '<td class="wordbreak">';
|
||||
print '<textarea name="template" wrap="soft" cols="120" rows="12">';
|
||||
print '<textarea name="template" wrap="soft" cols="90" rows="12">';
|
||||
print '</textarea>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
|
||||
@@ -187,7 +187,7 @@ print '</tr>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MaxSizeForUploadedFiles").'.';
|
||||
$max = @ini_get('upload_max_filesize');
|
||||
if (isset($max)) {
|
||||
if (!empty($max)) {
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("MustBeLowerThanPHPLimit", ((int) $max) * 1024, $langs->trans("Kb")).'.</span>';
|
||||
} else {
|
||||
print ' '.$langs->trans("NoMaxSizeByPHPLimit").'.';
|
||||
|
||||
@@ -166,9 +166,9 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||
$sourcetype = $sourcesarray[$directivetype][$sourcecsp]["data-sourcetype"];
|
||||
}
|
||||
$securitycspstring = "";
|
||||
if (isset($sourcetype) && $sourcetype == "data") {
|
||||
if ($sourcetype == "data") {
|
||||
$forceCSPArr[$directivecsp][] = "data:".$sourcedatacsp;
|
||||
} elseif (isset($sourcetype) && $sourcetype == "input") {
|
||||
} elseif ($sourcetype == "input") {
|
||||
if (empty($forceCSPArr[$directivecsp])) {
|
||||
$forceCSPArr[$directivecsp] = array();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
@@ -63,6 +63,20 @@ $modules = [
|
||||
'FICHINTER' => array('lang' => 'interventions', 'key' => 'Intervention', 'old_pdf' => '(soleil model)'),
|
||||
'FACTURE' => array('lang' => 'bills', 'key' => 'CustomerInvoice', 'old_pdf' => '(crabe model)'),
|
||||
'FACTUREREC' => array('lang' => 'bills', 'key' => 'RecurringInvoiceTemplate'),
|
||||
'SUPPLIER_PROPOSAL' => [
|
||||
'lang' => 'supplier_proposal',
|
||||
'key' => 'SupplierProposal',
|
||||
'old_pdf' => '(aurore model)',
|
||||
],
|
||||
'ORDER_SUPPLIER' => [
|
||||
'lang' => 'orders',
|
||||
'key' => 'SupplierOrder',
|
||||
'old_pdf' => '(muscadet model)',
|
||||
],
|
||||
'INVOICE_SUPPLIER' => [
|
||||
'lang' => 'bills',
|
||||
'key' => 'SupplierInvoice',
|
||||
],
|
||||
];
|
||||
// Conditions for the option to be offered
|
||||
$conditions = [
|
||||
@@ -71,6 +85,9 @@ $conditions = [
|
||||
'FICHINTER' => (isModEnabled("intervention")),
|
||||
'FACTURE' => isModEnabled("invoice"),
|
||||
'FACTUREREC' => isModEnabled("invoice"),
|
||||
'SUPPLIER_PROPOSAL' => isModEnabled("supplier_proposal"),
|
||||
'ORDER_SUPPLIER' => isModEnabled("supplier_order"),
|
||||
'INVOICE_SUPPLIER' => isModEnabled("supplier_invoice"),
|
||||
];
|
||||
|
||||
$max_depth = 0;
|
||||
|
||||
@@ -261,7 +261,7 @@ foreach ($syslogModules as $moduleName) {
|
||||
$value = (isset($option['default']) ? $option['default'] : '');
|
||||
}
|
||||
|
||||
print '<span class="hideonsmartphone opacitymedium">'.$option['name'].': </span><input type="text" class="flat'.(empty($option['css']) ? '' : ' '.$option['css']).'" name="'.dol_escape_htmltag($option['constant']).'" value="'.$value.'"'.(isset($option['attr']) ? ' '.$option['attr'] : '').'>';
|
||||
print '<span class="hideonsmartphone opacitymedium">'.$option['name'].': </span><input type="text" placeholder="'.$option['default'].'" class="flat'.(empty($option['css']) ? '' : ' '.$option['css']).'" name="'.dol_escape_htmltag($option['constant']).'" value="'.$value.'"'.(isset($option['attr']) ? ' '.$option['attr'] : '').'>';
|
||||
if (!empty($option['example'])) {
|
||||
print '<br>'.$langs->trans("Example").': '.dol_escape_htmltag($option['example']);
|
||||
}
|
||||
|
||||
@@ -147,6 +147,7 @@ if ($logsql) {
|
||||
// Define request to get table description
|
||||
$base = 0;
|
||||
$sql = null;
|
||||
$row = array();
|
||||
if (preg_match('/mysql/i', $conf->db->type)) {
|
||||
$sql = "SHOW TABLE STATUS LIKE '".$db->escape($db->escapeforlike($table))."'";
|
||||
$base = 1;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -34,6 +34,7 @@ require '../../main.inc.php';
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_document_root_alt
|
||||
* @var string $dolibarr_main_prod
|
||||
* @var string $conffile
|
||||
*/
|
||||
'
|
||||
@@ -64,7 +65,6 @@ $version = '0.0';
|
||||
|
||||
if ($action == 'getlastversion') {
|
||||
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
|
||||
//var_dump($result['content']);
|
||||
if (function_exists('simplexml_load_string')) {
|
||||
if (LIBXML_VERSION < 20900) {
|
||||
// Avoid load of external entities (security problem).
|
||||
@@ -325,10 +325,10 @@ print '</td></tr>'."\n";
|
||||
print '</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td> => '.$langs->trans("ClientHour").'</td><td>'.dol_print_date(dol_now('gmt'), 'dayhour', 'tzuser').'</td></tr>'."\n";
|
||||
|
||||
$filesystemencoding = ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0
|
||||
$filesystemencoding = ini_get("unicode.filesystem_encoding"); // Available with PHP 6.0
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)</td><td>'.$filesystemencoding.'</td></tr>'."\n";
|
||||
|
||||
$tmp = ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0
|
||||
$tmp = ini_get("unicode.filesystem_encoding"); // Available with PHP 6.0
|
||||
if (empty($tmp) && !empty($_SERVER["WINDIR"])) {
|
||||
$tmp = 'iso-8859-1'; // By default for windows
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ jQuery(document).ready(function() {
|
||||
getcssurl = $.ajax({
|
||||
type: "GET",
|
||||
data: { token: \'notrequired\' },
|
||||
url: \''.DOL_URL_ROOT.'/includes/jquery/css/base/jquery-ui.css\',
|
||||
url: \''.DOL_URL_ROOT.'/public/includes/jquery/css/base/jquery-ui.css\',
|
||||
cache: false,
|
||||
/* async: false, */
|
||||
/* crossDomain: true, */
|
||||
|
||||
@@ -53,10 +53,7 @@ if (!$user->admin) {
|
||||
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-system_phpinfo');
|
||||
|
||||
$title = 'InfoPHP';
|
||||
|
||||
if (isset($title)) {
|
||||
print load_fiche_titre($langs->trans($title), '', 'title_setup');
|
||||
}
|
||||
print load_fiche_titre($langs->trans($title), '', 'title_setup');
|
||||
|
||||
|
||||
// Check PHP setup is OK
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -231,6 +231,17 @@ if ($action == 'updateMask') {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$notification_email_template = GETPOST('TICKET_NOTIFICATION_EMAIL_TEMPLATE', 'alpha');
|
||||
$notification_email_template_description = 'Template email for ticket create notification';
|
||||
if (!empty($notification_email_to)) {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TEMPLATE', $notification_email_template, 'chaine', 0, $notification_email_template_description, $conf->entity);
|
||||
} else {
|
||||
$res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TEMPLATE', '', 'chaine', 0, $notification_email_template_description, $conf->entity);
|
||||
}
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml');
|
||||
$mail_intro_description = "Introduction text of ticket replies sent from Dolibarr";
|
||||
if (!empty($mail_intro)) {
|
||||
@@ -579,6 +590,22 @@ print $formcategory->textwithpicto('', $langs->trans("TicketsAutoReadTicketHelp"
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Auto mark ticket as read when assign someone
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoReadTicketWhenAssign").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_AUTO_READ_WHEN_ASSIGN');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_AUTO_READ_WHEN_ASSIGN", $arrval, getDolGlobalString('TICKET_AUTO_READ_WHEN_ASSIGN'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketsAutoReadTicketWhenAssignHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Auto assign ticket to user who created it
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><label for="TICKET_AUTO_ASSIGN_USER_CREATE" class="block">'.$langs->trans("TicketsAutoAssignTicket").'</label></td>';
|
||||
@@ -681,7 +708,7 @@ print '<tr class="oddeven"><td class="titlefieldmiddle"><label for="TICKET_SEND_
|
||||
print $form->textwithpicto($langs->trans("TicketSendToInternalCC"), $langs->trans("TicketSendToInternalCCHelp")).'</label></td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'email', 'class="pictofixedwidth"');
|
||||
print '<input class="minwidth200" name="TICKET_SEND_INTERNAL_CC" value="'.getDolGlobalString('TICKET_SEND_INTERNAL_CC').'">';
|
||||
print '<input class="flat width300" name="TICKET_SEND_INTERNAL_CC" value="'.getDolGlobalString('TICKET_SEND_INTERNAL_CC').'">';
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
@@ -699,6 +726,32 @@ print $formcategory->textwithpicto('', $langs->trans("TicketEmailNotificationToH
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
$formmail->fetchAllEMailTemplate('ticket_send', $user, null, -1); // We set lang=null to get in priority record with no lang
|
||||
$arrayofmessagename = array();
|
||||
if (is_array($formmail->lines_model)) {
|
||||
foreach ($formmail->lines_model as $modelmail) {
|
||||
//var_dump($modelmail);
|
||||
$moreonlabel = '';
|
||||
if (!empty($arrayofmessagename[$modelmail->label])) {
|
||||
$moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>';
|
||||
}
|
||||
// The 'label' is the key that is unique if we exclude the language
|
||||
$arrayofmessagename[$modelmail->label.':ticket_send'] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel;
|
||||
}
|
||||
}
|
||||
|
||||
// Email template for notification of TICKET_CREATE
|
||||
print '<tr class="oddeven"><td><label for="TICKET_NOTIFICATION_EMAIL_TEMPLATE" class="block">'.$langs->trans('TicketEmailNotificationTemplate').'</label></td>';
|
||||
print '<td class="left">';
|
||||
print $form->selectarray('TICKET_NOTIFICATION_EMAIL_TEMPLATE', $arrayofmessagename, getDolGlobalString('TICKET_NOTIFICATION_EMAIL_TEMPLATE'), 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans('TicketEmailNotificationTemplateHelp'), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Check "Notify thirdparty" by default on ticket creation
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAutoCheckNotifyThirdParty").'</td>';
|
||||
print '<td class="left">';
|
||||
|
||||
@@ -34,6 +34,7 @@ require '../../main.inc.php';
|
||||
* @var string $dolibarr_main_db_host
|
||||
* @var string $dolibarr_main_db_name
|
||||
* @var string $dolibarr_main_db_user
|
||||
* @var string $dolibarr_main_db_pass
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
|
||||
@@ -54,7 +54,7 @@ $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
|
||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) {
|
||||
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||
$offset = $limit * $page;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 Anthony Damhet <a.damhet@progiseize.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -30,21 +31,21 @@ class Documentation
|
||||
/**
|
||||
* Views
|
||||
*
|
||||
* @var array
|
||||
* @var array|array<int,string>
|
||||
*/
|
||||
public $view = array();
|
||||
|
||||
/**
|
||||
* Menu - Set in setMenu in order to use dol_buildpath and called in constructor
|
||||
*
|
||||
* @var array
|
||||
* @var array<array{url?: string, summary?: array<string,string>, submenu?: array<string,mixed>}>
|
||||
*/
|
||||
public $menu = array();
|
||||
|
||||
/**
|
||||
* Summary - Set in setSummary and called in constructor
|
||||
*
|
||||
* @var array
|
||||
* @var array<int,string>
|
||||
*/
|
||||
public $summary = array();
|
||||
|
||||
@@ -158,7 +159,7 @@ class Documentation
|
||||
),
|
||||
'Inputs' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/components/inputs.php', 1),
|
||||
'icon' => 'fas fa-comments',
|
||||
'icon' => 'far fa-edit',
|
||||
'submenu' => array(),
|
||||
'summary' => array(
|
||||
'DocBasicUsage' => '#setinputssection-basicusage',
|
||||
@@ -166,6 +167,12 @@ class Documentation
|
||||
'DocHelperFunctionsGetSearchFilterToolInput' => '#setinputssection-getSearchFilterToolInput',
|
||||
)
|
||||
),
|
||||
'ExperimentalUxInputAjaxFeedback' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/content/input-feedback.php', 1),
|
||||
'icon' => 'far fa-share-square',
|
||||
'submenu' => array(),
|
||||
'summary' => array(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -229,7 +236,34 @@ class Documentation
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// Elements
|
||||
$this->menu['UxDolibarrContext'] = array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fab fa-fort-awesome',
|
||||
'submenu' => array(
|
||||
'UxDolibarrContextHowItWork' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fab fa-fort-awesome',
|
||||
'submenu' => array(),
|
||||
'summary' => array(
|
||||
'Introduction' => '#titlesection-basicusage',
|
||||
'ConsoleHelp' => '#titlesection-console-help',
|
||||
'JSDolibarrhooks' => '#titlesection-hooks',
|
||||
'JSDolibarrhooksReadyVsInit' => '#titlesection-event-init-vs-ready',
|
||||
'JSDolibarrAwaitHooks' => '#titlesection-await-hooks',
|
||||
'ExampleOfCreatingNewContextTool' => '#titlesection-create-tool-example',
|
||||
'SetEventMessageTool' => '#titlesection-tool-seteventmessage',
|
||||
'SetAndUseContextVars' => '#titlesection-contextvars',
|
||||
),
|
||||
),
|
||||
'UxDolibarrContextLangsTool' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/dolibarr-context/langs-tool.php', 1),
|
||||
'icon' => 'far fa-flag',
|
||||
'submenu' => array(),
|
||||
'summary' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Elements
|
||||
$this->menu['ExperimentalUx'] = array(
|
||||
@@ -246,40 +280,6 @@ class Documentation
|
||||
'ExperimentalUxContributionTitle' => '#experimental-ux-contribution',
|
||||
),
|
||||
),
|
||||
'ExperimentalUxInputAjaxFeedback' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/input-feedback/index.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(),
|
||||
),
|
||||
'UxDolibarrContext' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(
|
||||
'UxDolibarrContextHowItWork' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(
|
||||
'Introduction' => '#titlesection-basicusage',
|
||||
'ConsoleHelp' => '#titlesection-console-help',
|
||||
'JSDolibarrhooks' => '#titlesection-hooks',
|
||||
'JSDolibarrhooksReadyVsInit' => '#titlesection-event-init-vs-ready',
|
||||
'JSDolibarrAwaitHooks' => '#titlesection-await-hooks',
|
||||
'ExampleOfCreatingNewContextTool' => '#titlesection-create-tool-example',
|
||||
'SetEventMessageTool' => '#titlesection-tool-seteventmessage',
|
||||
'SetAndUseContextVars' => '#titlesection-contextvars',
|
||||
),
|
||||
),
|
||||
'UxDolibarrContextLangsTool' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/langs-tool.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(),
|
||||
),
|
||||
),
|
||||
'summary' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -368,7 +368,7 @@ class Documentation
|
||||
/**
|
||||
* Recursive function to set Menu
|
||||
*
|
||||
* @param array $menu $this->menu or submenus
|
||||
* @param array<string, array{url?: string, icon?: string, summary?: array<string,string>, submenu?: array<string,array>}> $menu Menu entry or submenu
|
||||
* @param int $level level of menu
|
||||
* @return void
|
||||
*/
|
||||
@@ -441,13 +441,13 @@ class Documentation
|
||||
$i = 0;
|
||||
$menu_entry = [];
|
||||
if (!empty($this->view)) {
|
||||
// On se place au bon niveau
|
||||
// Set the correct menu depth (level)
|
||||
foreach ($this->view as $view) {
|
||||
$i++;
|
||||
if ($i == 1) {
|
||||
$menu_entry = $this->menu[$view];
|
||||
$menu_entry = $this->menu[$view] ?? [];
|
||||
} else {
|
||||
$menu_entry = $menu_entry['submenu'][$view];
|
||||
$menu_entry = $menu_entry['submenu'][$view] ?? [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -463,7 +463,7 @@ class Documentation
|
||||
/**
|
||||
* Recursive function for Automatic Summary
|
||||
*
|
||||
* @param array $menu $this->menu or submenus
|
||||
* @param array{summary?: array<string,string>, submenu?: array<string,array>} $menu $this->menu or submenus
|
||||
* @param int $level level of menu
|
||||
* @param int $showsubmenu Show Sub menus: 0 = No, 1 = Yes
|
||||
* @param int $showsubmenu_summary Show summary of sub menus: 0 = No, 1 = Yes
|
||||
@@ -517,7 +517,7 @@ class Documentation
|
||||
/**
|
||||
* Output a View Code area
|
||||
*
|
||||
* @param array $lines Lines of code to show
|
||||
* @param array<int,string> $lines Lines of code to show
|
||||
* @param string $option Source code language ('html', 'php' etc)
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2024 Anthony Damhet <a.damhet@progiseize.fr>
|
||||
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program and files/directory inner it is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the
|
||||
@@ -100,9 +101,9 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="prospectinput" class="valignmiddle"><span class="valignmiddle">Prospect</span><input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="1" checked></label></span>',
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="customerinput" class="valignmiddle"><span class="valignmiddle">Customer</span><input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1" checked></label></span>',
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="supplierinput" class="valignmiddle"><span class="valignmiddle">Supplier</span><input id="supplierinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="supplier" value="1" checked></label></span>',
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="prospectinput" class="valignmiddle"><span class="valignmiddle">Prospect</span><input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="1" checked></label></span>',
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="customerinput" class="valignmiddle"><span class="valignmiddle">Customer</span><input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1" checked></label></span>',
|
||||
'<span class="spannature paddinglarge marginrightonly nonature-back valignmiddle"><label for="supplierinput" class="valignmiddle"><span class="valignmiddle">Supplier</span><input id="supplierinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="supplier" value="1" checked></label></span>',
|
||||
);
|
||||
echo $documentation->showCode($lines); ?>
|
||||
|
||||
@@ -114,8 +115,8 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<input type="radio" id="idforradioinput1" name="radioinput" value="value1"><label for="idforradioinput1" class="marginrightonly"> Radio Input 1</label>',
|
||||
'<input type="radio" id="idforradioinput2" name="radioinput" value="value2"><label for="idforradioinput2" class="marginrightonly"> Radio Input 2</label>'
|
||||
'<input type="radio" id="idforradioinput1" name="radioinput" value="value1"><label for="idforradioinput1" class="marginrightonly"> Radio Input 1</label>',
|
||||
'<input type="radio" id="idforradioinput2" name="radioinput" value="value2"><label for="idforradioinput2" class="marginrightonly"> Radio Input 2</label>'
|
||||
);
|
||||
echo $documentation->showCode($lines); ?>
|
||||
</div>
|
||||
@@ -141,36 +142,36 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<?php',
|
||||
'',
|
||||
'/**',
|
||||
' * Function selectarray',
|
||||
' *',
|
||||
' * @param string $htmlname Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect,',
|
||||
' * @param array $array Array like array(key => value) or array(key=>array(\'label\'=>..., \'data-...\'=>..., \'disabled\'=>..., \'css\'=>...)),',
|
||||
' * @param string|string[]|int $id Preselected key or array of preselected keys for multiselect. Use \'ifone\' to autoselect record if there is only one record.,',
|
||||
' * @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is \'\' or " ", If \'Placeholder string\': key is -1 and value is the string), <0 to add an empty value with key that is this value.,',
|
||||
' * @param int<0,1> $key_in_label 1 to show key into label with format "[key] value",',
|
||||
' * @param int<0,1> $value_as_key 1 to use value as key,',
|
||||
' * @param string $moreparam Add more parameters onto the select tag. For example "style=\"width: 95%\"" to avoid select2 component to go over parent container,',
|
||||
' * @param int<0,1> $translate 1=Translate and encode value,',
|
||||
' * @param int $maxlen Length maximum for labels,',
|
||||
' * @param int<0,1> $disabled Html select box is disabled,',
|
||||
' * @param string $sort \'ASC\' or \'DESC\' = Sort on label, \'\' or \'NONE\' or \'POS\' = Do not sort, we keep original order,',
|
||||
' * @param string $morecss Add more class to css styles,',
|
||||
' * @param int $addjscombo Add js combo,',
|
||||
' * @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set,',
|
||||
' * @param int $disablebademail 1=Check if a not valid email, 2=Check string \'---\', and if found into value, disable and colorize entry,',
|
||||
' * @param int $nohtmlescape No html escaping (not recommended, use \'data-html\' if you need to use label with HTML content).,',
|
||||
' * @return string HTML select string.,',
|
||||
' */',
|
||||
'',
|
||||
'<?php',
|
||||
'',
|
||||
'/**',
|
||||
' * Function selectarray',
|
||||
' *',
|
||||
' * @param string $htmlname Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect,',
|
||||
' * @param array $array Array like array(key => value) or array(key=>array(\'label\'=>..., \'data-...\'=>..., \'disabled\'=>..., \'css\'=>...)),',
|
||||
' * @param string|string[]|int $id Preselected key or array of preselected keys for multiselect. Use \'ifone\' to autoselect record if there is only one record.,',
|
||||
' * @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is \'\' or " ", If \'Placeholder string\': key is -1 and value is the string), <0 to add an empty value with key that is this value.,',
|
||||
' * @param int<0,1> $key_in_label 1 to show key into label with format "[key] value",',
|
||||
' * @param int<0,1> $value_as_key 1 to use value as key,',
|
||||
' * @param string $moreparam Add more parameters onto the select tag. For example "style=\"width: 95%\"" to avoid select2 component to go over parent container,',
|
||||
' * @param int<0,1> $translate 1=Translate and encode value,',
|
||||
' * @param int $maxlen Length maximum for labels,',
|
||||
' * @param int<0,1> $disabled Html select box is disabled,',
|
||||
' * @param string $sort \'ASC\' or \'DESC\' = Sort on label, \'\' or \'NONE\' or \'POS\' = Do not sort, we keep original order,',
|
||||
' * @param string $morecss Add more class to css styles,',
|
||||
' * @param int $addjscombo Add js combo,',
|
||||
' * @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set,',
|
||||
' * @param int $disablebademail 1=Check if a not valid email, 2=Check string \'---\', and if found into value, disable and colorize entry,',
|
||||
' * @param int $nohtmlescape No html escaping (not recommended, use \'data-html\' if you need to use label with HTML content).,',
|
||||
' * @return string HTML select string.,',
|
||||
' */',
|
||||
'',
|
||||
|
||||
'// Select with empty value',
|
||||
'print $form->selectarray(\'htmlnameselectwithemptyvalue\', $values, \'idselectwithemptyvalue\', 1, 0, 0, \'\', 0, 0, 0, \'\', \'minwidth200\');',
|
||||
'',
|
||||
'// Select within empty value',
|
||||
'print $form->selectarray(\'htmlnameselectwithinemptyvalue\', $values, \'idnameselectwithinemptyvalue\', 0,0, 0, \'\', 0, 0, 0, \'\', \'minwidth200\');',
|
||||
'// Select with empty value',
|
||||
'print $form->selectarray(\'htmlnameselectwithemptyvalue\', $values, \'idselectwithemptyvalue\', 1, 0, 0, \'\', 0, 0, 0, \'\', \'minwidth200\');',
|
||||
'',
|
||||
'// Select within empty value',
|
||||
'print $form->selectarray(\'htmlnameselectwithinemptyvalue\', $values, \'idnameselectwithinemptyvalue\', 0,0, 0, \'\', 0, 0, 0, \'\', \'minwidth200\');',
|
||||
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php'); ?>
|
||||
@@ -187,29 +188,29 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<?php',
|
||||
'',
|
||||
'/**',
|
||||
' * Show a multiselect form from an array. WARNING: Use this only for short lists.',
|
||||
' *',
|
||||
' * @param string $htmlname Name of select',
|
||||
' * @param array<string,string|array{id:string,label:string,color:string,picto:string,labelhtml:string}> $array Array(key=>value) or Array(key=>array(\'id\'=>key, \'label\'=>value, \'color\'=> , \'picto\'=> , \'labelhtml\'=> ))',
|
||||
' * @param string[] $selected Array of keys preselected',
|
||||
' * @param int<0,1> $key_in_label 1 to show key like in "[key] value"',
|
||||
' * @param int<0,1> $value_as_key 1 to use value as key',
|
||||
' * @param string $morecss Add more css style',
|
||||
' * @param int<0,1> $translate Translate and encode value',
|
||||
' * @param int|string $width Force width of select box. May be used only when using jquery couch. Example: 250, \'95%\'',
|
||||
' * @param string $moreattrib Add more options on select component. Example: \'disabled\'',
|
||||
' * @param string $elemtype Type of element we show (\'category\', ...). Will execute a formatting function on it. To use in readonly mode if js component support HTML formatting.',
|
||||
' * @param string $placeholder String to use as placeholder',
|
||||
' * @param int<-1,1> $addjscombo Add js combo',
|
||||
' * @return string HTML multiselect string',
|
||||
' * @see selectarray(), selectArrayAjax(), selectArrayFilter()',
|
||||
' */',
|
||||
'',
|
||||
'// Multiselect',
|
||||
'print $form->multiselectarray(\'categories\', $values, GETPOST(\'categories\', \'array\'), 0, 0, \'minwidth200\', 0, 0);'
|
||||
'<?php',
|
||||
'',
|
||||
'/**',
|
||||
' * Show a multiselect form from an array. WARNING: Use this only for short lists.',
|
||||
' *',
|
||||
' * @param string $htmlname Name of select',
|
||||
' * @param array<string,string|array{id:string,label:string,color:string,picto:string,labelhtml:string}> $array Array(key=>value) or Array(key=>array(\'id\'=>key, \'label\'=>value, \'color\'=> , \'picto\'=> , \'labelhtml\'=> ))',
|
||||
' * @param string[] $selected Array of keys preselected',
|
||||
' * @param int<0,1> $key_in_label 1 to show key like in "[key] value"',
|
||||
' * @param int<0,1> $value_as_key 1 to use value as key',
|
||||
' * @param string $morecss Add more css style',
|
||||
' * @param int<0,1> $translate Translate and encode value',
|
||||
' * @param int|string $width Force width of select box. May be used only when using jquery couch. Example: 250, \'95%\'',
|
||||
' * @param string $moreattrib Add more options on select component. Example: \'disabled\'',
|
||||
' * @param string $elemtype Type of element we show (\'category\', ...). Will execute a formatting function on it. To use in readonly mode if js component support HTML formatting.',
|
||||
' * @param string $placeholder String to use as placeholder',
|
||||
' * @param int<-1,1> $addjscombo Add js combo',
|
||||
' * @return string HTML multiselect string',
|
||||
' * @see selectarray(), selectArrayAjax(), selectArrayFilter()',
|
||||
' */',
|
||||
'',
|
||||
'// Multiselect',
|
||||
'print $form->multiselectarray(\'categories\', $values, GETPOST(\'categories\', \'array\'), 0, 0, \'minwidth200\', 0, 0);'
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php'); ?>
|
||||
|
||||
@@ -232,41 +233,41 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<?php',
|
||||
'/**',
|
||||
' * Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.,',
|
||||
' * Fields are preselected with :,',
|
||||
' * - set_time date (must be a local PHP server timestamp or string date with format \'YYYY-MM-DD\' or \'YYYY-MM-DD HH:MM\'),',
|
||||
' * - local date in user area, if set_time is \'\' (so if set_time is \'\', output may differs when done from two different location),',
|
||||
' * - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1),',
|
||||
' *',
|
||||
' * @param integer|string $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, \'\' to use current date with 00:00 hour (Parameter \'empty\' must be 0 or 2).,',
|
||||
' * @param string $prefix Prefix for fields name,',
|
||||
' * @param int $h 1 or 2=Show also hours (2=hours on a new line), -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 or 4 (4=hours on a new line)=Show hour always empty,',
|
||||
' * @param int $m 1=Show also minutes, -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show minutes always empty,',
|
||||
' * @param int $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only,',
|
||||
' * @param string $form_name Not used,',
|
||||
' * @param int<0,1> $d 1=Show days, month, years,',
|
||||
' * @param int<0,2> $addnowlink Add a link "Now", 1 with server time, 2 with local computer time,',
|
||||
' * @param int<0,1> $disabled Disable input fields,',
|
||||
' * @param int|string $fullday When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if \'fulldaystart\') or 23:59 (if value is \'fulldayend\'),',
|
||||
' * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field.,',
|
||||
' * @param int|string|array<string,mixed> $adddateof Add a link "Date of ..." using the following date. Must be array(array(\'adddateof\' => ..., \'labeladddateof\' => ...)),',
|
||||
' * @param string $openinghours Specify hour start and hour end for the select ex 8,20,',
|
||||
' * @param int $stepminutes Specify step for minutes between 1 and 30,',
|
||||
' * @param string $labeladddateof Label to use for the $adddateof parameter. Deprecated. Used only when $adddateof is not an array.,',
|
||||
' * @param string $placeholder Placeholder,',
|
||||
' * @param \'auto\'|\'gmt\'|\'tzserver\'|\'tzuserrel\' $gm \'auto\' (for backward compatibility, avoid this), \'gmt\' or \'tzserver\' or \'tzuserrel\',',
|
||||
' * @param string $calendarpicto URL of the icon/image used to display the calendar,',
|
||||
' * @return string Html for selectDate,',
|
||||
' * @see form_date(), select_month(), select_year(), select_dayofweek(),',
|
||||
' */',
|
||||
'',
|
||||
'// Date Select',
|
||||
'print $form->selectDate();',
|
||||
'',
|
||||
'// Date Select with hours',
|
||||
'print $form->selectDate(\'\', \'re2\', 1, 1, 1);'
|
||||
'<?php',
|
||||
'/**',
|
||||
' * Show a HTML widget to input a date or combo list for day, month, years and optionally hours and minutes.,',
|
||||
' * Fields are preselected with :,',
|
||||
' * - set_time date (must be a local PHP server timestamp or string date with format \'YYYY-MM-DD\' or \'YYYY-MM-DD HH:MM\'),',
|
||||
' * - local date in user area, if set_time is \'\' (so if set_time is \'\', output may differs when done from two different location),',
|
||||
' * - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1),',
|
||||
' *',
|
||||
' * @param integer|string $set_time Preselected date (must be a local PHP server timestamp), -1 to keep date not preselected, \'\' to use current date with 00:00 hour (Parameter \'empty\' must be 0 or 2).,',
|
||||
' * @param string $prefix Prefix for fields name,',
|
||||
' * @param int $h 1 or 2=Show also hours (2=hours on a new line), -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 or 4 (4=hours on a new line)=Show hour always empty,',
|
||||
' * @param int $m 1=Show also minutes, -1 has same effect but hour and minutes are prefilled with 23:59 if date is empty, 3 show minutes always empty,',
|
||||
' * @param int $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only,',
|
||||
' * @param string $form_name Not used,',
|
||||
' * @param int<0,1> $d 1=Show days, month, years,',
|
||||
' * @param int<0,2> $addnowlink Add a link "Now", 1 with server time, 2 with local computer time,',
|
||||
' * @param int<0,1> $disabled Disable input fields,',
|
||||
' * @param int|string $fullday When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if \'fulldaystart\') or 23:59 (if value is \'fulldayend\'),',
|
||||
' * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field.,',
|
||||
' * @param int|string|array<string,mixed> $adddateof Add a link "Date of ..." using the following date. Must be array(array(\'adddateof\' => ..., \'labeladddateof\' => ...)),',
|
||||
' * @param string $openinghours Specify hour start and hour end for the select ex 8,20,',
|
||||
' * @param int $stepminutes Specify step for minutes between 1 and 30,',
|
||||
' * @param string $labeladddateof Label to use for the $adddateof parameter. Deprecated. Used only when $adddateof is not an array.,',
|
||||
' * @param string $placeholder Placeholder,',
|
||||
' * @param \'auto\'|\'gmt\'|\'tzserver\'|\'tzuserrel\' $gm \'auto\' (for backward compatibility, avoid this), \'gmt\' or \'tzserver\' or \'tzuserrel\',',
|
||||
' * @param string $calendarpicto URL of the icon/image used to display the calendar,',
|
||||
' * @return string Html for selectDate,',
|
||||
' * @see form_date(), select_month(), select_year(), select_dayofweek(),',
|
||||
' */',
|
||||
'',
|
||||
'// Date Select',
|
||||
'print $form->selectDate();',
|
||||
'',
|
||||
'// Date Select with hours',
|
||||
'print $form->selectDate(\'\', \'re2\', 1, 1, 1);'
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php'); ?>
|
||||
|
||||
@@ -281,29 +282,29 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<?php',
|
||||
'/**',
|
||||
' * Create an object to build an HTML area to edit a large string content',
|
||||
' *',
|
||||
' * @param string $htmlname HTML name of WYSIWYG field',
|
||||
' * @param string $content Content of WYSIWYG field',
|
||||
' * @param int|string $width Width in pixel of edit area (auto by default)',
|
||||
' * @param int $height Height in pixel of edit area (200px by default)',
|
||||
' * @param string $toolbarname Name of bar set to use (\'Full\', \'dolibarr_notes[_encoded]\', \'dolibarr_details[_encoded]\'=the less featured, \'dolibarr_mailings[_encoded]\', \'dolibarr_readonly\')',
|
||||
' * @param string $toolbarlocation Deprecated. Not used',
|
||||
' * @param bool $toolbarstartexpanded Bar is visible or not at start',
|
||||
' * @param bool|int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.',
|
||||
' * @param bool|int|string $okforextendededitor 1 or True=Allow usage of extended editor tool if qualified (like ckeditor). If \'textarea\', force use of simple textarea. If \'ace\', force use of Ace.',
|
||||
' * Warning: If you use \'ace\', don\'t forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave"',
|
||||
' * @param int $rows Size of rows for textarea tool',
|
||||
' * @param string $cols Size of cols for textarea tool (textarea number of cols \'70\' or percent \'x%\')',
|
||||
' * @param int<0,1> $readonly 0=Read/Edit, 1=Read only',
|
||||
' * @param array{x?:string,y?:string,find?:string} $poscursor Array for initial cursor position array(\'x\'=>x, \'y\'=>y).',
|
||||
' * array(\'find\'=> \'word\') can be used to go to line were the word has been found',
|
||||
' */',
|
||||
'',
|
||||
'$doleditor = new DolEditor(\'desc\', GETPOST(\'desc\', \'restricthtml\'), \'\', 160, \'dolibarr_details\', \'\', false, true, getDolGlobalString(\'FCKEDITOR_ENABLE_DETAILS\'), ROWS_4, \'90%\');',
|
||||
'print $form->multiselectarray(\'categories\', $values, GETPOST(\'categories\', \'array\'), 0, 0, \'minwidth200\', 0, 0);'
|
||||
'<?php',
|
||||
'/**',
|
||||
' * Create an object to build an HTML area to edit a large string content',
|
||||
' *',
|
||||
' * @param string $htmlname HTML name of WYSIWYG field',
|
||||
' * @param string $content Content of WYSIWYG field',
|
||||
' * @param int|string $width Width in pixel of edit area (auto by default)',
|
||||
' * @param int $height Height in pixel of edit area (200px by default)',
|
||||
' * @param string $toolbarname Name of bar set to use (\'Full\', \'dolibarr_notes[_encoded]\', \'dolibarr_details[_encoded]\'=the less featured, \'dolibarr_mailings[_encoded]\', \'dolibarr_readonly\')',
|
||||
' * @param string $toolbarlocation Deprecated. Not used',
|
||||
' * @param bool $toolbarstartexpanded Bar is visible or not at start',
|
||||
' * @param bool|int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.',
|
||||
' * @param bool|int|string $okforextendededitor 1 or True=Allow usage of extended editor tool if qualified (like ckeditor). If \'textarea\', force use of simple textarea. If \'ace\', force use of Ace.',
|
||||
' * Warning: If you use \'ace\', don\'t forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave"',
|
||||
' * @param int $rows Size of rows for textarea tool',
|
||||
' * @param string $cols Size of cols for textarea tool (textarea number of cols \'70\' or percent \'x%\')',
|
||||
' * @param int<0,1> $readonly 0=Read/Edit, 1=Read only',
|
||||
' * @param array{x?:string,y?:string,find?:string} $poscursor Array for initial cursor position array(\'x\'=>x, \'y\'=>y).',
|
||||
' * array(\'find\'=> \'word\') can be used to go to line were the word has been found',
|
||||
' */',
|
||||
'',
|
||||
'$doleditor = new DolEditor(\'desc\', GETPOST(\'desc\', \'restricthtml\'), \'\', 160, \'dolibarr_details\', \'\', false, true, getDolGlobalString(\'FCKEDITOR_ENABLE_DETAILS\'), ROWS_4, \'90%\');',
|
||||
'print $form->multiselectarray(\'categories\', $values, GETPOST(\'categories\', \'array\'), 0, 0, \'minwidth200\', 0, 0);'
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php'); ?>
|
||||
</div>
|
||||
@@ -316,14 +317,14 @@ $documentation->showSidebar(); ?>
|
||||
<?php
|
||||
$containerCssSelector = '#demo-search-filter-tool-container-01';
|
||||
print $form->getSearchFilterToolInput(
|
||||
$containerCssSelector. ' .search-item',
|
||||
'',
|
||||
'',
|
||||
['attr' => [
|
||||
'data-counter-target' => $containerCssSelector. ' .counter',
|
||||
'data-no-item-target' => $containerCssSelector. ' .search-tool-no-results',
|
||||
],
|
||||
]
|
||||
$containerCssSelector. ' .search-item',
|
||||
'',
|
||||
'',
|
||||
['attr' => [
|
||||
'data-counter-target' => $containerCssSelector. ' .counter',
|
||||
'data-no-item-target' => $containerCssSelector. ' .search-tool-no-results',
|
||||
],
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -349,57 +350,57 @@ $documentation->showSidebar(); ?>
|
||||
</div>
|
||||
<?php
|
||||
$lines = array(
|
||||
'<div class="search-tool-container">',
|
||||
' <input ',
|
||||
' type="search"',
|
||||
' name=""',
|
||||
' autofocus="" <?php // To use only if search is in top of page ?> ',
|
||||
' value=""',
|
||||
' class="search-tool-input" <?php // optional for js filter you can use custom class ?> ',
|
||||
' placeholder="Search"',
|
||||
' autocomplete="off"',
|
||||
' data-search-tool-target="#demo-filter .search-item" <?php // required for js filter ?> ',
|
||||
' data-counter-target="#demo-filter .counter" <?php // optional for js filter ?> ',
|
||||
' data-no-item-target="#demo-filter .search-tool-no-results" <?php // optional for js filter ?> ',
|
||||
' >',
|
||||
'</div>',
|
||||
'<div id="demo-filter">',
|
||||
' <p>Counter : <strong class="counter">4</strong></p>',
|
||||
' <ul>',
|
||||
' <li class="search-item">France</li>',
|
||||
' <li class="search-item">Italy</li>',
|
||||
' <li class="search-item">Germany</li>',
|
||||
' <li class="search-item">Spain</li>',
|
||||
' </ul>',
|
||||
' <div class="search-tool-no-results hidden-search-result" >No results</div>',
|
||||
'</div>',
|
||||
'<div class="search-tool-container">',
|
||||
' <input ',
|
||||
' type="search"',
|
||||
' name=""',
|
||||
' autofocus="" <?php // To use only if search is in top of page ?> ',
|
||||
' value=""',
|
||||
' class="search-tool-input" <?php // optional for js filter you can use custom class ?> ',
|
||||
' placeholder="Search"',
|
||||
' autocomplete="off"',
|
||||
' data-search-tool-target="#demo-filter .search-item" <?php // required for js filter ?> ',
|
||||
' data-counter-target="#demo-filter .counter" <?php // optional for js filter ?> ',
|
||||
' data-no-item-target="#demo-filter .search-tool-no-results" <?php // optional for js filter ?> ',
|
||||
' >',
|
||||
'</div>',
|
||||
'<div id="demo-filter">',
|
||||
' <p>Counter : <strong class="counter">4</strong></p>',
|
||||
' <ul>',
|
||||
' <li class="search-item">France</li>',
|
||||
' <li class="search-item">Italy</li>',
|
||||
' <li class="search-item">Germany</li>',
|
||||
' <li class="search-item">Spain</li>',
|
||||
' </ul>',
|
||||
' <div class="search-tool-no-results hidden-search-result" >No results</div>',
|
||||
'</div>',
|
||||
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php');
|
||||
|
||||
$lines = array(
|
||||
'<?php',
|
||||
'print $form->getSearchFilterToolInput(',
|
||||
' \'#demo-filter .search-item\',',
|
||||
' \'search-tools-input\',',
|
||||
' [\'attr\' => [',
|
||||
' \'data-no-item-target\' => \'#demo-filter .search-tool-no-results\', ',
|
||||
' \'data-counter-target\' => \'#demo-filter .counter\', ',
|
||||
' ],',
|
||||
' ]',
|
||||
'); ',
|
||||
'?>',
|
||||
'',
|
||||
'<div id="demo-filter">',
|
||||
' <p>Counter : <strong class="counter">4</strong></p>',
|
||||
' <ul>',
|
||||
' <li class="search-item">France</li>',
|
||||
' <li class="search-item">Italy</li>',
|
||||
' <li class="search-item">Germany</li>',
|
||||
' <li class="search-item">Spain</li>',
|
||||
' </ul>',
|
||||
' <div class="search-tool-no-results hidden-search-result" >No results</div>',
|
||||
'</div>',
|
||||
'<?php',
|
||||
'print $form->getSearchFilterToolInput(',
|
||||
' \'#demo-filter .search-item\',',
|
||||
' \'search-tools-input\',',
|
||||
' [\'attr\' => [',
|
||||
' \'data-no-item-target\' => \'#demo-filter .search-tool-no-results\', ',
|
||||
' \'data-counter-target\' => \'#demo-filter .counter\', ',
|
||||
' ],',
|
||||
' ]',
|
||||
'); ',
|
||||
'?>',
|
||||
'',
|
||||
'<div id="demo-filter">',
|
||||
' <p>Counter : <strong class="counter">4</strong></p>',
|
||||
' <ul>',
|
||||
' <li class="search-item">France</li>',
|
||||
' <li class="search-item">Italy</li>',
|
||||
' <li class="search-item">Germany</li>',
|
||||
' <li class="search-item">Spain</li>',
|
||||
' </ul>',
|
||||
' <div class="search-tool-no-results hidden-search-result" >No results</div>',
|
||||
'</div>',
|
||||
|
||||
);
|
||||
echo $documentation->showCode($lines, 'php');
|
||||
|
||||
@@ -66,16 +66,16 @@ if (empty($usedolheader)) {
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<title>Test page</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/base/jquery-ui.css" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css" /> -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/css/base/jquery-ui.css" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css" /> -->
|
||||
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php<?php echo (GETPOST("dol_use_jmobile") == 1) ? '?dol_use_jmobile=1&dol_optimize_smallscreen=1' : ''; ?>" />
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/js/jquery.min.js"></script>
|
||||
<!-- migration fixes for removed Jquery functions -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-migrate.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js"></script> -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/select2/select2.min.js?version=4.0.0-beta"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/js/jquery-migrate.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js"></script> -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/public/includes/jquery/plugins/select2/select2.min.js?version=4.0.0-beta"></script>
|
||||
</head>
|
||||
|
||||
<body style="padding: 10px;">
|
||||
@@ -86,17 +86,17 @@ if (empty($usedolheader)) {
|
||||
$arraycss = array();
|
||||
$arrayjs = array();
|
||||
/*
|
||||
$arraycss=array('/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/css/buttons.dataTables.min.css',
|
||||
'/includes/jquery/plugins/datatables/extensions/ColReorder/css/colReorder.dataTables.min.css'
|
||||
$arraycss=array('/public/includes/jquery/plugins/datatables/media/css/jquery.dataTables.css',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/css/buttons.dataTables.min.css',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/ColReorder/css/colReorder.dataTables.min.css'
|
||||
);
|
||||
$arrayjs=array('/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/js/dataTables.buttons.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.colVis.min.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.html5.min.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.flash.min.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.print.min.js',
|
||||
'/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js',
|
||||
$arrayjs=array('/public/includes/jquery/plugins/datatables/media/js/jquery.dataTables.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/js/dataTables.buttons.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.colVis.min.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.html5.min.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.flash.min.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.print.min.js',
|
||||
'/public/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js',
|
||||
'/includes/jszip/jszip.min.js',
|
||||
'/includes/pdfmake/pdfmake.min.js',
|
||||
'/includes/pdfmake/vfs_fonts.js'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user