forked from Wavyzz/dolibarr
Compare commits
863 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0eac798674 | ||
|
|
347667b346 | ||
|
|
8e324c36ff | ||
|
|
03b540b948 | ||
|
|
5a53a16c17 | ||
|
|
da9c25348e | ||
|
|
15af3d68fc | ||
|
|
22ca5e0671 | ||
|
|
2f7bb18e2b | ||
|
|
de5a2d738b | ||
|
|
6d6abd4320 | ||
|
|
23df5596e8 | ||
|
|
fdbb6debc9 | ||
|
|
6660923e94 | ||
|
|
33cd20de68 | ||
|
|
3d69a1dc70 | ||
|
|
6ea4928c79 | ||
|
|
2c0a1904b8 | ||
|
|
e50d239322 | ||
|
|
18d5ec7750 | ||
|
|
40e16672e3 | ||
|
|
72130dacb9 | ||
|
|
1ba03566dc | ||
|
|
e04557948d | ||
|
|
2109a91992 | ||
|
|
0023d14e65 | ||
|
|
ffb345e724 | ||
|
|
9aafb82fd3 | ||
|
|
3698af39f1 | ||
|
|
7d4a7a4be0 | ||
|
|
f1f37c7b29 | ||
|
|
e3811840df | ||
|
|
b36e658b20 | ||
|
|
7fcb62359d | ||
|
|
997cb214f1 | ||
|
|
564b9df1e7 | ||
|
|
58ff96af30 | ||
|
|
5bc80f8626 | ||
|
|
d19febc2ca | ||
|
|
92b89437d1 | ||
|
|
1ac341e651 | ||
|
|
0a2099e0ac | ||
|
|
366f458b39 | ||
|
|
fd8f8ff4e1 | ||
|
|
7bba9db2f0 | ||
|
|
5e6ce8ea70 | ||
|
|
941362e683 | ||
|
|
4020d97362 | ||
|
|
180a0a4557 | ||
|
|
e17818c3dd | ||
|
|
4169aa716c | ||
|
|
cbafbe16a2 | ||
|
|
e9a0b0c290 | ||
|
|
30ea9a497d | ||
|
|
d7bd7371a6 | ||
|
|
261d0772f8 | ||
|
|
38d95aa5cd | ||
|
|
bb192195f1 | ||
|
|
87806346c7 | ||
|
|
d9ac7ab9da | ||
|
|
af440b7c49 | ||
|
|
a66926cf08 | ||
|
|
4f2af3bf67 | ||
|
|
30c6ae394b | ||
|
|
cd8dd236f4 | ||
|
|
a5b74189e6 | ||
|
|
2140f05eb4 | ||
|
|
0943b13ecc | ||
|
|
cefc8dcca2 | ||
|
|
5dd9f4e4c4 | ||
|
|
2344435416 | ||
|
|
4fcaaa3387 | ||
|
|
ca3f62e4ac | ||
|
|
e5f8f38fbf | ||
|
|
ded7b79a6f | ||
|
|
699557adbe | ||
|
|
afafe1a737 | ||
|
|
29649a1e2a | ||
|
|
e9b17aac8d | ||
|
|
b47761e05c | ||
|
|
ca4a1dc266 | ||
|
|
9a3e68b594 | ||
|
|
7115bd7033 | ||
|
|
c393f8149c | ||
|
|
ede084a111 | ||
|
|
f6e0ed08e2 | ||
|
|
e19f496d62 | ||
|
|
9e5c7d0acf | ||
|
|
68bb552dcc | ||
|
|
da481049c1 | ||
|
|
f91e7e4917 | ||
|
|
009780b895 | ||
|
|
88a831c05a | ||
|
|
ae9c490134 | ||
|
|
99b4bfc91e | ||
|
|
6cc512ea16 | ||
|
|
3213148d87 | ||
|
|
c655720b78 | ||
|
|
2337d75d92 | ||
|
|
face2d644e | ||
|
|
2b317120d3 | ||
|
|
bc1724a3aa | ||
|
|
4303d3d3e8 | ||
|
|
2696a6a4d0 | ||
|
|
52af430ae2 | ||
|
|
e223189507 | ||
|
|
1e208e537f | ||
|
|
113144ea21 | ||
|
|
3ae61fcd73 | ||
|
|
c3f75ba2ec | ||
|
|
8360ca4b20 | ||
|
|
bdc73b5cae | ||
|
|
56259bae9a | ||
|
|
9915d97adf | ||
|
|
edc6abcea8 | ||
|
|
537b291fab | ||
|
|
c17c2a6c23 | ||
|
|
d491f2cf54 | ||
|
|
e2680fa29a | ||
|
|
a207365bd2 | ||
|
|
954c29786e | ||
|
|
e02aa4e41b | ||
|
|
ceb0a5b0b5 | ||
|
|
e5edc06f3d | ||
|
|
7ada0de654 | ||
|
|
2595f571c7 | ||
|
|
fe6453194e | ||
|
|
45ddde6940 | ||
|
|
4004aeb257 | ||
|
|
b7fbda8d08 | ||
|
|
1e6cc80438 | ||
|
|
e29d2588cf | ||
|
|
475abbe24b | ||
|
|
afacfa702d | ||
|
|
fb0f31c142 | ||
|
|
6434f255c3 | ||
|
|
f89195e39f | ||
|
|
9e3e8df60f | ||
|
|
650bddde0d | ||
|
|
6f52c62f2a | ||
|
|
434341316b | ||
|
|
55def0248c | ||
|
|
18ec65b4af | ||
|
|
bf9756b8c4 | ||
|
|
e042807b32 | ||
|
|
f3582d891a | ||
|
|
3f28c9a461 | ||
|
|
987fb806c6 | ||
|
|
f518bafda9 | ||
|
|
e39774a508 | ||
|
|
f073b7023a | ||
|
|
82a8c42441 | ||
|
|
9336828710 | ||
|
|
6d62e92e12 | ||
|
|
45345440a4 | ||
|
|
e29f4083e5 | ||
|
|
40565cdf06 | ||
|
|
ca14f9a0fa | ||
|
|
18a19dafe5 | ||
|
|
3d385dd378 | ||
|
|
2d1f151fb2 | ||
|
|
a9d1519f96 | ||
|
|
3d9d5d0ad5 | ||
|
|
baa502a224 | ||
|
|
cf96383bf9 | ||
|
|
54af917afb | ||
|
|
8b79b7f074 | ||
|
|
762ca96203 | ||
|
|
ddf3f8b244 | ||
|
|
d430b2896e | ||
|
|
987d3cf52e | ||
|
|
c7b1a43529 | ||
|
|
e327d609d7 | ||
|
|
e691045c3d | ||
|
|
cb98ec4d23 | ||
|
|
3811586cd0 | ||
|
|
92b245ae93 | ||
|
|
2b8da85eea | ||
|
|
49cfc1afd8 | ||
|
|
f5b9151f17 | ||
|
|
136d002639 | ||
|
|
aae1b9f7fe | ||
|
|
b8265d3604 | ||
|
|
30c167c6f4 | ||
|
|
cf039b26f9 | ||
|
|
928ed6eecc | ||
|
|
9f6a5d4cc9 | ||
|
|
bd3504c473 | ||
|
|
48183b396a | ||
|
|
fc2f2c6da7 | ||
|
|
0544434482 | ||
|
|
b6afd86354 | ||
|
|
4cf99585f8 | ||
|
|
e1db0ef855 | ||
|
|
66beb7c14f | ||
|
|
33b663091e | ||
|
|
d9e26b8569 | ||
|
|
e9b387a4e9 | ||
|
|
4a9c85ae39 | ||
|
|
4d50ba5e37 | ||
|
|
64d2f906bc | ||
|
|
a2f311d25a | ||
|
|
6d1eb9277b | ||
|
|
1a9afe6b20 | ||
|
|
d9a0edcf2b | ||
|
|
0cd05887ce | ||
|
|
d6887f3ca4 | ||
|
|
695771726f | ||
|
|
d4400cf80f | ||
|
|
387c2209d7 | ||
|
|
b3a064d309 | ||
|
|
860b6e7557 | ||
|
|
d9cef1c8d7 | ||
|
|
fa305fdaca | ||
|
|
36a0780f14 | ||
|
|
3f9731a3a0 | ||
|
|
d7d48936d2 | ||
|
|
78a427c996 | ||
|
|
c14b6884e3 | ||
|
|
c0b9fef229 | ||
|
|
d2d9ce3576 | ||
|
|
2afd38e2f6 | ||
|
|
6d894b7abd | ||
|
|
e0ebe85c13 | ||
|
|
160009630f | ||
|
|
aab9a2ff75 | ||
|
|
b41b22996f | ||
|
|
385f998254 | ||
|
|
8ed100ca87 | ||
|
|
1c7873b4f4 | ||
|
|
4c27ae6530 | ||
|
|
b1495e12ce | ||
|
|
82ace4b4ef | ||
|
|
908e5d7f0a | ||
|
|
84bca036c9 | ||
|
|
a0c013d87b | ||
|
|
c22e13b138 | ||
|
|
a8740352af | ||
|
|
91523b4b64 | ||
|
|
fe6fb12d18 | ||
|
|
635b9bb0fe | ||
|
|
ed045b2673 | ||
|
|
17a4447ccb | ||
|
|
ed63287797 | ||
|
|
10ab97944a | ||
|
|
84353087b2 | ||
|
|
7f56c4a785 | ||
|
|
b90a6024f5 | ||
|
|
6c3e5b19b4 | ||
|
|
a040cd0305 | ||
|
|
fc1a1c6afe | ||
|
|
d11dcc35c3 | ||
|
|
6798e9e6f5 | ||
|
|
df10b86d1f | ||
|
|
48245cf134 | ||
|
|
f6e2399f3c | ||
|
|
4564a5cffd | ||
|
|
a685026756 | ||
|
|
b77892451f | ||
|
|
21665cdc85 | ||
|
|
df91780552 | ||
|
|
e98671e404 | ||
|
|
42ee9845ad | ||
|
|
9764af7e9c | ||
|
|
eda3643639 | ||
|
|
c96937d101 | ||
|
|
f4df3d01b2 | ||
|
|
1aafd4667b | ||
|
|
ababad540a | ||
|
|
a90398af06 | ||
|
|
2fcb2ff19f | ||
|
|
b4fbb86548 | ||
|
|
3ea8d1895b | ||
|
|
b8a4c0d83b | ||
|
|
a70be95760 | ||
|
|
7f0e019c78 | ||
|
|
93735bf9cd | ||
|
|
285f215acf | ||
|
|
388e98fdf0 | ||
|
|
ab5c2b1fd5 | ||
|
|
922efaf49b | ||
|
|
02c5530e1f | ||
|
|
4b58213e5b | ||
|
|
64d877bc7b | ||
|
|
00e9ed1452 | ||
|
|
b5f48fb815 | ||
|
|
039fe92209 | ||
|
|
5edd8b1206 | ||
|
|
c8a93437ff | ||
|
|
67d6b6b3db | ||
|
|
94be1870ec | ||
|
|
1101c4e587 | ||
|
|
f7d4d78008 | ||
|
|
be46b2062e | ||
|
|
293c5a5626 | ||
|
|
cd1368cb71 | ||
|
|
2633e90890 | ||
|
|
e2dcc8f773 | ||
|
|
ce94788dd9 | ||
|
|
aebc04d30a | ||
|
|
21697eeda3 | ||
|
|
b68e85703f | ||
|
|
6819255b76 | ||
|
|
7972174787 | ||
|
|
436362502c | ||
|
|
3a9add0e70 | ||
|
|
e1129babbc | ||
|
|
93278b2dca | ||
|
|
0999f5e6f2 | ||
|
|
de90f24bd4 | ||
|
|
6b8ff56c20 | ||
|
|
80271cc852 | ||
|
|
7bc8a70b0a | ||
|
|
ab586b8f42 | ||
|
|
43f4c5ac96 | ||
|
|
c1d0cae24d | ||
|
|
910c4144e8 | ||
|
|
f6f9ca48dd | ||
|
|
8be14060d6 | ||
|
|
11e9cc68b7 | ||
|
|
7587e38302 | ||
|
|
e8ead1d924 | ||
|
|
cf05796f31 | ||
|
|
f670a68b04 | ||
|
|
0b790ef327 | ||
|
|
f6735ce8f2 | ||
|
|
536ab95207 | ||
|
|
f8ae5d9972 | ||
|
|
ff5bf040e8 | ||
|
|
f09fa5226a | ||
|
|
b8e68a5ef7 | ||
|
|
1e0e4d5d6d | ||
|
|
fb24fbba05 | ||
|
|
b72651fdfd | ||
|
|
27aeaaecb5 | ||
|
|
91fbccb594 | ||
|
|
f546103c01 | ||
|
|
817e16d652 | ||
|
|
ea60d0be63 | ||
|
|
3e7f0b364e | ||
|
|
3c29a7b8d8 | ||
|
|
01ec8693f2 | ||
|
|
855ac5467c | ||
|
|
26022f062f | ||
|
|
984fa0d5a0 | ||
|
|
7f746af10e | ||
|
|
b540bb29e0 | ||
|
|
86eaa78f1e | ||
|
|
18fdf3573f | ||
|
|
5b96066bf4 | ||
|
|
f7c07640dd | ||
|
|
53ceef5b6a | ||
|
|
c3b8949e2e | ||
|
|
85bea5a7c4 | ||
|
|
110787d66a | ||
|
|
d143bd8aec | ||
|
|
f2704036cd | ||
|
|
236898f4e7 | ||
|
|
a72b262f5b | ||
|
|
f726fcdcd8 | ||
|
|
1c6faf79a9 | ||
|
|
384cfeccf6 | ||
|
|
46ccd61009 | ||
|
|
0f71ee1e49 | ||
|
|
afbfd66ee9 | ||
|
|
8e6de35d7b | ||
|
|
8e246f2a18 | ||
|
|
acbbffdb7f | ||
|
|
1cda760621 | ||
|
|
94ae75c2a0 | ||
|
|
eebf48b27c | ||
|
|
2e27355dec | ||
|
|
b1bae5f3dd | ||
|
|
697043bbd3 | ||
|
|
acab0200a6 | ||
|
|
e9ee7a23e6 | ||
|
|
3cc68c6972 | ||
|
|
a38e273ae8 | ||
|
|
ba2c035556 | ||
|
|
20e684ec69 | ||
|
|
3ca0d48b37 | ||
|
|
8bca68cfba | ||
|
|
3f59ca6418 | ||
|
|
e2660fd31c | ||
|
|
fecfe2e3a1 | ||
|
|
f5ab957faf | ||
|
|
d0af49cdce | ||
|
|
9573f1289a | ||
|
|
eb63350d55 | ||
|
|
450b1761b1 | ||
|
|
679b94dcaa | ||
|
|
70e71d32c7 | ||
|
|
b693525b3e | ||
|
|
63d41fa356 | ||
|
|
1f471d46eb | ||
|
|
83f3c9ab6e | ||
|
|
28fa0e4e5d | ||
|
|
3e04fe2319 | ||
|
|
4ac978303b | ||
|
|
92cd0372db | ||
|
|
a1e714f123 | ||
|
|
c4d898e155 | ||
|
|
6f4ff57612 | ||
|
|
5a366767fb | ||
|
|
7fe8c7eab3 | ||
|
|
273443550e | ||
|
|
f7d1ce1e09 | ||
|
|
1ed8639653 | ||
|
|
f52f59e80a | ||
|
|
3c9ca3860b | ||
|
|
56336e1d30 | ||
|
|
c83f0f7484 | ||
|
|
2ac03c2875 | ||
|
|
0a8a8bafa0 | ||
|
|
c9ab61b521 | ||
|
|
caecb0152f | ||
|
|
3327f1c074 | ||
|
|
b9fc642a35 | ||
|
|
63f0c07a07 | ||
|
|
e402e35d96 | ||
|
|
89bd8ecc21 | ||
|
|
6cb780d125 | ||
|
|
50b789456d | ||
|
|
64f6542f96 | ||
|
|
49c38042a9 | ||
|
|
3ac07ff84f | ||
|
|
0716951b6d | ||
|
|
9ef6204f7e | ||
|
|
df81065f73 | ||
|
|
2ec60c9d55 | ||
|
|
34e434a17e | ||
|
|
88297d5682 | ||
|
|
721371a08c | ||
|
|
9950295e41 | ||
|
|
ed4aa55857 | ||
|
|
47987f239d | ||
|
|
009cc36355 | ||
|
|
e32ac7644d | ||
|
|
62387f712c | ||
|
|
9bbedce3d6 | ||
|
|
bfbc9b303a | ||
|
|
e838000795 | ||
|
|
5b8c50cb72 | ||
|
|
5ca9c71449 | ||
|
|
98dfc7ca71 | ||
|
|
13b47774e2 | ||
|
|
50790a7f36 | ||
|
|
eac75497c0 | ||
|
|
d0c4af5855 | ||
|
|
8a14652eae | ||
|
|
165df931f1 | ||
|
|
22a8c207f4 | ||
|
|
2f1b25c67a | ||
|
|
683ddac0d4 | ||
|
|
a41f54c82f | ||
|
|
ed0f6b56b9 | ||
|
|
c7cdb64087 | ||
|
|
d46417c8bd | ||
|
|
372d719693 | ||
|
|
e9bddf5c26 | ||
|
|
d7e4e5f18c | ||
|
|
a13287e285 | ||
|
|
bc0d98b91c | ||
|
|
f7b6895dc6 | ||
|
|
71910b2181 | ||
|
|
193a10bc39 | ||
|
|
4c8a04cf38 | ||
|
|
644d83d799 | ||
|
|
733814a8a0 | ||
|
|
7cee643c05 | ||
|
|
19084286be | ||
|
|
7da01c3013 | ||
|
|
3408f67348 | ||
|
|
d204cfe6c6 | ||
|
|
3c75c29e6b | ||
|
|
7ad67ff91d | ||
|
|
3b6db77cb3 | ||
|
|
c6f57c46a8 | ||
|
|
a923ef5a6d | ||
|
|
00a12b9fc8 | ||
|
|
7380fa32ec | ||
|
|
a7656793da | ||
|
|
5135474232 | ||
|
|
5622c1947b | ||
|
|
a743110f03 | ||
|
|
4d2b4583d0 | ||
|
|
9476fbc3e7 | ||
|
|
7330c31204 | ||
|
|
70706d9ea7 | ||
|
|
6f0071bebe | ||
|
|
1f5da36fdb | ||
|
|
e3dfe60567 | ||
|
|
5658d783d6 | ||
|
|
73f6c9210f | ||
|
|
04564e83ea | ||
|
|
3860f24908 | ||
|
|
d0c179e1e9 | ||
|
|
878c4fb106 | ||
|
|
fbce8fcfe3 | ||
|
|
125e964352 | ||
|
|
b081cf5cba | ||
|
|
3ea9c297ea | ||
|
|
474260e526 | ||
|
|
6ecacb9c29 | ||
|
|
07d64f47e3 | ||
|
|
7466eaade3 | ||
|
|
9fcbec9f02 | ||
|
|
06ad21f2e8 | ||
|
|
ff44e2d2ac | ||
|
|
7c9583011a | ||
|
|
1c7ce31207 | ||
|
|
81b41c932f | ||
|
|
9a92545d8d | ||
|
|
64207ef58d | ||
|
|
eead9a93d3 | ||
|
|
3eda785ca5 | ||
|
|
076caa11ab | ||
|
|
31fca2897a | ||
|
|
9b2da5bdae | ||
|
|
cb7342d4c8 | ||
|
|
4207d94f53 | ||
|
|
f512e0d161 | ||
|
|
3a9cc532d7 | ||
|
|
259f23e96b | ||
|
|
96481c3d52 | ||
|
|
9379f6fa9d | ||
|
|
4a012c13b2 | ||
|
|
947ccf0892 | ||
|
|
30379b4cba | ||
|
|
81ae6c45ea | ||
|
|
39f7742387 | ||
|
|
386d478b65 | ||
|
|
ddf233f2ed | ||
|
|
5fdf23bba8 | ||
|
|
84fc394e6f | ||
|
|
004397304e | ||
|
|
d3debccabe | ||
|
|
88d98acbba | ||
|
|
a05f9fad33 | ||
|
|
ab19bb2455 | ||
|
|
51f8c5ca87 | ||
|
|
b48c21dbcb | ||
|
|
e160ea2bee | ||
|
|
a7ba23d845 | ||
|
|
33fe7b5f70 | ||
|
|
7de191b097 | ||
|
|
925554d15e | ||
|
|
74667c2943 | ||
|
|
c516a54f78 | ||
|
|
81af385259 | ||
|
|
fec3377f24 | ||
|
|
4c0de74470 | ||
|
|
1657a6b50a | ||
|
|
a5379c7144 | ||
|
|
1e955a89ef | ||
|
|
0dbc37667c | ||
|
|
ca4b641094 | ||
|
|
55dd3ae0ae | ||
|
|
04a875f43b | ||
|
|
45579b0986 | ||
|
|
fbe6711353 | ||
|
|
94b6fbb223 | ||
|
|
ef86311639 | ||
|
|
61deab41f9 | ||
|
|
bcf17c79ef | ||
|
|
4ce1665a15 | ||
|
|
ade07865d6 | ||
|
|
3e807b00ba | ||
|
|
599bf89f60 | ||
|
|
5d9e713a1c | ||
|
|
d28eaf5824 | ||
|
|
f7b4e48d59 | ||
|
|
87e808fec4 | ||
|
|
a413e2861e | ||
|
|
d9f616d6e3 | ||
|
|
9be4b28bea | ||
|
|
c71da5d013 | ||
|
|
7eb4522636 | ||
|
|
8e1ffa5144 | ||
|
|
d38c6616e6 | ||
|
|
54d3703c42 | ||
|
|
c7c0eba10b | ||
|
|
ea13c707a2 | ||
|
|
b41ac2a428 | ||
|
|
a3328c5ef3 | ||
|
|
e9e0ce591b | ||
|
|
c1931a045e | ||
|
|
a848a8523a | ||
|
|
cc93a40c45 | ||
|
|
56e4fa1bb3 | ||
|
|
c767e553d3 | ||
|
|
4f1dd5439f | ||
|
|
7b8cafb710 | ||
|
|
0a5f971eb5 | ||
|
|
d3aeec0a7c | ||
|
|
2e1554def4 | ||
|
|
1fe4e4415e | ||
|
|
075757eb3d | ||
|
|
cb43928a5d | ||
|
|
1d05531aa8 | ||
|
|
26f6f04486 | ||
|
|
564f412957 | ||
|
|
ee29125579 | ||
|
|
8927d40cc4 | ||
|
|
37fce0d3ee | ||
|
|
8192e9dc67 | ||
|
|
8a9553522f | ||
|
|
f774733fcb | ||
|
|
6948e347c4 | ||
|
|
4841a5bf4a | ||
|
|
ca269864f7 | ||
|
|
1ff102f62a | ||
|
|
864c903d05 | ||
|
|
7e428885cc | ||
|
|
74b8b9f47d | ||
|
|
6d9967a5d3 | ||
|
|
dea03efd4f | ||
|
|
09359b8025 | ||
|
|
aa3b28a8be | ||
|
|
ca121dd689 | ||
|
|
6618205e6f | ||
|
|
4f4b778c8c | ||
|
|
0babab2824 | ||
|
|
95efdab62a | ||
|
|
325d635c48 | ||
|
|
dfe947885c | ||
|
|
5dc403cb66 | ||
|
|
ad22820872 | ||
|
|
6edaa7ac11 | ||
|
|
c4610fee8b | ||
|
|
f40c8ce507 | ||
|
|
4903287204 | ||
|
|
27bdee9df1 | ||
|
|
c9b715b7ad | ||
|
|
7afbb5ce9c | ||
|
|
467dc2da7a | ||
|
|
7e574e0429 | ||
|
|
4bdf10c995 | ||
|
|
ae5d94b01c | ||
|
|
13ffc186b7 | ||
|
|
8808b7df87 | ||
|
|
7f759c6ff5 | ||
|
|
838b6d1e71 | ||
|
|
25eae4db9c | ||
|
|
2b8a06cb5e | ||
|
|
20aa51f26b | ||
|
|
ce01cf278d | ||
|
|
6d1f62c1d9 | ||
|
|
f2b33c0d77 | ||
|
|
1f5c8f682c | ||
|
|
078112c649 | ||
|
|
35f32391a0 | ||
|
|
8d2ece83b7 | ||
|
|
3d279094c1 | ||
|
|
b1bb7de2fb | ||
|
|
e66313d47e | ||
|
|
b81c02de04 | ||
|
|
99b1c773a7 | ||
|
|
1fb6d1d43d | ||
|
|
c4a429fb56 | ||
|
|
26e0d63e31 | ||
|
|
fbcfc368b4 | ||
|
|
f7dda657b1 | ||
|
|
a6e3980acb | ||
|
|
7c2bed2846 | ||
|
|
ddf87e6d80 | ||
|
|
d4b67a6cef | ||
|
|
aaf9aef5c8 | ||
|
|
d39820d1ac | ||
|
|
adc996ee0a | ||
|
|
5ff4b638a5 | ||
|
|
a9d7bbc2ed | ||
|
|
e8407e3f0b | ||
|
|
fff7ee3e96 | ||
|
|
0123fa7696 | ||
|
|
a98b65ad99 | ||
|
|
a5a2d60755 | ||
|
|
55dc3d36ac | ||
|
|
deda6252f2 | ||
|
|
eb4ca743e4 | ||
|
|
ddc0547eda | ||
|
|
834873ab15 | ||
|
|
50d76ae0e8 | ||
|
|
de0234e7a8 | ||
|
|
f586c3b0c8 | ||
|
|
0f156a6521 | ||
|
|
24f416d0dd | ||
|
|
13ecf9a585 | ||
|
|
0b37c2c201 | ||
|
|
109770f5c3 | ||
|
|
5f417039f6 | ||
|
|
71f19b4e5e | ||
|
|
c80e37edf6 | ||
|
|
6f3197bbea | ||
|
|
3f2d6ac2ba | ||
|
|
d5546df57b | ||
|
|
fd64f0fadb | ||
|
|
88d2e13f02 | ||
|
|
945641a05b | ||
|
|
a22296ca72 | ||
|
|
b587ac6936 | ||
|
|
060df57cb1 | ||
|
|
e916ff40ff | ||
|
|
b9e5f349a1 | ||
|
|
87fe2e691b | ||
|
|
5e6ee7888c | ||
|
|
e962afb9c5 | ||
|
|
da99c89c26 | ||
|
|
bb5b55f9e3 | ||
|
|
0855598c00 | ||
|
|
c3ab1055bf | ||
|
|
8eff3162a9 | ||
|
|
d6b5a84895 | ||
|
|
52a92924de | ||
|
|
e35bba358f | ||
|
|
c6b6b97ac0 | ||
|
|
284a4189b3 | ||
|
|
87b3cf9765 | ||
|
|
e07a29ecd0 | ||
|
|
51489004a3 | ||
|
|
baaa6b797b | ||
|
|
f039008282 | ||
|
|
eac07aceb0 | ||
|
|
009eb0d4a4 | ||
|
|
c555a2c588 | ||
|
|
8476477137 | ||
|
|
74ac69fc5a | ||
|
|
957295ee2d | ||
|
|
9bc5eb44ca | ||
|
|
8b1fff202b | ||
|
|
8f8a733d7b | ||
|
|
ef9fe73d96 | ||
|
|
f797f6bbaf | ||
|
|
921dacf695 | ||
|
|
ab01acfe53 | ||
|
|
9c1c0ee08f | ||
|
|
aba29207a3 | ||
|
|
9f097b1a08 | ||
|
|
b52cfe58d6 | ||
|
|
4370bf8fdc | ||
|
|
91e7ff3c8e | ||
|
|
0b43d67eea | ||
|
|
4a516a0352 | ||
|
|
b95d74f843 | ||
|
|
01b9c42670 | ||
|
|
d3b70994fe | ||
|
|
373ab3bc01 | ||
|
|
a5baf2bc88 | ||
|
|
114e41108d | ||
|
|
c38e88ca46 | ||
|
|
e2786fc35f | ||
|
|
d7c079919b | ||
|
|
a18fda6b3d | ||
|
|
ec108162e3 | ||
|
|
b7a0de11c6 | ||
|
|
69c2f4bd27 | ||
|
|
f386614511 | ||
|
|
91f7a14602 | ||
|
|
b565881b31 | ||
|
|
5516c8ce81 | ||
|
|
c2f7d857a0 | ||
|
|
2067abdc7e | ||
|
|
aec47b474a | ||
|
|
2118c2eede | ||
|
|
2a6652f6b5 | ||
|
|
9f8166ed37 | ||
|
|
b2b2291117 | ||
|
|
2c26ddb22b | ||
|
|
b2a488ef9f | ||
|
|
3682d9143e | ||
|
|
4b4d1bcce2 | ||
|
|
6366881f91 | ||
|
|
090b0e90d2 | ||
|
|
3075e40f8c | ||
|
|
5919570b34 | ||
|
|
11ff3f6562 | ||
|
|
530930b7aa | ||
|
|
ee45c3efb6 | ||
|
|
ac2f6bdc42 | ||
|
|
5648205beb | ||
|
|
0ab16ed5ae | ||
|
|
295d42b476 | ||
|
|
559fc9f61e | ||
|
|
b4fdd9bc50 | ||
|
|
d6917b6b08 | ||
|
|
8d507c4f32 | ||
|
|
327b827fb4 | ||
|
|
f6eba36575 | ||
|
|
dc0972fdfc | ||
|
|
60f394a53c | ||
|
|
ea19ab96c3 | ||
|
|
593091f399 | ||
|
|
9ff424e23b | ||
|
|
a7ca7dfbb6 | ||
|
|
2cfca2a45e | ||
|
|
44c2909696 | ||
|
|
3fafbb372b | ||
|
|
91899d2f56 | ||
|
|
db1e324ba5 | ||
|
|
394c256ca1 | ||
|
|
d0d352be1a | ||
|
|
7c07589850 | ||
|
|
43b173ef76 | ||
|
|
016c7ad875 | ||
|
|
979d7eb548 | ||
|
|
51bc20a110 | ||
|
|
ce09ec8805 | ||
|
|
b0016764c4 | ||
|
|
fa16063875 | ||
|
|
31ae0bc06e | ||
|
|
0dcb83e6bf | ||
|
|
8d9577137a | ||
|
|
c60ae7227f | ||
|
|
e73b57e969 | ||
|
|
c6b05040a3 | ||
|
|
afadf9dc0e | ||
|
|
bb64d2d353 | ||
|
|
24bb61b5e4 | ||
|
|
b6be42e103 | ||
|
|
67eb584a7f | ||
|
|
7e814e2a08 | ||
|
|
9ce0e6869e | ||
|
|
d1e9f3a505 | ||
|
|
110a23623b | ||
|
|
dbb7db376b | ||
|
|
4511cf1060 | ||
|
|
1034e4a472 | ||
|
|
f6f0d9d4a2 | ||
|
|
49dd8e30aa | ||
|
|
7b4c674bdc | ||
|
|
ef64e20367 | ||
|
|
f8e18a3826 | ||
|
|
a773b86ad1 | ||
|
|
29cfd6d857 | ||
|
|
a5de331410 | ||
|
|
f1bbe1c64d | ||
|
|
e59ac41182 | ||
|
|
25fa83bd06 | ||
|
|
504a67daee | ||
|
|
1904ae0e82 | ||
|
|
549bf076d7 | ||
|
|
523d09536c | ||
|
|
bf281b7dab | ||
|
|
ac7a077c77 | ||
|
|
5b87b12e64 | ||
|
|
7cdfc3ca65 | ||
|
|
f14cd9f49f | ||
|
|
2b3cc0d048 | ||
|
|
69bd616e73 | ||
|
|
d3d572c8d3 | ||
|
|
0ab0bb2e7d | ||
|
|
58ad62aa7b | ||
|
|
3bc122ecf6 | ||
|
|
3faed758b3 | ||
|
|
88f0cc1331 | ||
|
|
72e59e6fe2 | ||
|
|
52506ddd05 | ||
|
|
f19f706c38 | ||
|
|
5be0485917 | ||
|
|
700e01d661 | ||
|
|
275b5d1f77 | ||
|
|
102428a503 | ||
|
|
ecea726323 |
@@ -3,6 +3,7 @@
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: trusty to have php 5.4+ available
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
@@ -42,7 +43,7 @@ env:
|
||||
global:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=false
|
||||
matrix:
|
||||
jobs:
|
||||
# MariaDB overrides MySQL installation so it's not possible to test both yet
|
||||
#- DB=mysql
|
||||
- DB=mariadb
|
||||
@@ -54,7 +55,7 @@ env:
|
||||
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
|
||||
#- WS=nginx
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
@@ -290,7 +291,7 @@ script:
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||
set +e
|
||||
echo
|
||||
|
||||
|
||||
288
ChangeLog
288
ChangeLog
@@ -2,6 +2,223 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 11.0.5 compared to 11.0.4 *****
|
||||
FIX: $arraydefaultmessage is an object, as well as in /htdocs/core/class/html.formmail.class.php
|
||||
FIX: 10.0 - pagination in prelevement/bons.php
|
||||
FIX: 10.0 - undefined $langs if template file copy fails during activation of modContrat
|
||||
FIX: 11.0 - fatal with postgres on contact/agenda.php
|
||||
FIX: 11.0 - multicurrency amount not fetched when fetching payments from llx_paiement or llx_paiementfourn
|
||||
FIX: 11.0 - when using pdftk as per hidden conf USE_PDFTK_FOR_PDF_CONCAT, check that the file exists before displaying a success message
|
||||
FIX: #13841
|
||||
FIX: #13877 - Can validate invoice if there is a credit note with VAT 0% on an invoice with other lines with a VAT non 0%
|
||||
FIX: #13968
|
||||
FIX: #14001
|
||||
FIX: #14002
|
||||
FIX: 9.0 - delete unused mandatory argument from migrate_clean_association: argument count mismatch causes a fatal error since php7
|
||||
FIX: 9.0 - fatal during migration from 3.1 using PHP 7
|
||||
FIX: Accountancy - Binding index - Add a filter on sql request for module Subtotal & Jalon
|
||||
FIX: avoid error "Call to undefined function measuringUnitString()"
|
||||
FIX: BlindBoolean SQL injection reported by Christian Weiler
|
||||
FIX: Can create a credit note on situation invoice if previous is also
|
||||
FIX: can install module even if (x) was appended during download.
|
||||
FIX: copy value date of VariousPayment onto the new AccountLine
|
||||
FIX: count of open day when date and start are not open should be 0
|
||||
FIX: Default bank account was not loaded for document generation.
|
||||
FIX: Do not show stats panel if the user does not have permissions
|
||||
FIX: Fix link of the button to create a credit note and fix the awareness of a error that happen when wo create a credit note
|
||||
FIX: force rounding 2 on export ld compta
|
||||
FIX: free text on cash desk
|
||||
FIX: links into emails of notifications
|
||||
FIX: missing file manifest.json.php
|
||||
FIX: missing GetNomURL Hook in warehouse class
|
||||
FIX: missing hook init + table class + $page not set
|
||||
FIX: missing rollbacks on trigger bad return
|
||||
FIX: missing translation value for key "NoMorePredefinedProductToDispatch"
|
||||
FIX: percent must be displayed on one line
|
||||
FIX: php error if multicompany disabled
|
||||
FIX: Privilege escalation reported by wizlynx WLX-2020-011
|
||||
FIX: replace filter parameter "none" by "restricthtml"
|
||||
FIX: Rounding Total TVA in "crabe" model pdf
|
||||
FIX: Show ref_customer, amount on contract link object
|
||||
FIX: Site ec.europa.eu has moved to https://
|
||||
FIX: Tickets mail models doesn't work
|
||||
FIX: vulnerability reported by wizlynx WLX-2020-012
|
||||
FIX: We must only rename current bank receipt
|
||||
FIX: when creating a VariousPayment, the value date is not copied onto the AccountLine that gets created at the same time, so the bank transaction's value date will be the payment date instead of the payment's value date
|
||||
FIX: wrong url param
|
||||
FIX: XSS using the renaming of .noexe files - reported by Nolan.
|
||||
|
||||
***** ChangeLog for 11.0.4 compared to 11.0.3 *****
|
||||
FIX: #13749
|
||||
FIX: #7594 Expense report multi pagebreak
|
||||
FIX: Access to undeclared static property: Contact::$table_element
|
||||
FIX: actions on supplier proposal not saved (bad trigger name)
|
||||
FIX: Add function "completeTabsHead" to "addreplace" type hook.
|
||||
FIX: All forms must use newToken()
|
||||
FIX: Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element"
|
||||
FIX: author search supplier proposal list
|
||||
FIX: A variable was erased by a temporary variable
|
||||
FIX: Avoid infinite loop when a fetch is inside a compute field.
|
||||
FIX: Backto link
|
||||
FIX: Bad position of total in column
|
||||
FIX: bad value in currency into discount created from down payment
|
||||
FIX: buyprice extrafield langfile and tooltip
|
||||
FIX: Buyprice was updated only if min price for this qty had same qty
|
||||
FIX: Can switch from double to price type for extrafields
|
||||
FIX: Can use decimal value in virtual products
|
||||
FIX: child categories only with good entity rights
|
||||
FIX: cloning of emailing when no content selected
|
||||
FIX: closing tags
|
||||
FIX: Combo list of available users to filter on the list of leaves.
|
||||
FIX: Compatibility with multicompany, bad numerotation of task.
|
||||
FIX: consistency of price w/wo vat wrong when price entered with tax
|
||||
FIX: default value of selectMasssAction broken
|
||||
FIX: draftordered replenish virtual stock
|
||||
FIX: Error update SQL into stock reception
|
||||
FIX: expensereport status in generated pdf
|
||||
FIX: extra date field incorrect check
|
||||
FIX: Extrafields of type price must be '' and not '0' if not defined
|
||||
FIX: Foreign currency lost when splitting a discount
|
||||
FIX: get remain to pay with rounding decimals
|
||||
FIX: gzip and bzip2 must use option -f
|
||||
FIX: IHM, unexpected quote
|
||||
FIX: keep viewstatut for doli 3.5
|
||||
FIX: Link missing into email of some notification
|
||||
FIX: Look and feel v11
|
||||
FIX: md stylesheet to be included by external modules like eldy
|
||||
FIX: missing array option
|
||||
FIX: missing default accountancy product buy code
|
||||
FIX: missing fk_bank during export of suppliers invoices
|
||||
FIX: missing member entity
|
||||
FIX: missing selectedlines on supplier order but checkbox are displayed
|
||||
FIX: Missing token and take into account max date when it can.
|
||||
FIX: model export list must be sorted by label
|
||||
FIX: multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL
|
||||
FIX: Must escape shell
|
||||
FIX: Must exclude logs and some dirs for compressed backup
|
||||
FIX: ordered stock already in $stock
|
||||
FIX: picture migration script from doli 9.0
|
||||
FIX: print pictures on shipment docs
|
||||
FIX: product get purchase prices
|
||||
FIX: product purchase prices
|
||||
FIX: Protection when database has a corrupted product id
|
||||
FIX: remove unused var, $usercancreate can be change by Multicompany
|
||||
FIX: replenish stock to buy
|
||||
FIX: Sanitizing menu parameter
|
||||
FIX: Send email from bulk action of list of thirdparties
|
||||
FIX: setup of suggested payment mode on proposals and orders
|
||||
FIX: Several pb in export of documents
|
||||
FIX: Situation invoice take into account the credit notes.
|
||||
FIX: some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report
|
||||
FIX: sort by default role makes no sense
|
||||
FIX: sort on company on member list
|
||||
FIX: TakePOS buying price
|
||||
FIX: text version of html emailing (removed the body style)
|
||||
FIX: The "test smtp connectivity" failed on page to setup mass emailing
|
||||
FIX: Error logs an Orderline::delete error, but this is an Orderline::insert error
|
||||
FIX: Translation of tooltips of extrafields
|
||||
FIX: Use getNomURL instead of hard coded link. Fix limit.
|
||||
FIX: Use of image into free text for PDF if DOL_DATA_DIR is outside of
|
||||
FIX: viewstatut to search status
|
||||
FIX: we must export company mail address on contact vcard only if contact email address is empty
|
||||
FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
|
||||
FIX: Wrong Sql on getListOfTowns api method
|
||||
FIX: wrong user right's name to top menu "commercial"
|
||||
FIX: XSS Vulnerability reported by Mehmet Kelepçe / Gais Cyber Security
|
||||
|
||||
***** ChangeLog for 11.0.3 compared to 11.0.2 *****
|
||||
FIX: unit price for selected supplier products not set. NaN was used.
|
||||
FIX: use bad var to check if total is positive for each VAT rate when validating an invoice
|
||||
FIX: status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
|
||||
FIX: translations for "orders" not loaded in the homepage box
|
||||
FIX: #13194
|
||||
FIX: #13274 cannot add or update 0 value for an int or double extrafield
|
||||
FIX: #13285 SQL error during migration with pgsql
|
||||
FIX: #13294
|
||||
FIX: #13313
|
||||
FIX: Clone Fourn Command, add line's extrafields
|
||||
FIX: cols parameter not propagated to tpl
|
||||
FIX: CSRF error when creating an intervention
|
||||
FIX: date order was -1D and desc with label repetition
|
||||
FIX: empty of series in graph of product distribution
|
||||
FIX: fk_type subscription list via api REST
|
||||
FIX: link when using anchor on "/" in website module
|
||||
FIX: menu export document was not visible when using "simple accounting"
|
||||
FIX: missing class declaration
|
||||
FIX: missing global $conf
|
||||
FIX: Missing token in some forms (avoid unset POST errors)
|
||||
FIX: params of setEventMessage($langs->trans('ErrorProductClone')...
|
||||
FIX: Remove unexisting link
|
||||
FIX: mass action on stock movements
|
||||
FIX: substitute lines dates values on doc generator (ODT, ...)
|
||||
FIX: Ticket - Load Cache Messages Ticket, wrong message's status
|
||||
FIX: Ticket Public - Private messages are displayed
|
||||
FIX: wrong include - replace extrafields_create.tpl.php to extrafields_add.tpl.php
|
||||
|
||||
***** ChangeLog for 11.0.2 compared to 11.0.1 *****
|
||||
FIX: #10309
|
||||
FIX: #13110
|
||||
FIX: #13118
|
||||
FIX: #13124
|
||||
FIX: #13131
|
||||
FIX: #13135
|
||||
FIX: #13146
|
||||
FIX: #13198
|
||||
FIX: #13175
|
||||
FIX: #13182
|
||||
FIX: #13183
|
||||
FIX: #13184
|
||||
FIX: #13263
|
||||
FIX: #13267
|
||||
FIX: an external user can not approve
|
||||
FIX: API Get list of documents for supplier_invoice
|
||||
FIX: API to push an expense report
|
||||
FIX: API upload/download doc for expensereport
|
||||
FIX: Avoid to download the export if we just press enter to refresh form
|
||||
FIX: Bad link to template invoices
|
||||
FIX: Bad sort link in accounting report
|
||||
FIX: Bad translation for productlot EatBy and SellBy
|
||||
FIX: better method to check user rights AND usergroup rights !
|
||||
FIX: CA by product list filter
|
||||
FIX: CSS
|
||||
FIX: Disable js if no javascript
|
||||
FIX: duplicate class name into some log lines
|
||||
FIX: etrafield with visibilty=5 were not in read only.
|
||||
FIX: excess paid from situation invoices not counted when calculating remain to pay.
|
||||
FIX: Force FEC export to txt format.
|
||||
FIX: Free input for email no more visible.
|
||||
FIX: Keep assigned users in session when loading projects and tasks
|
||||
FIX: List of viewed projects too large in task widget.
|
||||
FIX: Menu truncated. Add tooltip to have all content.
|
||||
FIX: Missing field "billed" in export.
|
||||
FIX: missing "statut" for getNomUrl() function
|
||||
FIX: modFournisseur is required by modSupplierProposal
|
||||
FIX: Multicompany compatibility
|
||||
FIX: must be == and not =
|
||||
FIX: option for topbar search and bookmarks
|
||||
FIX: option MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
FIX: some responsive troubles
|
||||
FIX: round MT in accountancy books
|
||||
FIX: search with '0'
|
||||
FIX: sort link
|
||||
FIX: SQL Overload in default contact trigger.
|
||||
FIX: SQl syntax error.
|
||||
FIX: Submit of documents for supplier invoices.
|
||||
FIX: timezone must be tzserver and not tzuser as on contract card
|
||||
FIX: token in barcode tools page missing
|
||||
FIX: Bad name of trigger PROPAL_SUPPLIER_TRIGGER, should be PROPOSAL_SUPPLIER_TRIGGER
|
||||
FIX: Type of contact for event does not exists and not supported
|
||||
FIX: Type of contact not saved when creating a contact
|
||||
FIX: typo on ckeck method
|
||||
FIX: undefined function measuringUnitString in product list
|
||||
FIX: Usage of project not available in export.
|
||||
FIX: wrong test
|
||||
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
|
||||
FIX: Use GETPOST instead of POST
|
||||
FIX: HTML Injection
|
||||
FIX: Visualization rights correction on last modified contacts box.
|
||||
FIX: Vulnerability in module from modulebuilder.
|
||||
FIX: Vulnerability reported by code16
|
||||
|
||||
***** ChangeLog for 11.0.1 compared to 11.0.0 *****
|
||||
FIX: advanced target emailing sql and ergonomy.
|
||||
@@ -286,6 +503,77 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
|
||||
|
||||
|
||||
***** ChangeLog for 10.0.7 compared to 10.0.6 *****
|
||||
FIX: 10.0 - missing translations for "orders" homepage "orders" box
|
||||
FIX: 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS
|
||||
FIX: 10.0 - translations for "orders" not loaded in the homepage box
|
||||
FIX: #10309
|
||||
FIX: #12875
|
||||
FIX: #12932
|
||||
FIX: #12966
|
||||
FIX: #12973
|
||||
FIX: #13304
|
||||
FIX: advanced target emailing sql and ergonomy
|
||||
FIX: an external user can not approved
|
||||
FIX: Bad translation for productlot EatBy and SellBy
|
||||
FIX: better check
|
||||
FIX: better method to check user rights AND usergroup rights !
|
||||
FIX: CA by prod list filter
|
||||
FIX: can be a string or integer
|
||||
FIX: Check on unicity on prof id was not triggered sometimes
|
||||
FIX: clone of purchase order
|
||||
FIX: compatibility with multicompany (avoid duplicate data)
|
||||
FIX: complex export model loading
|
||||
FIX: date filter not used if no operator
|
||||
FIX: date order was -1D and desc with label repetition
|
||||
FIX: default lang selection when filter
|
||||
FIX: dom and missing param
|
||||
FIX: drafts are now implemented for stats
|
||||
FIX: Error in log for email sending with smtps was not complete
|
||||
FIX: Extrafield position in export field list must respect "pos" field
|
||||
FIX: FEC export format
|
||||
FIX: FEC export have specific name
|
||||
FIX: fetching account on current entity
|
||||
FIX: Filenames must not contains non ascii char or we will get non ascii
|
||||
FIX: fk_type subscription list via api REST
|
||||
FIX: Force FEC export to txt format
|
||||
FIX: get remain to pay with rounding decimals
|
||||
FIX: Invert isSellerInEEC and isBuyerInEEC
|
||||
FIX: keep assigned users in session when loading projects and tasks
|
||||
FIX: length, width and height units coherence in product table
|
||||
FIX: links in products/services index
|
||||
FIX: Mail smtps truncated if content has a line with single .
|
||||
FIX: missing array option
|
||||
FIX: missing global $conf
|
||||
FIX: missing hook parameter
|
||||
FIX: Missing Linked objects Fichinter Ref. in PDF formats
|
||||
FIX: missing "statut" for getNomUrl() function
|
||||
FIX: multicompany for discount
|
||||
FIX: must be == and not =
|
||||
FIX: Problem with column label in subscription list
|
||||
FIX: regex for include or exclude categories in full arbo
|
||||
FIX: Remove unexisting link
|
||||
FIX: remove unused var, $usercancreate can be change by Multicompany
|
||||
FIX: require category class in extrafield
|
||||
FIX: round MT in accountancy books
|
||||
FIX: search with '0'
|
||||
FIX: send expense report mail in HTML format
|
||||
FIX: SQL request and phpunit
|
||||
FIX: substitute lines dates values on doc generator (ODT, ...)
|
||||
FIX: test on 0 better than isset
|
||||
FIX: The "automatic bind" was linked EEC to export accountancy code
|
||||
FIX: thirdparty alias name desappeared if we change country with THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION conf
|
||||
FIX: timezone must be tzserver and not tzuser as well as on contract card
|
||||
FIX: typo on ckeck method
|
||||
FIX: use "usergroup" instead "user"
|
||||
FIX: Visualization rights correction on last modified contacts box
|
||||
FIX: Warning on admin/export_files
|
||||
FIX: We want to be able to import data for extrafields of entity 0 too
|
||||
FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create
|
||||
FIX: wrong test
|
||||
FIX: XSS vulnerability in description of list of audit events.
|
||||
FIX: z-index for moretabsList with constant MAIN_MAXTABS_IN_CARD
|
||||
|
||||
***** ChangeLog for 10.0.6 compared to 10.0.5 *****
|
||||
FIX Regression of 10.0.5 to create/edit proposals and orders.
|
||||
FIX: #12760 #12763 #12755 #12765 #12751
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
@@ -19,7 +19,7 @@ use Term::ANSIColor;
|
||||
# Change this to defined target for option 98 and 99
|
||||
$PROJECT="dolibarr";
|
||||
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files";
|
||||
|
||||
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@@ -430,12 +430,14 @@ if ($nboftargetok) {
|
||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||
print 'Run git push -f --tags'."\n";
|
||||
$ret=`git push -f --tags`;
|
||||
#$ret=`git push -f origin "$MAJOR.$MINOR.$BUILD"`;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'Run git push --tags'."\n";
|
||||
$ret=`git push --tags`;
|
||||
#$ret=`git push origin "$MAJOR.$MINOR.$BUILD"`;
|
||||
}
|
||||
chdir("$olddir");
|
||||
}
|
||||
|
||||
@@ -104,6 +104,27 @@ with
|
||||
//return false;
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
with
|
||||
|
||||
// @CHANGE LDR Add support for src="file://..." links
|
||||
if (strpos($imgsrc, 'file://') === 0) {
|
||||
$imgsrc = str_replace('file://', '/', $imgsrc);
|
||||
$imgsrc = urldecode($imgsrc);
|
||||
$testscrtype = @parse_url($imgsrc);
|
||||
if (empty($testscrtype['query'])) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
|
||||
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
|
||||
}
|
||||
}
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -54,5 +54,5 @@ fi
|
||||
|
||||
echo Think to launch also:
|
||||
echo "> dev/tools/fixaltlanguages.sh fix all"
|
||||
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with ''"
|
||||
echo "For v11: Replace also regex \(.*(sponge|cornas|eratosthene|cyan).*\) with '' on *.lang files"
|
||||
|
||||
|
||||
12
doc/user/README-DE.md
Normal file
12
doc/user/README-DE.md
Normal file
@@ -0,0 +1,12 @@
|
||||
README (german)
|
||||
LiesMich (deutsch)
|
||||
|
||||
--------------------------------
|
||||
Benutzeranleitung
|
||||
--------------------------------
|
||||
|
||||
Alle Dolibarr-Informationen sind online verfuegbar ueber die Webseiten:
|
||||
https://www.dolibarr.de
|
||||
oder
|
||||
https://www.dolibarr.org
|
||||
https://wiki.dolibarr.org
|
||||
@@ -46,6 +46,8 @@ $search_accountparent = GETPOST('search_accountparent', 'alpha');
|
||||
$search_pcgtype = GETPOST('search_pcgtype', 'alpha');
|
||||
$search_pcgsubtype = GETPOST('search_pcgsubtype', 'alpha');
|
||||
|
||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0) accessforbidden();
|
||||
if (! $user->rights->accounting->chartofaccount) accessforbidden();
|
||||
@@ -101,11 +103,9 @@ if (empty($reshook))
|
||||
$search_pcgsubtype = "";
|
||||
$search_array_options = array();
|
||||
}
|
||||
|
||||
if (GETPOST('change_chart', 'alpha') && (GETPOST('valid_change_chart', 'int') || empty($conf->use_javascript_ajax)))
|
||||
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|
||||
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified
|
||||
{
|
||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||
|
||||
if ($chartofaccounts > 0)
|
||||
{
|
||||
// Get language code for this $chartofaccounts
|
||||
@@ -274,18 +274,13 @@ if ($resql)
|
||||
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print '<!-- Add javascript to update a flag when we select "Change plan" -->
|
||||
print '<!-- Add javascript to reload page when we click "Change plan" -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#searchFormList").on("submit", function (e) {
|
||||
console.log("chartofaccounts focus = "+$("#chartofaccounts").is(":focus"));
|
||||
console.log("change_chart focus = "+$("#change_chart").is(":focus"));
|
||||
if ($("#change_chart").is(":focus"))
|
||||
{
|
||||
console.log("We set valid_change_chart to 1");
|
||||
$("#valid_change_chart").val(1);
|
||||
}
|
||||
return true;
|
||||
$("#change_chart").on("click", function (e) {
|
||||
console.log("chartofaccounts seleted = "+$("#chartofaccounts").val());
|
||||
// reload page
|
||||
window.location.href = "'.$_SERVER["PHP_SELF"].'?valid_change_chart=1&chartofaccounts="+$("#chartofaccounts").val();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
@@ -332,8 +327,7 @@ if ($resql)
|
||||
else dol_print_error($db);
|
||||
print "</select>";
|
||||
print ajax_combobox("chartofaccounts");
|
||||
print '<input type="submit" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
print '<input type="hidden" name="valid_change_chart" id="valid_change_chart" value="0">';
|
||||
print '<input type="'.(empty($conf->use_javascript_ajax)?'submit':'button').'" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
@@ -161,6 +161,7 @@ print '<input type="hidden" name="action" value="update">';
|
||||
// Define main accounts for thirdparty
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
|
||||
|
||||
foreach ($list_account_main as $key) {
|
||||
print '<tr class="oddeven value">';
|
||||
@@ -180,15 +181,6 @@ foreach ($list_account_main as $key) {
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Define default accounts
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
foreach ($list_account as $key) {
|
||||
$reg=array();
|
||||
if (preg_match('/---(.*)---/', $key, $reg)) {
|
||||
|
||||
@@ -134,13 +134,13 @@ if ($action == 'update') {
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans('ConfigAccountingExpert');
|
||||
$title = $langs->trans('ExportOptions');
|
||||
llxHeader('', $title);
|
||||
|
||||
|
||||
$linkback = '';
|
||||
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy');
|
||||
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
|
||||
|
||||
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
|
||||
@@ -42,7 +42,6 @@ $page = GETPOST("page", 'int');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
if (GETPOST("exportcsv", 'alpha')) $action = 'export_csv';
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
@@ -198,12 +197,25 @@ if ($action != 'export_csv')
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="action" id="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$button = '<input type="submit" name="exportcsv" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#exportcsvbutton").click(function() {
|
||||
event.preventDefault();
|
||||
console.log("Set action to export_csv");
|
||||
jQuery("#action").val("export_csv");
|
||||
jQuery("#searchFormList").submit();
|
||||
jQuery("#action").val("list");
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
$button = '<input type="button" id="exportcsvbutton" name="exportcsvbutton" class="butAction" value="'.$langs->trans("Export").' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
|
||||
@@ -933,7 +933,7 @@ while ($i < min($num, $limit))
|
||||
// Amount debit
|
||||
if (!empty($arrayfields['t.debit']['checked']))
|
||||
{
|
||||
print '<td class="nowrap right">'.($line->debit ? price($line->debit) : '').'</td>';
|
||||
print '<td class="nowrap right">'.($line->debit != 0 ? price($line->debit) : '').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit';
|
||||
$totalarray['val']['totaldebit'] += $line->debit;
|
||||
@@ -942,7 +942,7 @@ while ($i < min($num, $limit))
|
||||
// Amount credit
|
||||
if (!empty($arrayfields['t.credit']['checked']))
|
||||
{
|
||||
print '<td class="nowrap right">'.($line->credit ? price($line->credit) : '').'</td>';
|
||||
print '<td class="nowrap right">'.($line->credit != 0 ? price($line->credit) : '').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit';
|
||||
$totalarray['val']['totalcredit'] += $line->credit;
|
||||
@@ -966,7 +966,7 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ if ($resql) {
|
||||
|
||||
$param="&socid=".$socid;
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||
|
||||
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
||||
|
||||
@@ -195,7 +195,7 @@ if ($resql) {
|
||||
|
||||
$param="&socid=".$socid;
|
||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="socid" value="' . $object->id . '">';
|
||||
|
||||
$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';
|
||||
|
||||
@@ -985,7 +985,7 @@ class AccountancyExport
|
||||
|
||||
print $racine_subledger_account . $separator; // deprecated CPTG & CPTA use instead
|
||||
// MONT
|
||||
print price(abs($line->montant), 0, '', 1, 2).$separator;
|
||||
print price(abs($line->montant), 0, '', 1, 2, 2).$separator;
|
||||
// CODC
|
||||
print $line->sens.$separator;
|
||||
// CPTG
|
||||
|
||||
@@ -1554,7 +1554,7 @@ class BookKeeping extends CommonObject
|
||||
$sql .= " WHERE piece_num = ".$piecenum;
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
@@ -1568,7 +1568,7 @@ class BookKeeping extends CommonObject
|
||||
$this->date_creation = $obj->date_creation;
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
|
||||
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1622,7 +1622,7 @@ class BookKeeping extends CommonObject
|
||||
$sql .= " WHERE piece_num = ".$piecenum;
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
@@ -1654,7 +1654,7 @@ class BookKeeping extends CommonObject
|
||||
}
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
|
||||
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@@ -251,6 +251,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd
|
||||
$sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'";
|
||||
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
$sql .= " AND fd.product_type <= 2";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND aa.account_number IS NULL";
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
@@ -327,10 +328,11 @@ $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'";
|
||||
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
$sql .= " AND fd.product_type <= 2";
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
|
||||
}
|
||||
$sql .= " AND aa.account_number IS NOT NULL";
|
||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
@@ -403,10 +405,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
$sql .= " AND fd.product_type <= 2";
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
@@ -455,10 +458,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
$sql .= " AND fd.product_type <= 2";
|
||||
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_SITUATION.")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")";
|
||||
$sql .= " AND f.type IN (".Facture::TYPE_STANDARD.", ".Facture::TYPE_REPLACEMENT.", ".Facture::TYPE_CREDIT_NOTE.", ".Facture::TYPE_DEPOSIT.", ".Facture::TYPE_SITUATION.")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
|
||||
@@ -332,7 +332,7 @@ if ($result) {
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||
$clickpicto = $form->showCheckAddButtons();
|
||||
print_liste_field_titre($clickpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
@@ -341,7 +341,7 @@ if ($result) {
|
||||
$product_static = new Product($db);
|
||||
|
||||
while ($objp = $db->fetch_object($result)) {
|
||||
$codecompta = length_accountg($objp->account_number).' - '.$objp->label_compte;
|
||||
$codecompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label_compte.'</span>';
|
||||
|
||||
$facture_static->ref = $objp->ref;
|
||||
$facture_static->id = $objp->facid;
|
||||
@@ -390,7 +390,7 @@ if ($result) {
|
||||
|
||||
print '<td>'.$objp->tva_intra.'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $codecompta.' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
|
||||
@@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@@ -287,7 +287,7 @@ if ($result) {
|
||||
|
||||
while ($i < min($num_lines, $limit)) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$codeCompta = length_accountg($objp->account_number).' - '.$objp->label;
|
||||
$codeCompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label.'</span>';
|
||||
|
||||
$expensereport_static->ref = $objp->ref;
|
||||
$expensereport_static->id = $objp->erid;
|
||||
@@ -315,7 +315,7 @@ if ($result) {
|
||||
|
||||
print '<td>'.$codeCompta.'</td>';
|
||||
|
||||
print '<td class="left"><a href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
|
||||
print '<td class="left"><a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ if ($conf->accounting->enabled)
|
||||
|
||||
$resultboxes = FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
|
||||
|
||||
$helpisexpanded = empty($resultboxes['boxactivated']); // If there is no widget, the tooltip help is expanded by default.
|
||||
$helpisexpanded = empty($resultboxes['boxactivated']) || (empty($resultboxes['boxlista']) && empty($resultboxes['boxlistb'])); // If there is no widget, the tooltip help is expanded by default.
|
||||
$showtutorial = '';
|
||||
|
||||
if (!$helpisexpanded)
|
||||
@@ -222,10 +222,6 @@ if ($conf->accounting->enabled)
|
||||
$boxlist .= '<div class="twocolumns">';
|
||||
|
||||
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
|
||||
if (!empty($nbworkboardcount))
|
||||
{
|
||||
$boxlist .= $boxwork;
|
||||
}
|
||||
|
||||
$boxlist .= $resultboxes['boxlista'];
|
||||
|
||||
@@ -233,7 +229,6 @@ if ($conf->accounting->enabled)
|
||||
|
||||
$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
|
||||
|
||||
$boxlist .= $boxstat;
|
||||
$boxlist .= $resultboxes['boxlistb'];
|
||||
|
||||
$boxlist .= '</div>';
|
||||
|
||||
@@ -663,7 +663,7 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
} elseif ($tabtype[$key] == 'payment_various') {
|
||||
$bookkeeping->subledger_account = $k;
|
||||
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||
$bookkeeping->numero_compte = $tabpay[$obj->rowid]["account_various"];
|
||||
$bookkeeping->numero_compte = $tabpay[$key]["account_various"];
|
||||
|
||||
$accountingaccount->fetch(null, $bookkeeping->numero_compte, true);
|
||||
$bookkeeping->label_compte = $accountingaccount->label;
|
||||
@@ -760,7 +760,7 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
if (price2num($totaldebit) != price2num($totalcredit))
|
||||
if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@@ -355,7 +355,7 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
|
||||
// Protection against a bug on line before
|
||||
if (price2num($totaldebit) != price2num($totalcredit))
|
||||
if (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT'))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@@ -513,7 +513,7 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
|
||||
// Protection against a bug on lines before
|
||||
if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit)))
|
||||
if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@@ -471,7 +471,7 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
|
||||
// Protection against a bug on lines before
|
||||
if (!$errorforline && (price2num($totaldebit) != price2num($totalcredit)))
|
||||
if (! $errorforline && (price2num($totaldebit, 'MT') != price2num($totalcredit, 'MT')))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@@ -38,8 +38,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$codeventil = GETPOST('codeventil');
|
||||
$id = GETPOST('id');
|
||||
$codeventil = GETPOST('codeventil', 'int');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Security check
|
||||
if ($user->socid > 0)
|
||||
|
||||
@@ -249,6 +249,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = ff
|
||||
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
|
||||
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND ff.fk_statut > 0";
|
||||
$sql .= " AND ffd.product_type <= 2";
|
||||
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND aa.account_number IS NULL";
|
||||
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
@@ -319,6 +320,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = ff
|
||||
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
|
||||
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND ff.fk_statut > 0";
|
||||
$sql .= " AND ffd.product_type <= 2";
|
||||
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND aa.account_number IS NOT NULL";
|
||||
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
@@ -389,6 +391,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
$sql .= " WHERE ff.datef >= '".$db->idate($search_date_start)."'";
|
||||
$sql .= " AND ff.datef <= '".$db->idate($search_date_end)."'";
|
||||
$sql .= " AND ff.fk_statut > 0";
|
||||
$sql .= " AND ffd.product_type <= 2";
|
||||
$sql .= " AND ff.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog('htdocs/accountancy/supplier/index.php');
|
||||
|
||||
@@ -336,7 +336,7 @@ if ($result) {
|
||||
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
|
||||
$checkpicto = $form->showCheckAddButtons();
|
||||
print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center ');
|
||||
print "</tr>\n";
|
||||
@@ -347,7 +347,7 @@ if ($result) {
|
||||
while ($i < min($num_lines, $limit)) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$codecompta = length_accountg($objp->account_number).' - '.$objp->label;
|
||||
$codecompta = length_accountg($objp->account_number).' - <span class="opacitymedium">'.$objp->label.'</span>';
|
||||
|
||||
$facturefournisseur_static->ref = $objp->ref;
|
||||
$facturefournisseur_static->id = $objp->facid;
|
||||
@@ -399,7 +399,7 @@ if ($result) {
|
||||
|
||||
print '<td>'.$objp->tva_intra.'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $codecompta.' <a href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
@@ -57,7 +57,7 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
|
||||
|
||||
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
|
||||
|
||||
$completefilename = $siren . "FEC" . $endaccountingperiod . "." . $format;
|
||||
$completefilename = $siren . "FEC" . $endaccountingperiod . ".txt";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -243,18 +243,16 @@ if (empty($reshook))
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$birthdate = '';
|
||||
if (isset($_POST["birthday"]) && $_POST["birthday"]
|
||||
&& isset($_POST["birthmonth"]) && $_POST["birthmonth"]
|
||||
&& isset($_POST["birthyear"]) && $_POST["birthyear"])
|
||||
if (GETPOST("birthday", 'int') && GETPOST("birthmonth", 'int') && GETPOST("birthyear", 'int'))
|
||||
{
|
||||
$birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
|
||||
$birthdate = dol_mktime(12, 0, 0, GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int'));
|
||||
}
|
||||
$lastname = $_POST["lastname"];
|
||||
$firstname = $_POST["firstname"];
|
||||
$gender = $_POST["gender"];
|
||||
$societe = $_POST["societe"];
|
||||
$morphy = $_POST["morphy"];
|
||||
$login = $_POST["login"];
|
||||
$lastname = GETPOST("lastname", 'alphanohtml');
|
||||
$firstname = GETPOST("firstname", 'alphanohtml');
|
||||
$gender = GETPOST("gender", 'alphanohtml');
|
||||
$societe = GETPOST("societe", 'alphanohtml');
|
||||
$morphy = GETPOST("morphy", 'alphanohtml');
|
||||
$login = GETPOST("login", 'alphanohtml');
|
||||
if ($morphy != 'mor' && empty($lastname)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
@@ -284,19 +282,19 @@ if (empty($reshook))
|
||||
$object->oldcopy = clone $object;
|
||||
|
||||
// Change values
|
||||
$object->civility_id = trim(GETPOST("civility_id", 'alpha'));
|
||||
$object->firstname = trim(GETPOST("firstname", 'alpha'));
|
||||
$object->lastname = trim(GETPOST("lastname", 'alpha'));
|
||||
$object->gender = trim(GETPOST("gender", 'alpha'));
|
||||
$object->civility_id = trim(GETPOST("civility_id", 'alphanohtml'));
|
||||
$object->firstname = trim(GETPOST("firstname", 'alphanohtml'));
|
||||
$object->lastname = trim(GETPOST("lastname", 'alphanohtml'));
|
||||
$object->gender = trim(GETPOST("gender", 'alphanohtml'));
|
||||
$object->login = trim(GETPOST("login", 'alpha'));
|
||||
$object->pass = trim(GETPOST("pass", 'alpha'));
|
||||
|
||||
$object->societe = trim(GETPOST("societe", 'alpha')); // deprecated
|
||||
$object->company = trim(GETPOST("societe", 'alpha'));
|
||||
$object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated
|
||||
$object->company = trim(GETPOST("societe", 'alphanohtml'));
|
||||
|
||||
$object->address = trim(GETPOST("address", 'alpha'));
|
||||
$object->zip = trim(GETPOST("zipcode", 'alpha'));
|
||||
$object->town = trim(GETPOST("town", 'alpha'));
|
||||
$object->address = trim(GETPOST("address", 'alphanohtml'));
|
||||
$object->zip = trim(GETPOST("zipcode", 'alphanohtml'));
|
||||
$object->town = trim(GETPOST("town", 'alphanohtml'));
|
||||
$object->state_id = GETPOST("state_id", 'int');
|
||||
$object->country_id = GETPOST("country_id", 'int');
|
||||
|
||||
@@ -442,14 +440,14 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
$typeid = GETPOST("typeid", 'int');
|
||||
$civility_id = GETPOST("civility_id", 'alpha');
|
||||
$lastname = GETPOST("lastname", 'alpha');
|
||||
$firstname = GETPOST("firstname", 'alpha');
|
||||
$gender = GETPOST("gender", 'alpha');
|
||||
$societe = GETPOST("societe", 'alpha');
|
||||
$address = GETPOST("address", 'alpha');
|
||||
$zip = GETPOST("zipcode", 'alpha');
|
||||
$town = GETPOST("town", 'alpha');
|
||||
$civility_id = GETPOST("civility_id", 'alphanohtml');
|
||||
$lastname = GETPOST("lastname", 'alphanohtml');
|
||||
$firstname = GETPOST("firstname", 'alphanohtml');
|
||||
$gender = GETPOST("gender", 'alphanohtml');
|
||||
$societe = GETPOST("societe", 'alphanohtml');
|
||||
$address = GETPOST("address", 'alphanohtml');
|
||||
$zip = GETPOST("zipcode", 'alphanohtml');
|
||||
$town = GETPOST("town", 'alphanohtml');
|
||||
$state_id = GETPOST("state_id", 'int');
|
||||
$country_id = GETPOST("country_id", 'int');
|
||||
|
||||
@@ -465,9 +463,8 @@ if (empty($reshook))
|
||||
$pass = GETPOST("password", 'alpha');
|
||||
$photo = GETPOST("photo", 'alpha');
|
||||
//$comment=GETPOST("comment",'none');
|
||||
$morphy = GETPOST("morphy", 'alpha');
|
||||
$subscription = GETPOST("subscription", 'alpha');
|
||||
$public = GETPOST("public", 'alpha');
|
||||
$morphy = GETPOST("morphy", 'alphanohtml');
|
||||
$public = GETPOST("public", 'alphanohtml');
|
||||
|
||||
$userid = GETPOST("userid", 'int');
|
||||
$socid = GETPOST("socid", 'int');
|
||||
@@ -976,7 +973,7 @@ else
|
||||
print "</td>\n";
|
||||
|
||||
// Company
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOST('societe', 'alpha') ?GETPOST('societe', 'alpha') : $object->company).'"></td></tr>';
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET('societe') ? GETPOST('societe', 'alphanohtml') : $object->company).'"></td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
@@ -984,39 +981,39 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOST('lastname', 'alpha') ?GETPOST('lastname', 'alpha') : $object->lastname).'"></td>';
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('lastname') ? GETPOST('lastname', 'alphanohtml') : $object->lastname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOST('firstname', 'alpha') ?GETPOST('firstname', 'alpha') : $object->firstname).'"></td>';
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET('firstname') ? GETPOST('firstname', 'alphanohtml') : $object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Gender
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||
print '<td>';
|
||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||
print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
|
||||
print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOST('member_email', 'alpha') ?GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_email').' '.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td><td><input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address', 'alphanohtml') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOSTISSET('address') ?GETPOST('address', 'alphanohtml') : $object->address).'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||
print $formcompany->select_ziptown((GETPOST('zipcode', 'alphanohtml') ?GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print ' ';
|
||||
print $formcompany->select_ziptown((GETPOST('town', 'alphanohtml') ?GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print $formcompany->select_ziptown((GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
$object->country_id = $object->country_id ? $object->country_id : $mysoc->country_id;
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
||||
print $form->select_country(GETPOST('country_id', 'alpha') ?GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
||||
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'alpha') : $object->country_id, 'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -1026,7 +1023,7 @@ else
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||
if ($object->country_id)
|
||||
{
|
||||
print $formcompany->select_state(GETPOST('state_id', 'int') ?GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
||||
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1036,18 +1033,18 @@ else
|
||||
}
|
||||
|
||||
// Pro phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOST('phone', 'alpha') ?GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td></tr>';
|
||||
|
||||
// Personal phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOST('phone_perso', 'alpha') ?GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET('phone_perso') ? GETPOST('phone_perso', 'alpha') : $object->phone_perso).'"></td></tr>';
|
||||
|
||||
// Mobile phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile', 'alpha') ?GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET('phone_mobile') ? GETPOST('phone_mobile', 'alpha') : $object->phone_mobile).'"></td></tr>';
|
||||
|
||||
if (!empty($conf->socialnetworks->enabled)) {
|
||||
foreach ($socialnetworks as $key => $value) {
|
||||
if (!$value['active']) break;
|
||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOST('member_'.$key, 'alpha') ?GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="member_'.$key.'" size="40" value="'.(GETPOSTISSET('member_'.$key) ? GETPOST('member_'.$key, 'alpha') : $object->socialnetworks[$key]).'"></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1196,14 +1193,14 @@ else
|
||||
$morphys["phy"] = $langs->trans("Physical");
|
||||
$morphys["mor"] = $langs->trans("Moral");
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
|
||||
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ?GETPOST("morphy", 'alpha') : $object->morphy));
|
||||
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy));
|
||||
print "</td></tr>";
|
||||
|
||||
// Type
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ?GETPOST("typeid", 'int') : $object->typeid));
|
||||
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $object->typeid));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1213,27 +1210,27 @@ else
|
||||
print "</td></tr>";
|
||||
|
||||
// Company
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(isset($_POST["societe"]) ?GETPOST("societe", '', 2) : $object->company).'"></td></tr>';
|
||||
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
print $formcompany->select_civility(isset($_POST["civility_id"]) ? $_POST["civility_id"] : $object->civility_id)."\n";
|
||||
print $formcompany->select_civility(GETPOSTISSET("civility_id") ? GETPOST("civility_id", 'alpha') : $object->civility_id)."\n";
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Lastname
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(isset($_POST["lastname"]) ?GETPOST("lastname", '', 2) : $object->lastname).'"></td>';
|
||||
print '<tr><td id="tdlastname">'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("lastname") ? GETPOST("lastname", 'alphanohtml', 2) : $object->lastname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(isset($_POST["firstname"]) ?GETPOST("firstname", '', 3) : $object->firstname).'"></td>';
|
||||
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" class="minwidth300" maxlength="50" value="'.(GETPOSTISSET("firstname") ? GETPOST("firstname", 'alphanohtml', 3) : $object->firstname).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Gender
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||
print '<td>';
|
||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
|
||||
print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Photo
|
||||
@@ -1256,14 +1253,14 @@ else
|
||||
|
||||
// Address
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(isset($_POST["address"]) ?GETPOST("address", '', 2) : $object->address).'</textarea>';
|
||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_2.'">'.(GETPOSTISSET("address") ? GETPOST("address", 'alphanohtml', 2) : $object->address).'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||
print $formcompany->select_ziptown((isset($_POST["zipcode"]) ?GETPOST("zipcode", '', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode", 'alphanohtml', 2) : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print ' ';
|
||||
print $formcompany->select_ziptown((isset($_POST["town"]) ?GETPOST("town", '', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town", 'alphanohtml', 2) : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
@@ -1282,18 +1279,18 @@ else
|
||||
}
|
||||
|
||||
// Pro phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"]) ?GETPOST("phone") : $object->phone).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(GETPOSTISSET("phone") ? GETPOST("phone") : $object->phone).'"></td></tr>';
|
||||
|
||||
// Personal phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"]) ?GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning').' '.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(GETPOSTISSET("phone_perso") ? GETPOST("phone_perso") : $object->phone_perso).'"></td></tr>';
|
||||
|
||||
// Mobile phone
|
||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"]) ?GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
||||
print '<tr><td>'.img_picto('', 'object_phoning_mobile').' '.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOSTISSET("phone_mobile") ? GETPOST("phone_mobile") : $object->phone_mobile).'"></td></tr>';
|
||||
|
||||
if (!empty($conf->socialnetworks->enabled)) {
|
||||
foreach ($socialnetworks as $key => $value) {
|
||||
if (!$value['active']) break;
|
||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(isset($_POST[$key]) ?GETPOST($key) : $object->socialnetworks[$key]).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans($value['label']).'</td><td><input type="text" name="'.$key.'" class="minwidth100" value="'.(GETPOSTISSET($key) ? GETPOST($key, 'alphanohtml') : $object->socialnetworks[$key]).'"></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,7 +1301,7 @@ else
|
||||
|
||||
// Public profil
|
||||
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
||||
print $form->selectyesno("public", (isset($_POST["public"]) ?GETPOST("public", '', 2) : $object->public), 1);
|
||||
print $form->selectyesno("public", (GETPOSTISSET("public") ? GETPOST("public", 'alphanohtml', 2) : $object->public), 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Categories
|
||||
@@ -1773,8 +1770,10 @@ else
|
||||
if ($action != 'editlogin' && $action != 'editthirdparty')
|
||||
{
|
||||
// Send
|
||||
if ($object->statut == 1) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut == 1) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Send card by email
|
||||
|
||||
@@ -259,7 +259,7 @@ print '<br>';
|
||||
|
||||
print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="foruserid" value="all">';
|
||||
print '<input type="hidden" name="mode" value="card">';
|
||||
print '<input type="hidden" name="action" value="builddoc">';
|
||||
@@ -279,7 +279,7 @@ print '<br><br>';
|
||||
|
||||
print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE?$conf->global->ADHERENT_CARD_TYPE:$langs->transnoentitiesnoconv("None"))).' ';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="mode" value="cardlogin">';
|
||||
print '<input type="hidden" name="action" value="builddoc">';
|
||||
print $langs->trans("DescADHERENT_CARD_TYPE").' ';
|
||||
@@ -299,7 +299,7 @@ print '<br><br>';
|
||||
|
||||
print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' ';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="mode" value="label">';
|
||||
print '<input type="hidden" name="action" value="builddoc">';
|
||||
print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' ';
|
||||
|
||||
@@ -1376,48 +1376,49 @@ class Adherent extends CommonObject
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
|
||||
$sql = "SELECT c.rowid, c.fk_adherent, c.subscription, c.note, c.fk_bank,";
|
||||
$sql.= " c.tms as datem,";
|
||||
$sql.= " c.datec as datec,";
|
||||
$sql.= " c.dateadh as dateh,";
|
||||
$sql.= " c.datef as datef";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."subscription as c";
|
||||
$sql.= " WHERE c.fk_adherent = ".$this->id;
|
||||
$sql.= " ORDER BY c.dateadh";
|
||||
$sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,";
|
||||
$sql .= " c.tms as datem,";
|
||||
$sql .= " c.datec as datec,";
|
||||
$sql .= " c.dateadh as dateh,";
|
||||
$sql .= " c.datef as datef";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."subscription as c";
|
||||
$sql .= " WHERE c.fk_adherent = ".$this->id;
|
||||
$sql .= " ORDER BY c.dateadh";
|
||||
dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG);
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$this->subscriptions=array();
|
||||
$this->subscriptions = array();
|
||||
|
||||
$i=0;
|
||||
$i = 0;
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
if ($i==0)
|
||||
if ($i == 0)
|
||||
{
|
||||
$this->first_subscription_date=$this->db->jdate($obj->datec);
|
||||
$this->first_subscription_date_start=$this->db->jdate($obj->dateh);
|
||||
$this->first_subscription_date_end=$this->db->jdate($obj->datef);
|
||||
$this->first_subscription_amount=$obj->subscription;
|
||||
$this->first_subscription_date = $this->db->jdate($obj->datec);
|
||||
$this->first_subscription_date_start = $this->db->jdate($obj->dateh);
|
||||
$this->first_subscription_date_end = $this->db->jdate($obj->datef);
|
||||
$this->first_subscription_amount = $obj->subscription;
|
||||
}
|
||||
$this->last_subscription_date=$this->db->jdate($obj->datec);
|
||||
$this->last_subscription_date_start=$this->db->jdate($obj->datef);
|
||||
$this->last_subscription_date_end=$this->db->jdate($obj->datef);
|
||||
$this->last_subscription_amount=$obj->subscription;
|
||||
$this->last_subscription_date = $this->db->jdate($obj->datec);
|
||||
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
|
||||
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
|
||||
$this->last_subscription_amount = $obj->subscription;
|
||||
|
||||
$subscription=new Subscription($this->db);
|
||||
$subscription->id=$obj->rowid;
|
||||
$subscription->fk_adherent=$obj->fk_adherent;
|
||||
$subscription->amount=$obj->subscription;
|
||||
$subscription->note=$obj->note;
|
||||
$subscription->fk_bank=$obj->fk_bank;
|
||||
$subscription->datem=$this->db->jdate($obj->datem);
|
||||
$subscription->datec=$this->db->jdate($obj->datec);
|
||||
$subscription->dateh=$this->db->jdate($obj->dateh);
|
||||
$subscription->datef=$this->db->jdate($obj->datef);
|
||||
$subscription = new Subscription($this->db);
|
||||
$subscription->id = $obj->rowid;
|
||||
$subscription->fk_adherent = $obj->fk_adherent;
|
||||
$subscription->fk_type = $obj->fk_type;
|
||||
$subscription->amount = $obj->subscription;
|
||||
$subscription->note = $obj->note;
|
||||
$subscription->fk_bank = $obj->fk_bank;
|
||||
$subscription->datem = $this->db->jdate($obj->datem);
|
||||
$subscription->datec = $this->db->jdate($obj->datec);
|
||||
$subscription->dateh = $this->db->jdate($obj->dateh);
|
||||
$subscription->datef = $this->db->jdate($obj->datef);
|
||||
|
||||
$this->subscriptions[]=$subscription;
|
||||
$this->subscriptions[] = $subscription;
|
||||
|
||||
$i++;
|
||||
}
|
||||
@@ -1425,7 +1426,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error().' sql='.$sql;
|
||||
$this->error = $this->db->error().' sql='.$sql;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -2281,7 +2282,7 @@ class Adherent extends CommonObject
|
||||
$sql.= " WHERE a.fk_adherent_type = t.rowid";
|
||||
$sql.= " AND a.statut = 1";
|
||||
$sql.= " AND a.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)";
|
||||
$sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = '1')";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@@ -52,6 +52,7 @@ $search_lastname = GETPOST("search_lastname", 'alpha');
|
||||
$search_firstname = GETPOST("search_firstname", 'alpha');
|
||||
$search_gender = GETPOST("search_gender", 'alpha');
|
||||
$search_civility = GETPOST("search_civility", 'alpha');
|
||||
$search_company = GETPOST('search_company', 'alphanohtml');
|
||||
$search_login = GETPOST("search_login", 'alpha');
|
||||
$search_address = GETPOST("search_address", 'alpha');
|
||||
$search_zip = GETPOST("search_zip", 'alpha');
|
||||
@@ -254,6 +255,7 @@ $sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.gender, d.societe as
|
||||
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
|
||||
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,";
|
||||
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
|
||||
$sql .= " s.nom,";
|
||||
$sql .= " t.libelle as type, t.subscription,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
// Add fields from extrafields
|
||||
@@ -269,6 +271,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
|
||||
if (!empty($search_categ) || !empty($catid)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_member as cm ON d.rowid = cm.fk_member"; // We need this table joined to the select in order to filter by categ
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = d.country)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = d.state_id)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on (s.rowid = d.fk_soc)";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
$sql .= " WHERE d.fk_adherent_type = t.rowid ";
|
||||
if ($catid > 0) $sql .= " AND cm.fk_categorie = ".$db->escape($catid);
|
||||
@@ -289,6 +292,7 @@ if ($search_firstname) $sql .= natural_search("d.firstname", $search_firstname);
|
||||
if ($search_lastname) $sql .= natural_search(array("d.firstname", "d.lastname", "d.societe"), $search_lastname);
|
||||
if ($search_gender != '' && $search_gender != '-1') $sql .= " AND d.gender = '".$search_gender."'";
|
||||
if ($search_login) $sql .= natural_search("d.login", $search_login);
|
||||
if ($search_company) $sql .= natural_search("s.nom", $search_company);
|
||||
if ($search_email) $sql .= natural_search("d.email", $search_email);
|
||||
if ($search_town) $sql .= natural_search("d.town", $search_town);
|
||||
if ($search_zip) $sql .= natural_search("d.zip", $search_zip);
|
||||
@@ -868,7 +872,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@@ -75,7 +75,7 @@ if ($id)
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'rowid', $linkback);
|
||||
dol_banner_tab($object, 'id', $linkback);
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
|
||||
@@ -145,6 +145,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
// Show filter box
|
||||
/*print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Member").'</td><td>';
|
||||
|
||||
@@ -33,6 +33,7 @@ $langs->loadLangs(array("members", "companies"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
@@ -116,7 +117,6 @@ if (empty($reshook))
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search = "";
|
||||
$search_type = "";
|
||||
$search_ref = "";
|
||||
$search_lastname = "";
|
||||
@@ -338,7 +338,7 @@ if (!empty($arrayfields['t.libelle']['checked']))
|
||||
if (!empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth150');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ while ($i < min($num, $limit))
|
||||
// Type
|
||||
if (!empty($arrayfields['d.fk_type']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
if ($typeid > 0)
|
||||
{
|
||||
print $adht->getNomUrl(1);
|
||||
@@ -466,14 +466,14 @@ while ($i < min($num, $limit))
|
||||
// Firstname
|
||||
if (!empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td>'.$adherent->firstname.'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->firstname).'">'.$adherent->firstname.'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Login
|
||||
if (!empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td>'.$adherent->login.'</td>';
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($adherent->login).'">'.$adherent->login.'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ while ($i < min($num, $limit))
|
||||
// Banque
|
||||
if (!empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print '<td class="tdmaxoverflow150">';
|
||||
if ($obj->fk_account > 0)
|
||||
{
|
||||
$accountstatic->id = $obj->fk_account;
|
||||
@@ -524,7 +524,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@@ -605,7 +605,7 @@ if ($rowid > 0)
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input class="flat" type="hidden" name="rowid" value="'.$object->id.'" size="12"></td>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@@ -324,7 +324,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
print '<table class="noborder allwidth">'."\n";
|
||||
|
||||
@@ -180,7 +180,7 @@ $head=agenda_prepare_head();
|
||||
dol_fiche_head($head, 'reminders', $langs->trans("Agenda"), -1, 'action');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
print '<table class="noborder allwidth">'."\n";
|
||||
|
||||
@@ -66,7 +66,7 @@ llxHeader('', $langs->trans("ClickToDialSetup"), $wikihelp);
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ClickToDialSetup"), $linkback, 'title_setup');
|
||||
|
||||
print $langs->trans("ClickToDialDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("ClickToDialDesc")."</span><br>\n";
|
||||
|
||||
print '<br>';
|
||||
print '<form method="post" action="clicktodial.php">';
|
||||
@@ -119,7 +119,7 @@ if (! empty($conf->global->CLICKTODIAL_URL))
|
||||
if (GETPOST('phonefortest')) $phonefortest=GETPOST('phonefortest');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
print $langs->trans("LinkToTestClickToDial", $user->login).' : ';
|
||||
print '<input class="flat" type="text" name="phonefortest" value="'.dol_escape_htmltag($phonefortest).'">';
|
||||
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("RefreshPhoneLink")).'">';
|
||||
|
||||
@@ -192,7 +192,8 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == "setshippableiconinlist") {
|
||||
}
|
||||
elseif ($action == "setshippableiconinlist") {
|
||||
// Activate Set Shippable Icon In List
|
||||
$setshippableiconinlist = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
||||
@@ -203,6 +204,25 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
elseif ($action == 'setribchq')
|
||||
{
|
||||
$rib = GETPOST('rib', 'alpha');
|
||||
$chq = GETPOST('chq', 'alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate ask for payment bank
|
||||
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
||||
@@ -514,7 +534,122 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print "<br>";
|
||||
|
||||
|
||||
/*
|
||||
* Payment mode
|
||||
*/
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInOrder"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
$sql .= " AND courant = 1";
|
||||
$sql .= " AND entity IN (".getEntity('bank_account').")";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num > 0)
|
||||
{
|
||||
print '<select name="rib" class="flat" id="rib">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected' : '';
|
||||
print '>'.$row[1].'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</select>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<select class="flat" name="chq" id="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
|
||||
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
$sql .= " AND courant = 1";
|
||||
$sql .= " AND entity IN (".getEntity('bank_account').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected' : '';
|
||||
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</select>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Other options
|
||||
|
||||
@@ -408,7 +408,7 @@ print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans(
|
||||
|
||||
// Name
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM: GETPOST("nom", 'nohtml')) . '"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
|
||||
|
||||
// Addresse
|
||||
@@ -477,36 +477,36 @@ if (!empty($conf->barcode->enabled)) {
|
||||
|
||||
// Logo
|
||||
print '<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans("Logo"), 'png, jpg').'</label></td><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<div class="centpertent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
|
||||
print '<input type="file" class="flat minwidth200" name="logo" id="logo" accept="image/*">';
|
||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||
print '</div><div class="inline-block valignmiddle marginrightonly">';
|
||||
if (!empty($mysoc->logo_mini)) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
|
||||
print ' ';
|
||||
print '</div><div class="inline-block valignmiddle">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
|
||||
}
|
||||
} else {
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Logo (squarred)
|
||||
print '<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans("LogoSquarred"), 'png, jpg').'</label></td><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<div class="centpertent nobordernopadding valignmiddle"><div class="inline-block marginrightonly">';
|
||||
print '<input type="file" class="flat minwidth200" name="logo_squarred" id="logo_squarred" accept="image/*">';
|
||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||
print '</div><div class="inline-block valignmiddle marginrightonly">';
|
||||
if (!empty($mysoc->logo_squarred_mini)) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) {
|
||||
print ' ';
|
||||
print '</div><div class="inline-block valignmiddle marginrightonly">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini).'">';
|
||||
}
|
||||
} else {
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Note
|
||||
|
||||
@@ -38,6 +38,7 @@ if (!$user->admin) accessforbidden();
|
||||
|
||||
$id = GETPOST('rowid', 'int');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$optioncss = GETPOST('optionscss', 'alphanohtml');
|
||||
|
||||
$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'createform'; // 'createform', 'filters', 'sortorder', 'focus'
|
||||
|
||||
@@ -212,10 +213,10 @@ print "<br>\n";
|
||||
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||
if ($defaulturl) $param .= '&defaulturl='.urlencode($defaulturl);
|
||||
if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
|
||||
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
|
||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||
if ($defaulturl) $param .= '&defaulturl='.urlencode($defaulturl);
|
||||
if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
|
||||
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
|
||||
@@ -252,7 +253,7 @@ $texthelp = $langs->trans("PageUrlForDefaultValues");
|
||||
if ($mode == 'createform') $texthelp .= $langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php', 'societe/card.php?abc=val1&def=val2');
|
||||
else $texthelp .= $langs->trans("PageUrlForDefaultValuesList", 'societe/list.php', 'societe/list.php?abc=val1&def=val2');
|
||||
$texthelp .= '<br><br>'.$langs->trans("AlsoDefaultValuesAreEffectiveForActionCreate");
|
||||
$texturl = $form->textwithpicto($langs->trans("Url"), $texthelp);
|
||||
$texturl = $form->textwithpicto($langs->trans("RelativeURL"), $texthelp);
|
||||
print_liste_field_titre($texturl, $_SERVER["PHP_SELF"], 'page,param', '', $param, '', $sortfield, $sortorder);
|
||||
// Field
|
||||
$texthelp = $langs->trans("TheKeyIsTheNameOfHtmlField");
|
||||
|
||||
@@ -644,6 +644,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
||||
if ($value == 'dayrule' && empty($_POST['dayrule'])) continue;
|
||||
if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position'
|
||||
if ((!isset($_POST[$value]) || $_POST[$value] == '')
|
||||
&& (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking')) // Fields that are not mandatory
|
||||
@@ -753,20 +754,33 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$i = 0;
|
||||
foreach ($listfieldinsert as $f => $value)
|
||||
{
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if (empty($keycode)) $keycode = $value;
|
||||
|
||||
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
|
||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
||||
}
|
||||
elseif ($value == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) $sql .= ",";
|
||||
|
||||
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
|
||||
if ($keycode == 'sortorder') // For column name 'sortorder', we use the field name 'position'
|
||||
{
|
||||
$sql .= "'".(int) $db->escape(GETPOST('position'))."'";
|
||||
$sql .= "'".(int) GETPOST('position', 'int')."'";
|
||||
}
|
||||
elseif ($_POST[$listfieldvalue[$i]] == '' && !($listfieldvalue[$i] == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
|
||||
else $sql .= "'".$db->escape(GETPOST($listfieldvalue[$i], 'nohtml'))."'";
|
||||
elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
|
||||
elseif ($keycode == 'content') {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
||||
}
|
||||
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
}
|
||||
else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$sql .= ",1)";
|
||||
@@ -806,23 +820,36 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$i = 0;
|
||||
foreach ($listfieldmodify as $field)
|
||||
{
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if (empty($keycode)) $keycode = $field;
|
||||
|
||||
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
|
||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
||||
}
|
||||
elseif ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = getEntity($tabname[$id]);
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) $sql .= ",";
|
||||
$sql .= $field."=";
|
||||
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
|
||||
{
|
||||
$sql .= "'".(int) $db->escape($_POST['position'])."'";
|
||||
$sql .= (int) GETPOST('position', 'int');
|
||||
}
|
||||
elseif ($_POST[$listfieldvalue[$i]] == '' && !($listfieldvalue[$i] == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
|
||||
else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'";
|
||||
elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
|
||||
elseif ($keycode == 'content') {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
||||
}
|
||||
elseif (in_array($keycode, array('private', 'position', 'scale'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
}
|
||||
else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$sql .= " WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
|
||||
$sql .= " WHERE ".$rowidcol." = ".(int) $db->escape($rowid);
|
||||
if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'";
|
||||
|
||||
dol_syslog("actionmodify", LOG_DEBUG);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Oscss-Shop <support@oscss-shop.fr>.
|
||||
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modifyion 2.0 (the "License");
|
||||
* it under the terms of the GNU General Public License as published bypliance with the License.
|
||||
@@ -17,6 +18,9 @@
|
||||
*/
|
||||
|
||||
if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1);
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -479,7 +479,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@@ -640,7 +640,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
|
||||
}
|
||||
|
||||
/*
|
||||
* Modes de reglement
|
||||
* Payment modes
|
||||
*/
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"), '', '');
|
||||
|
||||
@@ -185,7 +185,7 @@ else
|
||||
print '<br>'."\n";
|
||||
|
||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
|
||||
// Skins
|
||||
show_skin(null, 1);
|
||||
|
||||
@@ -58,6 +58,13 @@ if (GETPOST('cancel', 'alpha'))
|
||||
$action='';
|
||||
}
|
||||
|
||||
// Convert action set_XXX and del_XXX to set var (this is used when no javascript on for ajax_constantonoff)
|
||||
$regs = array();
|
||||
if (preg_match('/^(set|del)_([A-Z_]+)$/', $action, $regs)) {
|
||||
if ($regs[1] == 'set') dolibarr_set_const($db, $regs[2], 1, 'chaine', 0, '', $conf->entity);
|
||||
else dolibarr_del_const($db, $regs[2], $conf->entity);
|
||||
}
|
||||
|
||||
if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACKGROUND))
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity);
|
||||
@@ -81,15 +88,15 @@ if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACK
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["MAIN_LANG_DEFAULT"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);
|
||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
||||
|
||||
$val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
||||
@@ -141,25 +148,27 @@ if ($action == 'update')
|
||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
|
||||
else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["MAIN_DISABLE_JAVASCRIPT"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"], 'chaine', 0, '', 0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"], 'chaine', 0, '', 0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"], 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", GETPOST("MAIN_SHOW_LOGO", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST('MAIN_BUGTRACK_ENABLELINK', 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
|
||||
if ($_FILES[$varforimage]["tmp_name"])
|
||||
{
|
||||
$reg = array();
|
||||
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg))
|
||||
{
|
||||
$original_file=$reg[1];
|
||||
@@ -247,7 +256,7 @@ print '</tr>';
|
||||
|
||||
// Multilingual GUI
|
||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||
print $form->selectyesno('MAIN_MULTILANGS', $conf->global->MAIN_MULTILANGS, 1);
|
||||
print ajax_constantonoff("MAIN_MULTILANGS");
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
@@ -266,7 +275,7 @@ print '</tr>';
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1);
|
||||
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT");
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -23,7 +23,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/ldap.php
|
||||
* \ingroup ldap
|
||||
* \brief Page d'administration/configuration du module Ldap
|
||||
* \brief Page to setup module LDAP
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@@ -57,19 +57,19 @@ if (empty($reshook))
|
||||
$error=0;
|
||||
|
||||
$db->begin();
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@@ -99,6 +99,7 @@ $triggersendname = ''; // Disable triggers
|
||||
$paramname = 'id';
|
||||
$mode = 'emailfortest';
|
||||
$trackid = (($action == 'testhtml') ? "testhtml" : "test");
|
||||
$sendcontext='';
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||
|
||||
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') $action = 'test';
|
||||
@@ -791,7 +792,7 @@ else
|
||||
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mail = new CMailFile('', '', '', '');
|
||||
$mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext);
|
||||
$result = $mail->check_server_port($server, $port);
|
||||
if ($result) print '<div class="ok">'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'</div>';
|
||||
else
|
||||
|
||||
@@ -535,8 +535,9 @@ else
|
||||
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mail = new CMailFile('', '', '', '');
|
||||
$result=$mail->check_server_port($server, $port);
|
||||
$mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext);
|
||||
|
||||
$result = $mail->check_server_port($server, $port);
|
||||
if ($result) print '<div class="ok">'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'</div>';
|
||||
else
|
||||
{
|
||||
|
||||
@@ -58,6 +58,8 @@ $search_topic = GETPOST('search_topic', 'alpha');
|
||||
|
||||
if (!empty($user->socid)) accessforbidden();
|
||||
|
||||
$acts = array();
|
||||
$actl = array();
|
||||
$acts[0] = "activate";
|
||||
$acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
@@ -166,6 +168,7 @@ if ($conf->societe->enabled) $elementList['thirdparty'] = $langs->tran
|
||||
if ($conf->adherent->enabled) $elementList['member'] = $langs->trans('MailToMember');
|
||||
if ($conf->contrat->enabled) $elementList['contract'] = $langs->trans('MailToSendContract');
|
||||
if ($conf->projet->enabled) $elementList['project'] = $langs->trans('MailToProject');
|
||||
if ($conf->ticket->enabled) $elementList['ticket_send'] = $langs->trans('MailToTicket');
|
||||
$elementList['user'] = $langs->trans('MailToUser');
|
||||
|
||||
$parameters = array('elementList'=>$elementList);
|
||||
@@ -261,28 +264,39 @@ if (empty($reshook))
|
||||
$i = 0;
|
||||
foreach ($listfieldinsert as $f => $value)
|
||||
{
|
||||
//var_dump($i.' - '.$listfieldvalue[$i].' - '.$_POST[$listfieldvalue[$i]].' - '.$value);
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if ($value == 'label') $_POST[$keycode] = dol_escape_htmltag($_POST[$keycode]);
|
||||
if ($value == 'lang') $keycode = 'langcode';
|
||||
if (empty($keycode)) $keycode = $value;
|
||||
|
||||
if ($value == 'entity') $_POST[$keycode] = $conf->entity;
|
||||
if ($i) $sql .= ",";
|
||||
if ($value == 'fk_user' && !($_POST[$keycode] > 0)) $_POST[$keycode] = '';
|
||||
if ($value == 'private' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '0';
|
||||
if ($value == 'position' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '1';
|
||||
if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql .= "null"; // lang must be '' if not defined so the unique key that include lang will work
|
||||
elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql .= "''"; // lang must be '' if not defined so the unique key that include lang will work
|
||||
else $sql .= "'".$db->escape($_POST[$keycode])."'";
|
||||
//var_dump($keycode.' '.$value);
|
||||
|
||||
if ($i) $sql .= ", ";
|
||||
if (GETPOST($keycode) == '' && $keycode != 'langcode') $sql .= "null"; // langcode must be '' if not defined so the unique key that include lang will work
|
||||
elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work
|
||||
elseif ($keycode == 'content') {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
||||
}
|
||||
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
}
|
||||
else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$sql .= ",1)";
|
||||
$sql .= ", 1)";
|
||||
|
||||
dol_syslog("actionadd", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
||||
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
|
||||
$_POST = array('id'=>$id); // Clean $_POST array, we keep only id
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -308,6 +322,7 @@ if (empty($reshook))
|
||||
{
|
||||
$keycode = $listfieldvalue[$i];
|
||||
if ($field == 'lang') $keycode = 'langcode';
|
||||
if (empty($keycode)) $keycode = $field;
|
||||
|
||||
if ($field == 'fk_user' && !($_POST['fk_user'] > 0)) $_POST['fk_user'] = '';
|
||||
if ($field == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid];
|
||||
@@ -315,15 +330,22 @@ if (empty($reshook))
|
||||
if ($field == 'content') $_POST['content'] = $_POST['content-'.$rowid];
|
||||
if ($field == 'content_lines') $_POST['content_lines'] = $_POST['content_lines-'.$rowid];
|
||||
if ($field == 'entity') $_POST[$keycode] = $conf->entity;
|
||||
if ($i) $sql .= ",";
|
||||
|
||||
if ($i) $sql .= ", ";
|
||||
$sql .= $field."=";
|
||||
|
||||
//print $keycode.' - '.$_POST[$keycode].'<br>';
|
||||
if ($_POST[$keycode] == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && empty($_POST[$keycode]))) $sql .= "null"; // lang must be '' if not defined so the unique key that include lang will work
|
||||
elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql .= "''"; // lang must be '' if not defined so the unique key that include lang will work
|
||||
elseif ($keycode == 'private') $sql .= ((int) $_POST[$keycode]); // private must be 0 or 1
|
||||
elseif ($keycode == 'position') $sql .= ((int) $_POST[$keycode]);
|
||||
else $sql .= "'".$db->escape($_POST[$keycode])."'";
|
||||
if (GETPOST($keycode) == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && ! GETPOST($keycode))) $sql .= "null"; // langcode,... must be '' if not defined so the unique key that include lang will work
|
||||
elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work
|
||||
elseif ($keycode == 'content') {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
||||
}
|
||||
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
||||
$sql .= (int) GETPOST($keycode, 'int');
|
||||
}
|
||||
else {
|
||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$sql .= " WHERE ".$rowidcol." = '".$rowid."'";
|
||||
|
||||
@@ -118,6 +118,7 @@ if ($action == 'install')
|
||||
|
||||
// $original_file should match format module_modulename-x.y[.z].zip
|
||||
$original_file = basename($_FILES["fileinstall"]["name"]);
|
||||
$original_file = preg_replace('/\(\d+\)\.zip$/i', '.zip', $original_file);
|
||||
$newfile = $conf->admin->dir_temp.'/'.$original_file.'/'.$original_file;
|
||||
|
||||
if (!$original_file)
|
||||
@@ -930,7 +931,7 @@ if ($mode == 'marketplace')
|
||||
|
||||
?>
|
||||
<form method="POST" class="centpercent" id="searchFormList" action="<?php echo $dolistore->url ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken'] ?>">
|
||||
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
|
||||
<input type="hidden" name="mode" value="marketplace">
|
||||
<div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>:
|
||||
<input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br>
|
||||
|
||||
@@ -512,29 +512,35 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
/*
|
||||
* Payment mode
|
||||
*/
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
$sql = "SELECT rowid, label";
|
||||
@@ -571,13 +577,19 @@ if (empty($conf->facture->enabled))
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("BankModuleNotActive");
|
||||
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<select class="flat" name="chq" id="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
|
||||
@@ -605,10 +617,14 @@ if (empty($conf->facture->enabled))
|
||||
}
|
||||
}
|
||||
print "</select>";
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ dol_fiche_end();
|
||||
|
||||
print load_fiche_titre($langs->trans("TicketNumberingModules"));
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||
@@ -287,7 +288,9 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
}
|
||||
|
||||
print '</table><br>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
if (!$conf->use_javascript_ajax) {
|
||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||
|
||||
@@ -167,7 +167,7 @@ $head = ticketAdminPrepareHead();
|
||||
|
||||
dol_fiche_head($head, 'public', $langs->trans("Module56000Name"), -1, "ticket");
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a href="'.dol_buildpath('/public/ticket/index.php', 1).'" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span> : <a class="wordbreak" href="'.dol_buildpath('/public/ticket/index.php', 1).'" target="_blank" >'.dol_buildpath('/public/ticket/index.php', 2).'</a>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -176,14 +176,14 @@ $enabledisablehtml = $langs->trans("TicketsActivatePublicInterface").' ';
|
||||
if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
{
|
||||
// Button off, click to enable
|
||||
$enabledisablehtml .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=1'.$param.'">';
|
||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=1'.$param.'">';
|
||||
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
$enabledisablehtml .= '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Button on, click to disable
|
||||
$enabledisablehtml .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=0'.$param.'">';
|
||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setTICKET_ENABLE_PUBLIC_INTERFACE&value=0'.$param.'">';
|
||||
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
|
||||
$enabledisablehtml .= '</a>';
|
||||
}
|
||||
@@ -200,6 +200,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
print '<input type="hidden" name="action" value="setvarother">';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td>';
|
||||
print '<td class="left">';
|
||||
@@ -279,7 +280,9 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table><br>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
if (!$conf->use_javascript_ajax) {
|
||||
print '</form>';
|
||||
@@ -288,6 +291,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
// Admin var of module
|
||||
print load_fiche_titre($langs->trans("TicketParamMail"));
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||
@@ -369,13 +373,14 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
$url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE;
|
||||
print '<tr><td>'.$langs->trans("TicketUrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'" size="40" ></td>';
|
||||
print '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'"></td>';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
|
||||
|
||||
@@ -200,7 +200,6 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" />';
|
||||
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
|
||||
|
||||
@@ -137,6 +137,15 @@ class DolibarrApi
|
||||
unset($object->labelStatus);
|
||||
unset($object->labelStatusShort);
|
||||
|
||||
unset($object->stats_propale);
|
||||
unset($object->stats_commande);
|
||||
unset($object->stats_contrat);
|
||||
unset($object->stats_facture);
|
||||
unset($object->stats_commande_fournisseur);
|
||||
unset($object->stats_reception);
|
||||
unset($object->stats_mrptoconsume);
|
||||
unset($object->stats_mrptoproduce);
|
||||
|
||||
unset($object->element);
|
||||
unset($object->fk_element);
|
||||
unset($object->table_element);
|
||||
|
||||
@@ -230,7 +230,7 @@ class Documents extends DolibarrApi
|
||||
/**
|
||||
* Return the list of documents of a dedicated element (from its ID or Ref)
|
||||
*
|
||||
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'shipment', 'project', ...)
|
||||
* @param string $modulepart Name of module or area concerned ('thirdparty', 'member', 'proposal', 'order', 'invoice', 'supplier_invoice', 'shipment', 'project', ...)
|
||||
* @param int $id ID of element
|
||||
* @param string $ref Ref of element
|
||||
* @param string $sortfield Sort criteria ('','fullname','relativename','name','date','size')
|
||||
@@ -355,6 +355,24 @@ class Documents extends DolibarrApi
|
||||
|
||||
$upload_dir = $conf->facture->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'invoice');
|
||||
}
|
||||
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
||||
{
|
||||
$modulepart = 'supplier_invoice';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
$object = new FactureFournisseur($this->db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Invoice not found');
|
||||
}
|
||||
|
||||
$upload_dir = $conf->fournisseur->dir_output."/facture/".get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
elseif ($modulepart == 'produit' || $modulepart == 'product')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
@@ -387,6 +405,22 @@ class Documents extends DolibarrApi
|
||||
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
elseif ($modulepart == 'expensereport')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
|
||||
if (!DolibarrApiAccess::$user->rights->expensereport->read && !DolibarrApiAccess::$user->rights->expensereport->read) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
$object = new ExpenseReport($this->db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Expense report not found');
|
||||
}
|
||||
|
||||
$upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');
|
||||
@@ -418,8 +452,9 @@ class Documents extends DolibarrApi
|
||||
/**
|
||||
* Upload a file.
|
||||
*
|
||||
* Test sample 1: { "filename": "mynewfile.txt", "modulepart": "facture", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
||||
* Test sample 2: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
|
||||
* Test sample for invoice: { "filename": "mynewfile.txt", "modulepart": "invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
||||
* Test sample for supplier invoice: { "filename": "mynewfile.txt", "modulepart": "supplier_invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
||||
* Test sample for medias file: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
|
||||
*
|
||||
* @param string $filename Name of file to create ('FA1705-0123.txt')
|
||||
* @param string $modulepart Name of module or area concerned by file upload ('facture', 'project', 'project_task', ...)
|
||||
@@ -476,6 +511,13 @@ class Documents extends DolibarrApi
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$object = new Facture($this->db);
|
||||
}
|
||||
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
||||
{
|
||||
$modulepart = 'supplier_invoice';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$object = new FactureFournisseur($this->db);
|
||||
}
|
||||
elseif ($modulepart == 'project')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
@@ -510,6 +552,11 @@ class Documents extends DolibarrApi
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$object = new Product($this->db);
|
||||
}
|
||||
elseif ($modulepart == 'expensereport')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
$object = new ExpenseReport($this->db);
|
||||
}
|
||||
// TODO Implement additional moduleparts
|
||||
else
|
||||
{
|
||||
@@ -535,6 +582,12 @@ class Documents extends DolibarrApi
|
||||
throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found.");
|
||||
}
|
||||
|
||||
// Special cases that need to use get_exdir to get real dir of object
|
||||
// If future, all object should use this to define path of documents.
|
||||
if ($modulepart == 'supplier_invoice') {
|
||||
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
|
||||
}
|
||||
|
||||
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref);
|
||||
|
||||
$tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write');
|
||||
|
||||
@@ -281,7 +281,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Send
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
|
||||
if (empty($user->socid)) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
|
||||
}
|
||||
|
||||
if ($user->rights->asset->write)
|
||||
{
|
||||
|
||||
@@ -459,7 +459,7 @@ while ($i < min($num, $limit))
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
|
||||
@@ -278,6 +278,7 @@ dol_htmloutput_errors($mesg);
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="mode" value="label">';
|
||||
print '<input type="hidden" name="action" value="builddoc">';
|
||||
print '<input type="hidden" name="token" value="'.newtoken().'">';
|
||||
|
||||
print '<div class="tagtable">';
|
||||
|
||||
|
||||
@@ -546,7 +546,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
||||
<input type="hidden" name="token" value="' . newToken().'">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="' . $object->id.'">
|
||||
@@ -601,7 +601,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Send
|
||||
//print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
|
||||
//if (empty($user->socid)) {
|
||||
// print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
|
||||
//}
|
||||
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
|
||||
@@ -482,7 +482,7 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
|
||||
// Fields title search
|
||||
@@ -502,7 +502,7 @@ foreach ($object->fields as $key => $val)
|
||||
elseif (strpos($val['type'], 'integer:') === 0) {
|
||||
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1);
|
||||
}
|
||||
elseif (! preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
@@ -582,6 +582,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
||||
elseif ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||
|
||||
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||
if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
|
||||
|
||||
if (!empty($arrayfields['t.'.$key]['checked']))
|
||||
{
|
||||
|
||||
@@ -34,6 +34,7 @@ function printBookmarksList()
|
||||
|
||||
if (! empty($conf->use_javascript_ajax)) { // Bookmark autosubmit can't work when javascript is off.
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
||||
if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5;
|
||||
|
||||
$langs->load("bookmarks");
|
||||
|
||||
@@ -226,7 +226,7 @@ class Categories extends DolibarrApi
|
||||
throw new RestException(404, 'category not found');
|
||||
}
|
||||
|
||||
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ class Categories extends DolibarrApi
|
||||
throw new RestException(404, 'category not found');
|
||||
}
|
||||
|
||||
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ class Categories extends DolibarrApi
|
||||
throw new RestException(404, 'category not found');
|
||||
}
|
||||
|
||||
if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||
if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
|
||||
@@ -966,6 +966,7 @@ class Categorie extends CommonObject
|
||||
// phpcs:enable
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql .= " WHERE fk_parent = ".$this->id;
|
||||
$sql .= " AND entity IN (".getEntity('category').")";
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
|
||||
@@ -831,7 +831,7 @@ if ($action == 'create')
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="donotclearsession" value="1">';
|
||||
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.dol_getIdFromCode($db, 'AC_OTH', 'c_actioncomm').'">';
|
||||
|
||||
if (GETPOST("actioncode", 'aZ09') == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
|
||||
@@ -1053,7 +1053,7 @@ if ($action == 'create')
|
||||
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
$urloption = '?action=create';
|
||||
$urloption = '?action=create&donotclearsession=1';
|
||||
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
|
||||
|
||||
// update task list
|
||||
@@ -1232,7 +1232,7 @@ if ($id > 0)
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '<input type="hidden" name="ref_ext" value="'.$object->ref_ext.'">';
|
||||
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : htmlentities($_SERVER["HTTP_REFERER"])).'">';
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("Action"), 0, 'action');
|
||||
@@ -1473,7 +1473,7 @@ if ($id > 0)
|
||||
{
|
||||
print '<td id="project-task-input-container" >';
|
||||
|
||||
$urloption = '?action=create'; // we use create not edit for more flexibility
|
||||
$urloption = '?action=create&donotclearsession=1'; // we use create not edit for more flexibility
|
||||
$url = DOL_URL_ROOT.'/comm/action/card.php'.$urloption;
|
||||
|
||||
// update task list
|
||||
|
||||
@@ -681,6 +681,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
$sql = "SELECT a.id,";
|
||||
$sql .= " a.id as ref,";
|
||||
$sql .= " a.entity,";
|
||||
$sql .= " a.ref_ext,";
|
||||
$sql .= " a.datep,";
|
||||
$sql .= " a.datep2,";
|
||||
@@ -717,6 +718,7 @@ class ActionComm extends CommonObject
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->id;
|
||||
$this->entity = $obj->entity;
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
|
||||
@@ -903,7 +905,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res=$this->db->query($sql);
|
||||
if ($res < 0) {
|
||||
if (!$res) {
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
@@ -914,7 +916,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res=$this->db->query($sql);
|
||||
if ($res < 0) {
|
||||
if (!$res) {
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
|
||||
@@ -718,7 +718,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ $nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day="
|
||||
$picto = 'calendarweek';
|
||||
|
||||
$nav .= ' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
$nav .= '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
$nav .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$nav .= '<input type="hidden" name="action" value="'.$action.'">';
|
||||
$nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">';
|
||||
$nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">';
|
||||
|
||||
@@ -289,7 +289,7 @@ $nav .= " <a href=\"?year=".$next_year."&month=".$next_month."&da
|
||||
$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
|
||||
/*$nav.=' <form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">';
|
||||
$nav.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
$nav.='<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
$nav.='<input type="hidden" name="action" value="' . $action . '">';
|
||||
$nav.='<input type="hidden" name="filtert" value="' . $filtert . '">';
|
||||
$nav.='<input type="hidden" name="usergroup" value="' . $usergroup . '">';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -581,7 +581,7 @@ if ($object->id > 0)
|
||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="border boxtable boxtablenobottom boxtablenotop" width="100%">';
|
||||
$boxstat .= '<tr class="impair"><td colspan="2" class="tdboxstats nohover">';
|
||||
|
||||
if (!empty($conf->propal->enabled))
|
||||
if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
// Box proposals
|
||||
$tmp = $object->getOutstandingProposals();
|
||||
@@ -599,7 +599,7 @@ if ($object->id > 0)
|
||||
if ($link) $boxstat .= '</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->commande->enabled))
|
||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
// Box commandes
|
||||
$tmp = $object->getOutstandingOrders();
|
||||
@@ -617,7 +617,7 @@ if ($object->id > 0)
|
||||
if ($link) $boxstat .= '</a>';
|
||||
}
|
||||
|
||||
if (!empty($conf->facture->enabled))
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
// Box factures
|
||||
$tmp = $object->getOutstandingBills();
|
||||
@@ -666,7 +666,7 @@ if ($object->id > 0)
|
||||
$now = dol_now();
|
||||
|
||||
/*
|
||||
* Last proposals
|
||||
* Latest proposals
|
||||
*/
|
||||
if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
@@ -738,7 +738,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Last orders
|
||||
* Latest orders
|
||||
*/
|
||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
@@ -751,7 +751,7 @@ if ($object->id > 0)
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= " WHERE c.fk_soc = s.rowid ";
|
||||
$sql .= " AND s.rowid = ".$object->id;
|
||||
$sql .= " AND c.entity = ".$conf->entity;
|
||||
$sql .= " AND c.entity IN (".getEntity('commande').')';
|
||||
$sql .= " ORDER BY c.date_commande DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@@ -824,7 +824,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Last shipments
|
||||
* Latest shipments
|
||||
*/
|
||||
if (!empty($conf->expedition->enabled) && $user->rights->expedition->lire)
|
||||
{
|
||||
@@ -897,7 +897,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Last linked contracts
|
||||
* Latest linked contracts
|
||||
*/
|
||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
{
|
||||
@@ -905,7 +905,7 @@ if ($object->id > 0)
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql .= " WHERE c.fk_soc = s.rowid ";
|
||||
$sql .= " AND s.rowid = ".$object->id;
|
||||
$sql .= " AND c.entity = ".$conf->entity;
|
||||
$sql .= " AND c.entity IN (".getEntity('contract').")";
|
||||
$sql .= " ORDER BY c.datec DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@@ -967,7 +967,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Last interventions
|
||||
* Latest interventions
|
||||
*/
|
||||
if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
|
||||
{
|
||||
@@ -975,7 +975,7 @@ if ($object->id > 0)
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f";
|
||||
$sql .= " WHERE f.fk_soc = s.rowid";
|
||||
$sql .= " AND s.rowid = ".$object->id;
|
||||
$sql .= " AND f.entity = ".$conf->entity;
|
||||
$sql .= " AND f.entity IN (".getEntity('intervention').")";
|
||||
$sql .= " ORDER BY f.tms DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@@ -1028,7 +1028,7 @@ if ($object->id > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Last invoices templates
|
||||
* Latest invoices templates
|
||||
*/
|
||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
@@ -1044,7 +1044,7 @@ if ($object->id > 0)
|
||||
$sql .= ', s.nom, s.rowid as socid';
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
|
||||
$sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
|
||||
$sql .= " AND f.entity = ".$conf->entity;
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
$sql .= ' GROUP BY f.rowid, f.titre, f.amount, f.total, f.tva, f.total_ttc,';
|
||||
$sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,';
|
||||
$sql .= ' f.suspended, f.date_when,';
|
||||
@@ -1063,7 +1063,7 @@ if ($object->id > 0)
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.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
|
||||
@@ -149,6 +150,9 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.email";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.code_compta";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -167,7 +171,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
@@ -193,6 +197,9 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->entity = $obj->entity;
|
||||
$companystatic->email = $obj->email;
|
||||
$companystatic->code_compta = $obj->code_compta;
|
||||
print $companystatic->getNomUrl(1, 'customer', 16);
|
||||
print '</td>';
|
||||
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||
@@ -233,6 +240,9 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.code_fournisseur";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -276,6 +286,8 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->entity = $obj->entity;
|
||||
$companystatic->email = $obj->email;
|
||||
print $companystatic->getNomUrl(1, 'supplier', 16);
|
||||
print '</td>';
|
||||
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||
@@ -315,6 +327,9 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.email";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.code_compta";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -358,6 +373,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->email = $obj->email;
|
||||
$companystatic->entity = $obj->entity;
|
||||
print $companystatic->getNomUrl(1, 'customer', 16);
|
||||
print '</td>';
|
||||
if (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
||||
@@ -404,6 +421,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande-
|
||||
$sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.code_fournisseur";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -447,6 +466,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande-
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->entity = $obj->entity;
|
||||
$companystatic->email = $obj->email;
|
||||
print $companystatic->getNomUrl(1, 'supplier', 16);
|
||||
print '</td>';
|
||||
if (!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
||||
@@ -496,6 +517,9 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.code_compta";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql .= " WHERE s.client IN (1, 2, 3)";
|
||||
@@ -532,6 +556,9 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
$companystatic->code_client = $objp->code_client;
|
||||
$companystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$companystatic->canvas = $objp->canvas;
|
||||
$companystatic->code_compta = $objp->code_compta;
|
||||
$companystatic->entity = $objp->entity;
|
||||
$companystatic->email = $objp->email;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 48).'</td>';
|
||||
print '<td class="right" nowrap>';
|
||||
@@ -560,6 +587,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, s.datec as dc, s.canvas, s.tms as dm";
|
||||
$sql .= ", s.code_fournisseur";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql .= " WHERE s.fournisseur = 1";
|
||||
@@ -591,6 +620,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
|
||||
$companystatic->code_client = $objp->code_client;
|
||||
$companystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$companystatic->canvas = $objp->canvas;
|
||||
$companystatic->entity = $objp->entity;
|
||||
$companystatic->email = $objp->email;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'supplier', 44).'</td>';
|
||||
print '<td class="right">'.dol_print_date($db->jdate($objp->dm), 'day').'</td>';
|
||||
@@ -636,6 +667,8 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TOD
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, s.canvas, ";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."contrat as c";
|
||||
@@ -673,6 +706,8 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TOD
|
||||
$companystatic->code_client = $objp->code_client;
|
||||
$companystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$companystatic->canvas = $objp->canvas;
|
||||
$companystatic->entity = $objp->entity;
|
||||
$companystatic->email = $objp->email;
|
||||
print $companystatic->getNomUrl(1, 'customer', 44);
|
||||
print '</td>'."\n";
|
||||
print "<td class=\"right\">".$staticcontrat->LibStatut($obj->statut, 3)."</td></tr>\n";
|
||||
@@ -697,6 +732,8 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$langs->load("propal");
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, s.code_client";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= ", p.rowid as propalid, p.entity, p.total as total_ttc, p.total_ht, p.tva as total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
@@ -718,7 +755,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
@@ -760,6 +797,8 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->entity = $obj->entity;
|
||||
$companystatic->email = $obj->email;
|
||||
print $companystatic->getNomUrl(1, 'customer', 44);
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
@@ -802,6 +841,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
|
||||
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
|
||||
$sql .= ", s.code_client";
|
||||
$sql .= ", s.entity";
|
||||
$sql .= ", s.email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@@ -822,7 +863,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
@@ -864,6 +905,8 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->code_fournisseur = $obj->code_fournisseur;
|
||||
$companystatic->canvas = $obj->canvas;
|
||||
$companystatic->entity = $obj->entity;
|
||||
$companystatic->email = $obj->email;
|
||||
print $companystatic->getNomUrl(1, 'customer', 44);
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
|
||||
@@ -90,13 +90,13 @@ if (empty($reshook))
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||
{
|
||||
if (empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"]))
|
||||
if (! GETPOST("clone_content", 'alpha') && ! GETPOST("clone_receivers", 'alpha'))
|
||||
{
|
||||
setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $object->createFromClone($user, $object->id, $_REQUEST["clone_content"], $_REQUEST["clone_receivers"]);
|
||||
$result = $object->createFromClone($user, $object->id, GETPOST("clone_content", 'alpha'), GETPOST("clone_receivers", 'alpha'));
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
||||
@@ -345,6 +345,7 @@ if (empty($reshook))
|
||||
|
||||
if (!empty($conf->global->MAILING_DELAY))
|
||||
{
|
||||
dol_syslog("Wait a delay of MAILING_DELAY=".$conf->global->MAILING_DELAY);
|
||||
sleep($conf->global->MAILING_DELAY);
|
||||
}
|
||||
|
||||
@@ -992,7 +993,7 @@ else
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=settodraft&id='.$object->id.'">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
|
||||
if (($object->statut == 0 || $object->statut == 1) && $user->rights->mailing->creer)
|
||||
if (($object->statut == 0 || $object->statut == 1 || $object->statut == 2) && $user->rights->mailing->creer)
|
||||
{
|
||||
if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_MAILING))
|
||||
{
|
||||
|
||||
@@ -48,8 +48,8 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortfield) $sortfield = "email";
|
||||
if (!$sortorder) $sortorder = "ASC";
|
||||
if (!$sortfield) $sortfield = "mc.statut,email";
|
||||
if (!$sortorder) $sortorder = "DESC,ASC";
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
|
||||
@@ -615,7 +615,8 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
|
||||
//Standard Extrafield feature
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
||||
$elementtype = Societe::$table_element;
|
||||
$socstatic = new Societe($this->db);
|
||||
$elementtype = $socstatic->table_element;
|
||||
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
@@ -752,7 +753,8 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
|
||||
//Standard Extrafield feature
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
||||
$elementtype = Contact::$table_element;
|
||||
$contactstatic = new Contact($this->db);
|
||||
$elementtype = $contactstatic->table_element;
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
dol_include_once('/core/class/extrafields.class.php');
|
||||
@@ -854,7 +856,8 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
|
||||
//Standard Extrafield feature
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
||||
$elementtype = Societe::$table_element;
|
||||
$socstatic = new Societe($this->db);
|
||||
$elementtype = $socstatic->table_element;
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
dol_include_once('/core/class/extrafields.class.php');
|
||||
|
||||
@@ -65,7 +65,7 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_prospectlevel";
|
||||
$sql .= " WHERE active > 0";
|
||||
$sql .= " ORDER BY sortorder";
|
||||
dol_syslog(get_class($this).'::multiselectProspectionStatus sql='.$sql, LOG_DEBUG);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
@@ -111,7 +111,6 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " WHERE active = 1 AND code<>''";
|
||||
$sql .= " ORDER BY code ASC";
|
||||
|
||||
dol_syslog(get_class($this)."::select_country sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
@@ -260,7 +259,6 @@ class FormAdvTargetEmailing extends Form
|
||||
}
|
||||
// $sql.= ' WHERE entity = '.$conf->entity;
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
@@ -297,7 +295,7 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql = "SELECT rowid, code, label as civilite, active FROM ".MAIN_DB_PREFIX."c_civility";
|
||||
$sql .= " WHERE active = 1";
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@@ -385,7 +383,7 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql .= " WHERE type=".$type;
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@@ -432,7 +430,7 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " WHERE type_element='$type_element'";
|
||||
$sql .= " ORDER BY c.name";
|
||||
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'">';
|
||||
|
||||
@@ -273,8 +273,8 @@ class Mailing extends CommonObject
|
||||
*
|
||||
* @param User $user User making the clone
|
||||
* @param int $fromid Id of object to clone
|
||||
* @param int $option1 1=Copy content, 0=Forget content
|
||||
* @param int $option2 Not used
|
||||
* @param int $option1 1=Clone content, 0=Forget content
|
||||
* @param int $option2 1=Clone recipients
|
||||
* @return int New id of clone
|
||||
*/
|
||||
public function createFromClone(User $user, $fromid, $option1, $option2)
|
||||
@@ -305,7 +305,7 @@ class Mailing extends CommonObject
|
||||
$object->bgcolor = '';
|
||||
$object->bgimage = '';
|
||||
|
||||
$object->email_from = '';
|
||||
//$object->email_from = ''; // We do not reset from email because it is a mandatory value
|
||||
$object->email_replyto = '';
|
||||
$object->email_errorsto = '';
|
||||
|
||||
@@ -331,7 +331,7 @@ class Mailing extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
//Clone target
|
||||
// Clone recipient targets
|
||||
if (!empty($option2)) {
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/mailings/modules_mailings.php';
|
||||
|
||||
|
||||
@@ -157,6 +157,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
$limit = 10;
|
||||
$sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
||||
$sql .= " WHERE m.entity = ".$conf->entity;
|
||||
$sql .= " ORDER BY m.date_creat DESC";
|
||||
$sql .= " LIMIT ".$limit;
|
||||
$result = $db->query($sql);
|
||||
|
||||
@@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php';
|
||||
|
||||
$id = GETPOST('id');
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("mails");
|
||||
|
||||
@@ -1541,7 +1541,7 @@ if ($action == 'create')
|
||||
$object = new Propal($db);
|
||||
|
||||
print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
if ($origin != 'project' && $originid) {
|
||||
print '<input type="hidden" name="origin" value="'.$origin.'">';
|
||||
@@ -1675,7 +1675,7 @@ if ($action == 'create')
|
||||
$langs->load("projects");
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Project").'</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@@ -2052,7 +2052,7 @@ if ($action == 'create')
|
||||
print '</td><td>';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
|
||||
print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
print $form->selectDate($object->date, 're', '', '', 0, "editdate");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
@@ -2078,7 +2078,7 @@ if ($action == 'create')
|
||||
print '</td><td>';
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
|
||||
print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setecheance">';
|
||||
print $form->selectDate($object->fin_validite, 'ech', '', '', '', "editecheance");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
@@ -2412,7 +2412,7 @@ if ($action == 'create')
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
||||
<input type="hidden" name="token" value="' . newToken().'">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="' . $object->id.'">
|
||||
@@ -2498,11 +2498,13 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Send
|
||||
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||
} else
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('SendMail').'</a>';
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||
} else
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('SendMail').'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Create a sale order
|
||||
|
||||
@@ -223,6 +223,90 @@ class Propal extends CommonObject
|
||||
|
||||
public $oldcopy;
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'enabled' is a condition when the field must be managed.
|
||||
* 'position' is the sort order of field.
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
* 'help' is a string visible as a tooltip on field
|
||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
|
||||
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
|
||||
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
||||
*
|
||||
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
|
||||
*/
|
||||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields=array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>15),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>20),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
|
||||
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
|
||||
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>40),
|
||||
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'Ref client', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
|
||||
'datep' =>array('type'=>'date', 'label'=>'Datep', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
|
||||
'fin_validite' =>array('type'=>'datetime', 'label'=>'Fin validite', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
|
||||
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
|
||||
'date_cloture' =>array('type'=>'datetime', 'label'=>'Date cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
|
||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
||||
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>85),
|
||||
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
|
||||
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
|
||||
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
|
||||
'price' =>array('type'=>'double', 'label'=>'Price', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
|
||||
'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
|
||||
'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
|
||||
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
|
||||
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
|
||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
|
||||
'total' =>array('type'=>'double(24,8)', 'label'=>'Total', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
|
||||
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Fk currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
|
||||
'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>170),
|
||||
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>175),
|
||||
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>180),
|
||||
'date_livraison' =>array('type'=>'date', 'label'=>'Date livraison', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
|
||||
'fk_shipping_method' =>array('type'=>'integer', 'label'=>'Fk shipping method', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
|
||||
'fk_availability' =>array('type'=>'integer', 'label'=>'Fk availability', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
|
||||
'fk_delivery_address' =>array('type'=>'integer', 'label'=>'Fk delivery address', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
|
||||
'fk_input_reason' =>array('type'=>'integer', 'label'=>'Fk input reason', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
|
||||
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
|
||||
'fk_incoterms' =>array('type'=>'integer', 'label'=>'Fk incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>220),
|
||||
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'Location incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
|
||||
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
|
||||
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
|
||||
'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
|
||||
'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
|
||||
'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>250),
|
||||
'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>255),
|
||||
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>260),
|
||||
);
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* Draft status
|
||||
*/
|
||||
@@ -2908,8 +2992,11 @@ class Propal extends CommonObject
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$main = MAIN_DB_PREFIX . 'propaldet';
|
||||
$ef = $main . "_extrafields";
|
||||
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")";
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id;
|
||||
if ($this->db->query($sql))
|
||||
if ($this->db->query($sqlef) && $this->db->query($sql))
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$this->id;
|
||||
if ($this->db->query($sql))
|
||||
@@ -3309,8 +3396,8 @@ class Propal extends CommonObject
|
||||
$response->warning_delay = $delay_warning / 60 / 60 / 24;
|
||||
$response->label = $label;
|
||||
$response->labelShort = $labelShort;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->img = img_object('', "propal");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
||||
@@ -186,7 +186,7 @@ if (!empty($conf->propal->enabled))
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
$langs->load("propal");
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
$i = 0;
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
@@ -335,7 +335,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
@@ -423,7 +423,7 @@ if (! empty($conf->propal->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
@@ -496,7 +496,7 @@ if (! empty($conf->propal->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ $search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$object_statut = GETPOST('search_statut', 'alpha');
|
||||
|
||||
@@ -164,8 +164,8 @@ $arrayfields = array(
|
||||
'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
|
||||
'p.total_ht_invoiced'=>array('label'=>$langs->trans("AmountInvoicedHT"), 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
|
||||
'p.total_invoiced'=>array('label'=>$langs->trans("AmountInvoicedTTC"), 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
|
||||
'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
|
||||
'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>$conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT),
|
||||
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10),
|
||||
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1),
|
||||
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
@@ -229,13 +229,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_monthdelivery = '';
|
||||
$search_daydelivery = '';
|
||||
$search_availability = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$object_statut = '';
|
||||
$toselect = '';
|
||||
$search_array_options = array();
|
||||
$search_categ_cus = 0;
|
||||
}
|
||||
if ($object_statut != '') $viewstatut = $object_statut;
|
||||
if ($object_statut != '') $search_status = $object_statut;
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
@@ -338,9 +338,9 @@ if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL";
|
||||
|
||||
if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category);
|
||||
if ($socid > 0) $sql .= ' AND s.rowid = '.$socid;
|
||||
if ($viewstatut != '' && $viewstatut != '-1')
|
||||
if ($search_status != '' && $search_status != '-1')
|
||||
{
|
||||
$sql .= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
||||
$sql .= ' AND p.fk_statut IN ('.$db->escape($search_status).')';
|
||||
}
|
||||
$sql .= dolSqlDateFilter("p.datep", $search_day, $search_month, $search_year);
|
||||
$sql .= dolSqlDateFilter("p.fin_validite", $search_dayfin, $search_month_end, $search_yearfin);
|
||||
@@ -412,7 +412,7 @@ if ($resql)
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), $help_url);
|
||||
|
||||
$param = '&viewstatut='.urlencode($viewstatut);
|
||||
$param = '&search_status='.urlencode($search_status);
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||
@@ -468,7 +468,7 @@ if ($resql)
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail = "SendPropalRef";
|
||||
$modelmail = "proposal_send";
|
||||
$modelmail = "propal_send";
|
||||
$objecttmp = new Propal($db);
|
||||
$trackid = 'pro'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
@@ -706,7 +706,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
$formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
|
||||
$formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut');
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
@@ -1029,9 +1029,7 @@ if ($resql)
|
||||
$nbofsalesrepresentative = count($listsalesrepresentatives);
|
||||
if ($nbofsalesrepresentative > 3) // We print only number
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$companystatic->id.'">';
|
||||
print $nbofsalesrepresentative;
|
||||
print '</a>';
|
||||
}
|
||||
elseif ($nbofsalesrepresentative > 0)
|
||||
{
|
||||
@@ -1067,7 +1065,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@@ -242,7 +242,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
//{
|
||||
// Show filter box
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
|
||||
@@ -111,6 +111,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount1->description = $discount->description.' (1)';
|
||||
$newdiscount2->description = $discount->description.' (2)';
|
||||
}
|
||||
|
||||
$newdiscount1->fk_user = $discount->fk_user;
|
||||
$newdiscount2->fk_user = $discount->fk_user;
|
||||
$newdiscount1->fk_soc = $discount->fk_soc;
|
||||
@@ -121,13 +122,20 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount2->datec = $discount->datec;
|
||||
$newdiscount1->tva_tx = $discount->tva_tx;
|
||||
$newdiscount2->tva_tx = $discount->tva_tx;
|
||||
$newdiscount1->amount_ttc = $_POST["amount_ttc_1"];
|
||||
$newdiscount1->amount_ttc = $amount_ttc_1;
|
||||
$newdiscount2->amount_ttc = price2num($discount->amount_ttc - $newdiscount1->amount_ttc);
|
||||
$newdiscount1->amount_ht = price2num($newdiscount1->amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
|
||||
$newdiscount2->amount_ht = price2num($newdiscount2->amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
|
||||
$newdiscount1->amount_tva = price2num($newdiscount1->amount_ttc - $newdiscount1->amount_ht);
|
||||
$newdiscount2->amount_tva = price2num($newdiscount2->amount_ttc - $newdiscount2->amount_ht);
|
||||
|
||||
$newdiscount1->multicurrency_amount_ttc = $amount_ttc_1 * ($discount->multicurrency_amount_ttc / $discount->amount_ttc);
|
||||
$newdiscount2->multicurrency_amount_ttc = price2num($discount->multicurrency_amount_ttc - $newdiscount1->multicurrency_amount_ttc);
|
||||
$newdiscount1->multicurrency_amount_ht = price2num($newdiscount1->multicurrency_amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
|
||||
$newdiscount2->multicurrency_amount_ht = price2num($newdiscount2->multicurrency_amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
|
||||
$newdiscount1->multicurrency_amount_tva = price2num($newdiscount1->multicurrency_amount_ttc - $newdiscount1->multicurrency_amount_ht);
|
||||
$newdiscount2->multicurrency_amount_tva = price2num($newdiscount2->multicurrency_amount_ttc - $newdiscount2->multicurrency_amount_ht);
|
||||
|
||||
$db->begin();
|
||||
$discount->fk_facture_source = 0; // This is to delete only the require record (that we will recreate with two records) and not all family with same fk_facture_source
|
||||
// This is to delete only the require record (that we will recreate with two records) and not all family with same fk_invoice_supplier_source
|
||||
|
||||
@@ -1594,8 +1594,8 @@ if ($action == 'create' && $usercancreate)
|
||||
$note_public = $object->getDefaultCreateValueFor('note_public');
|
||||
}
|
||||
|
||||
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n";
|
||||
print '<input type="hidden" name="remise_percent" value="' . $soc->remise_percent . '">';
|
||||
@@ -1734,7 +1734,7 @@ if ($action == 'create' && $usercancreate)
|
||||
$langs->load("projects");
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Project").'</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@@ -2100,7 +2100,7 @@ if ($action == 'create' && $usercancreate)
|
||||
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||
$morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref .= '</form>';
|
||||
} else {
|
||||
@@ -2177,7 +2177,7 @@ if ($action == 'create' && $usercancreate)
|
||||
print '</td><td>';
|
||||
if ($action == 'editdate') {
|
||||
print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
print $form->selectDate($object->date, 'order_', '', '', '', "setdate");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
@@ -2198,7 +2198,7 @@ if ($action == 'create' && $usercancreate)
|
||||
print '</td><td>';
|
||||
if ($action == 'editdate_livraison') {
|
||||
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION ['newtoken'].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||
print $form->selectDate($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
@@ -2492,7 +2492,7 @@ if ($action == 'create' && $usercancreate)
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'].'">
|
||||
<input type="hidden" name="token" value="' . newToken().'">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="' . $object->id.'">';
|
||||
@@ -2548,11 +2548,13 @@ if ($action == 'create' && $usercancreate)
|
||||
}
|
||||
|
||||
// Send
|
||||
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||
} else
|
||||
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a>';
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) {
|
||||
if ($usercansend) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
|
||||
} else
|
||||
print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Valid
|
||||
|
||||
@@ -232,6 +232,94 @@ class Commande extends CommonOrder
|
||||
//! key of pos source ('0', '1', ...)
|
||||
public $pos_source;
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'enabled' is a condition when the field must be managed.
|
||||
* 'position' is the sort order of field.
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
* 'help' is a string visible as a tooltip on field
|
||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
|
||||
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
|
||||
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
||||
*
|
||||
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
|
||||
*/
|
||||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields=array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
|
||||
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>25),
|
||||
'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>30),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
|
||||
'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>40),
|
||||
'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'Ref client', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||
'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
|
||||
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
|
||||
'date_cloture' =>array('type'=>'datetime', 'label'=>'Date cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
|
||||
'date_commande' =>array('type'=>'date', 'label'=>'Date commande', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
|
||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
|
||||
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80),
|
||||
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
|
||||
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user cloture', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
|
||||
'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
|
||||
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Fk statut', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
|
||||
'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
|
||||
'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
|
||||
'remise_absolue' =>array('type'=>'double', 'label'=>'Remise absolue', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
|
||||
'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
|
||||
'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
||||
'total_ht' =>array('type'=>'double(24,8)', 'label'=>'Total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
|
||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
|
||||
'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>150),
|
||||
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>155),
|
||||
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>160),
|
||||
'facture' =>array('type'=>'tinyint(4)', 'label'=>'Facture', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>170),
|
||||
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Fk currency', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'Fk cond reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
|
||||
'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'Fk mode reglement', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
|
||||
'date_livraison' =>array('type'=>'date', 'label'=>'Date livraison', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
|
||||
'fk_shipping_method' =>array('type'=>'integer', 'label'=>'Fk shipping method', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
|
||||
'fk_warehouse' =>array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Fk warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
|
||||
'fk_availability' =>array('type'=>'integer', 'label'=>'Fk availability', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
|
||||
'fk_input_reason' =>array('type'=>'integer', 'label'=>'Fk input reason', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
|
||||
'fk_delivery_address' =>array('type'=>'integer', 'label'=>'Fk delivery address', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
|
||||
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
|
||||
'fk_incoterms' =>array('type'=>'integer', 'label'=>'Fk incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
|
||||
'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'Location incoterms', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
|
||||
'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
|
||||
'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
|
||||
'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency tx', 'enabled'=>1, 'visible'=>-1, 'position'=>250),
|
||||
'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ht', 'enabled'=>1, 'visible'=>-1, 'position'=>255),
|
||||
'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total tva', 'enabled'=>1, 'visible'=>-1, 'position'=>260),
|
||||
'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'Multicurrency total ttc', 'enabled'=>1, 'visible'=>-1, 'position'=>265),
|
||||
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>270),
|
||||
'module_source' =>array('type'=>'varchar(32)', 'label'=>'Module source', 'enabled'=>1, 'visible'=>-1, 'position'=>275),
|
||||
'pos_source' =>array('type'=>'varchar(32)', 'label'=>'Pos source', 'enabled'=>1, 'visible'=>-1, 'position'=>280),
|
||||
);
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* ERR Not enough stock
|
||||
*/
|
||||
@@ -3308,6 +3396,19 @@ class Commande extends CommonOrder
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete extrafields of order details
|
||||
$main = MAIN_DB_PREFIX . 'commandedet';
|
||||
$ef = $main . "_extrafields";
|
||||
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")";
|
||||
if (!$this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete order details
|
||||
@@ -3439,7 +3540,7 @@ class Commande extends CommonOrder
|
||||
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("OrdersToProcess");
|
||||
$response->labelShort = $langs->trans("Opened");
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?search_status=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->img=img_object('', "order");
|
||||
|
||||
$generic_commande = new Commande($this->db);
|
||||
@@ -4321,7 +4422,7 @@ class OrderLine extends CommonOrderLine
|
||||
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::insert ".$errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', '.$errmsg : $errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
|
||||
@@ -155,7 +155,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($status, $bool, 0).'</td>';
|
||||
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print $commandestatic->LibStatut($status, $bool, 3);
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
@@ -347,7 +347,7 @@ if (!empty($conf->commande->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
@@ -429,7 +429,7 @@ if (!empty($conf->commande->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ $search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
||||
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$billed = GETPOST('billed', 'int');
|
||||
$viewstatut = GETPOST('viewstatut', 'int');
|
||||
$search_status = GETPOST('search_status', 'int');
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
@@ -205,7 +205,7 @@ if (empty($reshook))
|
||||
$search_deliveryyear = '';
|
||||
$search_project_ref = '';
|
||||
$search_project = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$billed = '';
|
||||
$toselect = '';
|
||||
$search_array_options = array();
|
||||
@@ -288,23 +288,23 @@ if ($search_ref) $sql .= natural_search('c.ref', $search_ref);
|
||||
if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer);
|
||||
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
if ($billed != '' && $billed >= 0) $sql .= ' AND c.facture = '.$billed;
|
||||
if ($viewstatut <> '')
|
||||
if ($search_status <> '')
|
||||
{
|
||||
if ($viewstatut < 4 && $viewstatut > -3)
|
||||
if ($search_status < 4 && $search_status > -3)
|
||||
{
|
||||
if ($viewstatut == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
else $sql .= ' AND c.fk_statut = '.$viewstatut; // brouillon, validee, en cours, annulee
|
||||
if ($search_status == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
else $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee
|
||||
}
|
||||
if ($viewstatut == 4)
|
||||
if ($search_status == 4)
|
||||
{
|
||||
$sql .= ' AND c.facture = 1'; // invoice created
|
||||
}
|
||||
if ($viewstatut == -2) // To process
|
||||
if ($search_status == -2) // To process
|
||||
{
|
||||
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
||||
$sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||
}
|
||||
if ($viewstatut == -3) // To bill
|
||||
if ($search_status == -3) // To bill
|
||||
{
|
||||
//$sql.= ' AND c.fk_statut in (1,2,3)';
|
||||
//$sql.= ' AND c.facture = 0'; // invoice not created
|
||||
@@ -367,21 +367,21 @@ if ($resql)
|
||||
{
|
||||
$title = $langs->trans('ListOfOrders');
|
||||
}
|
||||
if (strval($viewstatut) == '0')
|
||||
if (strval($search_status) == '0')
|
||||
$title .= ' - '.$langs->trans('StatusOrderDraftShort');
|
||||
if ($viewstatut == 1)
|
||||
if ($search_status == 1)
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidatedShort');
|
||||
if ($viewstatut == 2)
|
||||
if ($search_status == 2)
|
||||
$title .= ' - '.$langs->trans('StatusOrderSentShort');
|
||||
if ($viewstatut == 3)
|
||||
if ($search_status == 3)
|
||||
$title .= ' - '.$langs->trans('StatusOrderToBillShort');
|
||||
if ($viewstatut == 4)
|
||||
if ($search_status == 4)
|
||||
$title .= ' - '.$langs->trans('StatusOrderProcessedShort');
|
||||
if ($viewstatut == -1)
|
||||
if ($search_status == -1)
|
||||
$title .= ' - '.$langs->trans('StatusOrderCanceledShort');
|
||||
if ($viewstatut == -2)
|
||||
if ($search_status == -2)
|
||||
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
|
||||
if ($viewstatut == -3)
|
||||
if ($search_status == -3)
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
@@ -404,7 +404,7 @@ if ($resql)
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||
if ($socid > 0) $param .= '&socid='.urlencode($socid);
|
||||
if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
|
||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||
if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday);
|
||||
if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth);
|
||||
if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear);
|
||||
@@ -462,7 +462,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
|
||||
@@ -717,7 +717,7 @@ if ($resql)
|
||||
-3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"),
|
||||
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort")
|
||||
);
|
||||
print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
@@ -820,7 +820,7 @@ if ($resql)
|
||||
|
||||
$generic_commande->getLinesArray(); // This set ->lines
|
||||
|
||||
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
|
||||
print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
|
||||
|
||||
// Show shippable Icon (create subloop, so may be slow)
|
||||
if ($conf->stock->enabled)
|
||||
@@ -1075,7 +1075,7 @@ if ($resql)
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i);
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
|
||||
@@ -57,7 +57,7 @@ $socid = GETPOST('socid', 'int');
|
||||
$selected = GETPOST('orders_to_invoice');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'alpha');
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
@@ -255,7 +255,9 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
// Show filter box
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
|
||||
@@ -16,11 +16,17 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/accounting-files.php
|
||||
* \ingroup compta
|
||||
* \brief Page to show portoflio and files of a thirdparty and download it
|
||||
*/
|
||||
|
||||
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
|
||||
}
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
@@ -77,7 +83,22 @@ if ($user->socid > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity;
|
||||
// Define $arrayofentities if multientity is set.
|
||||
$arrayofentities = array();
|
||||
if (!empty($conf->multicompany->enabled) && is_object($mc)) {
|
||||
$arrayofentities = $mc->getEntitiesList();
|
||||
}
|
||||
|
||||
$entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : (GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $conf->entity));
|
||||
if (!empty($conf->multicompany->enabled) && is_object($mc)) {
|
||||
if (empty($entity) && ! empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) {
|
||||
$entity = '0,'.join(',', array_keys($arrayofentities));
|
||||
}
|
||||
}
|
||||
if (empty($entity)) $entity = $conf->entity;
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -91,7 +112,7 @@ $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity;
|
||||
|
||||
$filesarray = array();
|
||||
$result = false;
|
||||
if (($action == "searchfiles" || $action == "dl")) {
|
||||
if (($action == 'searchfiles' || $action == 'dl')) {
|
||||
if (empty($date_start))
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
|
||||
@@ -108,42 +129,42 @@ if (($action == "searchfiles" || $action == "dl")) {
|
||||
$wheretail = " '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
|
||||
|
||||
// Customer invoices
|
||||
$sql = "SELECT t.rowid as id, t.ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
|
||||
$sql = "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
|
||||
$sql .= " WHERE datef between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
$sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT;
|
||||
$sql .= " UNION ALL";
|
||||
// Vendor invoices
|
||||
$sql .= " SELECT t.rowid as id, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
|
||||
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
|
||||
$sql .= " WHERE datef between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
$sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
|
||||
$sql .= " UNION ALL";
|
||||
// Expense reports
|
||||
$sql .= " SELECT t.rowid as id, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
|
||||
$sql .= " WHERE date_fin between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
$sql .= " AND t.fk_statut <> ".ExpenseReport::STATUS_DRAFT;
|
||||
$sql .= " UNION ALL";
|
||||
// Donations
|
||||
$sql .= " SELECT t.rowid as id, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country";
|
||||
$sql .= " WHERE datedon between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
$sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT;
|
||||
$sql .= " UNION ALL";
|
||||
// Paiements of salaries
|
||||
$sql .= " SELECT t.rowid as id, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " SELECT t.rowid as id, t.entity, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
|
||||
$sql .= " WHERE datep between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
|
||||
$sql .= " UNION ALL";
|
||||
// Social contributions
|
||||
$sql .= " SELECT t.rowid as id, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
|
||||
$sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t";
|
||||
$sql .= " WHERE date_creation between ".$wheretail;
|
||||
$sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')';
|
||||
@@ -220,7 +241,7 @@ if (($action == "searchfiles" || $action == "dl")) {
|
||||
{
|
||||
$result = true;
|
||||
|
||||
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
||||
$files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1);
|
||||
//var_dump($upload_dir);
|
||||
//var_dump($files);
|
||||
|
||||
@@ -228,6 +249,7 @@ if (($action == "searchfiles" || $action == "dl")) {
|
||||
{
|
||||
$nofile = array();
|
||||
$nofile['id'] = $objd->id;
|
||||
$nofile['entity'] = $objd->entity;
|
||||
$nofile['date'] = $db->idate($objd->date);
|
||||
$nofile['paid'] = $objd->paid;
|
||||
$nofile['amount_ht'] = $objd->total_ht;
|
||||
@@ -248,6 +270,7 @@ if (($action == "searchfiles" || $action == "dl")) {
|
||||
foreach ($files as $key => $file)
|
||||
{
|
||||
$file['id'] = $objd->id;
|
||||
$file['entity'] = $objd->entity;
|
||||
$file['date'] = $db->idate($objd->date);
|
||||
$file['paid'] = $objd->paid;
|
||||
$file['amount_ht'] = $objd->total_ht;
|
||||
@@ -314,6 +337,10 @@ if ($result && $action == "dl" && !$error)
|
||||
dol_mkdir($dirfortmpfile);
|
||||
|
||||
$log = $langs->transnoentitiesnoconv("Type");
|
||||
if (!empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
$log .= ','.$langs->transnoentitiesnoconv("Entity");
|
||||
}
|
||||
$log .= ','.$langs->transnoentitiesnoconv("Date");
|
||||
$log .= ','.$langs->transnoentitiesnoconv("Ref");
|
||||
$log .= ','.$langs->transnoentitiesnoconv("TotalHT");
|
||||
@@ -342,6 +369,10 @@ if ($result && $action == "dl" && !$error)
|
||||
}
|
||||
|
||||
$log .= $file['item'];
|
||||
if (!empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
$log .= ','.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]);
|
||||
}
|
||||
$log .= ','.dol_print_date($file['date'], 'dayrfc');
|
||||
$log .= ','.$file['ref'];
|
||||
$log .= ','.$file['amount_ht'];
|
||||
@@ -383,11 +414,13 @@ $form = new Form($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
$title = $langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||
$help_url = '';
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$h = 0;
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
|
||||
$head = array();
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"];
|
||||
$head[$h][1] = $langs->trans("AccountantFiles");
|
||||
$head[$h][2] = 'AccountancyFiles';
|
||||
|
||||
@@ -400,13 +433,18 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
|
||||
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
|
||||
|
||||
// Export is for current company only !
|
||||
// Export is for current company only
|
||||
if (!empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
$mc->getInfo($conf->entity);
|
||||
print '<span class="marginleftonly marginrightonly">('.$langs->trans("Entity").' : ';
|
||||
$mc->dao->getEntities();
|
||||
$mc->dao->fetch($conf->entity);
|
||||
print $mc->dao->label;
|
||||
print "<td>";
|
||||
if (! empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) {
|
||||
print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true);
|
||||
} else {
|
||||
print $mc->label;
|
||||
}
|
||||
print "</td>";
|
||||
print ")</span>\n";
|
||||
}
|
||||
|
||||
@@ -427,7 +465,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
$param .= '&date_stopyear='.GETPOST('date_stopyear', 'int');
|
||||
|
||||
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="token" value="'.currentToken().'">';
|
||||
|
||||
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
||||
|
||||
|
||||
@@ -92,12 +92,12 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents");
|
||||
$helpurl = "";
|
||||
llxHeader('', $title, $helpurl);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
if ($object->fetch($id, $ref)) {
|
||||
$upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num);
|
||||
@@ -114,13 +114,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
$totalsize += $file['size'];
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
||||
|
||||
$title = $langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts');
|
||||
print load_fiche_titre($title, '', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
@@ -137,9 +133,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
$modulepart = 'bank';
|
||||
$permission = $user->rights->banque->modifier;
|
||||
$permtoedit = $user->rights->banque->modifier;
|
||||
$param = '&id='.$object->id.'&num='.$num;
|
||||
$uri = '&num='.$num;
|
||||
$relativepathwithnofile = $id."/statement/".$num."/";
|
||||
$param = '&id='.$object->id.'&num='.urlencode($num);
|
||||
$moreparam = '&num='.urlencode($num);;
|
||||
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/";
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1157,14 +1157,14 @@ if ($resql)
|
||||
} else {
|
||||
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1;
|
||||
}
|
||||
$backgroundcolor = 'style="background-color: '.$color.';"';
|
||||
$backgroundcolor = 'style="background: '.$color.';"';
|
||||
} else {
|
||||
if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) {
|
||||
$color = '#7fdb86';
|
||||
} else {
|
||||
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2;
|
||||
}
|
||||
$backgroundcolor = 'style="background-color: '.$color.';"';
|
||||
$backgroundcolor = 'style="background: '.$color.';"';
|
||||
}
|
||||
}
|
||||
print '<tr class="oddeven" '.$backgroundcolor.'>';
|
||||
|
||||
@@ -214,6 +214,76 @@ class Account extends CommonObject
|
||||
*/
|
||||
public $date_solde;
|
||||
|
||||
|
||||
/**
|
||||
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
|
||||
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
|
||||
* 'label' the translation key.
|
||||
* 'enabled' is a condition when the field must be managed.
|
||||
* 'position' is the sort order of field.
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created.
|
||||
* 'index' if we want an index in database.
|
||||
* 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
|
||||
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
|
||||
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
|
||||
* 'css' is the CSS style to use on field. For example: 'maxwidth200'
|
||||
* 'help' is a string visible as a tooltip on field
|
||||
* 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
|
||||
* 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code.
|
||||
* 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
|
||||
* 'comment' is not used. You can store here any text of your choice. It is not used by application.
|
||||
*
|
||||
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
|
||||
*/
|
||||
|
||||
// BEGIN MODULEBUILDER PROPERTIES
|
||||
/**
|
||||
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
|
||||
*/
|
||||
public $fields=array(
|
||||
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
|
||||
'ref' =>array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25),
|
||||
'label' =>array('type'=>'varchar(30)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>35, 'index'=>1),
|
||||
'bank' =>array('type'=>'varchar(60)', 'label'=>'Bank', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
|
||||
'code_banque' =>array('type'=>'varchar(128)', 'label'=>'Code banque', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
|
||||
'code_guichet' =>array('type'=>'varchar(6)', 'label'=>'Code guichet', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
|
||||
'number' =>array('type'=>'varchar(255)', 'label'=>'Number', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
|
||||
'cle_rib' =>array('type'=>'varchar(5)', 'label'=>'Cle rib', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
|
||||
'bic' =>array('type'=>'varchar(11)', 'label'=>'Bic', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
|
||||
'iban_prefix' =>array('type'=>'varchar(34)', 'label'=>'Iban prefix', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
|
||||
'country_iban' =>array('type'=>'varchar(2)', 'label'=>'Country iban', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
|
||||
'cle_iban' =>array('type'=>'varchar(2)', 'label'=>'Cle iban', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
|
||||
'domiciliation' =>array('type'=>'varchar(255)', 'label'=>'Domiciliation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
|
||||
'state_id' =>array('type'=>'integer', 'label'=>'State id', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
|
||||
'fk_pays' =>array('type'=>'integer', 'label'=>'Fk pays', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>95),
|
||||
'proprio' =>array('type'=>'varchar(60)', 'label'=>'Proprio', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
|
||||
'owner_address' =>array('type'=>'text', 'label'=>'Owner address', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
|
||||
'courant' =>array('type'=>'smallint(6)', 'label'=>'Courant', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>110),
|
||||
'clos' =>array('type'=>'smallint(6)', 'label'=>'Clos', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>115),
|
||||
'rappro' =>array('type'=>'smallint(6)', 'label'=>'Rappro', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
|
||||
'url' =>array('type'=>'varchar(128)', 'label'=>'Url', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
|
||||
'account_number' =>array('type'=>'varchar(32)', 'label'=>'Account number', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
|
||||
'accountancy_journal' =>array('type'=>'varchar(20)', 'label'=>'Accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
||||
'currency_code' =>array('type'=>'varchar(3)', 'label'=>'Currency code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>140),
|
||||
'min_allowed' =>array('type'=>'integer', 'label'=>'Min allowed', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
|
||||
'min_desired' =>array('type'=>'integer', 'label'=>'Min desired', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
|
||||
'comment' =>array('type'=>'text', 'label'=>'Comment', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>156),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>157),
|
||||
'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>165),
|
||||
'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>170),
|
||||
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>175),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>180),
|
||||
'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>185),
|
||||
'fk_accountancy_journal' =>array('type'=>'integer', 'label'=>'Fk accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
|
||||
);
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* Current account
|
||||
*/
|
||||
|
||||
@@ -422,7 +422,11 @@ class PaymentVarious extends CommonObject
|
||||
$sign * abs($this->amount),
|
||||
$this->num_payment,
|
||||
($this->category_transaction > 0 ? $this->category_transaction : 0),
|
||||
$user
|
||||
$user,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
$this->datev
|
||||
);
|
||||
|
||||
// Update fk_bank into llx_paiement.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user