mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-14 04:52:45 +01:00
Compare commits
1045 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5efb94b06f | ||
|
|
ed2d9f179b | ||
|
|
7d5c3a5c4f | ||
|
|
2094c48b7f | ||
|
|
cad7bdc74b | ||
|
|
04199c2b4b | ||
|
|
f371f80de3 | ||
|
|
32ce42610a | ||
|
|
f3be6045f9 | ||
|
|
e801b5a431 | ||
|
|
6b2490f4e4 | ||
|
|
af09a3714b | ||
|
|
f82bedb36c | ||
|
|
dcd3387a30 | ||
|
|
51229a602f | ||
|
|
6c7a5cebdf | ||
|
|
d045dca003 | ||
|
|
95e7062ca3 | ||
|
|
d5d6939fd9 | ||
|
|
f98ca2e31a | ||
|
|
03f7df88c6 | ||
|
|
c755d5f58d | ||
|
|
c2397fad60 | ||
|
|
c008853842 | ||
|
|
faef7a2e0c | ||
|
|
fd36ade61a | ||
|
|
1d571c4159 | ||
|
|
9eeb80151e | ||
|
|
6d0c4deb6e | ||
|
|
884b74a6bb | ||
|
|
8b9041b93e | ||
|
|
4caefbe926 | ||
|
|
94de6efa4b | ||
|
|
3284ebdcf1 | ||
|
|
dd208348c4 | ||
|
|
cb27eb98e1 | ||
|
|
f9f37c52de | ||
|
|
60f8ca1283 | ||
|
|
57d6417095 | ||
|
|
6bb91dd5d2 | ||
|
|
aab0a33f40 | ||
|
|
ce2fc28d80 | ||
|
|
ee4fcba4f2 | ||
|
|
4d05bff780 | ||
|
|
27100df927 | ||
|
|
64dd6439e7 | ||
|
|
286d62edb8 | ||
|
|
c698558d9e | ||
|
|
b20ae45265 | ||
|
|
2d252e85e6 | ||
|
|
b4b185abe0 | ||
|
|
36cc1c6ca9 | ||
|
|
1d6baf5f2b | ||
|
|
b276a8186e | ||
|
|
7f419a29e7 | ||
|
|
01c2971f4f | ||
|
|
9690e68bfb | ||
|
|
b8736f5103 | ||
|
|
a698ba0b56 | ||
|
|
85e5ac678f | ||
|
|
6c8e7494f0 | ||
|
|
276f2dce77 | ||
|
|
67ee443b34 | ||
|
|
4056b87a74 | ||
|
|
7321829732 | ||
|
|
ea071b7680 | ||
|
|
671b4a399d | ||
|
|
2e1727e323 | ||
|
|
5535daf84a | ||
|
|
7c583227fb | ||
|
|
033b898106 | ||
|
|
49bad95d31 | ||
|
|
63987fa32e | ||
|
|
bfd46f62ea | ||
|
|
6fe69d4a60 | ||
|
|
15ab37b46e | ||
|
|
b21feca9d7 | ||
|
|
147b35d62e | ||
|
|
cf5c972c65 | ||
|
|
483bfb096b | ||
|
|
c28d87252b | ||
|
|
d0fdf700d7 | ||
|
|
0d00c51c2a | ||
|
|
94a76a1393 | ||
|
|
27c55635f3 | ||
|
|
23ee6748f7 | ||
|
|
fa2fddcdc1 | ||
|
|
c690dfb258 | ||
|
|
144c13998a | ||
|
|
1052213c97 | ||
|
|
ef05171641 | ||
|
|
24cc687724 | ||
|
|
448fcae02f | ||
|
|
abb7e651d1 | ||
|
|
4d6f87e544 | ||
|
|
d731857fd0 | ||
|
|
12f1e4c04b | ||
|
|
d3d3bcaca5 | ||
|
|
f88874c1f7 | ||
|
|
5c59f5c63b | ||
|
|
67ce71bc48 | ||
|
|
2817ace0d2 | ||
|
|
a5814ce779 | ||
|
|
b074f580db | ||
|
|
39cd63e2d4 | ||
|
|
371b168db1 | ||
|
|
3f17c92aa3 | ||
|
|
c988d3f1cc | ||
|
|
2e3bb4a585 | ||
|
|
414093f94f | ||
|
|
8156374005 | ||
|
|
a26bb2d884 | ||
|
|
6254e20c67 | ||
|
|
9b56555962 | ||
|
|
d989483d2b | ||
|
|
783dc18cd0 | ||
|
|
2081aefc84 | ||
|
|
bb93b98260 | ||
|
|
2d4624a1be | ||
|
|
839de65012 | ||
|
|
ae9c7ad6b6 | ||
|
|
906a9eaa5a | ||
|
|
dbe45d03d3 | ||
|
|
e5cb2be618 | ||
|
|
c4277c1e54 | ||
|
|
f3700b66c6 | ||
|
|
fd8f89c708 | ||
|
|
8ee1186492 | ||
|
|
d5b7184c8d | ||
|
|
a161ca37ff | ||
|
|
c1e6d88442 | ||
|
|
2114e6ba4e | ||
|
|
c9e7e6d925 | ||
|
|
c434136ba5 | ||
|
|
464ee6f9d6 | ||
|
|
13106d34a6 | ||
|
|
38d735341c | ||
|
|
2147bd23e6 | ||
|
|
cba0447cf1 | ||
|
|
c80fa48225 | ||
|
|
bdfbe462df | ||
|
|
8102883356 | ||
|
|
d2b81c23c0 | ||
|
|
3c281ccefa | ||
|
|
ba58578d60 | ||
|
|
cdb63bada3 | ||
|
|
1834be79a0 | ||
|
|
5b917c039e | ||
|
|
92cace6747 | ||
|
|
40b63be4b9 | ||
|
|
47d0b6583e | ||
|
|
c0e719e3d8 | ||
|
|
d3c0414b4f | ||
|
|
2c0eeaf8de | ||
|
|
1da7b154c1 | ||
|
|
54fb59d8db | ||
|
|
e66b266432 | ||
|
|
f339719ae9 | ||
|
|
adb70e0456 | ||
|
|
53ac13c792 | ||
|
|
c0481be8d8 | ||
|
|
19c616756a | ||
|
|
f2ae3ee41d | ||
|
|
054d98a2ba | ||
|
|
1420149b95 | ||
|
|
4874d08062 | ||
|
|
4c0dc21ca0 | ||
|
|
bc7bd77cea | ||
|
|
5d4eda68e0 | ||
|
|
94b1d59f2b | ||
|
|
f307fecaf6 | ||
|
|
6feacab4f5 | ||
|
|
4c8af0ff50 | ||
|
|
b154357683 | ||
|
|
3b9aee7d4c | ||
|
|
9f6118ed52 | ||
|
|
c947502efa | ||
|
|
dbb9caa196 | ||
|
|
764646634d | ||
|
|
0ae02d76a3 | ||
|
|
e9bf6ed4ce | ||
|
|
54228b4f98 | ||
|
|
58589b8454 | ||
|
|
387dd967e2 | ||
|
|
5adeaf9d76 | ||
|
|
205e715b7f | ||
|
|
79562f8d5b | ||
|
|
b5fe953a64 | ||
|
|
df22a311c2 | ||
|
|
9253fed754 | ||
|
|
c8c550cd33 | ||
|
|
8000777864 | ||
|
|
0bd45dc64b | ||
|
|
d99535d9da | ||
|
|
7ce7c0d5e5 | ||
|
|
0f51aa15d8 | ||
|
|
22d92c0540 | ||
|
|
a1ac285a25 | ||
|
|
7e8fda2d71 | ||
|
|
301f509611 | ||
|
|
550fc37e62 | ||
|
|
a14a3db2e9 | ||
|
|
e4d37c3e23 | ||
|
|
b2feac9d90 | ||
|
|
762ab74940 | ||
|
|
9471495dca | ||
|
|
58470e0913 | ||
|
|
f6ff6610e4 | ||
|
|
c7798d11ce | ||
|
|
25390e5f73 | ||
|
|
2e6c036ad8 | ||
|
|
61efda4cbd | ||
|
|
1331e8add7 | ||
|
|
0abe19c30d | ||
|
|
bbcf70cf4e | ||
|
|
70e75753f8 | ||
|
|
3ac413084f | ||
|
|
3d4e6c9169 | ||
|
|
56bc0dbd25 | ||
|
|
31b5d9df52 | ||
|
|
de305cb3b2 | ||
|
|
59a89b250d | ||
|
|
1c7b99d3dc | ||
|
|
b650ba21c4 | ||
|
|
b70dd36ffa | ||
|
|
6a62e13960 | ||
|
|
62f895e2ec | ||
|
|
4a5988accb | ||
|
|
b1ce3fc5c8 | ||
|
|
4ba039d229 | ||
|
|
ae7f8c3fe4 | ||
|
|
dc930dd6c5 | ||
|
|
3f6b3b51ca | ||
|
|
6900771c70 | ||
|
|
ca8ae3c723 | ||
|
|
b1f98b5903 | ||
|
|
2821459894 | ||
|
|
a020dbf3d7 | ||
|
|
aaadc6e001 | ||
|
|
0db03cfbcc | ||
|
|
ab558ee5fa | ||
|
|
a2f4afbf88 | ||
|
|
46770178d2 | ||
|
|
ef9468f78a | ||
|
|
48499fb506 | ||
|
|
f2e429e28f | ||
|
|
4017d09613 | ||
|
|
fd85088a6c | ||
|
|
1d9d8980a9 | ||
|
|
d3150ede42 | ||
|
|
f18edd5787 | ||
|
|
7e69a31dd6 | ||
|
|
3a181a5d28 | ||
|
|
59aa49076c | ||
|
|
e4725f4248 | ||
|
|
033016da7f | ||
|
|
12d0928244 | ||
|
|
3db4d10fc0 | ||
|
|
60fc500fa8 | ||
|
|
3ddc582edd | ||
|
|
5128ad6e24 | ||
|
|
eb03f8f08e | ||
|
|
b671edb116 | ||
|
|
09d3db145b | ||
|
|
8dc3d7323d | ||
|
|
9b9b5adf66 | ||
|
|
08abb1490a | ||
|
|
8a5c53550b | ||
|
|
049a038f56 | ||
|
|
e526162e8e | ||
|
|
1b16eb731d | ||
|
|
1bdffa961f | ||
|
|
6de3a40546 | ||
|
|
5f71165020 | ||
|
|
04327189f7 | ||
|
|
c4b2c3e697 | ||
|
|
8e1a9064cb | ||
|
|
95fa183fac | ||
|
|
bfc476a118 | ||
|
|
c90ece1188 | ||
|
|
c70dff89dd | ||
|
|
340287f073 | ||
|
|
365639a6c0 | ||
|
|
44e5566ee5 | ||
|
|
38be224665 | ||
|
|
29568287ef | ||
|
|
5fae19b4d6 | ||
|
|
c7d0e917fb | ||
|
|
9cafb08759 | ||
|
|
03fd69c3b9 | ||
|
|
a832bbb348 | ||
|
|
5308acdcde | ||
|
|
b2effa7cc8 | ||
|
|
b7f26ea788 | ||
|
|
d2135fd139 | ||
|
|
acd2d0121d | ||
|
|
9fa6bfd1a5 | ||
|
|
359e82fd3e | ||
|
|
dbde97f25f | ||
|
|
f04af6c1b3 | ||
|
|
c194538609 | ||
|
|
883c9dbf99 | ||
|
|
d0ab117488 | ||
|
|
3071796bc3 | ||
|
|
fa1bb9d672 | ||
|
|
a9e4fcfdca | ||
|
|
780e8ce470 | ||
|
|
2e9952439e | ||
|
|
5fef6478a5 | ||
|
|
61798d1af0 | ||
|
|
4cbcf5189a | ||
|
|
38c770ffb3 | ||
|
|
07cd1fb3c2 | ||
|
|
2493c2468d | ||
|
|
306dcf3600 | ||
|
|
c2f84309db | ||
|
|
314c30f489 | ||
|
|
1e4844fd1c | ||
|
|
e1344eb97c | ||
|
|
219e58d0e4 | ||
|
|
356f36c5bf | ||
|
|
9a75cb466a | ||
|
|
dc5127e619 | ||
|
|
a9bfe0f48f | ||
|
|
5d6555b9dd | ||
|
|
3f360601af | ||
|
|
35182066a8 | ||
|
|
a6e4e4ddb0 | ||
|
|
c3c14277e1 | ||
|
|
42b7d80567 | ||
|
|
fde33594a2 | ||
|
|
7f28c9fff6 | ||
|
|
57a6ada2a3 | ||
|
|
5741d4d67d | ||
|
|
4b90510b82 | ||
|
|
924cf871a7 | ||
|
|
77b6ef7396 | ||
|
|
388b90a94c | ||
|
|
f789714f14 | ||
|
|
e195cf0b95 | ||
|
|
a2c80a704f | ||
|
|
b5196b7164 | ||
|
|
1a5bbef266 | ||
|
|
05683bbf61 | ||
|
|
90615a8682 | ||
|
|
36b4d50cff | ||
|
|
d421b90376 | ||
|
|
356525730d | ||
|
|
d29233f553 | ||
|
|
5703c704f9 | ||
|
|
50ed463b9f | ||
|
|
3889941406 | ||
|
|
0d38e154cf | ||
|
|
22a3721dda | ||
|
|
2636c2470b | ||
|
|
1ea6df14d0 | ||
|
|
fe3ce78ae4 | ||
|
|
27ace14fb7 | ||
|
|
7f1adc6a6a | ||
|
|
6eb2204c2b | ||
|
|
1d9873e1a9 | ||
|
|
bc9b816719 | ||
|
|
825ceeaa8d | ||
|
|
864af9cc3b | ||
|
|
d453961afc | ||
|
|
7d4b43f368 | ||
|
|
d3a0cff30a | ||
|
|
52421406ce | ||
|
|
eb4a5f6570 | ||
|
|
e992e4bea5 | ||
|
|
13667e4850 | ||
|
|
b58df17545 | ||
|
|
a291919cf7 | ||
|
|
03544f783a | ||
|
|
6ea69f421f | ||
|
|
310bf4bde4 | ||
|
|
ec3a07cd52 | ||
|
|
63a363080e | ||
|
|
323a0d7d0d | ||
|
|
b7cf434ebd | ||
|
|
555b37411f | ||
|
|
bd68b94411 | ||
|
|
141df52dd6 | ||
|
|
fb3f1ef667 | ||
|
|
4755197503 | ||
|
|
59df957181 | ||
|
|
192dc43b87 | ||
|
|
91fbb4da41 | ||
|
|
a6879775bb | ||
|
|
01a3787664 | ||
|
|
3db101ffdd | ||
|
|
2b966e630b | ||
|
|
892798bf79 | ||
|
|
007783cf76 | ||
|
|
0de1b878bd | ||
|
|
777d2f7027 | ||
|
|
78645c718f | ||
|
|
0b271cca46 | ||
|
|
985a268477 | ||
|
|
cd5e43483e | ||
|
|
02f47b5a91 | ||
|
|
4feecbeab8 | ||
|
|
0630542e20 | ||
|
|
783efd1a71 | ||
|
|
5313d61847 | ||
|
|
92c33b76dc | ||
|
|
7c1d6251f7 | ||
|
|
9178d80349 | ||
|
|
bc8127d685 | ||
|
|
8e18d5906d | ||
|
|
f02e731c67 | ||
|
|
9bcf01bf3f | ||
|
|
fed0f3d09e | ||
|
|
07b25e457b | ||
|
|
78e3c63ead | ||
|
|
6b7c59635e | ||
|
|
61909d842d | ||
|
|
4c5bb7660c | ||
|
|
bbc13b8ac9 | ||
|
|
71622b9f86 | ||
|
|
82231b77a2 | ||
|
|
67208b111d | ||
|
|
c48721e008 | ||
|
|
0efd118d43 | ||
|
|
d9d4b6e06d | ||
|
|
f4a95f89ac | ||
|
|
a7655b69e8 | ||
|
|
ce6d1d306d | ||
|
|
5f89b4427f | ||
|
|
9427b2f4b1 | ||
|
|
1d0c93c0b6 | ||
|
|
08e83983d0 | ||
|
|
eaafe83ae4 | ||
|
|
58584d8784 | ||
|
|
76aa2df807 | ||
|
|
da93081f47 | ||
|
|
ba434617dc | ||
|
|
97b694b59c | ||
|
|
c258e229c8 | ||
|
|
611f5f638d | ||
|
|
79279caa2e | ||
|
|
745c4625a6 | ||
|
|
be0cd601a9 | ||
|
|
703d4a6aee | ||
|
|
6b0d060289 | ||
|
|
4325363084 | ||
|
|
c387436a68 | ||
|
|
fba3adbc5e | ||
|
|
030cea6a0f | ||
|
|
b70808eca7 | ||
|
|
16c212c9fd | ||
|
|
8ac7dd8e9a | ||
|
|
1afbf75cbc | ||
|
|
da8fe06301 | ||
|
|
cad44ee68a | ||
|
|
8baad70f6c | ||
|
|
735f06fd83 | ||
|
|
75580f253e | ||
|
|
08d5ff4736 | ||
|
|
a1217d61b6 | ||
|
|
fbc3be84e3 | ||
|
|
efaa0b1e2a | ||
|
|
f7556e7ad2 | ||
|
|
5afd2695fb | ||
|
|
d4ade7b935 | ||
|
|
d7113a3602 | ||
|
|
8da7f789d8 | ||
|
|
9c3805c0d5 | ||
|
|
83440f5bbc | ||
|
|
b0c68ddc61 | ||
|
|
cb089987ee | ||
|
|
93d16bf4d7 | ||
|
|
3793ae323a | ||
|
|
7ee64fc0d4 | ||
|
|
3e43e164ae | ||
|
|
74b401b70d | ||
|
|
8626d6279a | ||
|
|
df53870c01 | ||
|
|
4382642099 | ||
|
|
b124c7f16d | ||
|
|
000c1bddb2 | ||
|
|
6b557fd92f | ||
|
|
6ba7fe26a7 | ||
|
|
50cacfee3d | ||
|
|
aa1ff189e1 | ||
|
|
235817c581 | ||
|
|
81e7f45200 | ||
|
|
5998f60764 | ||
|
|
5937fba373 | ||
|
|
626fea3f7a | ||
|
|
b3f17dc614 | ||
|
|
dac99c7745 | ||
|
|
a4b4eab2ae | ||
|
|
bec985a551 | ||
|
|
b491d22c16 | ||
|
|
5a4480bd1d | ||
|
|
807724e0f0 | ||
|
|
11614af2c2 | ||
|
|
5f021990b4 | ||
|
|
5f22afa450 | ||
|
|
647c4036cf | ||
|
|
857b59409c | ||
|
|
c3ada19892 | ||
|
|
558f261b60 | ||
|
|
20d4ba9ddd | ||
|
|
5ab88e629b | ||
|
|
463441c808 | ||
|
|
2fd0ffbfec | ||
|
|
8d3df7ea57 | ||
|
|
1e7676d26f | ||
|
|
cd814d420b | ||
|
|
68ec8ef313 | ||
|
|
e717bfc04b | ||
|
|
538c7579ba | ||
|
|
b4018846e8 | ||
|
|
220b37133b | ||
|
|
cfce9f7171 | ||
|
|
d59d7887bb | ||
|
|
7e999603fc | ||
|
|
f8771c2214 | ||
|
|
1b04c4beb7 | ||
|
|
fa7a277d64 | ||
|
|
f2ad205538 | ||
|
|
6d5c2bf7b2 | ||
|
|
913a5d1df2 | ||
|
|
fd796723f2 | ||
|
|
b213c7ed24 | ||
|
|
2a76cc6f54 | ||
|
|
dce71d6e7d | ||
|
|
19de053054 | ||
|
|
ec9c355791 | ||
|
|
257fe68f13 | ||
|
|
21bb799e7b | ||
|
|
8513ddb9b4 | ||
|
|
8104c97f77 | ||
|
|
7b853d8981 | ||
|
|
d808add499 | ||
|
|
d07ec07896 | ||
|
|
ed467aa74b | ||
|
|
1becbb8805 | ||
|
|
afc1938676 | ||
|
|
5411699256 | ||
|
|
8ce723b4c9 | ||
|
|
19adbaf84b | ||
|
|
337d6d9f08 | ||
|
|
7767f03e9c | ||
|
|
711bbe0afb | ||
|
|
76efc31b00 | ||
|
|
346c17b649 | ||
|
|
56acb2c08c | ||
|
|
69c47aa7d9 | ||
|
|
13cb806436 | ||
|
|
d28188d19d | ||
|
|
37b1b161f9 | ||
|
|
123c9d2315 | ||
|
|
fef6440ff2 | ||
|
|
0b808fa2aa | ||
|
|
c4b3dc40c3 | ||
|
|
888e5ed2c5 | ||
|
|
29a6c7e6ba | ||
|
|
90964d25ce | ||
|
|
26e537e328 | ||
|
|
7c30b3ca5d | ||
|
|
ea5c54ad9c | ||
|
|
ec8db116f8 | ||
|
|
884fc5d249 | ||
|
|
b5bfc3e2c7 | ||
|
|
be84b52d19 | ||
|
|
7c690ae8b8 | ||
|
|
17b286ef59 | ||
|
|
6a05645295 | ||
|
|
4a63e6b6ec | ||
|
|
f510f3062b | ||
|
|
30a9e40f4e | ||
|
|
7ba2dd8397 | ||
|
|
93cf135d5e | ||
|
|
537a551bb5 | ||
|
|
8866683a72 | ||
|
|
7f807986d7 | ||
|
|
c5f30f0d80 | ||
|
|
04f4a81736 | ||
|
|
dc790e62ce | ||
|
|
15c8515d53 | ||
|
|
0dfbc8d72f | ||
|
|
d4488cb040 | ||
|
|
eacb221ffe | ||
|
|
2fe0736b87 | ||
|
|
76f1dbe16b | ||
|
|
49982b36ac | ||
|
|
1002923dea | ||
|
|
7f420f3246 | ||
|
|
59571b1ce1 | ||
|
|
c5287e68b1 | ||
|
|
3cc7f66e90 | ||
|
|
919d29fdf7 | ||
|
|
fe55feb82f | ||
|
|
4c7b39f49e | ||
|
|
d2c23ebc8d | ||
|
|
35ae0e435d | ||
|
|
485b1ba88e | ||
|
|
d3d6fca350 | ||
|
|
cef7b9c92d | ||
|
|
4b92e2a705 | ||
|
|
270aba99fa | ||
|
|
adb3827d1e | ||
|
|
554a640c2b | ||
|
|
3a7aea48d7 | ||
|
|
1bb5408d83 | ||
|
|
73494a23df | ||
|
|
ef61407d95 | ||
|
|
5776a948c4 | ||
|
|
84173f3759 | ||
|
|
2ca5f2e27e | ||
|
|
339d1eb124 | ||
|
|
e1b4788bc2 | ||
|
|
72108c3a4e | ||
|
|
8f19ffd097 | ||
|
|
76c3fe1260 | ||
|
|
cafcbe03e1 | ||
|
|
5240217144 | ||
|
|
d68abf8237 | ||
|
|
03ffbe55ce | ||
|
|
a918fd1cf2 | ||
|
|
21959aec8f | ||
|
|
68c9d08909 | ||
|
|
e61032a313 | ||
|
|
fc5c9ad2f2 | ||
|
|
1daa0204aa | ||
|
|
7706020805 | ||
|
|
77fea1983c | ||
|
|
5e2cc05047 | ||
|
|
052e025537 | ||
|
|
6a0ef4b561 | ||
|
|
f87614e2d3 | ||
|
|
ddeca6cc06 | ||
|
|
cec91ae837 | ||
|
|
13d5471dd0 | ||
|
|
8123562ded | ||
|
|
14e1306b20 | ||
|
|
f4ddce7274 | ||
|
|
cc7aee6c3e | ||
|
|
d5966f944f | ||
|
|
caf4ca7451 | ||
|
|
949eef82f0 | ||
|
|
815d0aff90 | ||
|
|
848bc0779a | ||
|
|
f5bc9c08b1 | ||
|
|
5018bf1baf | ||
|
|
7375afca3e | ||
|
|
978702d04b | ||
|
|
f936b17d68 | ||
|
|
9838199de1 | ||
|
|
70b11f18b5 | ||
|
|
c11ff4a18c | ||
|
|
aba907d1a8 | ||
|
|
0c01c7ceba | ||
|
|
6ac1b6e82e | ||
|
|
0536d6cbed | ||
|
|
278bcfa8da | ||
|
|
52ebdcc27f | ||
|
|
4c97f5514d | ||
|
|
c6f7687bbb | ||
|
|
8536d0f6e9 | ||
|
|
4043141ae3 | ||
|
|
31721165b5 | ||
|
|
5383df5246 | ||
|
|
eaee8ee586 | ||
|
|
f76b675e09 | ||
|
|
99149b5cfe | ||
|
|
196c5c1267 | ||
|
|
2c3428a1bf | ||
|
|
94368accc1 | ||
|
|
ee774f1bf9 | ||
|
|
bb73da4c5e | ||
|
|
39acb46139 | ||
|
|
9e29ea8011 | ||
|
|
97e8974fdf | ||
|
|
279988bd60 | ||
|
|
ff7a17eb96 | ||
|
|
5bb4590348 | ||
|
|
e4767b1a51 | ||
|
|
058b690e25 | ||
|
|
8986640a10 | ||
|
|
5e4b500b5d | ||
|
|
bb6b3db0ac | ||
|
|
087e22ab94 | ||
|
|
48ae76e295 | ||
|
|
7b8699f54c | ||
|
|
59f644a3e2 | ||
|
|
17eec5f9e9 | ||
|
|
45b5819b8d | ||
|
|
97d5c067ac | ||
|
|
9dfd4bb430 | ||
|
|
ff7b542bfa | ||
|
|
8b9b99ac40 | ||
|
|
cce1549f66 | ||
|
|
affaec2a6f | ||
|
|
c52e593ea8 | ||
|
|
5d920be880 | ||
|
|
062152c723 | ||
|
|
84359a0078 | ||
|
|
5d068083e5 | ||
|
|
42399952ea | ||
|
|
4bc8773417 | ||
|
|
9e7108ff60 | ||
|
|
22b2446c05 | ||
|
|
d9947f2374 | ||
|
|
2de76d733b | ||
|
|
2798726dba | ||
|
|
f16d88fd53 | ||
|
|
69f86fc0af | ||
|
|
53c73054f4 | ||
|
|
b80b7bbcb9 | ||
|
|
225d78c767 | ||
|
|
a38bbdcc05 | ||
|
|
047f01888a | ||
|
|
f2d092c815 | ||
|
|
8392158ee3 | ||
|
|
93defa5f59 | ||
|
|
24436b550d | ||
|
|
ed8e08b78a | ||
|
|
f0983353f2 | ||
|
|
dbb50d7b16 | ||
|
|
2d7916f77d | ||
|
|
7d5dc08a0a | ||
|
|
fe1ce5b3ac | ||
|
|
9523bf5fbd | ||
|
|
ed013c1b7e | ||
|
|
aafc108260 | ||
|
|
3b56663e4d | ||
|
|
d7b84bd35f | ||
|
|
4b8862c1ec | ||
|
|
fed3165b53 | ||
|
|
6d40f797d2 | ||
|
|
f2cd96b9c0 | ||
|
|
dc38ec5051 | ||
|
|
38621b622e | ||
|
|
9b22f046f5 | ||
|
|
a5a08006e9 | ||
|
|
e0eef2080e | ||
|
|
60078300b8 | ||
|
|
58b49f9a08 | ||
|
|
3deacaa5c4 | ||
|
|
c44a5ede43 | ||
|
|
e11c7a08ea | ||
|
|
939d33cce7 | ||
|
|
0744b5d91b | ||
|
|
f68d31d7c5 | ||
|
|
6e3174e71a | ||
|
|
d572e1ddad | ||
|
|
30eb03af4c | ||
|
|
f0e0df2660 | ||
|
|
cd888a2149 | ||
|
|
0608778b9c | ||
|
|
e038e1a2f5 | ||
|
|
681c2a67bd | ||
|
|
d5b7b7ec52 | ||
|
|
44405e5415 | ||
|
|
e9bc5b719d | ||
|
|
2fdad0f11d | ||
|
|
6da5a6b82f | ||
|
|
029f1c411f | ||
|
|
206e44431d | ||
|
|
31b5ca17f1 | ||
|
|
5a68d69067 | ||
|
|
19e780c53f | ||
|
|
e9912c020e | ||
|
|
646e8713f2 | ||
|
|
b87ce172c3 | ||
|
|
a300a635d8 | ||
|
|
61a0f04bbe | ||
|
|
214bad26db | ||
|
|
e9e6a8e5ad | ||
|
|
26385fa10d | ||
|
|
d13c4b7b84 | ||
|
|
c315ad7801 | ||
|
|
762b4eb876 | ||
|
|
67e9b65a2e | ||
|
|
a8fdf0b5ea | ||
|
|
7404a6cf98 | ||
|
|
db02c32a9f | ||
|
|
c1c75208ec | ||
|
|
bb53146192 | ||
|
|
23c5b0366f | ||
|
|
310e912a9d | ||
|
|
c498ce3c41 | ||
|
|
8b20c5edab | ||
|
|
a6a142753a | ||
|
|
17da808325 | ||
|
|
03fe9d4e97 | ||
|
|
d4c20a919d | ||
|
|
1a389b6faf | ||
|
|
34f08ce082 | ||
|
|
20ed279489 | ||
|
|
da2f971345 | ||
|
|
835cd43565 | ||
|
|
7dbd0bd355 | ||
|
|
7c743eb7da | ||
|
|
863c575580 | ||
|
|
f92eded0a2 | ||
|
|
a97b87d2cd | ||
|
|
faaebbf5e1 | ||
|
|
6701ad8b73 | ||
|
|
b9af2d6b97 | ||
|
|
3393947dbc | ||
|
|
7648d300b5 | ||
|
|
bde293af22 | ||
|
|
e43b13968e | ||
|
|
b5c30ea679 | ||
|
|
18cbe31a84 | ||
|
|
451adb077f | ||
|
|
4bbd42123e | ||
|
|
17310da0f8 | ||
|
|
33e2179b65 | ||
|
|
032f54dd1a | ||
|
|
9fa85a5831 | ||
|
|
016ed12c11 | ||
|
|
d26b2a694d | ||
|
|
9b35793608 | ||
|
|
9cc344f8cc | ||
|
|
5a75e14a8a | ||
|
|
f5e14c9d70 | ||
|
|
237270a27e | ||
|
|
f5ccd943f1 | ||
|
|
53f5513476 | ||
|
|
e599e47e84 | ||
|
|
4638ebac8a | ||
|
|
52986c5c07 | ||
|
|
d4ff877fdd | ||
|
|
d66fac5662 | ||
|
|
a158f5ab9d | ||
|
|
67b5353861 | ||
|
|
4dd58a94f3 | ||
|
|
1821be87e9 | ||
|
|
1154f871f1 | ||
|
|
c22e8cfc01 | ||
|
|
61ee071f43 | ||
|
|
2c3a696b78 | ||
|
|
03bbb340f8 | ||
|
|
869c8a4ead | ||
|
|
65b6b142bd | ||
|
|
f3b1f89bae | ||
|
|
3126676ffb | ||
|
|
eb9e8c9dfc | ||
|
|
ac7f1035e1 | ||
|
|
3108f5bf0d | ||
|
|
c108f11c01 | ||
|
|
f92129dcdb | ||
|
|
09e9254f35 | ||
|
|
7c722def0f | ||
|
|
227c8a96c8 | ||
|
|
9fe1d8462a | ||
|
|
5ba13a9500 | ||
|
|
d018bd4892 | ||
|
|
0d0b7f8af2 | ||
|
|
4660bc58fc | ||
|
|
223e1b1cd4 | ||
|
|
0fc8a0f840 | ||
|
|
2768878618 | ||
|
|
ffb408f440 | ||
|
|
ac08dec2c3 | ||
|
|
d88a75b666 | ||
|
|
cf49c274a6 | ||
|
|
1a956cce9a | ||
|
|
d9008cd302 | ||
|
|
be63eb8cef | ||
|
|
2ab12f54ff | ||
|
|
6a3d110d3a | ||
|
|
49a29a16e6 | ||
|
|
e71409b7c8 | ||
|
|
0a67ca53d4 | ||
|
|
b65db49868 | ||
|
|
3e4a7ba97c | ||
|
|
2c4e8cbb4a | ||
|
|
a3085cb44a | ||
|
|
5a81073cd8 | ||
|
|
c028771ad0 | ||
|
|
70cbaeb423 | ||
|
|
d5a9d32778 | ||
|
|
bfc5f01e1e | ||
|
|
d3c95e030b | ||
|
|
45136de664 | ||
|
|
4998eb3061 | ||
|
|
991a33f7b6 | ||
|
|
2cf924ab74 | ||
|
|
6c202c5fa1 | ||
|
|
8ca2bbecc6 | ||
|
|
945fb61e59 | ||
|
|
044feab00f | ||
|
|
dabd882056 | ||
|
|
e862ba9daf | ||
|
|
d96a83adac | ||
|
|
7218a9de0e | ||
|
|
8f01db10a6 | ||
|
|
eebaff95cf | ||
|
|
22ca29a51f | ||
|
|
e9cdf85286 | ||
|
|
07f7db1b6d | ||
|
|
1523b2ef80 | ||
|
|
075a138e14 | ||
|
|
73a799b0ce | ||
|
|
3d5edba574 | ||
|
|
21a7fcb01a | ||
|
|
c3152a6343 | ||
|
|
0ce51fcb87 | ||
|
|
570c683b99 | ||
|
|
1f64f9dfcc | ||
|
|
b3642708b3 | ||
|
|
f6604f6578 | ||
|
|
c382ca22b8 | ||
|
|
52a2073152 | ||
|
|
54afb2f1af | ||
|
|
80af01c20f | ||
|
|
526ccc870b | ||
|
|
1ce1899a46 | ||
|
|
896c8b4a78 | ||
|
|
d800d10766 | ||
|
|
7916a2a648 | ||
|
|
ba3581354a | ||
|
|
5cc02ac97f | ||
|
|
08da8ef09d | ||
|
|
4052e15565 | ||
|
|
c8f323b706 | ||
|
|
c91f70cbf4 | ||
|
|
a01bb27d7e | ||
|
|
3f806f83e3 | ||
|
|
4445c34af0 | ||
|
|
782b85ba13 | ||
|
|
91644d2145 | ||
|
|
3e7ed752ea | ||
|
|
98f5fbab5d | ||
|
|
da34ea6b11 | ||
|
|
533881e620 | ||
|
|
d8ead2693f | ||
|
|
7d9a18a63d | ||
|
|
fbac1cfe1e | ||
|
|
9684c8b4bc | ||
|
|
ef31c47c15 | ||
|
|
2416c387f5 | ||
|
|
326d3df63f | ||
|
|
982fca541d | ||
|
|
ad39c30c21 | ||
|
|
7da1b215f3 | ||
|
|
ab37794f61 | ||
|
|
ccb5344d32 | ||
|
|
9079d2890c | ||
|
|
bf1f60b31e | ||
|
|
1b1d1a8d0b | ||
|
|
947acfffe2 | ||
|
|
6b5b10fc94 | ||
|
|
f3ef6448d7 | ||
|
|
52a8692a85 | ||
|
|
29e656ec7e | ||
|
|
4da49dfc2d | ||
|
|
cabe7c696c | ||
|
|
e3370b6a98 | ||
|
|
e25a428118 | ||
|
|
2492b9968a | ||
|
|
6dda2f3670 | ||
|
|
aae24c26a3 | ||
|
|
97dbb40ad6 | ||
|
|
18ca96e285 | ||
|
|
206d46cbb7 | ||
|
|
41ce4886fd | ||
|
|
256f6e410c | ||
|
|
d5d337c631 | ||
|
|
71818da6a5 | ||
|
|
c53aef9955 | ||
|
|
a18995d3dc | ||
|
|
a17e4434be | ||
|
|
d2955cb32f | ||
|
|
5b0e6297bb | ||
|
|
749355abc2 | ||
|
|
7c3640a4c3 | ||
|
|
ca3b3b9843 | ||
|
|
9be342bd25 | ||
|
|
4a310f36d8 | ||
|
|
e647b5562b | ||
|
|
9ffcd9e922 | ||
|
|
599f6426a5 | ||
|
|
e8a2680e31 | ||
|
|
f5993a2507 | ||
|
|
9782937138 | ||
|
|
7aff424d1c | ||
|
|
d7be62b7da | ||
|
|
84d584f607 | ||
|
|
68c31c55c5 | ||
|
|
5a0641a30e | ||
|
|
ac3a270e17 | ||
|
|
aeba02fb22 | ||
|
|
1101a1094f | ||
|
|
64aed24539 | ||
|
|
b77fe285dc | ||
|
|
874d61bb6d | ||
|
|
c793e847bc | ||
|
|
112a6f7b44 | ||
|
|
398733ff9a | ||
|
|
744f0ab198 | ||
|
|
f2d5bcbbdd | ||
|
|
323a6e34b5 | ||
|
|
3330f040ba | ||
|
|
4d26dffa7d | ||
|
|
9d4d85ca9d | ||
|
|
d37d1a033a | ||
|
|
dcd1a089b1 | ||
|
|
9ad2a9ac85 | ||
|
|
5c53081007 | ||
|
|
f375c41950 | ||
|
|
2a59dbbc89 | ||
|
|
d5d92c6290 | ||
|
|
e96eadb5e7 | ||
|
|
593d06e91e | ||
|
|
ca3cdfabec | ||
|
|
bfa8630feb | ||
|
|
0bf4ac6fb3 | ||
|
|
a7c1ff402a | ||
|
|
0960473c9b | ||
|
|
fd38a55f51 | ||
|
|
76bee57553 | ||
|
|
d791476708 | ||
|
|
975fd0a6d3 | ||
|
|
2be75420ca | ||
|
|
c2a89ae58e | ||
|
|
1c157c7c3d | ||
|
|
e039f7cc22 | ||
|
|
e1dd85d261 | ||
|
|
4cab48a000 | ||
|
|
f876833b9a | ||
|
|
ce534491fd | ||
|
|
843172ccc8 | ||
|
|
794d638ded | ||
|
|
ba283377b9 | ||
|
|
f8ad108da6 | ||
|
|
98208b9963 | ||
|
|
8eba418715 | ||
|
|
ea616114a9 | ||
|
|
166b5da560 | ||
|
|
c8172d2b49 | ||
|
|
ec5b304634 | ||
|
|
e19de25297 | ||
|
|
9b74a632e1 | ||
|
|
5f6c63948e | ||
|
|
0b5adc7795 | ||
|
|
2f6fe2c65e | ||
|
|
6ac08c3bee |
48
.travis.yml
48
.travis.yml
@@ -2,19 +2,15 @@
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: precise to have php 5.3 available
|
||||
dist: precise
|
||||
sudo: required
|
||||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- nightly
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
@@ -33,10 +29,16 @@ addons:
|
||||
- libapache2-mod-fastcgi
|
||||
# We need pgloader for import mysql database into pgsql
|
||||
- pgloader
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
#- hhvm only with dist: trusty
|
||||
- nightly
|
||||
|
||||
env:
|
||||
global:
|
||||
@@ -57,11 +59,22 @@ env:
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: 7.1
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
#- env: DB=postgresql
|
||||
# TODO
|
||||
#- env: DB=sqlite
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.4'
|
||||
env: DB=postgresql
|
||||
- php: '5.5'
|
||||
env: DB=postgresql
|
||||
- php: '5.6'
|
||||
env: DB=postgresql
|
||||
- php: '7.0'
|
||||
env: DB=postgresql
|
||||
- php: hhvm
|
||||
env: DB=postgresql
|
||||
- php: nightly
|
||||
env: DB=postgresql
|
||||
|
||||
notifications:
|
||||
email:
|
||||
@@ -305,6 +318,9 @@ script:
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
|
||||
241
ChangeLog
241
ChangeLog
@@ -2,14 +2,192 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 6.0.0 compared to 5.0.* *****
|
||||
|
||||
***** ChangeLog for 6.0.6 compared to 6.0.6 *****
|
||||
FIX: #7974 Contract - Invalid reference on the document
|
||||
FIX: #8139
|
||||
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
|
||||
FIX: #8151
|
||||
FIX: #8200
|
||||
FIX: add planned delivery to order exports
|
||||
FIX: a discount is a percent, not an amount, so we use vatrate not price
|
||||
FIX: Avoid empty value to fk_multicurrency attribute
|
||||
FIX: Bad localtaxes assignment in cashdesk
|
||||
FIX: check shipping on delete order
|
||||
FIX: check verif exped on delete order
|
||||
FIX: creer into lire
|
||||
FIX: Delete tasks on project delete will now trigger TASK_DELETE
|
||||
FIX: Global on $user parameter reset the variable
|
||||
FIX: if we make a mistake with situation_percent, now we can correct…
|
||||
FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back
|
||||
FIX: Import process must stop after ending line nb to import
|
||||
FIX: migration script for product photo
|
||||
FIX: natural search double quote
|
||||
FIX: reverse field to have object loaded in doaction
|
||||
FIX: Saving wrong localtax on order addline
|
||||
FIX: show status on societe banner
|
||||
FIX: solve column mismatch in user card's usergroup list + code cleanup
|
||||
FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup
|
||||
FIX: unset categorie
|
||||
FIX: update_extras on fourn card
|
||||
FIX: warning when adding ECM files using old photo path
|
||||
FIX: Withdrawals lines not filter by company name and not respect dropdown limit lines by page
|
||||
NEW: Add sale representative einstein_pdf_modules
|
||||
NEW_einstein_pdf_modules
|
||||
NEW: field commerciaux and categ export CustomersInvoicesAndPayments
|
||||
|
||||
|
||||
***** ChangeLog for 6.0.5 compared to 6.0.4 *****
|
||||
FIX: security vulnerability reported by ADLab of Venustech
|
||||
CVE-2017-17897, CVE-2017-17898, CVE-2017-17899, CVE-2017-17900
|
||||
FIX: #7379: Compatibility with PRODUCT_USE_OLD_PATH_FOR_PHOTO variable
|
||||
FIX: #7903
|
||||
FIX: #7933
|
||||
FIX: #8029 Unable to make leave request in holyday module
|
||||
FIX: #8093
|
||||
FIX: Bad name alias showing in name of third column
|
||||
FIX: Cashdesk should not sell to inactive third parties
|
||||
FIX: Edit accountancy account and warning message on loan
|
||||
FIX: $accounts[$bid] is a label !
|
||||
FIX: $oldvatrateclean & $newvatrateclean must be set if preg_match === false
|
||||
FIX: product best price on product list
|
||||
FIX: search on contact list
|
||||
FIX: stats trad for customerinvoice
|
||||
FIX: translate unactivate on contractline
|
||||
FIX: email sent was not in HTML
|
||||
FIX: missing hook invoice index
|
||||
FIX: subject mail sepa
|
||||
|
||||
|
||||
***** ChangeLog for 6.0.4 compared to 6.0.3 *****
|
||||
FIX: #7737
|
||||
FIX: #7751
|
||||
FIX: #7756 Add better error message
|
||||
FIX: #7786
|
||||
FIX: #7806
|
||||
FIX: #7824
|
||||
FIX: add line bad price and ref
|
||||
FIX: A lot of several fix on local taxes and NPR tax
|
||||
FIX: createfromorder
|
||||
FIX: CSS for IE10
|
||||
FIX: external user cannot be set as internal
|
||||
FIX: Filter type on actioncomm with multiselect doesn't work
|
||||
FIX: list of donation not filtered on multicompany
|
||||
FIX: list of module not complete when module mb_strlen not available
|
||||
FIX: Locatax were not propagated when cloning order or proposal
|
||||
FIX: Searching translation should not be case sensitive
|
||||
FIX: Search into language is ok for file into external modules two.
|
||||
FIX: test for filter fk_status
|
||||
FIX: too much users on holiday list
|
||||
FIX: Wrong alias sql
|
||||
|
||||
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
|
||||
FIX: #7211 Update qty dispatched on qty change
|
||||
FIX: #7458
|
||||
FIX: #7593
|
||||
FIX: #7616
|
||||
FIX: #7619
|
||||
FIX: #7626
|
||||
FIX: #7648
|
||||
FIX: #7675
|
||||
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
|
||||
FIX: API to get object does not return data of linked objects
|
||||
FIX: Bad localtax apply
|
||||
FIX: Bad ressource list in popup in gantt view
|
||||
FIX: bankentries search conciliated if val 0
|
||||
FIX: hook formObjectOptions() must use $expe and not $object
|
||||
FIX: make of link to other object during creation
|
||||
FIX: Missing function getLinesArray
|
||||
FIX: old batch not shown in multi shipping
|
||||
FIX: paid supplier invoices are shown as abandoned
|
||||
FIX: selection of thirdparty was lost on stats page of invoices
|
||||
FIX: sql syntax error because of old field accountancy_journal
|
||||
FIX: Stats on invoices show nothing
|
||||
FIX: substitution in ODT of thirdparties documents
|
||||
FIX: wrong key in selectarray
|
||||
FIX: wrong personnal project time spent
|
||||
|
||||
***** ChangeLog for 6.0.2 compared to 6.0.1 *****
|
||||
FIX: #7148
|
||||
FIX: #7288
|
||||
FIX: #7366 renaming table with pgsql
|
||||
FIX: #7435 Can't add payment term
|
||||
FIX: #7461
|
||||
FIX: #7464
|
||||
FIX: #7471
|
||||
FIX: #7473 Mass update of vat rates and other bugs on localtax
|
||||
FIX: #7475
|
||||
FIX: #7486 Empty value for multicurrency rate must be forbidden
|
||||
FIX: #7490
|
||||
FIX: #7505
|
||||
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
|
||||
FIX: #7514
|
||||
FIX: #7531 #7537
|
||||
FIX: #7541
|
||||
FIX: #7546
|
||||
FIX: #7550
|
||||
FIX: #7554
|
||||
FIX: #7567
|
||||
FIX: Accountancy export model for Agiris Isacompta
|
||||
FIX: Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled
|
||||
FIX: Bad preview on scroping when special file names
|
||||
FIX: Generation of invoice from bulk action "Bill Orders"
|
||||
FIX: Implementation of a Luracast recommandation for the REST api server (#7370)
|
||||
FIX: Missing space in request
|
||||
FIX: Only modified values must be modified
|
||||
FIX: replenish if line test GETPOST on line 0
|
||||
FIX: Stripe not working on live mode
|
||||
FIX: wrong basePath in the swagger view
|
||||
FIX: Implementation of a Luracast recommandation for the REST api server
|
||||
|
||||
***** ChangeLog for 6.0.1 compared to 6.0.* *****
|
||||
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
|
||||
FIX: #7325 Default VAT rate when editing template invoices is 0%
|
||||
FIX: #7330
|
||||
FIX: #7359
|
||||
FIX: #7367
|
||||
FIX: #7368
|
||||
FIX: #7391
|
||||
FIX: #7420
|
||||
FIX: Add some missing attributes in Adherent:makeSubstitution (type, phone…
|
||||
FIX: Bad const name
|
||||
FIX: Bad link to unpayed suppliers invoices
|
||||
FIX: Better protection to no send email when we change limit
|
||||
FIX: Calculation in the activity box
|
||||
FIX: Clean bad parameters when inserting line of template invoice
|
||||
FIX: dateSelector was not taken into account
|
||||
FIX: hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
|
||||
FIX: journalization for bank journal should not rely on a label.
|
||||
FIX: menu enty when url is external link
|
||||
FIX: missing supplier qty and supplier discount in available fields for product export.
|
||||
FIX: multicompany better accuracy in rounding and with revenue stamp.
|
||||
FIX: Must use pdf format page as default for merging PDF.
|
||||
FIX: PDF output was sharing 2 different currencies in same total
|
||||
FIX: Position of signature on strato template
|
||||
FIX: Protection to avoid to apply credit note discount > remain to pay
|
||||
FIX: Remove warning when using log into syslog
|
||||
FIX: Responsive
|
||||
FIX: Security fixes (filter onload js, less verbose error message in
|
||||
FIX: SEPA recording payment must save one payment in bank per customer
|
||||
FIX: Several problem with the last event box on project/tasks
|
||||
FIX: Sign of amount in origin currency on credit note created from lines
|
||||
FIX: Some page of admin were not responsive
|
||||
FIX: SQL injection
|
||||
FIX: time.php crashed without project id in param
|
||||
FIX: transfer of line extrafields from order to invoice
|
||||
FIX: Upgrade missing on field
|
||||
FIX: View of timespent for another user
|
||||
FIX: ODT generation
|
||||
FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-14241,
|
||||
CVE-2017-14242
|
||||
|
||||
***** ChangeLog for 6.0.0 compared to 5.0.* *****
|
||||
NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
|
||||
NEW: Add a payment module for Stripe.
|
||||
NEW: Add module "Product variant" (like red, blue for the product shoes)
|
||||
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
|
||||
NEW: Add a tracking id into mass emailing.
|
||||
NEW: Tax system more compatible with the new tax roollout in India (IGST / CGST / SGST).
|
||||
NEW: Tax system more compatible with the new tax rollout in India (IGST / CGST / SGST).
|
||||
NEW: Add calculation function for Loan schedule
|
||||
NEW: Add "depends on" and "required by" into module informations
|
||||
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
|
||||
@@ -23,7 +201,7 @@ NEW: add property to show warnings when activating modules
|
||||
NEW: add rapport file for supplier paiement
|
||||
NEW: Add statistics on supplier tab.
|
||||
NEW: Add tooltip help on shipment weight and volume calculation
|
||||
NEW: An external module can hook and add mass actions
|
||||
NEW: An external module can hook and add mass actions.
|
||||
NEW: Better reponsive design
|
||||
NEW: Bookmarks are into a combo list.
|
||||
NEW: Bulk actions available on supplier orders
|
||||
@@ -144,7 +322,9 @@ Following changes may create regression for some external modules, but were nece
|
||||
exists, but if an external module need action on it, it must provides itself its trigger file.
|
||||
* Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode. So, if you set var
|
||||
$multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into
|
||||
the Home - setup - other admin page.
|
||||
the Home - setup - other admin page.
|
||||
* If you use Multicompany transverse mode, it will be necessary to check the activation of the modules in the children
|
||||
entities and to review completely the rights of the groups and the users.
|
||||
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
|
||||
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
|
||||
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
|
||||
@@ -153,6 +333,57 @@ content by doing a print into function, sometimes by returning content into "res
|
||||
hook specifications so you must return output into "resprint".
|
||||
|
||||
|
||||
***** ChangeLog for 5.0.7 compared to 5.0.6 *****
|
||||
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
|
||||
FIX: #7148
|
||||
FIX: #7325 Default VAT rate when editing template invoices is 0%
|
||||
FIX: #7366 renaming table with pgsql
|
||||
FIX: #7391
|
||||
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
|
||||
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
|
||||
FIX: Bad link to unpayed suppliers invoices
|
||||
FIX: bankentries search conciliated if val 0
|
||||
FIX: multicompany better accuracy in rounding and with revenue stamp.
|
||||
FIX: PDF output was sharing 2 different currencies in same total
|
||||
FIX: Upgrade missing on field
|
||||
FIX: wrong key in selectarray
|
||||
FIX: wrong personnal project time spent
|
||||
|
||||
***** ChangeLog for 5.0.6 compared to 5.0.5 *****
|
||||
FIX: Removed a bad symbolic link into custom directory.
|
||||
FIX: Renaming a resource ref rename also the directory of attached files.
|
||||
|
||||
***** ChangeLog for 5.0.5 compared to 5.0.4 *****
|
||||
FIX: #7075 : bad path for document
|
||||
FIX: #7156
|
||||
FIX: #7173
|
||||
FIX: #7224
|
||||
FIX: #7226
|
||||
FIX: #7239
|
||||
FIX: add supplierproposaldet without price (new product)
|
||||
FIX: amount overlap other amount when a pagebreak is done due to an image at the bottom of page.
|
||||
FIX: Bad tax calculation with expense report
|
||||
FIX: Best buy price calculation
|
||||
FIX: Buying prices must always be in positive value.
|
||||
FIX: calculate correct remain to pay for planned bank transactions
|
||||
FIX: delete linked element on facture rec
|
||||
FIX: edit sociale was emptying label
|
||||
FIX: Error when updating thirdparty not returned
|
||||
FIX: holidays with postgresql like on rowid integer
|
||||
FIX: id of user not saved when making a payment of expense report
|
||||
FIX: invoice page list
|
||||
FIX: invoice situation VAT total rounding into PDF crabe
|
||||
FIX: PgSQL compatibility.
|
||||
FIX: remove order rights on invoice page
|
||||
FIX: status were wrong on product referent list
|
||||
FIX: supplier id was not passed to hooks
|
||||
FIX: Support of vat code when using price per customer
|
||||
FIX: User id correction on holiday request
|
||||
FIX: value of user id filled to 0 in llx_bank_url when recording an expense report.
|
||||
FIX: we have to check if contact doesn't already exist on add_contact() function
|
||||
FIX: We should be able to insert data with value '0' into const
|
||||
FIX: install process with DoliWamp
|
||||
|
||||
***** ChangeLog for 5.0.4 compared to 5.0.3 *****
|
||||
FIX: #5640 Prices of a predefined product/service were incorrect under certain circumstances
|
||||
FIX: #6541 since 4.0.4 to 5.0.0 autofill zip/town not working
|
||||
@@ -657,7 +888,7 @@ NEW: Disabled users are striked.
|
||||
NEW: Enhance navigation of project module
|
||||
NEW: fichinter lines ordered by rang AND DATE
|
||||
NEW: hidden conf to use input file multiple from mail form
|
||||
NEW: hidden feature: SUPPLIERORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
||||
NEW: hidden feature: SUPPLIER_ORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
||||
NEW: Hidden option MAIN_LANDING_PAGE to choose the first page to show after login works as a "global" option (llx_const) and as a "per user" option (llx_user_param).
|
||||
NEW: Holiday is a now a RH module. All RH module provides by default visilibity on users of its hierarchy.
|
||||
NEW: If error is reported during migration process, you can ignore it to avoid to be locked.
|
||||
|
||||
@@ -353,7 +353,7 @@ begin
|
||||
begin
|
||||
// TODO Copy file or ask to install package ?
|
||||
//CustomMessage('YouWillInstallDoliWamp')+#13#13
|
||||
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30679">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
|
||||
MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the DoliWAMP installation/upgrade.',mbInformation,MB_OK);
|
||||
end;
|
||||
// Pb seems similar with msvcp110.dll
|
||||
//vcredist_x64.exe
|
||||
|
||||
@@ -49,6 +49,8 @@ if (empty($argv[1]))
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
parse_str($argv[1]);
|
||||
|
||||
$i=0;
|
||||
while ($i < $argc)
|
||||
{
|
||||
@@ -98,9 +100,9 @@ foreach ($includeconstants as $countrycode => $tmp)
|
||||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir=dirname(__FILE__).'/../htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist-'.$release.'.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist-'.$release.'.xml',0,1,1);
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
|
||||
|
||||
$checksumconcat=array();
|
||||
|
||||
@@ -129,7 +131,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
|
||||
@@ -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="ldestailleur\@vmprod.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
|
||||
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@@ -334,7 +334,7 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
}
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH) {
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedchangelog++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
|
||||
$nboftargetok++;
|
||||
}
|
||||
@@ -366,7 +366,9 @@ if ($nboftargetok) {
|
||||
}
|
||||
else # For a maintenance release
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
|
||||
}
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
@@ -554,9 +556,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||
@@ -569,6 +568,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
|
||||
@@ -577,6 +577,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
|
||||
@@ -588,6 +589,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
|
||||
|
||||
print "Remove subdir of custom dir\n";
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# \file build/makepack-dolibarrmodule.pl
|
||||
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
||||
# \author (c)2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \contributor (c)2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
@@ -134,7 +135,15 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
print "Version detected for module ".$PROJECT.": ";
|
||||
$result=open(IN,"<".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
|
||||
if (! $result) { die "Error: Can't open descriptor file ".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n"; }
|
||||
$custom=false;
|
||||
if (! $result) {
|
||||
$result=open(IN,"<".$SOURCE."/htdocs/custom/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
|
||||
if (! $result) {
|
||||
die "Error: Can't open descriptor file ".$SOURCE."/htdocs/(or /htdocs/custom/)".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n";
|
||||
}else{
|
||||
$custom = true;
|
||||
}
|
||||
}
|
||||
while(<IN>)
|
||||
{
|
||||
if ($_ =~ /this->version\s*=\s*'([\d\.]+)'/) { $PROJVERSION=$1; break; }
|
||||
@@ -294,8 +303,11 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf*sav*`;
|
||||
if($custom){
|
||||
$ret=`cp -r $BUILDROOT/$PROJECTLC/htdocs/custom/* $BUILDROOT/$PROJECTLC/htdocs/.`;
|
||||
}
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/Thumbs.db $BUILDROOT/$PROJECTLC/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/CVS* $BUILDROOT/$PROJECTLC/*/CVS* $BUILDROOT/$PROJECTLC/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/*/CVS*`;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
README (English)
|
||||
##################################################
|
||||
Install script for Virtualmin Pro
|
||||
Install script for Virtualmin Professional / GPL
|
||||
##################################################
|
||||
|
||||
This script will install automatically Dolibarr from Virtualmin Pro
|
||||
http://www.virtualmin.com
|
||||
This script will install automatically Dolibarr from Virtualmin.
|
||||
(Included in the professional version and can be added in the GPL version)
|
||||
|
||||
https://www.virtualmin.com
|
||||
http://www.webmin.com/virtualmin.html
|
||||
@@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
# \author (c)2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.8.1", "3.7.1", "3.6.4", "3.5.7" );
|
||||
return ( "5.0.4", "4.0.6", "3.9.4" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
{
|
||||
return 2; # for mysqli fix
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
@@ -177,9 +182,9 @@ if ($opts->{'newdb'} && !$upgrade) {
|
||||
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
|
||||
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
|
||||
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
|
||||
local $dbphptype = $dbtype eq "mysql" && $version >= 3.6 ? "mysql" :
|
||||
local $dbphptype = $dbtype eq "mysql" && $version < 3.6 ? "mysql" :
|
||||
$dbtype eq "mysql" ? "mysqli" : "pgsql";
|
||||
local $dbhost = &get_database_host($dbtype);
|
||||
local $dbhost = &get_database_host($dbtype, $d);
|
||||
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
|
||||
return (0, "Database connection failed : $dberr") if ($dberr);
|
||||
|
||||
@@ -206,9 +211,6 @@ $pgcharset = $tmpl->{'postgres_encoding'};
|
||||
$charset = $dbtype eq "mysql" ? $mycharset : $pgcharset;
|
||||
$collate = $dbtype eq "mysql" ? $mycollate : "C";
|
||||
|
||||
# Install filename
|
||||
local $step = $version >= 3.8 ? "step" : "etape";
|
||||
|
||||
$path = &script_path_url($d, $opts);
|
||||
if ($path =~ /^https:/ || $d->{'ssl'}) {
|
||||
$url = "https://$d->{'dom'}";
|
||||
@@ -222,15 +224,11 @@ if ($opts->{'path'} =~ /\w/) {
|
||||
|
||||
if (!$upgrade) {
|
||||
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
|
||||
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
|
||||
©_source_dest_as_domain_user($d, $cdef, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0777, $cfiledir);
|
||||
&set_permissions_as_domain_user($d, 0666, $cfile);
|
||||
©_source_dest_as_domain_user($d, $cfile);
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
||||
&set_permissions_as_domain_user($d, 0777, $docdir);
|
||||
if (!$version >= 3.7.2) {
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
|
||||
&set_permissions_as_domain_user($d, 0777, $altdir);
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Preserve old config file, documents and custom directory
|
||||
@@ -266,7 +264,8 @@ if ($upgrade) {
|
||||
[ "versionfrom", $upgrade->{'version'} ],
|
||||
[ "versionto", $ver ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory.
|
||||
@@ -289,15 +288,17 @@ else {
|
||||
[ "main_force_https", $opts->{'forcehttps'} ],
|
||||
[ "dolibarr_main_db_character_set", $charset ],
|
||||
[ "dolibarr_main_db_collation", $collate ],
|
||||
[ "main_use_alt_dir", "1" ],
|
||||
[ "usealternaterootdir", "1" ],
|
||||
[ "main_alt_dir_name", "custom" ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."1", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step1" : "etape1";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Second page (Populate database)
|
||||
local @params = ( [ "action", "set" ] );
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."2", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step2" : "etape2";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Third page (Add administrator account)
|
||||
@@ -306,7 +307,8 @@ else {
|
||||
[ "pass", $dompass ],
|
||||
[ "pass_verif", $dompass ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory and protect config file.
|
||||
@@ -384,7 +386,10 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :
|
||||
|
||||
@@ -163,6 +163,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
%_datadir/dolibarr/htdocs/commande
|
||||
%_datadir/dolibarr/htdocs/compta
|
||||
|
||||
@@ -99,7 +99,7 @@ JQUERYFILETREE:
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
* Add 2 lines into function
|
||||
* Add 2 lines into file AutoLoader.php to complete function
|
||||
private function alias($className, $currentClass)
|
||||
{
|
||||
...
|
||||
@@ -110,4 +110,25 @@ to get
|
||||
if ($className == 'Luracast\Restler\string') return;
|
||||
if ($className == 'Luracast\Restler\mixed') return;
|
||||
...
|
||||
|
||||
|
||||
|
||||
PARSEDOWN
|
||||
---------
|
||||
|
||||
* Fix to avoid fatal error when mb_strlen not available:
|
||||
|
||||
// @CHANGE LDR Fix when mb_strlen is not available
|
||||
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||
else $len = strlen($line);
|
||||
$shortage = 4 - $len % 4;
|
||||
|
||||
|
||||
|
||||
JEDITABLE.JS
|
||||
------------
|
||||
|
||||
* <button type="submit" /> => <button class="button" type="submit" />
|
||||
* <button type="cancel" /> => <button class="button" type="cancel" />
|
||||
|
||||
|
||||
|
||||
9423
dev/initdemo/mysqldump_dolibarr_6.0.0.sql
Normal file
9423
dev/initdemo/mysqldump_dolibarr_6.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -187,11 +187,13 @@ export list="
|
||||
--ignore-table=$base.llx_bt_webseedfiles
|
||||
--ignore-table=$base.llx_c_civilite
|
||||
--ignore-table=$base.llx_c_dolicloud_plans
|
||||
--ignore-table=$base.llx_c_pays
|
||||
--ignore-table=$base.llx_c_source
|
||||
--ignore-table=$base.llx_cabinetmed_c_banques
|
||||
--ignore-table=$base.llx_cabinetmed_c_ccam
|
||||
--ignore-table=$base.llx_cabinetmed_c_examconclusion
|
||||
--ignore-table=$base.llx_cabinetmed_cons
|
||||
--ignore-table=$base.llx_cabinetmed_cons_extrafields
|
||||
--ignore-table=$base.llx_cabinetmed_diaglec
|
||||
--ignore-table=$base.llx_cabinetmed_examaut
|
||||
--ignore-table=$base.llx_cabinetmed_exambio
|
||||
@@ -207,7 +209,18 @@ export list="
|
||||
--ignore-table=$base.llx_dolicloud_customers
|
||||
--ignore-table=$base.llx_dolicloud_stats
|
||||
--ignore-table=$base.llx_dolicloud_emailstemplates
|
||||
--ignore-table=$base.llx_dolireport_column
|
||||
--ignore-table=$base.llx_dolireport_criteria
|
||||
--ignore-table=$base.llx_dolireport_graph
|
||||
--ignore-table=$base.llx_dolireport_plot
|
||||
--ignore-table=$base.llx_dolireport_report
|
||||
--ignore-table=$base.llx_domain
|
||||
--ignore-table=$base.llx_ecommerce_commande
|
||||
--ignore-table=$base.llx_ecommerce_facture
|
||||
--ignore-table=$base.llx_ecommerce_product
|
||||
--ignore-table=$base.llx_ecommerce_site
|
||||
--ignore-table=$base.llx_ecommerce_societe
|
||||
--ignore-table=$base.llx_ecommerce_socpeople
|
||||
--ignore-table=$base.llx_element_rang
|
||||
--ignore-table=$base.llx_entity
|
||||
--ignore-table=$base.llx_filemanager_roots
|
||||
@@ -215,6 +228,8 @@ export list="
|
||||
--ignore-table=$base.llx_google_maps
|
||||
--ignore-table=$base.llx_milestone
|
||||
--ignore-table=$base.llx_monitoring_probes
|
||||
--ignore-table=$base.llx_m
|
||||
--ignore-table=$base.llx_m_extrafields
|
||||
--ignore-table=$base.llx_notes
|
||||
--ignore-table=$base.llx_pos_cash
|
||||
--ignore-table=$base.llx_pos_control_cash
|
||||
|
||||
@@ -145,12 +145,12 @@ else if ($action == 'update') {
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
|
||||
$helpurl = "";
|
||||
llxHeader("",$title,$helpurl);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewFiscalYear"));
|
||||
|
||||
@@ -28,7 +28,9 @@ require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
|
||||
|
||||
@@ -631,7 +631,7 @@ if ($action == 'create') {
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if ($total_debit != $total_credit)
|
||||
if (price2num($total_debit) != price2num($total_credit))
|
||||
{
|
||||
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ class AccountancyExport
|
||||
|
||||
|
||||
/**
|
||||
* Export format : Agiris
|
||||
* Export format : Agiris Isacompta
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
@@ -433,30 +433,23 @@ class AccountancyExport
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
print $line->id . $this->separator;
|
||||
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
|
||||
print $line->piece_num . $this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
} else {
|
||||
// FIXME Because the subledger_account is already an accounting account, does we really need
|
||||
// to concat 4011 or 401 to it ?
|
||||
if (substr($line->numero_compte, 0, 1) == 'C' || substr($line->numero_compte, 0, 1) == '9') {
|
||||
print '411' . substr(str_replace(" ", "", $line->subledger_account), 0, 5) . $this->separator;
|
||||
}
|
||||
if (substr($line->numero_compte, 0, 1) == 'F' || substr($line->numero_compte, 0, 1) == '0') {
|
||||
print '401' . substr(str_replace(" ", "", $line->subledger_account), 0, 5) . $this->separator;
|
||||
}
|
||||
print length_accounta($line->subledger_account) . $this->separator;
|
||||
}
|
||||
|
||||
print length_accounta($line->subledger_account) . $this->separator;
|
||||
print $line->doc_ref . $this->separator;
|
||||
print price($line->debit) . $this->separator;
|
||||
print price($line->credit) . $this->separator;
|
||||
print price($line->montant).$this->separator;
|
||||
print $line->sens.$this->separator;
|
||||
print $line->code_journal . $this->separator;
|
||||
print $line->code_journal;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,8 +213,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -240,8 +240,20 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
@@ -269,8 +281,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -296,8 +308,20 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
@@ -363,7 +387,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@@ -152,7 +152,7 @@ print '<script type="text/javascript">
|
||||
/*
|
||||
* Customer Invoice lines
|
||||
*/
|
||||
$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.ref_client,";
|
||||
$sql = "SELECT f.rowid as factid, f.facnumber, f.type, f.datef, f.ref_client,";
|
||||
$sql .= " fd.rowid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
|
||||
@@ -302,7 +302,7 @@ if ($result) {
|
||||
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
|
||||
|
||||
$facture_static->ref = $objp->facnumber;
|
||||
$facture_static->id = $objp->rowid;
|
||||
$facture_static->id = $objp->factid;
|
||||
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
|
||||
@@ -85,6 +85,9 @@ if ($user->societe_id > 0)
|
||||
if (! $user->rights->accounting->bind->write)
|
||||
accessforbidden();
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('accountancycustomerlist'));
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$accounting = new AccountingAccount($db);
|
||||
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
|
||||
@@ -98,26 +101,33 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
$search_lineid = '';
|
||||
$search_ref = '';
|
||||
$search_invoice = '';
|
||||
$search_label = '';
|
||||
$search_desc = '';
|
||||
$search_amount = '';
|
||||
$search_account = '';
|
||||
$search_vat = '';
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_lineid = '';
|
||||
$search_ref = '';
|
||||
$search_invoice = '';
|
||||
$search_label = '';
|
||||
$search_desc = '';
|
||||
$search_amount = '';
|
||||
$search_account = '';
|
||||
$search_vat = '';
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='AccountingAccount';
|
||||
$permtoread = $user->rights->accounting->read;
|
||||
$permtodelete = $user->rights->accounting->delete;
|
||||
$uploaddir = $conf->accounting->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='Skeleton';
|
||||
$objectlabel='Skeleton';
|
||||
$permtoread = $user->rights->accounting->read;
|
||||
$permtodelete = $user->rights->accounting->delete;
|
||||
$uploaddir = $conf->accounting->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
if ($massaction == 'ventil') {
|
||||
$msg='';
|
||||
@@ -182,6 +192,9 @@ $sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype,";
|
||||
$sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
|
||||
$sql .= " aa.rowid as aarowid";
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
@@ -223,6 +236,11 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
}
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
|
||||
@@ -94,7 +94,7 @@ if ($action == 'validatehistory') {
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||
|
||||
|
||||
$resql1 = $db->query($sql1);
|
||||
if (! $resql1) {
|
||||
$error ++;
|
||||
@@ -139,7 +139,7 @@ if ($action == 'validatehistory') {
|
||||
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
||||
$sql1.= " AND er.entity IN (" . getEntity('accountancy') . ")";
|
||||
$sql1.=")";
|
||||
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||
|
||||
$resql1 = $db->query($sql1);
|
||||
@@ -194,8 +194,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -217,9 +217,21 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($row[13]) . '</td>';
|
||||
@@ -247,8 +259,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -270,9 +282,21 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($row[13]) . '</td>';
|
||||
@@ -292,9 +316,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
{
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||
|
||||
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
|
||||
@@ -302,7 +326,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("TotalExpenseReport") . "' AS label,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
@@ -314,12 +338,12 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND er.fk_statut > 0 ";
|
||||
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
|
||||
dol_syslog('htdocs/accountancy/expensereport/index.php');
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
@@ -328,7 +352,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
|
||||
@@ -4,7 +4,7 @@ use Stripe\BankAccount;
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
@@ -104,12 +104,15 @@ $idpays = $mysoc->country_id;
|
||||
|
||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type, b.fk_account,";
|
||||
$sql .= " ba.courant, ba.ref as baref, ba.account_number, ba.fk_accountancy_journal,";
|
||||
$sql .= " soc.code_compta, soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, bu1.type as typeop,";
|
||||
$sql .= " u.accountancy_code, u.rowid as userid, u.lastname as lastname, u.firstname as firstname, bu2.type as typeop";
|
||||
$sql .= " soc.code_compta, soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, bu1.type as typeop_company,";
|
||||
$sql .= " u.accountancy_code, u.rowid as userid, u.lastname as lastname, u.firstname as firstname, bu2.type as typeop_user,";
|
||||
$sql .= " bu3.type as typeop_payment, bu4.type as typeop_payment_supplier";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "bank as b";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='user'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu3 ON bu3.fk_bank = b.rowid AND bu3.type='payment'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu4 ON bu4.fk_bank = b.rowid AND bu4.type='payment_supplier'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc on bu1.url_id=soc.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u on bu2.url_id=u.rowid";
|
||||
$sql .= " WHERE ba.fk_accountancy_journal=" . $id_journal;
|
||||
@@ -147,6 +150,7 @@ $result = $db->query($sql);
|
||||
if ($result) {
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
//print $sql;
|
||||
|
||||
// Variables
|
||||
$account_supplier = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : 'NotDefined'); // NotDefined is a reserved word
|
||||
@@ -172,13 +176,31 @@ if ($result) {
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
// Set accountancy code (for bank and thirdparty)
|
||||
$lineisapurchase = -1;
|
||||
$lineisasale = -1;
|
||||
// Old method to detect if it's a sale or purchase
|
||||
if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)') $lineisapurchase=1;
|
||||
if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)') $lineisasale=1;
|
||||
// Try a more reliable method to detect if record is a supplier payment or a customer payment
|
||||
if ($lineisapurchase < 0)
|
||||
{
|
||||
if ($obj->typeop_payment_supplier == 'payment_supplier') $lineisapurchase = 1;
|
||||
}
|
||||
if ($lineisasale < 0)
|
||||
{
|
||||
if ($obj->typeop_payment == 'payment') $lineisasale = 1;
|
||||
}
|
||||
//var_dump($obj->type_payment); var_dump($obj->type_payment_supplier);
|
||||
//var_dump($lineisapurchase); //var_dump($lineisasale);
|
||||
|
||||
// Set accountancy code for bank
|
||||
$compta_bank = $obj->account_number;
|
||||
|
||||
// Set accountancy code for thirdparty
|
||||
$compta_soc = 'NotDefined';
|
||||
if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)')
|
||||
if ($lineisapurchase > 0)
|
||||
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier);
|
||||
if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)')
|
||||
if ($lineisasale > 0)
|
||||
$compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $account_customer);
|
||||
|
||||
$tabcompany[$obj->rowid] = array (
|
||||
@@ -187,6 +209,7 @@ if ($result) {
|
||||
'code_compta' => $compta_soc,
|
||||
);
|
||||
|
||||
// Set accountancy code for user
|
||||
$compta_user = (! empty($obj->accountancy_code) ? $obj->accountancy_code : $account_employee);
|
||||
|
||||
$tabuser[$obj->rowid] = array (
|
||||
@@ -202,6 +225,7 @@ if ($result) {
|
||||
$tabpay[$obj->rowid]["type_payment"] = $obj->fk_type; // CHQ, VIR, LIQ, CB, ...
|
||||
$tabpay[$obj->rowid]["ref"] = $obj->label; // By default. Not unique. May be changed later
|
||||
$tabpay[$obj->rowid]["fk_bank"] = $obj->rowid;
|
||||
$tabpay[$obj->rowid]["bank_account_ref"] = $obj->baref;
|
||||
$tabpay[$obj->rowid]["fk_bank_account"] = $obj->fk_account;
|
||||
if (preg_match('/^\((.*)\)$/i', $obj->label, $reg)) {
|
||||
$tabpay[$obj->rowid]["lib"] = $langs->trans($reg[1]);
|
||||
@@ -214,7 +238,7 @@ if ($result) {
|
||||
//var_dump($tabpay);
|
||||
|
||||
// By default
|
||||
$tabpay[$obj->rowid]['type'] = 'unknown'; // Can be SOLD, miscellaneous entry, payment of patient, or old record with no links in bank_url.
|
||||
$tabpay[$obj->rowid]['type'] = 'unknown'; // Can be SOLD, miscellaneous entry, payment of patient, or any old record with no links in bank_url.
|
||||
$tabtype[$obj->rowid] = 'unknown';
|
||||
|
||||
// get_url may return -1 which is not traversable
|
||||
@@ -604,6 +628,8 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Export
|
||||
if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
@@ -737,6 +763,22 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
|
||||
|
||||
|
||||
// Test that setup is complete
|
||||
$sql='SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL';
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
if ($obj->nb > 0)
|
||||
{
|
||||
print img_warning().' '.$langs->trans("TheJournalCodeIsNotDefinedOnSomeBankAccount");
|
||||
print ' : '.$langs->trans("AccountancyAreaDescBank", 9, '<strong>'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>');
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
|
||||
// Button to write into Ledger
|
||||
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1'
|
||||
|| empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1'
|
||||
@@ -797,8 +839,10 @@ if (empty($action) || $action == 'view') {
|
||||
// Bank
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
//var_dump($tabpay[$key]);
|
||||
print '<!-- Bank bank.rowid='.$key.' type='.$tabpay[$key]['type'].' ref='.$tabpay[$key]['ref'].'-->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Bank bank.rowid=".$key."--></td>";
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
@@ -819,11 +863,14 @@ if (empty($action) || $action == 'view') {
|
||||
}
|
||||
else print $accounttoshow;*/
|
||||
print "</td>";
|
||||
if ($val['soclib'] == '') {
|
||||
print "<td>" . $langs->trans("Bank") . " - " . $reflabel . "</td>";
|
||||
} else {
|
||||
print "<td>" . $langs->trans("Bank") . " - " . $val['soclib'] . "</td>";
|
||||
print "<td>";
|
||||
//var_dump($tabpay[$key]);
|
||||
print $langs->trans("Bank");
|
||||
print ' '.$val['bank_account_ref'];
|
||||
if (! empty($val['soclib'])) {
|
||||
print " - " . $val['soclib'];
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>" . $val["type_payment"] . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
@@ -834,14 +881,15 @@ if (empty($action) || $action == 'view') {
|
||||
if (is_array($tabtp[$key])) {
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
if ($k != 'type') {
|
||||
print '<!-- Thirdparty bank.rowid='.$key.' -->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty bank.rowid=".$key." --></td>";
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
print "<td>";
|
||||
$account_ledger = $k;
|
||||
|
||||
// Try to force general ledger account depending on type
|
||||
if ($tabtype[$key] == 'payment') $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER;
|
||||
if ($tabtype[$key] == 'payment_supplier') $account_ledger = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
|
||||
if ($tabtype[$key] == 'payment_expensereport') $account_ledger = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
|
||||
@@ -878,7 +926,11 @@ if (empty($action) || $action == 'view') {
|
||||
{
|
||||
if (empty($accounttoshowsubledger) || $accounttoshowsubledger == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
/*var_dump($tabpay[$key]);
|
||||
var_dump($tabtype[$key]);
|
||||
var_dump($tabbq[$key]);*/
|
||||
//print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown").'</span>';
|
||||
}
|
||||
else print $accounttoshowsubledger;
|
||||
}
|
||||
@@ -893,8 +945,9 @@ if (empty($action) || $action == 'view') {
|
||||
}
|
||||
} else {
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
print '<!-- Wait bank.rowid='.$key.' -->';
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Wait bank.rowid=".$key." --></td>";
|
||||
print "<td></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $ref . "</td>";
|
||||
// Ledger account
|
||||
@@ -936,7 +989,7 @@ $db->close();
|
||||
* Return source for doc_ref of a bank transaction
|
||||
*
|
||||
* @param string $val Array of val
|
||||
* @param string $typerecord Type of record
|
||||
* @param string $typerecord Type of record ('payment', 'payment_supplier', 'payment_expensereport', 'payment_vat', ...)
|
||||
* @return string|unknown
|
||||
*/
|
||||
function getSourceDocRef($val, $typerecord)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
@@ -135,9 +135,9 @@ if ($result) {
|
||||
$compta_fees = $obj->compte;
|
||||
|
||||
$vatdata = getTaxesFromId($obj->tva_tx.($obj->vat_src_code?' ('.$obj->vat_src_code.')':''), $mysoc, $mysoc, 0);
|
||||
$compta_tva = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $account_vat);
|
||||
$compta_localtax1 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
||||
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
|
||||
$compta_tva = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $account_vat);
|
||||
$compta_localtax1 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
|
||||
$compta_localtax2 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
|
||||
|
||||
// Define array to display all VAT rates that use this accounting account $compta_tva
|
||||
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
|
||||
@@ -190,8 +190,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -213,8 +213,20 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
@@ -244,8 +256,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -267,9 +279,21 @@ if ($resql) {
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr class="oddeven"><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($row[13]) . '</td>';
|
||||
|
||||
@@ -85,6 +85,9 @@ if ($user->societe_id > 0)
|
||||
if (! $user->rights->accounting->bind->write)
|
||||
accessforbidden();
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('accountancysupplierlist'));
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$accounting = new AccountingAccount($db);
|
||||
// TODO: we should need to check if result is a really exist accountaccount rowid.....
|
||||
@@ -99,26 +102,32 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_lineid = '';
|
||||
$search_ref = '';
|
||||
$search_invoice = '';
|
||||
$search_label = '';
|
||||
$search_desc = '';
|
||||
$search_amount = '';
|
||||
$search_account = '';
|
||||
$search_vat = '';
|
||||
}
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
// Mass actions
|
||||
$objectclass='Skeleton';
|
||||
$objectlabel='Skeleton';
|
||||
$permtoread = $user->rights->accounting->read;
|
||||
$permtodelete = $user->rights->accounting->delete;
|
||||
$uploaddir = $conf->accounting->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_lineid = '';
|
||||
$search_ref = '';
|
||||
$search_invoice = '';
|
||||
$search_label = '';
|
||||
$search_desc = '';
|
||||
$search_amount = '';
|
||||
$search_account = '';
|
||||
$search_vat = '';
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='AccountingAccount';
|
||||
$permtoread = $user->rights->accounting->read;
|
||||
$permtodelete = $user->rights->accounting->delete;
|
||||
$uploaddir = $conf->accounting->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
if ($massaction == 'ventil') {
|
||||
$msg='';
|
||||
@@ -184,6 +193,9 @@ $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_lab
|
||||
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht as price, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
|
||||
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
|
||||
$sql.= " aa.rowid as aarowid";
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
|
||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
@@ -220,6 +232,11 @@ if (strlen(trim($search_vat))) {
|
||||
}
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;
|
||||
|
||||
@@ -14,8 +14,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT -->
|
||||
|
||||
@@ -14,9 +14,16 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$contact = $GLOBALS['objcanvas']->control->object;
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,10 +14,18 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$contact = $GLOBALS['objcanvas']->control->object;
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||
|
||||
@@ -1730,8 +1730,8 @@ else
|
||||
//$filedir = $conf->adherent->dir_output . '/' . get_exdir($object->id, 2, 0, 0, $object, 'member') . dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->adherent->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'member');
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $object->id;
|
||||
$genallowed = $user->rights->adherent->creer;
|
||||
$delallowed = $user->rights->adherent->supprimer;
|
||||
$genallowed = $user->rights->adherent->lire;
|
||||
$delallowed = $user->rights->adherent->creer;
|
||||
|
||||
print $formfile->showdocuments('member', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $object->default_lang, '', $object);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@@ -68,6 +68,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.country = c.rowid";
|
||||
$sql.= " WHERE d.fk_adherent_type = t.rowid AND d.statut = 1";
|
||||
$sql.= " AND d.entity IN (".getEntity('adherent').")";
|
||||
if (is_numeric($foruserid)) $sql.=" AND d.rowid=".$foruserid;
|
||||
if ($foruserlogin) $sql.=" AND d.login='".$db->escape($foruserlogin)."'";
|
||||
$sql.= " ORDER BY d.rowid ASC";
|
||||
@@ -123,7 +124,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
||||
{
|
||||
$nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY'];
|
||||
if ($nb <= 0) $nb=1; // Protection to avoid empty page
|
||||
|
||||
|
||||
for($j=0;$j<$nb;$j++)
|
||||
{
|
||||
$arrayofmembers[]=array(
|
||||
|
||||
@@ -158,6 +158,7 @@ class Adherent extends CommonObject
|
||||
$from=$conf->email_from;
|
||||
if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
|
||||
// Send email (substitutionarray must be done just before this)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml);
|
||||
if ($mailfile->sendfile())
|
||||
@@ -198,6 +199,9 @@ class Adherent extends CommonObject
|
||||
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
|
||||
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
|
||||
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
|
||||
$infos.= $langs->transnoentities("PhonePro").": ".$this->phone."\n";
|
||||
$infos.= $langs->transnoentities("PhonePerso").": ".$this->phone_perso."\n";
|
||||
$infos.= $langs->transnoentities("PhoneMobile").": ".$this->phone_mobile."\n";
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||
{
|
||||
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
|
||||
@@ -242,6 +246,11 @@ class Adherent extends CommonObject
|
||||
'%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo,
|
||||
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
||||
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
|
||||
'%TYPE%'=>$msgishtml?dol_htmlentitiesbr($this->type):$this->type,
|
||||
'%PHONE_PRO%'=>$msgishtml?dol_htmlentitiesbr($this->phone):$this->phone,
|
||||
'%PHONE_PERSO%'=>$msgishtml?dol_htmlentitiesbr($this->phone_perso):$this->phone_perso,
|
||||
'%PHONE_MOBILE%'=>$msgishtml?dol_htmlentitiesbr($this->phone_mobile):$this->phone_mobile,
|
||||
// For backward compatibility
|
||||
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos,
|
||||
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
|
||||
'%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
|
||||
|
||||
@@ -134,7 +134,7 @@ class AdherentType extends CommonObject
|
||||
$sql.= "note = '".$this->db->escape($this->note)."',";
|
||||
$sql.= "vote = '".$this->db->escape($this->vote)."',";
|
||||
$sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'";
|
||||
$sql .= " WHERE rowid =".$this->id;
|
||||
$sql.= " WHERE rowid =".$this->id;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
@@ -252,7 +252,7 @@ class AdherentType extends CommonObject
|
||||
|
||||
$sql = "SELECT rowid, libelle";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql.= " WHERE entity = ".$conf->entity;
|
||||
$sql.= " WHERE entity IN (".getEntity('adherent').")";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@@ -33,7 +33,7 @@ class Subscription extends CommonObject
|
||||
public $element='subscription';
|
||||
public $table_element='subscription';
|
||||
public $picto='payment';
|
||||
|
||||
|
||||
var $datec; // Date creation
|
||||
var $datem; // Date modification
|
||||
var $dateh; // Subscription start date (date subscription)
|
||||
@@ -193,12 +193,11 @@ class Subscription extends CommonObject
|
||||
*/
|
||||
function delete($user)
|
||||
{
|
||||
$accountline=new AccountLine($this->db);
|
||||
|
||||
// It subscription is linked to a bank transaction, we get it
|
||||
if ($this->fk_bank > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$accountline=new AccountLine($this->db);
|
||||
$result=$accountline->fetch($this->fk_bank);
|
||||
}
|
||||
|
||||
@@ -288,7 +287,7 @@ class Subscription extends CommonObject
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
@@ -301,7 +300,7 @@ class Subscription extends CommonObject
|
||||
$langs->load("members");
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load information of the subscription object
|
||||
*
|
||||
|
||||
@@ -100,6 +100,7 @@ $fieldstosearchall = array(
|
||||
'd.note_public'=>'NotePublic',
|
||||
'd.note_private'=>'NotePrivate',
|
||||
);
|
||||
if($db->type == 'pgsql') unset($fieldstosearchall['d.rowid']);
|
||||
$arrayfields=array(
|
||||
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
|
||||
@@ -249,8 +250,9 @@ foreach ($search_array_options as $key => $val)
|
||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||
$typ=$extrafields->attribute_type[$tmpkey];
|
||||
$mode=0;
|
||||
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
|
||||
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
|
||||
if (in_array($typ, array('int','double','real'))) $mode=1; // Search on a numeric
|
||||
if (in_array($typ, array('sellist')) && $crit != '0' && $crit != '-1') $mode=2; // Search on a foreign key int
|
||||
if ($crit != '' && (! in_array($typ, array('select','sellist')) || $crit != '0'))
|
||||
{
|
||||
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -31,10 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
@@ -114,7 +114,6 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
||||
if ($result < 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$errmsg=$langs->trans($company->error);
|
||||
setEventMessages($company->error, $company->errors, 'errors');
|
||||
}
|
||||
else
|
||||
@@ -124,7 +123,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
||||
}
|
||||
else
|
||||
{
|
||||
$errmsg=$object->error;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +211,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$paymentdate=dol_mktime(0, 0, 0, $_POST["paymentmonth"], $_POST["paymentday"], $_POST["paymentyear"]);
|
||||
}
|
||||
$subscription=$_POST["subscription"]; // Amount of subscription
|
||||
$subscription=price2num(GETPOST("subscription",'alpha')); // Amount of subscription
|
||||
$label=$_POST["label"];
|
||||
|
||||
// Payment informations
|
||||
@@ -230,6 +229,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg=$langs->trans("ErrorBadDateFormat",$langs->transnoentitiesnoconv("DateSubscription"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action='addsubscription';
|
||||
}
|
||||
if (GETPOST('end') && ! $datesubend)
|
||||
@@ -237,6 +237,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$errmsg=$langs->trans("ErrorBadDateFormat",$langs->transnoentitiesnoconv("DateEndSubscription"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action='addsubscription';
|
||||
}
|
||||
if (! $datesubend)
|
||||
@@ -247,16 +248,20 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$error++;
|
||||
$errmsg=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action='addsubscription';
|
||||
}
|
||||
|
||||
$amount = price2num(GETPOST("subscription",'alpha'));
|
||||
|
||||
// Check if a payment is mandatory or not
|
||||
if (! $error && $adht->subscription) // Member type need subscriptions
|
||||
{
|
||||
if (! is_numeric($_POST["subscription"]))
|
||||
if (! is_numeric($amount))
|
||||
{
|
||||
// If field is '' or not a numeric value
|
||||
$errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
$action='addsubscription';
|
||||
}
|
||||
@@ -274,7 +279,11 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
if ($_POST["accountid"]) $errmsg=$langs->trans("ErrorDoNotProvideAccountsIfNullAmount");
|
||||
}
|
||||
if ($errmsg) $action='addsubscription';
|
||||
if ($errmsg)
|
||||
{
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$action='addsubscription';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,6 +329,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$error++;
|
||||
$errmsg=$db->lasterror();
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -327,14 +337,16 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$error++;
|
||||
$errmsg=$acct->error;
|
||||
$errmsgs=$acct->errors;
|
||||
}
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errmsg=$acct->error;
|
||||
$errmsgs=$acct->errors;
|
||||
}
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// If option choosed, we create invoice
|
||||
@@ -352,6 +364,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$langs->load("errors");
|
||||
$errmsg=$langs->trans("ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst");
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -362,6 +375,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$errmsg=$customer->error;
|
||||
$errmsgs=$acct->errors;
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -379,6 +393,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$error++;
|
||||
$errmsg='ErrorNoPaymentTermRECEPFound';
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
}
|
||||
}
|
||||
$invoice->socid=$object->fk_soc;
|
||||
@@ -396,6 +411,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$errmsg=$invoice->error;
|
||||
$errmsgs=$invoice->errors;
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -416,6 +432,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
if ($result <= 0)
|
||||
{
|
||||
$errmsg=$invoice->error;
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -428,6 +445,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$errmsg=$invoice->error;
|
||||
$errmsgs=$invoice->errors;
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -455,6 +473,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$errmsg=$paiement->error;
|
||||
$errmsgs=$paiement->errors;
|
||||
setEventMessages($errmsg, $errmsgs, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -536,6 +555,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
if ($result < 0)
|
||||
{
|
||||
$errmsg=$object->error;
|
||||
setEventMessages($errmsg, null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,7 +819,6 @@ if ($rowid > 0)
|
||||
if ($result)
|
||||
{
|
||||
$subscriptionstatic=new Subscription($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
@@ -818,6 +837,8 @@ if ($rowid > 0)
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
@@ -829,20 +850,23 @@ if ($rowid > 0)
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dateh),'day')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
|
||||
print '<td align="right">'.price($objp->subscription).'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->bid)
|
||||
{
|
||||
$accountstatic->label=$objp->label;
|
||||
$accountstatic->id=$objp->baid;
|
||||
$accountstatic->number=$objp->number;
|
||||
$accountstatic->account_number=$objp->account_number;
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->bid)
|
||||
{
|
||||
$accountstatic->label=$objp->label;
|
||||
$accountstatic->id=$objp->baid;
|
||||
$accountstatic->number=$objp->number;
|
||||
$accountstatic->account_number=$objp->account_number;
|
||||
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
||||
|
||||
$accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0,1,1,'',1);
|
||||
$accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0,1,1,'',1);
|
||||
}
|
||||
|
||||
$accountstatic->ref=$objp->ref;
|
||||
print $accountstatic->getNomUrl(1);
|
||||
@@ -1073,12 +1097,12 @@ if ($rowid > 0)
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0);
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
// Add invoice with payments
|
||||
@@ -1098,12 +1122,12 @@ if ($rowid > 0)
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0);
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -25,7 +25,9 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
if (! empty($conf->banque->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
}
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
@@ -231,20 +233,20 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
||||
if ($object->fk_bank)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($object->fk_bank);
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($object->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoneF");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@@ -326,27 +328,26 @@ if ($rowid && $action != 'edit')
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';
|
||||
|
||||
// Bank line
|
||||
// Bank line
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE || $object->fk_bank)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur">';
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur">';
|
||||
if ($object->fk_bank)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($object->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($object->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoneF");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
@@ -389,8 +390,8 @@ if ($rowid && $action != 'edit')
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id;
|
||||
$genallowed = $user->rights->facture->creer;
|
||||
$delallowed = $user->rights->facture->supprimer;
|
||||
$genallowed = $user->rights->facture->lire;
|
||||
$delallowed = $user->rights->facture->creer;
|
||||
|
||||
print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
|
||||
$somethingshown = $formfile->numoffiles;
|
||||
|
||||
@@ -36,7 +36,7 @@ $langs->load("users");
|
||||
if (!$user->rights->adherent->lire)
|
||||
accessforbidden();
|
||||
|
||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
||||
$rowid=GETPOST("rowid",'int');
|
||||
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$object = new Subscription($db);
|
||||
$result = $object->fetch($rowid);
|
||||
|
||||
|
||||
@@ -304,22 +304,22 @@ if ($result)
|
||||
print dol_trunc($obj->note,32);
|
||||
print '</td>';
|
||||
|
||||
// Banque
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($obj->fk_account)
|
||||
{
|
||||
$accountstatic->id=$obj->fk_account;
|
||||
$accountstatic->fetch($obj->fk_account);
|
||||
//$accountstatic->label=$obj->label;
|
||||
print '<td>'.$accountstatic->getNomUrl(1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
print "</td>\n";
|
||||
}
|
||||
}
|
||||
// Banque
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($obj->fk_account > 0)
|
||||
{
|
||||
$accountstatic->id=$obj->fk_account;
|
||||
$accountstatic->fetch($obj->fk_account);
|
||||
//$accountstatic->label=$obj->label;
|
||||
print '<td>'.$accountstatic->getNomUrl(1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
print "</td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh),'day')."</td>\n";
|
||||
|
||||
@@ -15,8 +15,15 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || ! is_object($conf))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
@@ -33,7 +40,7 @@ $var=true;
|
||||
$total=0;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
|
||||
|
||||
?>
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||
<td><?php echo $langs->trans("Subscription"); ?></td>
|
||||
|
||||
@@ -96,7 +96,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
||||
$object->label = trim($label);
|
||||
$object->subscription = (int) trim($subscription);
|
||||
$object->note = trim($comment);
|
||||
$object->mail_valid = (boolean) trim($mail_valid);
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
@@ -134,7 +134,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
||||
$object->label = trim($label);
|
||||
$object->subscription = (int) trim($subscription);
|
||||
$object->note = trim($comment);
|
||||
$object->mail_valid = (boolean) trim($mail_valid);
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
@@ -390,13 +390,13 @@ if ($rowid > 0)
|
||||
}
|
||||
if ($status != '')
|
||||
{
|
||||
$sql.= " AND d.statut IN (".$status.")"; // Peut valoir un nombre ou liste de nombre separes par virgules
|
||||
$sql.= " AND d.statut IN (".$db->escape($status).")"; // Peut valoir un nombre ou liste de nombre separes par virgules
|
||||
}
|
||||
if ($action == 'search')
|
||||
{
|
||||
if (GETPOST('search'))
|
||||
{
|
||||
$sql.= natural_search(array("d.firstname","d.lastname"), GETPOST('search'));
|
||||
$sql.= natural_search(array("d.firstname","d.lastname"), GETPOST('search','alpha'));
|
||||
}
|
||||
}
|
||||
if (! empty($search_lastname))
|
||||
|
||||
@@ -131,12 +131,11 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@@ -67,11 +67,11 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Agenda");
|
||||
|
||||
llxHeader('',$langs->trans("AgendaSetup"));
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
|
||||
@@ -125,11 +125,11 @@ $formother=new FormOther($db);
|
||||
$arrayofjs=array();
|
||||
$arrayofcss=array();
|
||||
|
||||
llxHeader('',$langs->trans("AgendaSetup"),'','',0,0,$arrayofjs,$arrayofcss);
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('',$langs->trans("AgendaSetup"),$wikihelp,'',0,0,$arrayofjs,$arrayofcss);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -210,7 +210,7 @@ while ($i <= $MAXAGENDA)
|
||||
$color='AGENDA_EXT_COLOR'.$key;
|
||||
$enabled='AGENDA_EXT_ENABLED'.$key;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Nb
|
||||
print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>";
|
||||
|
||||
@@ -42,7 +42,7 @@ $action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$param = GETPOST('param','alpha');
|
||||
$cancel = GETPOST('cancel','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type = 'action';
|
||||
|
||||
|
||||
@@ -174,12 +174,12 @@ else if ($action == 'setdoc')
|
||||
|
||||
$formactions=new FormActions($db);
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
llxHeader();
|
||||
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"),$wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
print '<td align="center">'."\n";
|
||||
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
@@ -286,7 +286,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -373,11 +373,12 @@ $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AG
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// AGENDA_DEFAULT_FILTER_STATUS
|
||||
// TODO Remove to use the default generic feature
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
|
||||
print '<td align="center"> </td>'."\n";
|
||||
print '<td align="right">'."\n";
|
||||
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2);
|
||||
$formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_FILTER_STATUS, 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// AGENDA_DEFAULT_VIEW
|
||||
|
||||
@@ -71,11 +71,11 @@ if ($actionsave)
|
||||
|
||||
if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY=100;
|
||||
|
||||
llxHeader();
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@@ -43,7 +43,7 @@ if (!$user->admin)
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type = 'bankaccount';
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ foreach ($dirmodels as $reldir)
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td align="center">' . "\n";
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scandir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ foreach ($dirmodels as $reldir)
|
||||
if ($conf->global->BANKADDON_PDF == $name) {
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&scandir=' . $module->scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&value=' . $name . '&scan_dir=' . $module->scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type = 'order';
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ $error=0;
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
|
||||
|| ($action == 'updateedit') )
|
||||
{
|
||||
$tmparray=getCountry(GETPOST('country_id','int'),'all',$db,$langs,0);
|
||||
@@ -63,19 +63,19 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_COUNTRY", $s,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP",$_POST["zipcode"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE",$_POST["state_id"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD",$_POST["barcode"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM", GETPOST("nom",'nohtml'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("address",'nohtml'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("town",'nohtml'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("zipcode",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE", GETPOST("state_id",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL", GETPOST("tel",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX", GETPOST("fax",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL", GETPOST("mail",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB", GETPOST("web",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE", GETPOST("note",'none'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD", GETPOST("barcode",'alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
$varforimage='logo'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
|
||||
if ($_FILES[$varforimage]["tmp_name"])
|
||||
{
|
||||
@@ -100,8 +100,8 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
if ($isimage > 0)
|
||||
{
|
||||
// Create thumbs
|
||||
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
|
||||
|
||||
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
|
||||
|
||||
// Create small thumb, Used on logon for example
|
||||
$imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
|
||||
if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
|
||||
@@ -143,27 +143,27 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS",$_POST["MAIN_INFO_SOCIETE_MANAGERS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID5",$_POST["MAIN_INFO_PROFID5"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID6",$_POST["MAIN_INFO_PROFID6"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT",$_POST["object"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6",'alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START",$_POST["fiscalmonthstart"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("object",'nohtml'),'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("fiscalmonthstart",'alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "FACTURE_TVAOPTION", GETPOST("optiontva",'alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
// Local taxes
|
||||
dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION",$_POST["optionlocaltax1"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION",$_POST["optionlocaltax2"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION", GETPOST("optionlocaltax1",'alpha'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION", GETPOST("optionlocaltax2",'alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
if($_POST["optionlocaltax1"]=="localtax1on")
|
||||
{
|
||||
@@ -173,9 +173,9 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", $_POST["clt1"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
if($_POST["optionlocaltax2"]=="localtax2on")
|
||||
{
|
||||
@@ -185,9 +185,9 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2'),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", $_POST["clt2"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
if ($action != 'updateedit' && ! $error)
|
||||
@@ -207,7 +207,7 @@ if ($action == 'addthumb') // Regenerate thumbs
|
||||
if ($isimage > 0)
|
||||
{
|
||||
// Create thumbs
|
||||
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
|
||||
//$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
|
||||
|
||||
// Create small thumb. Used on logon for example
|
||||
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small',$quality);
|
||||
@@ -309,72 +309,72 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
|
||||
// Name
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM:$_POST["nom"]) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||
print '<input name="nom" id="name" class="minwidth200" value="'. ($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM: GETPOST("nom",'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
|
||||
|
||||
// Addresse
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS:$_POST["address"]) . '</textarea></td></tr>'."\n";
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS: GETPOST("address",'nohtml')) . '</textarea></td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:$_POST["zipcode"]) . '"></td></tr>'."\n";
|
||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'. ($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP: GETPOST("zipcode",'alpha')) . '"></td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:$_POST["town"]) . '"></td></tr>'."\n";
|
||||
print '<input name="town" class="minwidth100" id="town" value="'. ($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN: GETPOST("town",'nohtml')) . '"></td></tr>'."\n";
|
||||
|
||||
// Country
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
|
||||
print $form->select_country($mysoc->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="currency">'.$langs->trans("CompanyCurrency").'</label></td><td>';
|
||||
print $form->selectCurrency($conf->currency,"currency");
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||
print '<input name="tel" id="phone" value="'. $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||
print '<input name="fax" id="fax" value="'. $conf->global->MAIN_INFO_SOCIETE_FAX . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||
print '<input name="mail" id="email" class="minwidth200" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Web
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||
print '<input name="web" id="web" class="minwidth300" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Barcode
|
||||
if (! empty($conf->barcode->enabled)) {
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
||||
print '<input name="barcode" id="barcode" class="minwidth150" value="'. $conf->global->MAIN_INFO_SOCIETE_GENCOD . '"></td></tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Logo
|
||||
|
||||
|
||||
print '<tr'.dol_bc($var,'hideonsmartphone').'><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
|
||||
@@ -392,9 +392,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '</td></tr>';
|
||||
|
||||
// Note
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note','none') ? GETPOST('note','none') : $conf->global->MAIN_INFO_SOCIETE_NOTE).'</textarea></td></tr>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -409,17 +409,17 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
$langs->load("companies");
|
||||
|
||||
// Managing Director(s)
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="' . $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '"></td></tr>';
|
||||
|
||||
// Capital
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||
print '<input name="capital" id="capital" class="minwidth100" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
|
||||
|
||||
// Juridical Status
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||
if ($mysoc->country_code) {
|
||||
print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code');
|
||||
@@ -431,7 +431,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfID1
|
||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -447,7 +447,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfId2
|
||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -463,7 +463,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfId3
|
||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -479,7 +479,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfId4
|
||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -495,7 +495,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfId5
|
||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -511,7 +511,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// ProfId6
|
||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
@@ -525,13 +525,13 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
}
|
||||
|
||||
// TVA Intra
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
|
||||
print '<input name="tva" id="intra_vat" class="minwidth200" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Object of the company
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
|
||||
print '</td></tr>';
|
||||
@@ -546,7 +546,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td><label for="fiscalmonthstart">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
|
||||
print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '</td></tr>';
|
||||
|
||||
@@ -561,7 +561,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -570,7 +570,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -593,7 +593,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td>'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
@@ -616,7 +616,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -637,7 +637,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
@@ -657,7 +657,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -693,22 +693,22 @@ else
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("CompanyName").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
|
||||
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
{
|
||||
@@ -719,13 +719,13 @@ else
|
||||
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("CompanyCurrency").'</td><td>';
|
||||
print currency_name($conf->currency,1);
|
||||
print ' ('.$conf->currency;
|
||||
@@ -733,28 +733,28 @@ else
|
||||
print ')';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
|
||||
|
||||
// Web
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '</td></tr>';
|
||||
|
||||
// Barcode
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
|
||||
}
|
||||
|
||||
// Logo
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Logo").'</td><td>';
|
||||
|
||||
$tagtd='tagtd ';
|
||||
@@ -780,7 +780,7 @@ else
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -796,17 +796,17 @@ else
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Managing Director(s)
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ManagingDirectors").'</td><td>';
|
||||
print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
|
||||
|
||||
// Capital
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Capital").'</td><td>';
|
||||
print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
|
||||
|
||||
// Juridical Status
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("JuridicalStatus").'</td><td>';
|
||||
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
||||
print '</td></tr>';
|
||||
@@ -814,7 +814,7 @@ else
|
||||
// ProfId1
|
||||
if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SIREN))
|
||||
{
|
||||
@@ -830,7 +830,7 @@ else
|
||||
// ProfId2
|
||||
if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_SIRET))
|
||||
{
|
||||
@@ -846,7 +846,7 @@ else
|
||||
// ProfId3
|
||||
if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_APE))
|
||||
{
|
||||
@@ -862,7 +862,7 @@ else
|
||||
// ProfId4
|
||||
if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_RCS))
|
||||
{
|
||||
@@ -878,7 +878,7 @@ else
|
||||
// ProfId5
|
||||
if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_PROFID5))
|
||||
{
|
||||
@@ -894,7 +894,7 @@ else
|
||||
// ProfId6
|
||||
if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
||||
if (! empty($conf->global->MAIN_INFO_PROFID6))
|
||||
{
|
||||
@@ -908,7 +908,7 @@ else
|
||||
}
|
||||
|
||||
// VAT
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("VATIntra").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($conf->global->MAIN_INFO_TVAINTRA))
|
||||
@@ -944,8 +944,8 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -960,7 +960,7 @@ else
|
||||
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("FiscalMonthStart").'</td><td>';
|
||||
$monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
|
||||
print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
|
||||
@@ -977,7 +977,7 @@ else
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"use_vat\" disabled value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -986,7 +986,7 @@ else
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"no_vat\" disabled value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -1011,7 +1011,7 @@ else
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" disabled value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -1039,7 +1039,7 @@ else
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" disabled value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -1061,7 +1061,7 @@ else
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" disabled value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
@@ -1090,7 +1090,7 @@ else
|
||||
print "</table>";
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" disabled value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
|
||||
@@ -37,7 +37,7 @@ if (!$user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='contract';
|
||||
|
||||
if (empty($conf->global->CONTRACT_ADDON))
|
||||
@@ -397,7 +397,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
print '<input type="hidden" id="mode" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
// Page
|
||||
@@ -301,13 +302,13 @@ print '<input type="text" class="flat minwidth200 maxwidthonsmartphone" name="de
|
||||
print '</td>'."\n";
|
||||
// Field
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidth100" name="defaultkey" value="">';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultkey" value="">';
|
||||
print '</td>';
|
||||
// Value
|
||||
if ($mode != 'focus')
|
||||
{
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat maxwidthonsmartphone" name="defaultvalue" value="">';
|
||||
print '<input type="text" class="flat maxwidth100onsmartphone" name="defaultvalue" value="">';
|
||||
print '</td>';
|
||||
}
|
||||
// Limit to superadmin
|
||||
@@ -409,6 +410,7 @@ else
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ $actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
|
||||
|
||||
$listoffset=GETPOST('listoffset');
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000; // To avoid too long dictionaries
|
||||
$active = 1;
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@@ -600,7 +600,8 @@ 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 ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||
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')) // Fields that are not mandatory
|
||||
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||
)
|
||||
@@ -715,7 +716,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
|
||||
{
|
||||
$sql.="'".(int) $db->escape($_POST['position'])."'";
|
||||
}
|
||||
elseif ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
|
||||
$i++;
|
||||
}
|
||||
@@ -764,7 +769,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
$sql.= $field."=";
|
||||
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position'
|
||||
{
|
||||
$sql.="'".(int) $db->escape($_POST['position'])."'";
|
||||
}
|
||||
elseif ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
|
||||
$i++;
|
||||
}
|
||||
@@ -990,6 +999,7 @@ if ($id)
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Line for title
|
||||
@@ -1118,7 +1128,7 @@ if ($id)
|
||||
}
|
||||
|
||||
if ($id == 4) print '<td></td>';
|
||||
print '<td colspan="3" align="right">';
|
||||
print '<td colspan="3" align="center">';
|
||||
if ($action != 'edit')
|
||||
{
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
@@ -1130,11 +1140,7 @@ if ($id)
|
||||
if ($id == 4) $colspan++;
|
||||
|
||||
print '</table>';
|
||||
|
||||
/*if (! empty($alabelisused) && $id != 25) // If there is one label among fields, we show legend of *
|
||||
{
|
||||
print '* '.$langs->trans("LabelUsedByDefault").'.<br>';
|
||||
}*/
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
@@ -1154,11 +1160,13 @@ if ($id)
|
||||
$i = 0;
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
if ($num > $listlimit || $page)
|
||||
{
|
||||
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
|
||||
print '<div class="clearboth"></div>';
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Title line with search boxes
|
||||
@@ -1580,6 +1588,7 @@ if ($id)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
@@ -1595,6 +1604,8 @@ else
|
||||
*/
|
||||
|
||||
$lastlineisempty=false;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td>'.$langs->trans("Module").'</td>';
|
||||
@@ -1647,6 +1658,7 @@ else
|
||||
}
|
||||
}
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
@@ -1836,6 +1848,8 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($fieldlist[$field]=='sortorder') $fieldlist[$field]='position';
|
||||
|
||||
$classtd=''; $class='';
|
||||
if ($fieldlist[$field]=='code') $classtd='width100';
|
||||
if ($fieldlist[$field]=='affect') $class='maxwidth50';
|
||||
|
||||
@@ -45,7 +45,7 @@ if (! $user->admin)
|
||||
$action=GETPOST('action','alpha');
|
||||
$value=GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='shipping';
|
||||
|
||||
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
||||
@@ -263,7 +263,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$file.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
@@ -402,7 +402,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -440,7 +440,7 @@ foreach ($dirmodels as $reldir)
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='expensereport';
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir)
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
@@ -406,7 +406,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='ficheinter';
|
||||
|
||||
|
||||
@@ -221,9 +221,38 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_WITHOUT_DURATION') {
|
||||
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_DATE_WITHOUT_HOUR') {
|
||||
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@@ -431,7 +460,7 @@ foreach ($dirmodels as $reldir)
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
@@ -439,7 +468,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -451,7 +480,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -576,6 +605,40 @@ print '<input type="submit" class="button" value="' . $langs->trans("Modify") .
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
// Use duration
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="set_FICHINTER_WITHOUT_DURATION">';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $langs->trans("UseDurationOnFichinter");
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"' . ($conf->global->FICHINTER_WITHOUT_DURATION?' checked':'') . '>';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
// use date without hour
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="set_FICHINTER_DATE_WITHOUT_HOUR">';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $langs->trans("UseDateWithoutHourOnFichinter");
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"' . ($conf->global->FICHINTER_DATE_WITHOUT_HOUR?' checked':'') . '>';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -70,13 +70,13 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
||||
|
||||
print $langs->trans("SetupDescription1").' ';
|
||||
print $langs->trans("AreaForAdminOnly").' ';
|
||||
print $langs->trans("SetupDescription2", $langs->trans("MenuCompanySetup"), $langs->trans("Modules"))."<br><br>";
|
||||
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"))."<br><br>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Show info setup company
|
||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete=1;
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit'), $langs->trans("Setup"), $langs->trans("MenuCompanySetup"));
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
||||
if (! empty($setupcompanynotcomplete))
|
||||
{
|
||||
$langs->load("errors");
|
||||
@@ -88,7 +88,7 @@ print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->trans("Setup"), $langs->trans("Modules"));
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
|
||||
{
|
||||
$langs->load("errors");
|
||||
|
||||
@@ -44,7 +44,7 @@ if (!$user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='delivery';
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ foreach ($dirmodels as $reldir)
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
@@ -393,7 +393,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -46,13 +46,18 @@ if ($action == 'test' || $action == 'send')
|
||||
}
|
||||
|
||||
$substitutionarrayfortest=array(
|
||||
'__LOGIN__' => $user->login,
|
||||
'__ID__' => 'TESTIdRecord',
|
||||
'__EMAIL__' => 'TESTEMail',
|
||||
'__LASTNAME__' => 'TESTLastname',
|
||||
'__FIRSTNAME__' => 'TESTFirstname',
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''),
|
||||
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
|
||||
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
|
||||
'__ID__' => 'RecipientIdRecord',
|
||||
//'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails
|
||||
'__CHECK_READ__' => (is_object($object) && is_object($object->thirdparty))?'<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>':'',
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''), // Done into actions_sendmails
|
||||
'__LOGIN__' => 'RecipientLogin',
|
||||
'__LASTNAME__' => 'RecipientLastname',
|
||||
'__FIRSTNAME__' => 'RecipientFirstname',
|
||||
'__ADDRESS__'=> 'RecipientAddress',
|
||||
'__ZIP__'=> 'RecipientZip',
|
||||
'__TOWN_'=> 'RecipientTown',
|
||||
'__COUNTRY__'=> 'RecipientCountry'
|
||||
);
|
||||
complete_substitutions_array($substitutionarrayfortest, $langs);
|
||||
|
||||
|
||||
@@ -465,6 +465,7 @@ print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Form to add a new line
|
||||
@@ -581,13 +582,13 @@ if ($action != 'edit')
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$colspan=count($fieldlist)+1;
|
||||
//print '<tr><td colspan="'.$colspan.'"> </td></tr>'; // Keep to have a line with enough height
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
@@ -596,6 +597,7 @@ print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// List of available record in database
|
||||
@@ -840,6 +842,7 @@ else {
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@@ -83,27 +83,27 @@ if ($action == 'update')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$menu = new Menubase($db);
|
||||
$result=$menu->fetch($_POST['menuId']);
|
||||
$result=$menu->fetch(GETPOST('menuId', 'int'));
|
||||
if ($result > 0)
|
||||
{
|
||||
$menu->titre=$_POST['titre'];
|
||||
$menu->leftmenu=$_POST['leftmenu'];
|
||||
$menu->url=$_POST['url'];
|
||||
$menu->langs=$_POST['langs'];
|
||||
$menu->position=$_POST['position'];
|
||||
$menu->enabled=$_POST['enabled'];
|
||||
$menu->perms=$_POST['perms'];
|
||||
$menu->target=$_POST['target'];
|
||||
$menu->user=$_POST['user'];
|
||||
if (is_numeric($_POST['menuIdParent']))
|
||||
$menu->titre=GETPOST('titre', 'alpha');
|
||||
$menu->leftmenu=GETPOST('leftmenu', 'alpha');
|
||||
$menu->url=GETPOST('url','alpha');
|
||||
$menu->langs=GETPOST('langs','alpha');
|
||||
$menu->position=GETPOST('position','int');
|
||||
$menu->enabled=GETPOST('enabled','alpha');
|
||||
$menu->perms=GETPOST('perms','alpha');
|
||||
$menu->target=GETPOST('target','alpha');
|
||||
$menu->user=GETPOST('user','alpha');
|
||||
if (is_numeric(GETPOST('menuIdParent','alpha')))
|
||||
{
|
||||
$menu->fk_menu=$_POST['menuIdParent'];
|
||||
$menu->fk_menu=GETPOST('menuIdParent','alpha');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($_POST['type'] == 'top') $menu->fk_menu=0;
|
||||
if (GETPOST('type','alpha') == 'top') $menu->fk_menu=0;
|
||||
else $menu->fk_menu=-1;
|
||||
$menu->fk_mainmenu=$mainmenu;
|
||||
$menu->fk_leftmenu=$leftmenu;
|
||||
@@ -123,7 +123,6 @@ if ($action == 'update')
|
||||
{
|
||||
setEventMessages($menu->error, $menu->errors, 'errors');
|
||||
}
|
||||
$_GET["menuId"] = $_POST['menuId'];
|
||||
$action = "edit";
|
||||
}
|
||||
else
|
||||
@@ -148,9 +147,9 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
$leftmenu=''; $mainmenu='';
|
||||
if (! empty($_POST['menuId']) && ! is_numeric($_POST['menuId']))
|
||||
if (GETPOST('menuId','int') && ! is_numeric(GETPOST('menuId','int')))
|
||||
{
|
||||
$tmp=explode('&',$_POST['menuId']);
|
||||
$tmp=explode('&',GETPOST('menuId','int'));
|
||||
foreach($tmp as $s)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/',$s))
|
||||
@@ -197,7 +196,7 @@ if ($action == 'add')
|
||||
$action = 'create';
|
||||
$error++;
|
||||
}
|
||||
if (! $error && empty($_POST['menuId']) && $_POST['type'] == 'left')
|
||||
if (! $error && ! $_POST['menuId'] && $_POST['type'] == 'left')
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors');
|
||||
$action = 'create';
|
||||
@@ -207,23 +206,23 @@ if ($action == 'add')
|
||||
if (! $error)
|
||||
{
|
||||
$menu = new Menubase($db);
|
||||
$menu->menu_handler=preg_replace('/_menu$/','',$_POST['menu_handler']);
|
||||
$menu->type=$_POST['type'];
|
||||
$menu->titre=$_POST['titre'];
|
||||
$menu->url=$_POST['url'];
|
||||
$menu->langs=$_POST['langs'];
|
||||
$menu->position=$_POST['position'];
|
||||
$menu->enabled=$_POST['enabled'];
|
||||
$menu->perms=$_POST['perms'];
|
||||
$menu->target=$_POST['target'];
|
||||
$menu->user=$_POST['user'];
|
||||
if (is_numeric($_POST['menuId']))
|
||||
$menu->menu_handler=preg_replace('/_menu$/','',GETPOST('menu_handler','aZ09'));
|
||||
$menu->type=GETPOST('type','alpha');
|
||||
$menu->titre=GETPOST('titre','alpha');
|
||||
$menu->url=GETPOST('url','alpha');
|
||||
$menu->langs=GETPOST('langs','alpha');
|
||||
$menu->position=GETPOST('position','int');
|
||||
$menu->enabled=GETPOST('enabled','alpha');
|
||||
$menu->perms=GETPOST('perms','alpha');
|
||||
$menu->target=GETPOST('target','alpha');
|
||||
$menu->user=GETPOST('user','alpha');
|
||||
if (is_numeric(GETPOST('menuId','int')))
|
||||
{
|
||||
$menu->fk_menu=$_POST['menuId'];
|
||||
$menu->fk_menu=GETPOST('menuId','int');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($_POST['type'] == 'top') $menu->fk_menu=0;
|
||||
if (GETPOST('type','alpha') == 'top') $menu->fk_menu=0;
|
||||
else $menu->fk_menu=-1;
|
||||
$menu->fk_mainmenu=$mainmenu;
|
||||
$menu->fk_leftmenu=$leftmenu;
|
||||
@@ -232,7 +231,7 @@ if ($action == 'add')
|
||||
$result=$menu->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$_POST['menu_handler']);
|
||||
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler','aZ09'));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -305,17 +304,17 @@ if ($action == 'create')
|
||||
</script>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewMenu"),'','title_setup');
|
||||
|
||||
print '<form action="./edit.php?action=add&menuId='.$_GET['menuId'].'" method="post" name="formmenucreate">';
|
||||
|
||||
print '<form action="./edit.php?action=add&menuId='.GETPOST('menuId', 'int').'" method="post" name="formmenucreate">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Id
|
||||
$parent_rowid = $_GET['menuId'];
|
||||
if ($_GET['menuId'])
|
||||
$parent_rowid = GETPOST('menuId', 'int');
|
||||
if (GETPOST('menuId', 'int'))
|
||||
{
|
||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int');
|
||||
$res = $db->query($sql);
|
||||
@@ -375,40 +374,40 @@ if ($action == 'create')
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><input type="text" size="48" id="menuId" name="menuId" value="'.($_POST["menuId"]?$_POST["menuId"]:'').'"></td>';
|
||||
print '<td><input type="text" size="48" id="menuId" name="menuId" value="'.(GETPOST("menuId", 'int')?GETPOST("menuId", 'int'):'').'"></td>';
|
||||
}
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||
print '</td></tr>';
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.$_POST["titre"].'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.dol_escape_htmltag(GETPOST("titre",'alpha')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
|
||||
// URL
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" size="60" name="url" value="'.$_POST["url"].'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" size="60" name="url" value="'.GETPOST("url",'alpha').'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
|
||||
// Langs
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" size="30" name="langs" value="'.$parent_langs.'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
|
||||
// Position
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" size="5" name="position" value="'.(isset($_POST["position"])?$_POST["position"]:100).'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" size="5" name="position" value="'.dol_escape_htmltag(isset($_POST["position"])?$_POST["position"]:100).'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||
print '<option value=""'.($menu->target==""?' selected':'').'>'.$langs->trans('').'</option>';
|
||||
print '<option value=""'.($menu->target==""?' selected':'').'> </option>';
|
||||
print '<option value="_blank"'.($menu->target=="_blank"?' selected':'').'>'.$langs->trans('_blank').'</option>';
|
||||
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
// Enabled
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" size="60" name="enabled" value="'.$_POST["enabled"].'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" size="60" name="enabled" value="'.GETPOST("enabled",'alpha').'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
|
||||
|
||||
// Perms
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" size="60" name="perms" value="'.$_POST["perms"].'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" size="60" name="perms" value="'.GETPOST('perms','alpha').'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Boutons
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
@@ -426,14 +425,14 @@ elseif ($action == 'edit')
|
||||
print '<form action="./edit.php?action=update" method="POST" name="formmenuedit">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="handler_origine" value="'.$menu_handler.'">';
|
||||
print '<input type="hidden" name="menuId" value="'.$_GET['menuId'].'">';
|
||||
print '<input type="hidden" name="menuId" value="'.GETPOST('menuId', 'int').'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$menu = new Menubase($db);
|
||||
$result=$menu->fetch($_GET['menuId']);
|
||||
$result=$menu->fetch(GETPOST('menuId', 'int'));
|
||||
//var_dump($menu);
|
||||
|
||||
// Id
|
||||
@@ -472,20 +471,20 @@ elseif ($action == 'edit')
|
||||
//print '<tr><td>'.$langs->trans('Level').'</td><td>'.$menu->level.'</td><td>'.$langs->trans('DetailLevel').'</td></tr>';
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.$menu->titre.'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.dol_escape_htmltag($menu->titre).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
|
||||
// Url
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" class="quatrevingtpercent" name="url" value="'.$menu->url.'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
|
||||
|
||||
// Langs
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" size="30" name="langs" value="'.$menu->langs.'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" size="30" name="langs" value="'.dol_escape_htmltag($menu->langs).'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
|
||||
|
||||
// Position
|
||||
print '<tr><td>'.$langs->trans('Position').'</td><td><input type="text" size="5" name="position" value="'.$menu->position.'"></td><td>'.$langs->trans('DetailPosition').'</td></tr>';
|
||||
|
||||
// Target
|
||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||
print '<option value=""'.($menu->target==""?' selected':'').'>'.$langs->trans('').'</option>';
|
||||
print '<option value=""'.($menu->target==""?' selected':'').'> </option>';
|
||||
print '<option value="_blank"'.($menu->target=="_blank"?' selected':'').'>'.$langs->trans('_blank').'</option>';
|
||||
print '</select></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||
|
||||
@@ -502,7 +501,7 @@ elseif ($action == 'edit')
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Bouton
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
|
||||
@@ -365,7 +365,7 @@ if ($mode == 'desc')
|
||||
if ($mode == 'feature')
|
||||
{
|
||||
$text.='<br><strong>'.$langs->trans("DependsOn").':</strong> ';
|
||||
if (count($objMod->requiredby)) $text.=join(',', $objMod->depends);
|
||||
if (count($objMod->depends)) $text.=join(',', $objMod->depends);
|
||||
else $text.=$langs->trans("None");
|
||||
$text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
|
||||
if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby);
|
||||
|
||||
@@ -843,115 +843,111 @@ if ($mode == 'marketplace')
|
||||
|
||||
if ($mode == 'deploy')
|
||||
{
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
dol_fiche_head($head, $mode, '', -1);
|
||||
|
||||
$dolibarrdataroot=preg_replace('/([\\/]+)$/i','',DOL_DATA_ROOT);
|
||||
$allowonlineinstall=true;
|
||||
$allowfromweb=1;
|
||||
if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) $allowonlineinstall=false;
|
||||
|
||||
$allowonlineinstall=true;
|
||||
$allowfromweb=1;
|
||||
if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) $allowonlineinstall=false;
|
||||
$fullurl='<a href="'.$urldolibarrmodules.'" target="_blank">'.$urldolibarrmodules.'</a>';
|
||||
$message='';
|
||||
if (! empty($allowonlineinstall))
|
||||
{
|
||||
if (! in_array('/custom',explode(',',$dolibarr_main_url_root_alt)))
|
||||
{
|
||||
$message=info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
|
||||
$allowfromweb=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dirins_ok)
|
||||
{
|
||||
if (! is_writable(dol_osencode($dirins)))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$message=info_admin($langs->trans("ErrorFailedToWriteInDir",$dirins));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=info_admin($langs->trans("NotExistsDirect",$dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample"));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile",$dolibarrdataroot.'/installmodules.lock'));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
|
||||
$fullurl='<a href="'.$urldolibarrmodules.'" target="_blank">'.$urldolibarrmodules.'</a>';
|
||||
$message='';
|
||||
if (! empty($allowonlineinstall))
|
||||
{
|
||||
if (! in_array('/custom',explode(',',$dolibarr_main_url_root_alt)))
|
||||
{
|
||||
$message=info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
|
||||
$allowfromweb=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dirins_ok)
|
||||
{
|
||||
if (! is_writable(dol_osencode($dirins)))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$message=info_admin($langs->trans("ErrorFailedToWriteInDir",$dirins));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($allowfromweb < 1)
|
||||
{
|
||||
print $langs->trans("SomethingMakeInstallFromWebNotPossible");
|
||||
print $message;
|
||||
//print $langs->trans("SomethingMakeInstallFromWebNotPossible2");
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
$message=info_admin($langs->trans("NotExistsDirect",$dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample"));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile",$dolibarrdataroot.'/installmodules.lock'));
|
||||
$allowfromweb=0;
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
if ($allowfromweb < 1)
|
||||
{
|
||||
print $langs->trans("SomethingMakeInstallFromWebNotPossible");
|
||||
print $message;
|
||||
//print $langs->trans("SomethingMakeInstallFromWebNotPossible2");
|
||||
print '<br>';
|
||||
}
|
||||
if ($allowfromweb >= 0)
|
||||
{
|
||||
if ($allowfromweb == 1)
|
||||
{
|
||||
//print $langs->trans("ThisIsProcessToFollow").'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",1).'</b>: ';
|
||||
print $langs->trans("FindPackageFromWebSite",$fullurl).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",2).'</b>: ';
|
||||
print $langs->trans("DownloadPackageFromWebSite",$fullurl).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
if ($allowfromweb == 1)
|
||||
{
|
||||
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
||||
|
||||
if ($allowfromweb >= 0)
|
||||
{
|
||||
if ($allowfromweb == 1)
|
||||
{
|
||||
//print $langs->trans("ThisIsProcessToFollow").'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("ThisIsAlternativeProcessToFollow").'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",1).'</b>: ';
|
||||
print $langs->trans("FindPackageFromWebSite",$fullurl).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",2).'</b>: ';
|
||||
print $langs->trans("DownloadPackageFromWebSite",$fullurl).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",3).'</b>: ';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
if ($allowfromweb == 1)
|
||||
{
|
||||
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||
print '<input type="hidden" name="action" value="install">';
|
||||
print '<input type="hidden" name="mode" value="deploy">';
|
||||
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
|
||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print '<form enctype="multipart/form-data" method="POST" class="noborder" action="'.$_SERVER["PHP_SELF"].'" name="forminstall">';
|
||||
print '<input type="hidden" name="action" value="install">';
|
||||
print '<input type="hidden" name="mode" value="deploy">';
|
||||
print $langs->trans("YouCanSubmitFile").' <input type="file" name="fileinstall"> ';
|
||||
print '<input type="submit" name="send" value="'.dol_escape_htmltag($langs->trans("Send")).'" class="button">';
|
||||
print '</form>';
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",4).'</b>: ';
|
||||
print $langs->trans("SetupIsReadyForUse").'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
if (! empty($result['return']))
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("UnpackPackageInModulesRoot",$dirins).'<br>';
|
||||
print '<b>'.$langs->trans("StepNb",4).'</b>: ';
|
||||
print $langs->trans("SetupIsReadyForUse").'<br>';
|
||||
}
|
||||
}
|
||||
foreach($result['return'] as $value)
|
||||
{
|
||||
echo $value.'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! empty($result['return']))
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
foreach($result['return'] as $value)
|
||||
{
|
||||
echo $value.'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -78,34 +78,54 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
|
||||
if ($action == 'add_currency')
|
||||
{
|
||||
$error=0;
|
||||
|
||||
$langs->loadCacheCurrencies('');
|
||||
|
||||
$code = GETPOST('code', 'alpha');
|
||||
$rate = GETPOST('rate', 'alpha');
|
||||
$rate = price2num(GETPOST('rate', 'alpha'));
|
||||
$currency = new MultiCurrency($db);
|
||||
$currency->code = $code;
|
||||
$currency->name = !empty($langs->cache_currencies[$code]['label']) ? $langs->cache_currencies[$code]['label'].' ('.$langs->getCurrencySymbol($code).')' : $code;
|
||||
|
||||
if ($currency->create($user) > 0)
|
||||
if (empty($rate))
|
||||
{
|
||||
if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array());
|
||||
else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors');
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
if ($currency->create($user) > 0)
|
||||
{
|
||||
if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array());
|
||||
else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors');
|
||||
}
|
||||
else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors');
|
||||
}
|
||||
else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors');
|
||||
}
|
||||
elseif ($action == 'update_currency')
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
$submit = GETPOST('submit', 'alpha');
|
||||
|
||||
if ($submit == $langs->trans('Modify'))
|
||||
{
|
||||
$fk_multicurrency = GETPOST('fk_multicurrency', 'int');
|
||||
$rate = GETPOST('rate', 'float');
|
||||
$rate = price2num(GETPOST('rate', 'alpha'));
|
||||
$currency = new MultiCurrency($db);
|
||||
|
||||
if ($currency->fetch($fk_multicurrency) > 0)
|
||||
if (empty($rate))
|
||||
{
|
||||
$currency->updateRate($rate);
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
if ($currency->fetch($fk_multicurrency) > 0)
|
||||
{
|
||||
$currency->updateRate($rate);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($submit == $langs->trans('Delete'))
|
||||
@@ -235,7 +255,7 @@ print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
print '<br />';
|
||||
print '<br>';
|
||||
|
||||
if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
||||
{
|
||||
@@ -279,7 +299,6 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
|
||||
print '<td align="center" width="20"> </td>';
|
||||
@@ -325,8 +344,7 @@ print '</td></form></tr>';
|
||||
|
||||
foreach ($TCurrency as &$currency)
|
||||
{
|
||||
if($currency->code == $conf->currency) continue;
|
||||
|
||||
if ($currency->code == $conf->currency) continue;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
|
||||
|
||||
@@ -36,7 +36,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='invoice';
|
||||
|
||||
if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON = 'mod_payment_cicada.php';
|
||||
@@ -188,7 +188,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2105 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@@ -56,7 +56,7 @@ if ($cancel) {
|
||||
if ($action == 'update')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", $_POST["MAIN_PDF_MARGIN_LEFT"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", $_POST["MAIN_PDF_MARGIN_RIGHT"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PDF_MARGIN_TOP", $_POST["MAIN_PDF_MARGIN_TOP"],'chaine',0,'',$conf->entity);
|
||||
@@ -74,7 +74,11 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"],'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
|
||||
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", $_POST["MAIN_PDF_MAIN_HIDE_SECOND_TAX"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", $_POST["MAIN_PDF_MAIN_HIDE_THIRD_TAX"],'chaine',0,'',$conf->entity);
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
exit;
|
||||
}
|
||||
@@ -130,7 +134,8 @@ if ($action == 'edit') // Edit
|
||||
|
||||
// Misc options
|
||||
print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'<br>';
|
||||
$var=true;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
@@ -138,7 +143,7 @@ if ($action == 'edit') // Edit
|
||||
if (empty($selected)) $selected=dol_getDefaultFormat();
|
||||
|
||||
// Show pdf format
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DictionaryPaperFormat").'</td><td>';
|
||||
print $formadmin->select_paper_format($selected,'MAIN_PDF_FORMAT');
|
||||
print '</td></tr>';
|
||||
@@ -155,26 +160,28 @@ if ($action == 'edit') // Edit
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_BOTTOM").'</td><td>';
|
||||
print '<input type="text" class="maxwidth50" name="MAIN_PDF_MARGIN_BOTTOM" value="'.(empty($conf->global->MAIN_PDF_MARGIN_BOTTOM)?10:$conf->global->MAIN_PDF_MARGIN_BOTTOM).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Addresses
|
||||
print load_fiche_titre($langs->trans("PDFAddressForging"),'','').'<br>';
|
||||
$var=true;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Hide VAT Intra on address
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td>';
|
||||
print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
|
||||
@@ -192,7 +199,7 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
|
||||
@@ -210,7 +217,7 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
|
||||
@@ -228,7 +235,7 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
|
||||
@@ -246,51 +253,88 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Localtaxes
|
||||
if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2))
|
||||
{
|
||||
$locales ='';
|
||||
$text='';
|
||||
|
||||
if ($mysoc->useLocalTax(1))
|
||||
{
|
||||
$locales = $langs->transcountry("LT1",$mysoc->country_code);
|
||||
$text ='<tr class="oddeven"><td>' . $langs->trans("HideLocalTaxOnPDF",$langs->transcountry("LT1",$mysoc->country_code)) . '</td><td>';
|
||||
$text.= $form->selectyesno('MAIN_PDF_MAIN_HIDE_SECOND_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX : 0, 1);
|
||||
$text .= '</td></tr>';
|
||||
}
|
||||
|
||||
if ($mysoc->useLocalTax(2))
|
||||
{
|
||||
$locales.=($locales?' & ':'').$langs->transcountry("LT2",$mysoc->country_code);
|
||||
|
||||
$text.= '<tr class="oddeven"><td>' . $langs->trans("HideLocalTaxOnPDF",$langs->transcountry("LT2",$mysoc->country_code)) . '</td><td>';
|
||||
$text.= $form->selectyesno('MAIN_PDF_MAIN_HIDE_THIRD_TAX', (!empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) ? $conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX : 0, 1);
|
||||
$text.= '</td></tr>';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("PDFLocaltax",$locales),'','');
|
||||
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
print $text;
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
}
|
||||
|
||||
// Other
|
||||
print load_fiche_titre($langs->trans("Other"),'','').'<br>';
|
||||
$var=true;
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Hide any PDF informations
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Desc
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideDescOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Ref
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideRefOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Details
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideDetailsOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Place customer adress to the ISO location
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PlaceCustomerAddressToIsoLocation").'</td><td>';
|
||||
print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowDetailsInPDFPageFoot").'</td><td>';
|
||||
print $form->selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||
@@ -303,17 +347,16 @@ if ($action == 'edit') // Edit
|
||||
}
|
||||
else // Show
|
||||
{
|
||||
$var=true;
|
||||
|
||||
// Misc options
|
||||
print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','');
|
||||
|
||||
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Show pdf format
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DictionaryPaperFormat").'</td><td>';
|
||||
|
||||
$pdfformatlabel='';
|
||||
@@ -352,24 +395,26 @@ else // Show
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_PDF_MARGIN_BOTTOM").'</td><td>';
|
||||
print empty($conf->global->MAIN_PDF_MARGIN_BOTTOM)?10:$conf->global->MAIN_PDF_MARGIN_BOTTOM;
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("PDFAddressForging"),'','');
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Hide Intra VAT on address
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowVATIntaInAddress").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Show prof id 1 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
|
||||
@@ -387,7 +432,7 @@ else // Show
|
||||
}
|
||||
|
||||
// Show prof id 2 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
|
||||
@@ -405,7 +450,7 @@ else // Show
|
||||
}
|
||||
|
||||
// Show prof id 3 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
|
||||
@@ -423,7 +468,7 @@ else // Show
|
||||
}
|
||||
|
||||
// Show prof id 4 in address into pdf
|
||||
|
||||
|
||||
if (! $noCountryCode)
|
||||
{
|
||||
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
|
||||
@@ -441,18 +486,52 @@ else // Show
|
||||
}
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Localtaxes
|
||||
if ($mysoc->useLocalTax(1) || $mysoc->useLocalTax(2))
|
||||
{
|
||||
$locales ='';
|
||||
$text='';
|
||||
|
||||
if ($mysoc->useLocalTax(1))
|
||||
{
|
||||
$locales = $langs->transcountry("LT1",$mysoc->country_code);
|
||||
$text ='<tr class="oddeven"><td>' . $langs->trans("HideLocalTaxOnPDF",$langs->transcountry("LT1",$mysoc->country_code)) . '</td><td>';
|
||||
$text .= yn($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX,1);
|
||||
$text .= '</td></tr>';
|
||||
}
|
||||
|
||||
if ($mysoc->useLocalTax(2))
|
||||
{
|
||||
$locales.=($locales?' & ':'').$langs->transcountry("LT2",$mysoc->country_code);
|
||||
|
||||
$text.= '<tr class="oddeven"><td>' . $langs->trans("HideLocalTaxOnPDF",$langs->transcountry("LT2",$mysoc->country_code)) . '</td><td>';
|
||||
$text.= yn($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX,1);
|
||||
$text.= '</td></tr>';
|
||||
}
|
||||
|
||||
print load_fiche_titre($langs->trans("PDFLocaltax",$locales),'','');
|
||||
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||
print $text;
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
}
|
||||
|
||||
// Other
|
||||
print load_fiche_titre($langs->trans("Other"),'','');
|
||||
$var=true;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="more" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px" colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
|
||||
// Encrypt and protect PDF
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$text = $langs->trans("ProtectAndEncryptPdfFiles");
|
||||
@@ -480,48 +559,51 @@ else // Show
|
||||
print '</tr>';
|
||||
|
||||
// Hide any PDF informations
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Desc
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideDescOnPDF").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Ref
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideRefOnPDF").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1);
|
||||
print '</td></tr>';
|
||||
|
||||
//Details
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideDetailsOnPDF").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("PlaceCustomerAddressToIsoLocation").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_PDF_USE_ISO_LOCATION,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowDetailsInPDFPageFoot").'</td><td colspan="2">';
|
||||
print $arraydetailsforpdffoot[$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS];
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
/*
|
||||
* Library
|
||||
*/
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("Library"));
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
@@ -529,10 +611,9 @@ else // Show
|
||||
print '<td>'.$langs->trans("Value").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=false;
|
||||
if (! empty($dolibarr_pdf_force_fpdf))
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print '<td>dolibarr_pdf_force_fpdf</td>'."\n";
|
||||
print '<td>';
|
||||
@@ -541,7 +622,7 @@ else // Show
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">'."\n";
|
||||
print '<td>'.$langs->trans("LibraryToBuildPDF").'</td>'."\n";
|
||||
print '<td>';
|
||||
@@ -580,6 +661,7 @@ else // Show
|
||||
print '</tr>'."\n";
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
if (! empty($dolibarr_pdf_force_fpdf))
|
||||
{
|
||||
|
||||
@@ -332,7 +332,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='propal';
|
||||
|
||||
/*
|
||||
@@ -443,7 +443,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ dol_fiche_head($head, 'file', $langs->trans("Security"), -1);
|
||||
// Upload options
|
||||
$var=false;
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("Parameters").'</td>';
|
||||
@@ -192,6 +193,7 @@ print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ accessforbidden();
|
||||
$type=GETPOST('type', 'alpha');
|
||||
$value=GETPOST('value', 'alpha');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
|
||||
$specimenthirdparty=new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
@@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir)
|
||||
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
|
||||
//{
|
||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
/*}
|
||||
@@ -411,7 +411,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -421,11 +421,11 @@ foreach ($dirmodels as $reldir)
|
||||
{
|
||||
//print img_picto($langs->trans("Default"),'on');
|
||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ $type=GETPOST('type', 'alpha');
|
||||
$value=GETPOST('value', 'alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
|
||||
$specimenthirdparty=new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
@@ -420,7 +420,7 @@ foreach ($dirmodels as $reldir)
|
||||
print '<td align="center">'."\n";
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
@@ -433,7 +433,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='supplier_payment';
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.preg_replace('/\.php$/','',$file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ if (! $user->admin) accessforbidden();
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$scandir = GETPOST('scan_dir','alpha');
|
||||
$type='supplier_proposal';
|
||||
|
||||
$error=0;
|
||||
@@ -423,7 +423,7 @@ foreach ($dirmodels as $reldir)
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ print load_fiche_titre($langs->trans("FileCheckDolibarr"),'','title_setup');
|
||||
print $langs->trans("FileCheckDesc").'<br><br>';
|
||||
|
||||
// Version
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionLastInstall").'</td><td>'.$conf->global->MAIN_VERSION_LAST_INSTALL.'</td></tr>'."\n";
|
||||
@@ -63,6 +64,7 @@ if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) {
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@@ -133,7 +135,7 @@ if (GETPOST('target') == 'local')
|
||||
if (GETPOST('target') == 'remote')
|
||||
{
|
||||
$xmlarray = getURLContent($xmlremote);
|
||||
|
||||
|
||||
// Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||
if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
|
||||
{
|
||||
@@ -147,20 +149,21 @@ if (GETPOST('target') == 'remote')
|
||||
setEventMessages($errormsg, null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($xml)
|
||||
{
|
||||
$checksumconcat = array();
|
||||
$file_list = array();
|
||||
$out = '';
|
||||
|
||||
|
||||
// Forced constants
|
||||
if (is_object($xml->dolibarr_constants[0]))
|
||||
{
|
||||
$out.=load_fiche_titre($langs->trans("ForcedConstants"));
|
||||
|
||||
|
||||
$out.='<div class="div-table-responsive-no-min">';
|
||||
$out.='<table class="noborder">';
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
@@ -175,13 +178,13 @@ if ($xml)
|
||||
$constname=$constant['name'];
|
||||
$constvalue=(string) $constant;
|
||||
$constvalue = (empty($constvalue)?'0':$constvalue);
|
||||
// Value found
|
||||
// Value found
|
||||
$value='';
|
||||
if ($constname && $conf->global->$constname != '') $value=$conf->global->$constname;
|
||||
$valueforchecksum=(empty($value)?'0':$value);
|
||||
|
||||
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
|
||||
|
||||
$i++;
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td>'.$i.'</td>' . "\n";
|
||||
@@ -196,10 +199,11 @@ if ($xml)
|
||||
$out.='<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$out.='</table>';
|
||||
|
||||
$out.='</div>';
|
||||
|
||||
$out.='<br>';
|
||||
}
|
||||
|
||||
|
||||
// Scan htdocs
|
||||
if (is_object($xml->dolibarr_htdocs_dir[0]))
|
||||
{
|
||||
@@ -208,7 +212,7 @@ if ($xml)
|
||||
|
||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||
|
||||
// Fill file_list with files in signature, new files, modified files
|
||||
@@ -223,10 +227,11 @@ if ($xml)
|
||||
$file_list['added'][]=array('filename'=>$tmprelativefilename, 'md5'=>$md5newfile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Files missings
|
||||
$out.=load_fiche_titre($langs->trans("FilesMissing"));
|
||||
|
||||
|
||||
$out.='<div class="div-table-responsive-no-min">';
|
||||
$out.='<table class="noborder">';
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
@@ -247,18 +252,20 @@ if ($xml)
|
||||
$out.="</tr>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$out.='<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
}
|
||||
$out.='</table>';
|
||||
$out.='</div>';
|
||||
|
||||
$out.='<br>';
|
||||
|
||||
// Files modified
|
||||
$out.=load_fiche_titre($langs->trans("FilesModified"));
|
||||
|
||||
|
||||
$totalsize=0;
|
||||
$out.='<div class="div-table-responsive-no-min">';
|
||||
$out.='<table class="noborder">';
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
@@ -295,18 +302,20 @@ if ($xml)
|
||||
$out.='<td align="right"></td>' . "\n";
|
||||
$out.="</tr>\n";
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$out.='<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$out.='</table>';
|
||||
|
||||
$out.='</div>';
|
||||
|
||||
$out.='<br>';
|
||||
|
||||
|
||||
// Files added
|
||||
$out.=load_fiche_titre($langs->trans("FilesAdded"));
|
||||
|
||||
|
||||
$totalsize = 0;
|
||||
$out.='<div class="div-table-responsive-no-min">';
|
||||
$out.='<table class="noborder">';
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
@@ -348,8 +357,9 @@ if ($xml)
|
||||
$out.='<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$out.='</table>';
|
||||
|
||||
|
||||
$out.='</div>';
|
||||
|
||||
|
||||
// Show warning
|
||||
if (empty($tmpfilelist) && empty($tmpfilelist2) && empty($tmpfilelist3))
|
||||
{
|
||||
@@ -358,7 +368,7 @@ if ($xml)
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), 'warnings');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -374,9 +384,9 @@ if ($xml)
|
||||
$file_list = array();
|
||||
$ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list
|
||||
}*/
|
||||
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
//var_dump($checksumconcat);
|
||||
$checksumget = md5(join(',',$checksumconcat));
|
||||
$checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
|
||||
@@ -397,10 +407,10 @@ if ($xml)
|
||||
{
|
||||
print '<span class="error">'.$checksumget.'</span>';
|
||||
}
|
||||
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Output detail
|
||||
print $out;
|
||||
}
|
||||
@@ -434,7 +444,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre
|
||||
{
|
||||
$filename = $path.$file['name'];
|
||||
$file_list['insignature'][] = $filename;
|
||||
|
||||
|
||||
//if (preg_match('#'.$exclude.'#', $filename)) continue;
|
||||
|
||||
if (!file_exists($pathref.'/'.$filename))
|
||||
|
||||
@@ -40,26 +40,27 @@ if (!$user->admin) accessforbidden();
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
llxHeader('', $langs->trans("InfoWebServer"));
|
||||
|
||||
print load_fiche_titre($langs->trans("InfoWebServer"),'','title_setup');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\"><td>".$langs->trans("Parameter")."</td><td>".$langs->trans("Value")."</td></tr>\n";
|
||||
print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("VirtualServerName")."</td><td>" . $_SERVER["SERVER_NAME"] . "</td></tr>\n";
|
||||
print "<tr $bc[0]><td width=\"240\">".$langs->trans("IP")."</td><td>".$_SERVER["SERVER_ADDR"]."</td></tr>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("Port")."</td><td>" . $_SERVER["SERVER_PORT"] . "</td></tr>\n";
|
||||
print "<tr $bc[0]><td width=\"240\">".$langs->trans("DocumentRootServer")."</td><td>".$_SERVER["DOCUMENT_ROOT"]."</td></tr>\n";
|
||||
print "<tr $bc[1]><td>".$langs->trans("DataRootServer")."</td><td>" . DOL_DATA_ROOT . "</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter")."</td><td>".$langs->trans("Value")."</td></tr>\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("Version")."</td><td>".$_SERVER["SERVER_SOFTWARE"]."</td></tr>\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("VirtualServerName")."</td><td>" . $_SERVER["SERVER_NAME"] . "</td></tr>\n";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("IP")."</td><td>".$_SERVER["SERVER_ADDR"]."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Port")."</td><td>" . $_SERVER["SERVER_PORT"] . "</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("DocumentRootServer")."</td><td>".$_SERVER["DOCUMENT_ROOT"]."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("DataRootServer")."</td><td>" . DOL_DATA_ROOT . "</td></tr>\n";
|
||||
$labeluser=dol_getwebuser('user');
|
||||
$labelgroup=dol_getwebuser('group');
|
||||
if ($labeluser && $labelgroup)
|
||||
{
|
||||
print "<tr $bc[0]><td>".$langs->trans("WebUserGroup")."</td><td>".$labeluser.'/'.$labelgroup."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("WebUserGroup")."</td><td>".$labeluser.'/'.$labelgroup."</td></tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@@ -465,13 +465,17 @@ if (! empty($_SESSION["commandbackuplastdone"]))
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div> <!-- end div center button -->
|
||||
|
||||
<?php
|
||||
print '</td></tr></table>';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div> <!-- end div fichehalfleft -->
|
||||
|
||||
<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">
|
||||
<div class="ficheaddleft">
|
||||
|
||||
@@ -481,6 +485,7 @@ $result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/
|
||||
print '<br>';
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -162,6 +162,7 @@ if ($action == 'delete')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formadmin = new FormAdmin($db);
|
||||
|
||||
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
|
||||
@@ -233,6 +234,7 @@ if ($mode == 'overwrite')
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder);
|
||||
@@ -319,8 +321,8 @@ if ($mode == 'overwrite')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
}
|
||||
|
||||
@@ -336,6 +338,9 @@ if ($mode == 'searchkey')
|
||||
|
||||
$recordtoshow=array();
|
||||
|
||||
// Search modules dirs
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
|
||||
$nbempty=0;
|
||||
/*var_dump($langcode);
|
||||
var_dump($transkey);
|
||||
@@ -349,29 +354,38 @@ if ($mode == 'searchkey')
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load all translations keys
|
||||
foreach($conf->file->dol_document_root as $keydir => $searchdir)
|
||||
// Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root)
|
||||
foreach($modulesdir as $keydir => $tmpsearchdir)
|
||||
{
|
||||
// Directory of translation files
|
||||
$dir_lang = $searchdir."/langs/".$langcode;
|
||||
$dir_lang_osencoded=dol_osencode($dir_lang);
|
||||
$searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/'
|
||||
|
||||
$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
|
||||
// Directory of translation files
|
||||
$dir_lang = dirname(dirname($searchdir))."/langs/".$langcode; // The 2 dirname is to go up in dir for 2 levels
|
||||
$dir_lang_osencoded=dol_osencode($dir_lang);
|
||||
|
||||
foreach($filearray as $file)
|
||||
{
|
||||
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
|
||||
$newlang->load($tmpfile, 0, 0, '', 0); // Load translation files + database overwrite
|
||||
$newlangfileonly->load($tmpfile, 0, 0, '', 1); // Load translation files only
|
||||
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
|
||||
}
|
||||
$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
|
||||
foreach($filearray as $file)
|
||||
{
|
||||
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
|
||||
//Detect if trans coming from extranl module
|
||||
foreach ($conf->file->dol_document_root as $keyconf=>$dirconfalt) {
|
||||
if (($keyconf!='main') && (preg_match('$'.preg_quote($dirconfalt).'$i', $file['fullname']))) {
|
||||
//In this case load modulename@nmodulename
|
||||
$tmpfile=$tmpfile.'@'.$tmpfile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$newlang->load($tmpfile, 0, 0, '', 0); // Load translation files + database overwrite
|
||||
$newlangfileonly->load($tmpfile, 0, 0, '', 1); // Load translation files only
|
||||
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Now search into translation array
|
||||
foreach($newlang->tab_translate as $key => $val)
|
||||
{
|
||||
if ($transkey && ! preg_match('/'.preg_quote($transkey).'/', $key)) continue;
|
||||
if ($transvalue && ! preg_match('/'.preg_quote($transvalue).'/', $val)) continue;
|
||||
if ($transkey && ! preg_match('/'.preg_quote($transkey).'/i', $key)) continue;
|
||||
if ($transvalue && ! preg_match('/'.preg_quote($transvalue).'/i', $val)) continue;
|
||||
$recordtoshow[$key]=$val;
|
||||
}
|
||||
}
|
||||
@@ -391,6 +405,7 @@ if ($mode == 'searchkey')
|
||||
print '<input type="hidden" id="action" name="action" value="search">';
|
||||
print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder).'</td>';
|
||||
@@ -465,7 +480,7 @@ if ($mode == 'searchkey')
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -128,7 +128,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
||||
|
||||
// Show message
|
||||
$message='';
|
||||
$url=$urlwithroot.'/api/index.php/login?login=<strong>auserlogin</strong>&userpassword=<strong>thepassword</strong>[&reset=1]';
|
||||
$url=$urlwithroot.'/api/index.php/login?login=<strong>auserlogin</strong>&password=<strong>thepassword</strong>[&reset=1]';
|
||||
$message.=$langs->trans("UrlToGetKeyToUseAPIs").':<br>';
|
||||
$message.=img_picto('','object_globe.png').' '.$url;
|
||||
print $message;
|
||||
|
||||
@@ -48,7 +48,7 @@ class DolibarrApi
|
||||
*/
|
||||
function __construct($db, $cachedir='', $refreshCache=false)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $dolibarr_main_url_root;
|
||||
|
||||
if (empty($cachedir)) $cachedir = $conf->api->dir_temp;
|
||||
Defaults::$cacheDirectory = $cachedir;
|
||||
@@ -57,6 +57,13 @@ class DolibarrApi
|
||||
$production_mode = ( empty($conf->global->API_PRODUCTION_MODE) ? false : true );
|
||||
$this->r = new Restler($production_mode, $refreshCache);
|
||||
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
|
||||
$urlwithouturlrootautodetect=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim(DOL_MAIN_URL_ROOT));
|
||||
$urlwithrootautodetect=$urlwithouturlroot.DOL_URL_ROOT; // This is to use local domain autodetected by dolibarr from url
|
||||
|
||||
$this->r->setBaseUrls($urlwithouturlroot, $urlwithouturlrootautodetect);
|
||||
$this->r->setAPIVersion(1);
|
||||
}
|
||||
|
||||
@@ -129,6 +136,9 @@ class DolibarrApi
|
||||
unset($object->table_element_line);
|
||||
unset($object->picto);
|
||||
|
||||
unset($object->skip_update_total);
|
||||
unset($object->context);
|
||||
|
||||
// Remove the $oldcopy property because it is not supported by the JSON
|
||||
// encoder. The following error is generated when trying to serialize
|
||||
// it: "Error encoding/decoding JSON: Type is not supported"
|
||||
|
||||
@@ -69,7 +69,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
*/
|
||||
public function __isAllowed()
|
||||
{
|
||||
global $db;
|
||||
global $conf, $db;
|
||||
|
||||
$login = '';
|
||||
$stored_key = '';
|
||||
@@ -100,10 +100,13 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
|
||||
if ($api_key)
|
||||
{
|
||||
$userentity = 0;
|
||||
|
||||
$sql = "SELECT u.login, u.datec, u.api_key, ";
|
||||
$sql.= " u.tms as date_modification, u.entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.api_key = '".$db->escape($api_key)."'";
|
||||
// TODO Check if 2 users has same API key.
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
@@ -113,24 +116,34 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
$obj = $db->fetch_object($result);
|
||||
$login = $obj->login;
|
||||
$stored_key = $obj->api_key;
|
||||
$userentity = $obj->entity;
|
||||
|
||||
if (! defined("DOLENTITY") && $conf->entity != ($obj->entity?$obj->entity:1)) // If API was not forced with HTTP_DOLENTITY, and user is on another entity, so we reset entity to entity of user
|
||||
{
|
||||
$conf->entity = ($obj->entity?$obj->entity:1);
|
||||
// We must also reload global conf to get params from the entity
|
||||
dol_syslog("Entity was not set on http header with HTTP_DOLAPIENTITY (recommanded for performance purpose), so we switch now on entity of user (".$conf->entity .") and we have to reload configuration.", LOG_WARNING);
|
||||
$conf->setValues($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg);
|
||||
}
|
||||
|
||||
if ($stored_key != $api_key) {
|
||||
if ($stored_key != $api_key) { // This should not happen since we did a search on api_key
|
||||
$userClass::setCacheIdentifier($api_key);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! $login)
|
||||
{
|
||||
throw new RestException(503, 'Error when searching logn user fro mapi key');
|
||||
throw new RestException(503, 'Error when searching login user from api key');
|
||||
}
|
||||
$fuser = new User($db);
|
||||
if(! $fuser->fetch('',$login)) {
|
||||
throw new RestException(503, 'Error when fetching user :'.$fuser->error);
|
||||
$result = $fuser->fetch('', $login, '', 0, (empty($userentity) ? -1 : $conf->entity)); // If user is not entity 0, we search in working entity $conf->entity (that may have been forced to a different value than user entity)
|
||||
if ($result <= 0) {
|
||||
throw new RestException(503, 'Error when fetching user :'.$fuser->error.' (conf->entity='.$conf->entity.')');
|
||||
}
|
||||
$fuser->getrights();
|
||||
static::$user = $fuser;
|
||||
@@ -143,14 +156,14 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RestException(401, "Failed to login to API. No parameter 'DOLAPIKEY' on HTTP header (neither in URL).");
|
||||
throw new RestException(401, "Failed to login to API. No parameter 'HTTP_DOLAPIKEY' on HTTP header (and no parameter DOLAPIKEY in URL).");
|
||||
}
|
||||
|
||||
$userClass::setCacheIdentifier(static::$role);
|
||||
Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess';
|
||||
$requirefortest = static::$requires;
|
||||
if (! is_array($requirefortest)) $requirefortest=explode(',',$requirefortest);
|
||||
return in_array(static::$role, (array) $requirefortest) || static::$role == 'admin';
|
||||
$userClass::setCacheIdentifier(static::$role);
|
||||
Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess';
|
||||
$requirefortest = static::$requires;
|
||||
if (! is_array($requirefortest)) $requirefortest=explode(',',$requirefortest);
|
||||
return in_array(static::$role, (array) $requirefortest) || static::$role == 'admin';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ class Login
|
||||
*
|
||||
* Request the API token for a couple username / password.
|
||||
* Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file).
|
||||
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "api_key" into field at the top right of page (Note: "api_key" can be found/set on the user page).
|
||||
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: Tha API key (DOLAPIKEY) can be found/set on the user page.
|
||||
*
|
||||
* @param string $login User login
|
||||
* @param string $password User password
|
||||
|
||||
@@ -37,6 +37,10 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not lo
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
|
||||
|
||||
// Force entity if a value is provided into HTTP header. Otherwise, will use the entity of user of token used.
|
||||
if (! empty($_SERVER['HTTP_DOLAPIENTITY'])) define("DOLENTITY", (int) $_SERVER['HTTP_DOLAPIENTITY']);
|
||||
|
||||
|
||||
$res=0;
|
||||
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
|
||||
if (! $res) die("Include of main fails");
|
||||
@@ -124,7 +128,7 @@ if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/resources.json' |
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Search available module
|
||||
dol_syslog("Scan directory ".$dir." for module descriptor to after search for API files");
|
||||
dol_syslog("Scan directory ".$dir." for module descriptor files, then search for API files");
|
||||
|
||||
$handle=@opendir(dol_osencode($dir));
|
||||
if (is_resource($handle))
|
||||
@@ -135,14 +139,14 @@ if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/resources.json' |
|
||||
{
|
||||
$module = strtolower($regmod[1]);
|
||||
$moduledirforclass = getModuleDirForApiClass($module);
|
||||
$moduleforperm = $module;
|
||||
if ($module == 'propale') { $moduleforperm='propal'; }
|
||||
$modulenameforenabled = $module;
|
||||
if ($module == 'propale') { $modulenameforenabled='propal'; }
|
||||
|
||||
//dol_syslog("Found module file ".$file." - module=".$module." - moduledirforclass=".$moduledirforclass);
|
||||
dol_syslog("Found module file ".$file." - module=".$module." - moduledirforclass=".$moduledirforclass);
|
||||
|
||||
// Defined if module is enabled
|
||||
$enabled=true;
|
||||
if (empty($conf->$moduleforperm->enabled)) $enabled=false;
|
||||
if (empty($conf->$modulenameforenabled->enabled)) $enabled=false;
|
||||
|
||||
if ($enabled)
|
||||
{
|
||||
@@ -231,7 +235,13 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/resources.json'
|
||||
if ($module == 'order') { $classname='Commande'; }
|
||||
//var_dump($classfile);var_dump($classname);exit;
|
||||
|
||||
require_once $dir_part_file;
|
||||
$res = include_once $dir_part_file;
|
||||
if (! $res)
|
||||
{
|
||||
print 'API not found (failed to include API file)';
|
||||
header('HTTP/1.1 501 API not found (failed to include API file)');
|
||||
exit(0);
|
||||
}
|
||||
if (class_exists($classname.'Api')) $api->r->addAPIClass($classname.'Api', '/');
|
||||
}
|
||||
else
|
||||
@@ -242,7 +252,14 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/resources.json'
|
||||
$dir_part_file = dol_buildpath('/'.$moduledirforclass.'/class/api_'.$classfile.'.class.php');
|
||||
$classname=ucwords($module);
|
||||
|
||||
require_once $dir_part_file;
|
||||
$res = include_once $dir_part_file;
|
||||
if (! $res)
|
||||
{
|
||||
print 'API not found (failed to include API file)';
|
||||
header('HTTP/1.1 501 API not found (failed to include API file)');
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (class_exists($classname)) $api->r->addAPIClass($classname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@@ -143,7 +144,7 @@ if ($action == 'initbarcodeproducts')
|
||||
$nextvalue=$modBarCodeProduct->getNextValue($productstatic,'');
|
||||
|
||||
//print 'Set value '.$nextvalue.' to product '.$productstatic->id." ".$productstatic->ref." ".$productstatic->type."<br>\n";
|
||||
$result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'date', '', $user, 'PRODUCT_MODIFY');
|
||||
$result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY');
|
||||
|
||||
$nbtry++;
|
||||
if ($result > 0) $nbok++;
|
||||
|
||||
@@ -108,6 +108,17 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
if($this->element === 'invoice_supplier') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
$object = new FactureFournisseur($this->db);
|
||||
if($object->fetch($this->fk_object)>0) {
|
||||
return $object->getNomUrl(1);
|
||||
}
|
||||
else{
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
|
||||
@@ -119,6 +130,17 @@ class BlockedLog
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
else if($this->element === 'payment_supplier') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
|
||||
$object = new PaiementFourn($this->db);
|
||||
if($object->fetch($this->fk_object)>0) {
|
||||
return $object->getNomUrl(1);
|
||||
}
|
||||
else{
|
||||
$this->error++;
|
||||
}
|
||||
}
|
||||
|
||||
return $langs->trans('ImpossibleToReloadObject', $this->element, $this->fk_object);
|
||||
|
||||
@@ -153,7 +175,7 @@ class BlockedLog
|
||||
*/
|
||||
public function setObjectData(&$object) {
|
||||
|
||||
if($object->element=='payment') {
|
||||
if($object->element=='payment' || $object->element=='payment_supplier') {
|
||||
$this->date_object = $object->datepaye;
|
||||
}
|
||||
else{
|
||||
@@ -183,13 +205,28 @@ class BlockedLog
|
||||
$this->object_data->note_private= (double) $object->note_private;
|
||||
|
||||
}
|
||||
elseif($this->element==='payment'){
|
||||
if($this->element === 'invoice_supplier') {
|
||||
if(empty($object->thirdparty))$object->fetch_thirdparty();
|
||||
$this->object_data->thirdparty = new stdClass();
|
||||
|
||||
foreach($object->thirdparty as $key=>$value) {
|
||||
if(!is_object($value)) $this->object_data->thirdparty->{$key} = $value;
|
||||
}
|
||||
|
||||
$this->object_data->total_ht = (double) $object->total_ht;
|
||||
$this->object_data->total_tva = (double) $object->total_tva;
|
||||
$this->object_data->total_ttc = (double) $object->total_ttc;
|
||||
$this->object_data->total_localtax1= (double) $object->total_localtax1;
|
||||
$this->object_data->total_localtax2= (double) $object->total_localtax2;
|
||||
$this->object_data->note_public = (double) $object->note_public;
|
||||
$this->object_data->note_private= (double) $object->note_private;
|
||||
|
||||
}
|
||||
elseif($this->element==='payment'|| $object->element=='payment_supplier'){
|
||||
|
||||
$this->object_data->amounts = $object->amounts;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -511,6 +548,15 @@ class BlockedLog
|
||||
$this->amounts = (double) $obj->amount;
|
||||
}
|
||||
}
|
||||
if($this->element === 'payment_supplier') {
|
||||
$sql="SELECT amount FROM ".MAIN_DB_PREFIX."paiementfourn WHERE rowid=".$this->fk_object;
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
|
||||
if($res && $obj = $this->db->fetch_object($res)) {
|
||||
$this->amounts = (double) $obj->amount;
|
||||
}
|
||||
}
|
||||
elseif($this->element === 'facture') {
|
||||
$sql="SELECT total_ttc FROM ".MAIN_DB_PREFIX."facture WHERE rowid=".$this->fk_object;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@@ -103,7 +103,7 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td width=\"50%\">'.$langs->trans("CashDeskThirdPartyForSell").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,0,1,array(),0);
|
||||
print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3) AND s.status = 1',1,0,1,array(),0);
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
|
||||
@@ -114,10 +114,13 @@ switch($action)
|
||||
{
|
||||
if (count($prodcustprice->lines) > 0)
|
||||
{
|
||||
$pu_ht = price($prodcustprice->lines [0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines [0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines [0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines [0]->tva_tx;
|
||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||
$tva_npr = $prodcustprice->lines[0]->recuperableonly;
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -105,7 +105,7 @@ print '<td>';
|
||||
$disabled=0;
|
||||
$langs->load("companies");
|
||||
if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice
|
||||
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1);
|
||||
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3) AND s.status = 1',!$disabled,$disabled,1);
|
||||
//print '<input name="warehouse_id" class="texte_login" type="warehouse_id" value="" />';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("cashdesk");
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2008-2010 Laurent Destailleur <eldy@uers.sourceforge.net>
|
||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -19,6 +19,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
@@ -71,7 +79,7 @@ print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname
|
||||
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
|
||||
print '<form id="frmThirdparty" class="formulaire1 inline-block" method="post" action="facturation_verif.php?action=change_thirdparty">';
|
||||
print $langs->trans("CashDeskThirdParty").': ';
|
||||
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3)', '', 0, 0, null, 0, 'valignmiddle inline-block');
|
||||
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3) AND s.status = 1', '', 0, 0, null, 0, 'valignmiddle inline-block');
|
||||
print '<input class="button bouton_change_thirdparty inline-block valignmiddle" type="submit" id="bouton_change_thirdparty" value="'.$langs->trans("Modify").'">';
|
||||
//print $companyLink;
|
||||
print '<br>';
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($langs) || ! is_object($langs))
|
||||
{
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
|
||||
@@ -1540,17 +1540,31 @@ class Categorie extends CommonObject
|
||||
dol_mkdir($dir);
|
||||
}
|
||||
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$originImage = $dir . $file['name'];
|
||||
if (file_exists($dir)) {
|
||||
if (is_array($file['name']) && count($file['name']) > 0) {
|
||||
$nbfile = count($file['name']);
|
||||
for ($i = 0; $i <= $nbfile; $i ++) {
|
||||
|
||||
// Cree fichier en taille origine
|
||||
dol_move_uploaded_file($file['tmp_name'], $originImage, 1, 0, 0);
|
||||
$originImage = $dir . $file['name'][$i];
|
||||
|
||||
if (file_exists($originImage))
|
||||
{
|
||||
// Create thumbs
|
||||
$this->addThumbs($originImage);
|
||||
// Cree fichier en taille origine
|
||||
dol_move_uploaded_file($file['tmp_name'][$i], $originImage, 1, 0, 0);
|
||||
|
||||
if (file_exists($originImage)) {
|
||||
// Create thumbs
|
||||
$this->addThumbs($originImage);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$originImage = $dir . $file['name'];
|
||||
|
||||
// Cree fichier en taille origine
|
||||
dol_move_uploaded_file($file['tmp_name'], $originImage, 1, 0, 0);
|
||||
|
||||
if (file_exists($originImage)) {
|
||||
// Create thumbs
|
||||
$this->addThumbs($originImage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,6 +577,11 @@ if ($action == 'mupdate')
|
||||
|
||||
}
|
||||
|
||||
// Actions to delete doc
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$permissioncreate = ($user->rights->agenda->allactions->create || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->read));
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
@@ -665,7 +670,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired titlefieldcreate"':'').'>'.$langs->trans("Title").'</td><td><input type="text" id="label" name="label" class="soixantepercent" value="'.GETPOST('label').'"></td></tr>';
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired titlefieldcreate"':'').'>'.$langs->trans("Label").'</td><td><input type="text" id="label" name="label" class="soixantepercent" value="'.GETPOST('label').'"></td></tr>';
|
||||
|
||||
// Full day
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked':'').'></td></tr>';
|
||||
@@ -709,7 +714,7 @@ if ($action == 'create')
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="minwidth100" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
@@ -965,7 +970,7 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Title
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$object->label.'"></td></tr>';
|
||||
print '<tr><td'.(empty($conf->global->AGENDA_USE_EVENT_TYPE)?' class="fieldrequired"':'').'>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" class="minwidth100" value="'.$object->label.'"></td></tr>';
|
||||
|
||||
// Full day event
|
||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent?' checked':'').'></td></tr>';
|
||||
@@ -1049,7 +1054,7 @@ if ($id > 0)
|
||||
// Location
|
||||
if (empty($conf->global->AGENDA_DISABLE_LOCATION))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" class="minwidth100" value="'.$object->location.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Assigned to
|
||||
@@ -1212,7 +1217,6 @@ if ($id > 0)
|
||||
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=show_day&year='.dol_print_date($object->datep,'%Y').'&month='.dol_print_date($object->datep,'%m').'&day='.dol_print_date($object->datep,'%d').'">'.$langs->trans("ViewDay").'</a>';
|
||||
$linkback.=$out;
|
||||
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Thirdparty
|
||||
//$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
@@ -1325,6 +1329,8 @@ if ($id > 0)
|
||||
print '</div>';
|
||||
if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
//var_dump($object->userassigned);
|
||||
//var_dump($listofuserid);
|
||||
print '<div class="myavailability">';
|
||||
print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody
|
||||
print '</div>';
|
||||
@@ -1477,10 +1483,10 @@ if ($id > 0)
|
||||
*/
|
||||
|
||||
$filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
|
||||
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
|
||||
$genallowed=$user->rights->agenda->myactions->create;
|
||||
$delallowed=$user->rights->agenda->myactions->delete;
|
||||
$genallowed=$user->rights->agenda->myactions->read;
|
||||
$delallowed=$user->rights->agenda->myactions->create;
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.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
|
||||
@@ -225,11 +225,11 @@ class ActionComm extends CommonObject
|
||||
if ($this->elementtype=='commande') $this->elementtype='order';
|
||||
if ($this->elementtype=='contrat') $this->elementtype='contract';
|
||||
|
||||
if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility
|
||||
if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility when userassigned was an int instead fo array
|
||||
{
|
||||
$tmpid=$this->userassigned;
|
||||
$this->userassigned=array();
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid);
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid, 'transparency'=>$this->transparency);
|
||||
}
|
||||
|
||||
if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
|
||||
@@ -240,7 +240,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
// Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...).
|
||||
if (empty($this->userassigned) || count($this->userassigned) == 0 || ! is_array($this->userassigned))
|
||||
$this->userassigned = array($userownerid=>array('id'=>$userownerid));
|
||||
$this->userassigned = array($userownerid=>array('id'=>$userownerid, 'transparency'=>$this->transparency));
|
||||
|
||||
if (! $this->type_id || ! $this->type_code)
|
||||
{
|
||||
@@ -860,9 +860,10 @@ class ActionComm extends CommonObject
|
||||
* @param string $filter Other filter
|
||||
* @param string $sortfield Sort on this field
|
||||
* @param string $sortorder ASC or DESC
|
||||
* @param string $limit Limit number of answers
|
||||
* @return array or string Error string if KO, array with actions if OK
|
||||
*/
|
||||
static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='', $sortorder='')
|
||||
static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='datep', $sortorder='DESC', $limit=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
@@ -879,6 +880,7 @@ class ActionComm extends CommonObject
|
||||
}
|
||||
if (! empty($filter)) $sql.= $filter;
|
||||
if ($sortorder && $sortfield) $sql.=$db->order($sortfield, $sortorder);
|
||||
if ($limit) $sql.=$db->plimit($limit);
|
||||
|
||||
dol_syslog(get_class()."::getActions", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
@@ -1331,6 +1333,7 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
// Note: Output of sql request is encoded in $conf->file->character_set_client
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
$diff = 0;
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$qualified=true;
|
||||
@@ -1365,8 +1368,9 @@ class ActionComm extends CommonObject
|
||||
|
||||
if ($qualified && $datestart)
|
||||
{
|
||||
$eventarray[$datestart]=$event;
|
||||
$eventarray[$datestart+$diff]=$event;
|
||||
}
|
||||
$diff++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -75,7 +75,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="name";
|
||||
|
||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart='contract';
|
||||
$modulepart='actions';
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -297,7 +297,11 @@ if ($status == 'done') $title=$langs->trans("DoneActions");
|
||||
if ($status == 'todo') $title=$langs->trans("ToDoActions");
|
||||
|
||||
$param='';
|
||||
if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param.="&actioncode=".$actioncode;
|
||||
if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) {
|
||||
if(is_array($actioncode)) {
|
||||
foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action;
|
||||
} else $param.="&actioncode=".$actioncode;
|
||||
}
|
||||
if ($resourceid > 0) $param.="&resourceid=".$resourceid;
|
||||
if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".$status;
|
||||
if ($filter) $param.="&filter=".$filter;
|
||||
@@ -482,7 +486,14 @@ if (! empty($actioncode))
|
||||
elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'";
|
||||
else
|
||||
{
|
||||
$sql.=" AND ca.code IN ('".implode("','", explode(',',$actioncode))."')";
|
||||
if (is_array($actioncode))
|
||||
{
|
||||
$sql.=" AND ca.code IN ('".implode("','", $actioncode)."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,11 @@ $listofextcals=array();
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($actioncode != '') $param.="&actioncode=".$actioncode;
|
||||
if ($actioncode != '') {
|
||||
if(is_array($actioncode)) {
|
||||
foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action;
|
||||
} else $param.="&actioncode=".$actioncode;
|
||||
}
|
||||
if ($resourceid > 0) $param.="&resourceid=".$resourceid;
|
||||
if ($status != '' && $status > -1) $param.="&status=".$status;
|
||||
if ($filter) $param.="&filter=".$filter;
|
||||
@@ -227,7 +231,14 @@ if (! empty($actioncode))
|
||||
elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'";
|
||||
else
|
||||
{
|
||||
$sql.=" AND c.code IN ('".implode("','", explode(',',$actioncode))."')";
|
||||
if (is_array($actioncode))
|
||||
{
|
||||
$sql.=" AND c.code IN ('".implode("','", $actioncode)."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user