forked from Wavyzz/dolibarr
Compare commits
628 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f197cb1bb | ||
|
|
6c62b64b7c | ||
|
|
d4ac506d66 | ||
|
|
e5c2d07c53 | ||
|
|
05de9c19c3 | ||
|
|
5c2ce8a301 | ||
|
|
849dc8c836 | ||
|
|
bdc330ad6a | ||
|
|
85eedfa6e7 | ||
|
|
e121ab8c86 | ||
|
|
fe76902342 | ||
|
|
9142e3400b | ||
|
|
87cc60d647 | ||
|
|
c5728843a5 | ||
|
|
e260997e0b | ||
|
|
fef04f6921 | ||
|
|
bc2411098c | ||
|
|
0dafeb8e44 | ||
|
|
084efd03a3 | ||
|
|
61372f4650 | ||
|
|
049e588341 | ||
|
|
2d15b64f24 | ||
|
|
6bab2e0bd8 | ||
|
|
f425762e9d | ||
|
|
81970b8dd0 | ||
|
|
6e3404a231 | ||
|
|
2b0e420618 | ||
|
|
cb96735f50 | ||
|
|
fb2fd71ff4 | ||
|
|
6c2d9baeb5 | ||
|
|
cef55097ea | ||
|
|
552c82a032 | ||
|
|
2355f83295 | ||
|
|
b2fa4b3f49 | ||
|
|
d6f1f870a2 | ||
|
|
2e38300ec4 | ||
|
|
5f8530d0c0 | ||
|
|
2bd7dc68d3 | ||
|
|
173ff4f92a | ||
|
|
1f9e0d3e00 | ||
|
|
594d5ee216 | ||
|
|
2130b9715c | ||
|
|
b2ff7b5ea1 | ||
|
|
f03e0965e2 | ||
|
|
acb9380f1c | ||
|
|
40660482d4 | ||
|
|
f1cbb10edc | ||
|
|
640f001bba | ||
|
|
7b671815e0 | ||
|
|
cb1e1be0d3 | ||
|
|
78a26d61ad | ||
|
|
ff2dc246eb | ||
|
|
7e0b500d75 | ||
|
|
3670cfd966 | ||
|
|
d090788caa | ||
|
|
db4240afad | ||
|
|
34673e220d | ||
|
|
7f7fa693f3 | ||
|
|
4786ab9268 | ||
|
|
0db0ab34b4 | ||
|
|
69b65de41b | ||
|
|
0f2a1a854b | ||
|
|
32a7747440 | ||
|
|
0a8ae2934d | ||
|
|
afeabd44f0 | ||
|
|
99e234d703 | ||
|
|
117cd337dd | ||
|
|
4f5432160d | ||
|
|
92624d650f | ||
|
|
8b2f1eee13 | ||
|
|
96726c1c9b | ||
|
|
bbe270d4bf | ||
|
|
bb74a63d59 | ||
|
|
b1f3dbd45e | ||
|
|
da8bc79c6d | ||
|
|
54134e3d19 | ||
|
|
fa4c69c52f | ||
|
|
e1f57b60e3 | ||
|
|
da29ea89a7 | ||
|
|
fe672e1e4b | ||
|
|
be4960cfbb | ||
|
|
e4f7df25b0 | ||
|
|
17c45208d3 | ||
|
|
6a4f03eab3 | ||
|
|
3778d206ac | ||
|
|
f4c9da5e9f | ||
|
|
a2641b89e7 | ||
|
|
983c38a33d | ||
|
|
899f4df9ed | ||
|
|
ae0a746510 | ||
|
|
f6afc75d96 | ||
|
|
a2db2c5012 | ||
|
|
ae6e3ad5c4 | ||
|
|
e15834dae2 | ||
|
|
8a77ffe58f | ||
|
|
498ac04ad1 | ||
|
|
c77ecc15c9 | ||
|
|
2a1c6422ac | ||
|
|
4ff5f1bf1c | ||
|
|
a37035c862 | ||
|
|
cbb5ca229a | ||
|
|
954f46ec62 | ||
|
|
9798ddad80 | ||
|
|
c92bd58278 | ||
|
|
c429c421da | ||
|
|
51ccb33964 | ||
|
|
c55eabeaff | ||
|
|
a92bb8373a | ||
|
|
46304c8d98 | ||
|
|
5c93da8a72 | ||
|
|
087644a861 | ||
|
|
1b5f540d93 | ||
|
|
a0f78aad4a | ||
|
|
70cf8227a2 | ||
|
|
67fd6356aa | ||
|
|
58e61781e1 | ||
|
|
8a2e5b5962 | ||
|
|
1891e7364a | ||
|
|
ba9861f856 | ||
|
|
bc9d85b03f | ||
|
|
3e2e3b2bcb | ||
|
|
ab71e4f891 | ||
|
|
a4ec4224b0 | ||
|
|
0b77cb3a5d | ||
|
|
b4aa076a82 | ||
|
|
dc532cc2d4 | ||
|
|
3efa77a70f | ||
|
|
a8d32b71bf | ||
|
|
8074022e8f | ||
|
|
bcde526db1 | ||
|
|
23c4f78df0 | ||
|
|
148e40e07c | ||
|
|
1eae596f98 | ||
|
|
2a9456cb83 | ||
|
|
f1f9c842f8 | ||
|
|
7f243d92e5 | ||
|
|
10384e3856 | ||
|
|
8bc3608717 | ||
|
|
4b62eaeed2 | ||
|
|
c5e1b367de | ||
|
|
06b6c38379 | ||
|
|
ee0f92f6aa | ||
|
|
49d943e57f | ||
|
|
3d10d6a559 | ||
|
|
ccdaf2ffb4 | ||
|
|
c0c481a746 | ||
|
|
c2f465a98a | ||
|
|
f6fc21f5fb | ||
|
|
c3b18a1e38 | ||
|
|
11430cd555 | ||
|
|
fa8fad3b04 | ||
|
|
3ed1795096 | ||
|
|
5f0491bc6f | ||
|
|
0ff5a7bc9c | ||
|
|
34f790b85e | ||
|
|
af9c8abe9c | ||
|
|
50129ec945 | ||
|
|
2160e86928 | ||
|
|
0b2e07964f | ||
|
|
5386f00b0e | ||
|
|
78b0f14b1a | ||
|
|
467bf090dd | ||
|
|
4fcbe39fd9 | ||
|
|
7ad2de61d1 | ||
|
|
d5c95b76a5 | ||
|
|
e7d117c920 | ||
|
|
9b21aa0a60 | ||
|
|
f5a4f32b0f | ||
|
|
674aa0cf12 | ||
|
|
d1646e245a | ||
|
|
03f85bef83 | ||
|
|
d68a2cb0d8 | ||
|
|
5a1e29cc08 | ||
|
|
45b24fff0d | ||
|
|
29256aba8b | ||
|
|
4f2a47c4fc | ||
|
|
f4f2db33f0 | ||
|
|
b73014c044 | ||
|
|
53cc1667d5 | ||
|
|
af9b03e7c7 | ||
|
|
dd7c3ed2f8 | ||
|
|
7e25172f03 | ||
|
|
a83c118a8f | ||
|
|
fd9574a2f8 | ||
|
|
8014713795 | ||
|
|
10e632375f | ||
|
|
9327858bee | ||
|
|
b801a391a4 | ||
|
|
20704d6a5c | ||
|
|
1af4834f10 | ||
|
|
02f30aeee2 | ||
|
|
2f9f7d401f | ||
|
|
58b2b91928 | ||
|
|
d11e22c970 | ||
|
|
0428d5eee4 | ||
|
|
3686fad393 | ||
|
|
8b832f475f | ||
|
|
925bded6d9 | ||
|
|
dd60c384a5 | ||
|
|
293e0ac831 | ||
|
|
250e3555c3 | ||
|
|
8ee06f02b1 | ||
|
|
ba896c024d | ||
|
|
41dcd9370a | ||
|
|
928af1a2b3 | ||
|
|
c8eb666826 | ||
|
|
6f919da5d9 | ||
|
|
7382f4e3ee | ||
|
|
ff048175f7 | ||
|
|
a3c74aa9bd | ||
|
|
ce7f45ab1f | ||
|
|
59c84747ac | ||
|
|
8befcb9477 | ||
|
|
45f09da98a | ||
|
|
bf9fd6a2da | ||
|
|
5c2d8656cc | ||
|
|
ab6129a1cc | ||
|
|
a13bf2b93f | ||
|
|
b0ab71db5f | ||
|
|
7f021ad5d9 | ||
|
|
65304f2e77 | ||
|
|
8a6cd7f84d | ||
|
|
3e30cde02e | ||
|
|
ea21064ca2 | ||
|
|
4e395e741c | ||
|
|
b5a12ff088 | ||
|
|
92858a7b47 | ||
|
|
9623d50f48 | ||
|
|
deecfe5d07 | ||
|
|
067a9b0820 | ||
|
|
1f98a23587 | ||
|
|
cd3df1d6e1 | ||
|
|
1d5db424a1 | ||
|
|
b632c2233b | ||
|
|
8d0cafc687 | ||
|
|
57958e25bf | ||
|
|
9edb149d2c | ||
|
|
622720132d | ||
|
|
bdd8b393f9 | ||
|
|
123b45aa4b | ||
|
|
55ac02382b | ||
|
|
87f2ec663d | ||
|
|
70cd7b87e9 | ||
|
|
18ae5ff6ea | ||
|
|
52c2d39194 | ||
|
|
0b56923de5 | ||
|
|
11f78c1913 | ||
|
|
3164b5615c | ||
|
|
189cba6c41 | ||
|
|
de5612ae0b | ||
|
|
f23d826e0a | ||
|
|
62f14e3dd5 | ||
|
|
643e077c68 | ||
|
|
5e490f8530 | ||
|
|
a67f6cc732 | ||
|
|
06c17b806e | ||
|
|
8deeac403a | ||
|
|
56f7d31d11 | ||
|
|
ed724b82d3 | ||
|
|
d941d1efee | ||
|
|
9fed7fba30 | ||
|
|
cb04444301 | ||
|
|
8c030f4f81 | ||
|
|
4ef651d50b | ||
|
|
6bd438fc7f | ||
|
|
657c7eb4cf | ||
|
|
a00439b375 | ||
|
|
cb6f9f40b8 | ||
|
|
cfa8ca5c52 | ||
|
|
3354b35e75 | ||
|
|
9b1047eea7 | ||
|
|
3556adc11d | ||
|
|
0d83691c5b | ||
|
|
bcfd35648b | ||
|
|
554a5b4c29 | ||
|
|
eb543f0606 | ||
|
|
1f4d3207fe | ||
|
|
83d75aaa31 | ||
|
|
2e74a4ba85 | ||
|
|
5d502aa7d1 | ||
|
|
c28c5c1003 | ||
|
|
383195581f | ||
|
|
6c27963d1d | ||
|
|
707bffd181 | ||
|
|
6406d4e64c | ||
|
|
142e7e55d7 | ||
|
|
56188ca798 | ||
|
|
c8c31b2167 | ||
|
|
c4fbdbbce4 | ||
|
|
86aab20c0a | ||
|
|
548266d607 | ||
|
|
fb15ea20c6 | ||
|
|
c9be1cbb8b | ||
|
|
eef50058b1 | ||
|
|
c9c4ba2a72 | ||
|
|
4c52e477e4 | ||
|
|
b8b400a5a4 | ||
|
|
92cb694f55 | ||
|
|
db148c4233 | ||
|
|
2be18e834a | ||
|
|
b554dfc3d2 | ||
|
|
183ba3e8ca | ||
|
|
f2365a4c8d | ||
|
|
c512585670 | ||
|
|
1b19fddbc6 | ||
|
|
1c3bf3bb22 | ||
|
|
db840bf8de | ||
|
|
4713738ea3 | ||
|
|
176c6013ec | ||
|
|
6f28b69804 | ||
|
|
92bb9c99f5 | ||
|
|
aee1c3b069 | ||
|
|
1f4be4cfed | ||
|
|
a04ca9449a | ||
|
|
1649a9a1b1 | ||
|
|
8c4ddb99be | ||
|
|
bef5b66dab | ||
|
|
c43b5f99ac | ||
|
|
d8894b149e | ||
|
|
407978991c | ||
|
|
0d1159d862 | ||
|
|
06442f4755 | ||
|
|
54dd02413f | ||
|
|
7feff22c1a | ||
|
|
a5a4ef538d | ||
|
|
c8bd77ddd7 | ||
|
|
1c32b4231d | ||
|
|
31560e19df | ||
|
|
e9a8ec1795 | ||
|
|
26aa12de97 | ||
|
|
00d185f648 | ||
|
|
4e05640ecb | ||
|
|
ff33cb4a88 | ||
|
|
5ce0fe1405 | ||
|
|
7c61f6fd88 | ||
|
|
42b3e109d7 | ||
|
|
d11971dbbd | ||
|
|
20d90831e1 | ||
|
|
0160fb8c5e | ||
|
|
a51114d571 | ||
|
|
52f270d623 | ||
|
|
9c42cdc7d3 | ||
|
|
d79b65ce49 | ||
|
|
2b85a2fcd4 | ||
|
|
4fd98dfb72 | ||
|
|
06eca56e00 | ||
|
|
2d818fc886 | ||
|
|
180908bfe1 | ||
|
|
3dcf553a47 | ||
|
|
f9bda74e22 | ||
|
|
73f1d8ee99 | ||
|
|
1a73347866 | ||
|
|
d7308525ae | ||
|
|
4deeb20dd8 | ||
|
|
0a8016e2aa | ||
|
|
7ed980fab5 | ||
|
|
368af101ef | ||
|
|
8b224e9e2d | ||
|
|
03ec0d7cc5 | ||
|
|
a717297a8c | ||
|
|
086a0ae340 | ||
|
|
599971b27a | ||
|
|
f23462a173 | ||
|
|
a83c7d0992 | ||
|
|
f67636d0f3 | ||
|
|
92fe8ebe1d | ||
|
|
2812bfae7a | ||
|
|
1a969e61e9 | ||
|
|
fd9565934c | ||
|
|
a465814fd4 | ||
|
|
514babeab1 | ||
|
|
caadf396e2 | ||
|
|
5c2922a17b | ||
|
|
1618ce29c7 | ||
|
|
f11430dec8 | ||
|
|
ea51673ce7 | ||
|
|
d9d32bb9f5 | ||
|
|
76f8d1d37c | ||
|
|
1cbd628971 | ||
|
|
46ae38c86d | ||
|
|
b6c9a37415 | ||
|
|
79cafb1c12 | ||
|
|
21d30c1b3e | ||
|
|
82af0ed28f | ||
|
|
ffaadcc930 | ||
|
|
95b976c3d5 | ||
|
|
190bcf61e4 | ||
|
|
229ae171de | ||
|
|
face8fc0be | ||
|
|
72f67f640d | ||
|
|
0b7b27e795 | ||
|
|
04bb23d9bf | ||
|
|
ed48969630 | ||
|
|
96294403e2 | ||
|
|
c1b1dcc5e7 | ||
|
|
646651e731 | ||
|
|
90c4e6598b | ||
|
|
952864f532 | ||
|
|
23226ad472 | ||
|
|
6cf8c5c102 | ||
|
|
1b1b58ad5a | ||
|
|
1725e5b591 | ||
|
|
7a49d56589 | ||
|
|
43f1fbed01 | ||
|
|
a8913704e9 | ||
|
|
f7476d5727 | ||
|
|
68c1fa6c34 | ||
|
|
94f9fb2e2f | ||
|
|
0ade601a11 | ||
|
|
dc1457b96a | ||
|
|
ceb5f161f6 | ||
|
|
b4440a6b2e | ||
|
|
fd362f1108 | ||
|
|
6f1fd1ae53 | ||
|
|
5c62e8865a | ||
|
|
e13696db55 | ||
|
|
964bb0968f | ||
|
|
91faac4c87 | ||
|
|
06679ede7c | ||
|
|
4a4cdc0839 | ||
|
|
ee31359488 | ||
|
|
230f4f8f57 | ||
|
|
4278a113a0 | ||
|
|
da0dc3472b | ||
|
|
e94b20f684 | ||
|
|
be85c5c381 | ||
|
|
d4ca08db00 | ||
|
|
8416014cff | ||
|
|
c0691b01eb | ||
|
|
795310b934 | ||
|
|
3e72bdbc87 | ||
|
|
791c08c006 | ||
|
|
7c7d0bd495 | ||
|
|
9bd8e3434e | ||
|
|
a8f69ad16f | ||
|
|
fc46a1ff97 | ||
|
|
decdc2a9a3 | ||
|
|
bd0be8f358 | ||
|
|
7700293bdf | ||
|
|
60c77f3d50 | ||
|
|
9f770d862d | ||
|
|
ca67f976b6 | ||
|
|
e722138608 | ||
|
|
32d2b0a9d6 | ||
|
|
30026ecddb | ||
|
|
d53a56f13f | ||
|
|
49c7a1f2b4 | ||
|
|
b9b2dbe9b1 | ||
|
|
1726720d16 | ||
|
|
84a09808fc | ||
|
|
f47d6c71ed | ||
|
|
b623392062 | ||
|
|
425ca83a99 | ||
|
|
15efd9e8a1 | ||
|
|
50443f1977 | ||
|
|
2bb87aabbe | ||
|
|
2519690020 | ||
|
|
ea0e05b07c | ||
|
|
21d028c064 | ||
|
|
c9a35c4e3a | ||
|
|
22006aa4dc | ||
|
|
82b31e1f5b | ||
|
|
7a3ef9bf8a | ||
|
|
d0480f1d90 | ||
|
|
9b4b8db189 | ||
|
|
562be023c6 | ||
|
|
4799c6692e | ||
|
|
01d37ad159 | ||
|
|
1b2a4f4742 | ||
|
|
bfba7bbc7f | ||
|
|
8d95ae1884 | ||
|
|
748ac3a5a7 | ||
|
|
5ea6b99593 | ||
|
|
33b9c5af45 | ||
|
|
85e797596f | ||
|
|
34fe219dcb | ||
|
|
2fe16db244 | ||
|
|
ebf73de8cd | ||
|
|
b26c3266ed | ||
|
|
f4759a0e6e | ||
|
|
656d4942a6 | ||
|
|
7921965fe2 | ||
|
|
5953f18f54 | ||
|
|
7a6a462ef2 | ||
|
|
21a4dd9685 | ||
|
|
41e8011a80 | ||
|
|
46987ea4bd | ||
|
|
6c7206d210 | ||
|
|
39e34357a1 | ||
|
|
557c96455e | ||
|
|
ea07afd6c2 | ||
|
|
7e933ca175 | ||
|
|
47c0b8272d | ||
|
|
afd9b817be | ||
|
|
f5cc12895a | ||
|
|
c7daf233cd | ||
|
|
9edd80b850 | ||
|
|
67adc11086 | ||
|
|
129bb0cf2f | ||
|
|
69b429914f | ||
|
|
74887b5850 | ||
|
|
3641a4b5bb | ||
|
|
d4d598d0aa | ||
|
|
450ccf31a7 | ||
|
|
6b9717b250 | ||
|
|
2a19e9d2a1 | ||
|
|
9200847eaa | ||
|
|
3918335bf7 | ||
|
|
99006125fd | ||
|
|
dfcfb48057 | ||
|
|
62ecc497fa | ||
|
|
f7b0e1a976 | ||
|
|
0092f1bc89 | ||
|
|
6e84b8ca63 | ||
|
|
fa0e1ca87e | ||
|
|
58df839271 | ||
|
|
d5b21a05b2 | ||
|
|
455789d575 | ||
|
|
965057307f | ||
|
|
2515d27d19 | ||
|
|
d390f3137f | ||
|
|
2b77a99fa3 | ||
|
|
3a2caa3e46 | ||
|
|
a9c03aa01e | ||
|
|
32339b03fd | ||
|
|
52f324002c | ||
|
|
db53aa53b6 | ||
|
|
ab80f6aaa7 | ||
|
|
eff43a8e0c | ||
|
|
e503b2d858 | ||
|
|
216df5ad07 | ||
|
|
907c7f748d | ||
|
|
91b8f33ea5 | ||
|
|
5580a4cc30 | ||
|
|
cb8b5188be | ||
|
|
8e9f3cabf3 | ||
|
|
c31c40a61e | ||
|
|
6958fe9693 | ||
|
|
e0e3c07670 | ||
|
|
64c4d59466 | ||
|
|
312f81004f | ||
|
|
5f001c1079 | ||
|
|
12a3ce7746 | ||
|
|
6b07571f09 | ||
|
|
294cc73481 | ||
|
|
0f20381453 | ||
|
|
2187f3fda7 | ||
|
|
5f7d552c71 | ||
|
|
ef36cbc1be | ||
|
|
5b609c7ea1 | ||
|
|
672dc99145 | ||
|
|
54f588cb90 | ||
|
|
7cb3e6f780 | ||
|
|
d41d516072 | ||
|
|
f235caf4ec | ||
|
|
4ddb9023d7 | ||
|
|
ca7fa84d80 | ||
|
|
6e291ad70f | ||
|
|
435ee2cc26 | ||
|
|
6c7eb59f31 | ||
|
|
ab94865c71 | ||
|
|
8ec22d9f67 | ||
|
|
fb59b5c69a | ||
|
|
a31a74134c | ||
|
|
5169437c2d | ||
|
|
f9b2f29547 | ||
|
|
64ddee017b | ||
|
|
1a56c5b021 | ||
|
|
779e33d490 | ||
|
|
c628cfd99a | ||
|
|
3abffac52a | ||
|
|
25640853f5 | ||
|
|
b0c55c77c3 | ||
|
|
a17f7d1041 | ||
|
|
779eacd9c1 | ||
|
|
a4359d6eaa | ||
|
|
c3040f9609 | ||
|
|
e446d8c7a2 | ||
|
|
6212d1a425 | ||
|
|
42c8b25597 | ||
|
|
381ce5fee3 | ||
|
|
71c43c9069 | ||
|
|
2ee9ca9c79 | ||
|
|
16fccd7892 | ||
|
|
346fd0d09b | ||
|
|
4f5456c8d8 | ||
|
|
a8f66a9b09 | ||
|
|
ab52d046b9 | ||
|
|
7e843d855a | ||
|
|
a11e4ceb44 | ||
|
|
4f490f3e2d | ||
|
|
28aa89c659 | ||
|
|
0e4ca576ec | ||
|
|
53a78838f8 | ||
|
|
eb6008bb4d | ||
|
|
a748466758 | ||
|
|
c7317ed2a1 | ||
|
|
1e526a2a03 | ||
|
|
b141f3caf5 | ||
|
|
5aae71f9de | ||
|
|
bb917bea08 | ||
|
|
3870428f16 | ||
|
|
307c010b90 | ||
|
|
d7e579e234 | ||
|
|
45e34aba65 | ||
|
|
2a12b24644 | ||
|
|
b948ee1212 | ||
|
|
8a20b670e7 | ||
|
|
6ef98b3d46 | ||
|
|
d3198894b8 | ||
|
|
231fd6b2ae | ||
|
|
8f32a35faa | ||
|
|
6616254504 | ||
|
|
a98e57c596 | ||
|
|
d4cc4b4288 | ||
|
|
1104387b72 | ||
|
|
49bb9d774d | ||
|
|
58b0751599 | ||
|
|
dc46b82cf3 | ||
|
|
141fa014e6 | ||
|
|
b6b873cfc5 | ||
|
|
ae8b16b9fc | ||
|
|
64d60d1270 | ||
|
|
56daf57cb1 | ||
|
|
9a4314947d | ||
|
|
d892f36fe8 | ||
|
|
4804530468 | ||
|
|
06b0330d84 |
@@ -21,8 +21,8 @@ PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files
|
|||||||
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
|
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
|
||||||
|
|
||||||
JS libraries:
|
JS libraries:
|
||||||
jQuery 1.7.1 GPL and MIT Licence Yes JS library
|
jQuery 1.7.2 GPL and MIT Licence Yes JS library
|
||||||
jQuery UI 1.8.17 GPL and MIT Licence Yes JS library plugin UI
|
jQuery UI 1.8.20 GPL and MIT Licence Yes JS library plugin UI
|
||||||
jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors
|
jQuery Colorpicker 1.1 MIT Licence Yes JS library for color picker for a defined list of colors
|
||||||
jQuery DataTable 1.8.1 BSD Yes JS library for tables output
|
jQuery DataTable 1.8.1 BSD Yes JS library for tables output
|
||||||
jQuery Flot 0.7 MIT Licence Yes JS library to build graph
|
jQuery Flot 0.7 MIT Licence Yes JS library to build graph
|
||||||
@@ -51,6 +51,7 @@ Copyright (C) 2012
|
|||||||
- Juanjo Menent <jmenent@2byte.es>
|
- Juanjo Menent <jmenent@2byte.es>
|
||||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
- Jean Heimburger <jean@tiaris.info>
|
- Jean Heimburger <jean@tiaris.info>
|
||||||
|
- Marcos García <marcosgdf@gmail.com>
|
||||||
|
|
||||||
Copyright (C) 2011
|
Copyright (C) 2011
|
||||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
|||||||
55
ChangeLog
55
ChangeLog
@@ -2,11 +2,35 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
***** ChangeLog for 3.3 compared to 3.2 *****
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.2.1 compared to 3.2.0 *****
|
||||||
|
- Fix: Edit of projects.
|
||||||
|
- Fix: Activation of modules does not fails if directory install was removed.
|
||||||
|
- Fix: [ bug #444 ] Regression on auto-closing for proposals and orders.
|
||||||
|
- Fix: Update translations (catalan, french, spanish, brazilian).
|
||||||
|
- Fix: [ bug #445 ] Hex escaping in descriptions.
|
||||||
|
- Fix: error when validating shipment for non predefined products with a
|
||||||
|
selected warehouse.
|
||||||
|
- Fix: Bad local taxes if price base type is TTC for spanish local taxes.
|
||||||
|
- Fix: Phone not saved when using web service.
|
||||||
|
- Fix: [ bug #464 ] Payment form should allow to add transmitter for bank transfers.
|
||||||
|
- Fix: Allows to use a comma decimal separator in supplier invoices payments.
|
||||||
|
- Fix: Translation for tr_TR, es_ES, pt_BR.
|
||||||
|
- Fix: Products with no prices not visible.
|
||||||
|
- Fix: Access to product card created with very old version of Dolibarr.
|
||||||
|
- Fix: Delete temporary files after validating an invoice.
|
||||||
|
- Fix: preview of supplier order and invoice template.
|
||||||
|
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
|
||||||
|
- Fix: Average amount graphs weren't comparing the previous year stats
|
||||||
|
- Fix: Closed project didn't show the new status unless the page was refreshed
|
||||||
|
- Fix: Files were not being uploaded to a project's task
|
||||||
|
- Fix: [ bug #503 ] Unable to delete linked file to a deposit
|
||||||
|
- Fix: [ bug #501 ] Error while trying to modify an user
|
||||||
|
- Fix: [ bug #506 ] Can't set percentage of a started event
|
||||||
|
- Fix: Bad assignation of const for pdf delivery module name
|
||||||
|
|
||||||
***** ChangeLog for 3.2 compared to 3.1 *****
|
***** ChangeLog for 3.2.0 compared to 3.1.3 *****
|
||||||
WARNING: PHP lower than 5.x are no more supported.
|
WARNING: PHP lower than 5.x are no more supported.
|
||||||
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
WARNING: Because of a major datastructure change onto supplier prices tables, be aware
|
||||||
to make a backup of your database before making upgrade.
|
to make a backup of your database before making upgrade.
|
||||||
@@ -70,6 +94,10 @@ For users:
|
|||||||
- Fix: Can use POS module with several concurrent users.
|
- Fix: Can use POS module with several concurrent users.
|
||||||
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
- Fix: Installer don't fails with Mysql version that added a ssl_cypher field.
|
||||||
- Fix: Sanitize input parameters.
|
- Fix: Sanitize input parameters.
|
||||||
|
- Fix: [ bug #368 ] Product list
|
||||||
|
- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills
|
||||||
|
- Fix: [ bug #399 ] Bad calculation of local taxes in update line products
|
||||||
|
- Fix: [ bug #427 ] Bad links to wiki help in certains menus
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
- New: Can add a left menu into an existing top menu or left menu.
|
- New: Can add a left menu into an existing top menu or left menu.
|
||||||
@@ -98,6 +126,29 @@ For developers:
|
|||||||
WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx.
|
WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol_xxx.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.1.3 compared to 3.1.2 *****
|
||||||
|
|
||||||
|
Fix: PgSQL - property must be set if success
|
||||||
|
Fix: Provide a solution for backup when mysqldump is not available
|
||||||
|
Fix: Bug #460 - Wrong entity assignment when creating a warehouse
|
||||||
|
Fix: bug #405 - Late icon always displayed on comm/propal.php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.1.2 compared to 3.1.1 *****
|
||||||
|
|
||||||
|
- Fix: Can clone a proposal
|
||||||
|
- Fix: Add member ID in substitution method
|
||||||
|
- Fix: Duplicate end tag and missing form parts
|
||||||
|
- Fix: Support companies with no prof id.
|
||||||
|
- Fix: Sanitize data
|
||||||
|
- Fix: Bug #318
|
||||||
|
- Fix: Bug #369
|
||||||
|
- Fix: More bugs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
|
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
|
||||||
|
|
||||||
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
|
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
dolibarr (3.3.0+nmu1) unstable; urgency=low
|
dolibarr (3.2.1+nmu1) unstable; urgency=low
|
||||||
|
|
||||||
* Non-maintainer upload.
|
* Non-maintainer upload.
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
closes: bug#634783
|
closes: bug#634783
|
||||||
|
|
||||||
-- Dolibarr team <contact@dolibarr.org> Mon, 10 Aug 2011 12:00:00 +0100
|
-- Dolibarr team <contact@dolibarr.org> Mon, 18 Jun 2012 12:00:00 +0100
|
||||||
|
|
||||||
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz
|
||||||
@@ -9,13 +9,12 @@ Build-Depends: debhelper (>= 7), po-debconf, dpatch
|
|||||||
Package: dolibarr
|
Package: dolibarr
|
||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-mysql | php5-mysqli,
|
php5-mysql | php5-mysqli,
|
||||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip, php-fpdf,
|
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||||
libphp-adodb,
|
php-fpdf,
|
||||||
libfpdi-php,
|
libphp-adodb,
|
||||||
libfpdf-tpl-php,
|
|
||||||
libnusoap-php,
|
libnusoap-php,
|
||||||
libphp-pclzip,
|
libphp-pclzip,
|
||||||
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||||
ttf-dejavu-core,
|
ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
mysql-server,
|
mysql-server,
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ Installed-Size: 61200
|
|||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-mysql | php5-mysqli,
|
php5-mysql | php5-mysqli,
|
||||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||||
|
libphp-adodb,
|
||||||
libnusoap-php,
|
libnusoap-php,
|
||||||
libphp-pclzip,
|
libphp-pclzip,
|
||||||
libfpdi-php,
|
libjs-jquery, libjs-jquery-ui, ckeditor,
|
||||||
libfpdf-tpl-php,
|
|
||||||
ckeditor,
|
|
||||||
ttf-dejavu-core,
|
ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
mysql-server
|
mysql-server
|
||||||
|
|||||||
@@ -83,8 +83,9 @@ case "$1" in
|
|||||||
chown -R root:www-data $installconfig
|
chown -R root:www-data $installconfig
|
||||||
chmod -R 660 $installconfig
|
chmod -R 660 $installconfig
|
||||||
|
|
||||||
if [ ! -s $config ]
|
# If a conf already exists and its content was already completed by installer
|
||||||
then
|
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||||
|
then
|
||||||
# Create an empty conf.php with permission to web server
|
# Create an empty conf.php with permission to web server
|
||||||
echo Create empty file $config
|
echo Create empty file $config
|
||||||
touch $config
|
touch $config
|
||||||
@@ -93,17 +94,17 @@ case "$1" in
|
|||||||
else
|
else
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY" $config || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY_UI" $config || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
#
|
#
|
||||||
# see: dh_installdeb(1)
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
set -e
|
#set -e
|
||||||
|
set +e
|
||||||
|
|
||||||
# summary of how this script can be called:
|
# summary of how this script can be called:
|
||||||
# * <postrm> `remove'
|
# * <postrm> `remove'
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $force_install_lockinstall='444';
|
|||||||
|
|
||||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
// Value to overwrite path to use shared libraries/fonts instead of embedded one
|
||||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||||
$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||||
$force_dolibarr_lib_GEOIP_PATH='';
|
$force_dolibarr_lib_GEOIP_PATH='';
|
||||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||||
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||||
@@ -36,7 +36,7 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
|||||||
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||||
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||||
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||||
$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -93,17 +93,18 @@ clean:
|
|||||||
# clean from all embedded libraries (we use package dependencies instead)
|
# clean from all embedded libraries (we use package dependencies instead)
|
||||||
rm -fr htdocs/includes/adodbtime
|
rm -fr htdocs/includes/adodbtime
|
||||||
rm -fr htdocs/includes/ckeditor
|
rm -fr htdocs/includes/ckeditor
|
||||||
rm -fr htdocs/includes/fpdfi
|
# rm -fr htdocs/includes/fpdfi
|
||||||
rm -fr htdocs/includes/fonts
|
rm -fr htdocs/includes/fonts
|
||||||
rm -fr htdocs/includes/geoip
|
rm -fr htdocs/includes/geoip
|
||||||
rm -fr htdocs/includes/nusoap
|
rm -fr htdocs/includes/nusoap
|
||||||
rm -fr htdocs/includes/odtphp/zip/pclzip
|
rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||||
rm -fr htdocs/includes/jquery/css
|
rm -fr htdocs/includes/jquery/css
|
||||||
rm -fr htdocs/includes/jquery/js
|
rm -fr htdocs/includes/jquery/js
|
||||||
rm -fr htdocs/includes/jquery/plugins/flot
|
# rm -fr htdocs/includes/jquery/plugins/flot
|
||||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||||
rm -fr htdocs/includes/jquery/plugins/mobile
|
rm -fr htdocs/includes/jquery/plugins/mobile
|
||||||
|
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip
|
||||||
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
rm -fr htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 3.3.0
|
PROJECT_NUMBER = 3.2.0
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
|
|||||||
@@ -16,13 +16,14 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
; ----- Change this -----
|
; ----- Change this -----
|
||||||
AppName=DoliWamp
|
AppName=DoliWamp
|
||||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
AppVerName=DoliWamp-3.3.0-alpha
|
AppVerName=DoliWamp-3.2.1
|
||||||
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
OutputBaseFilename=DoliWamp-3.3.0-alpha
|
OutputBaseFilename=DoliWamp-3.2.1
|
||||||
; Define full path from wich all relative path are defined
|
; Define full path from wich all relative path are defined
|
||||||
; You must modify this to put here your dolibarr root directory
|
; You must modify this to put here your dolibarr root directory
|
||||||
SourceDir=c:\Documents and Settings\ldestail\git\dolibarr
|
;SourceDir=C:\Documents and Settings\ldestail\git\dolibarr_old
|
||||||
|
SourceDir=Z:\home\ldestail\git\dolibarr_old
|
||||||
; ----- End of change
|
; ----- End of change
|
||||||
;OutputManifestFile=build\doliwampbuild.log
|
;OutputManifestFile=build\doliwampbuild.log
|
||||||
AppId=doliwamp
|
AppId=doliwamp
|
||||||
@@ -31,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
|
|||||||
AppSupportURL=http://www.dolibarr.org
|
AppSupportURL=http://www.dolibarr.org
|
||||||
AppUpdatesURL=http://www.dolibarr.org
|
AppUpdatesURL=http://www.dolibarr.org
|
||||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||||
AppCopyright=Copyright (C) 2008-2011 Laurent Destailleur, NLTechno
|
AppCopyright=Copyright (C) 2008-2012 Laurent Destailleur, NLTechno
|
||||||
DefaultDirName=c:\dolibarr
|
DefaultDirName=c:\dolibarr
|
||||||
DefaultGroupName=Dolibarr
|
DefaultGroupName=Dolibarr
|
||||||
;LicenseFile=COPYING
|
;LicenseFile=COPYING
|
||||||
|
|||||||
24
build/makepack-dolibarr.pl
Normal file → Executable file
24
build/makepack-dolibarr.pl
Normal file → Executable file
@@ -9,8 +9,8 @@ use Cwd;
|
|||||||
|
|
||||||
$PROJECT="dolibarr";
|
$PROJECT="dolibarr";
|
||||||
$MAJOR="3";
|
$MAJOR="3";
|
||||||
$MINOR="3";
|
$MINOR="2";
|
||||||
$BUILD="0-alpha"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
$BUILD="1"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
||||||
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
$RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||||
|
|
||||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||||
@@ -24,7 +24,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
|
|||||||
"RPM_OPENSUSE"=>"rpmbuild",
|
"RPM_OPENSUSE"=>"rpmbuild",
|
||||||
"DEB"=>"dpkg",
|
"DEB"=>"dpkg",
|
||||||
"APS"=>"zip",
|
"APS"=>"zip",
|
||||||
"EXEDOLIWAMP"=>"iscc.exe"
|
"EXEDOLIWAMP"=>"ISCC.exe"
|
||||||
);
|
);
|
||||||
%ALTERNATEPATH=(
|
%ALTERNATEPATH=(
|
||||||
"7z"=>"7-ZIP",
|
"7z"=>"7-ZIP",
|
||||||
@@ -38,7 +38,7 @@ $FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
|||||||
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
||||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
||||||
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||||
$FILENAMEEXEDOLIWAMP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||||
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
||||||
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
|
||||||
|
|
||||||
@@ -102,7 +102,8 @@ for (0..@ARGV-1) {
|
|||||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ENV{"DESTI"}) { $DESTI = $ENV{"DESTI"}; } # Force output dir if env DESTI is defined
|
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
|
||||||
|
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
|
||||||
|
|
||||||
|
|
||||||
print "Makepack version $VERSION\n";
|
print "Makepack version $VERSION\n";
|
||||||
@@ -165,7 +166,7 @@ $atleastonerpm=0;
|
|||||||
foreach my $target (keys %CHOOSEDTARGET) {
|
foreach my $target (keys %CHOOSEDTARGET) {
|
||||||
if ($target =~ /RPM/i)
|
if ($target =~ /RPM/i)
|
||||||
{
|
{
|
||||||
if ($atleastonerpm && ! $ENV{"DESTI"})
|
if ($atleastonerpm && ($DESTI eq "$SOURCE/build"))
|
||||||
{
|
{
|
||||||
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
|
print "Error: You asked creation of several rpms. Because all rpm have same name, you must defined an environment variable DESTI to tell packager where it can create subdirs for each generated package.\n";
|
||||||
exit;
|
exit;
|
||||||
@@ -323,7 +324,6 @@ if ($nboftargetok) {
|
|||||||
$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/.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/geoip/sample*.*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/lightbox`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jstree`;
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||||
@@ -412,7 +412,7 @@ if ($nboftargetok) {
|
|||||||
print "Go to directory $BUILDROOT\n";
|
print "Go to directory $BUILDROOT\n";
|
||||||
$olddir=getcwd();
|
$olddir=getcwd();
|
||||||
chdir("$BUILDROOT");
|
chdir("$BUILDROOT");
|
||||||
$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMEZIP\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMEZIP\\*";
|
$cmd= "7z a -r -tzip -xr\@\"$BUILDROOT\/$FILENAMEZIP\/build\/zip\/zip_exclude.txt\" -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMEZIP\/*";
|
||||||
print $cmd."\n";
|
print $cmd."\n";
|
||||||
$ret= `$cmd`;
|
$ret= `$cmd`;
|
||||||
chdir("$olddir");
|
chdir("$olddir");
|
||||||
@@ -763,8 +763,10 @@ if ($nboftargetok) {
|
|||||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||||
|
|
||||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
$SOURCEBACK=$SOURCE;
|
||||||
$cmd= "iscc.exe \"$SOURCE\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
$SOURCEBACK =~ s/\//\\/g;
|
||||||
|
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||||
|
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||||
print "$cmd\n";
|
print "$cmd\n";
|
||||||
$ret= `$cmd`;
|
$ret= `$cmd`;
|
||||||
#print "$ret\n";
|
#print "$ret\n";
|
||||||
@@ -772,6 +774,8 @@ if ($nboftargetok) {
|
|||||||
# Move to final dir
|
# Move to final dir
|
||||||
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||||
|
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
|
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
0
build/makepack-dolibarrmodule.pl
Normal file → Executable file
0
build/makepack-dolibarrmodule.pl
Normal file → Executable file
0
build/makepack-dolibarrtheme.pl
Normal file → Executable file
0
build/makepack-dolibarrtheme.pl
Normal file → Executable file
@@ -8,7 +8,7 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
beta version of Dolibarr, step by step.
|
beta version of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in / directory (README*.txt, ChangeLog...)
|
- Update version/info in /ChangeLog and /filefunc.inc.php
|
||||||
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
|
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
|
||||||
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
|
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
|
||||||
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
||||||
@@ -34,7 +34,7 @@ This files describe steps made by Dolibarr packaging team to make a
|
|||||||
complete release of Dolibarr, step by step.
|
complete release of Dolibarr, step by step.
|
||||||
|
|
||||||
- Check all files are commited.
|
- Check all files are commited.
|
||||||
- Update version/info in / directory (README*.txt, ChangeLog...)
|
- Update version/info in /ChangeLog and /filefunc.inc.php
|
||||||
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
|
||||||
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
|
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
|
||||||
- Update version number with x.x.x-y in htdocs/filefunc.inc.php
|
- Update version number with x.x.x-y in htdocs/filefunc.inc.php
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2.1</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>05</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||||
@@ -81,6 +82,11 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
</Web_Info>
|
</Web_Info>
|
||||||
<Permissions>
|
<Permissions>
|
||||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||||
|
<EULA>GNU GPL</EULA>
|
||||||
|
</Permissions>
|
||||||
|
<ASP>
|
||||||
|
<ASP_FORM>Y</ASP_FORM>
|
||||||
|
<ASP_Member>N</ASP_Member>
|
||||||
<ASP_Member_Number />
|
<ASP_Member_Number />
|
||||||
</ASP>
|
</ASP>
|
||||||
<Affiliates>
|
<Affiliates>
|
||||||
@@ -187,9 +193,4 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
<Affiliates_Yaskifo_Order_Page />
|
<Affiliates_Yaskifo_Order_Page />
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
<Affiliates_Yaskifo_Vendor_ID />
|
||||||
<Affiliates_Yaskifo_Product_ID />
|
<Affiliates_Yaskifo_Product_ID />
|
||||||
</Affiliates>
|
|
||||||
<ASP>
|
|
||||||
<ASP_FORM>Y</ASP_FORM>
|
|
||||||
<ASP_Member>N</ASP_Member>
|
|
||||||
<ASP_Member_Number />
|
|
||||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
<CompanyName />
|
<CompanyName />
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.1..0</Program_Version>
|
<Program_Version>3.2.1</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>05</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -43,11 +43,31 @@
|
|||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to install
|
Simple to install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to use
|
Simple to use
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Simple to develop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
|
</English>
|
||||||
|
<French>
|
||||||
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
|
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
|
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||||
@@ -56,18 +76,6 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
|||||||
|
|
||||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||||
|
|
||||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
|
||||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
|
||||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
|
||||||
</Italian>
|
|
||||||
<French>
|
|
||||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
|
||||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
|
||||||
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
|
||||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple pour le développement (pas de frameworks lourds).
|
Simple pour le développement (pas de frameworks lourds).
|
||||||
@@ -88,6 +96,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
@@ -194,9 +207,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
|
||||||
<Affiliates_VFree_Product_ID />
|
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
|
|||||||
@@ -6,26 +6,26 @@
|
|||||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||||
</MASTER_PAD_VERSION_INFO>
|
</MASTER_PAD_VERSION_INFO>
|
||||||
<Company_Info>
|
<Company_Info>
|
||||||
<Company_Name>Dolibarr team</Company_Name>
|
<Company_Name>NLTechno</Company_Name>
|
||||||
<Address_1>11 rue raymond Queneau</Address_1>
|
<Address_1>11 Rue raymond Queneau</Address_1>
|
||||||
<Address_2 />
|
<Address_2 />
|
||||||
<City_Town>Rueil Malmaison</City_Town>
|
<City_Town>Rueil Malmaison</City_Town>
|
||||||
<State_Province />
|
<State_Province />
|
||||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||||
<Country>FRANCE</Country>
|
<Country>FRANCE</Country>
|
||||||
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
|
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
|
||||||
<Contact_Info>
|
<Contact_Info>
|
||||||
<Author_First_Name>Dolibarr team</Author_First_Name>
|
<Author_First_Name>NLTechno</Author_First_Name>
|
||||||
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||||
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
|
<Author_Email>dolibarr@nltechno.com</Author_Email>
|
||||||
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
<Contact_First_Name>NLTechno</Contact_First_Name>
|
||||||
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
||||||
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
|
<Contact_Email>dolibarr@nltechno.com</Contact_Email>
|
||||||
</Contact_Info>
|
</Contact_Info>
|
||||||
<Support_Info>
|
<Support_Info>
|
||||||
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
<Sales_Email>dolibarr@nltechno.com</Sales_Email>
|
||||||
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
|
<Support_Email>dolibarr@nltechno.com</Support_Email>
|
||||||
<General_Email>dolibarr-dev@nongnu.org</General_Email>
|
<General_Email>dolibarr@nltechno.com</General_Email>
|
||||||
<Sales_Phone />
|
<Sales_Phone />
|
||||||
<Support_Phone />
|
<Support_Phone />
|
||||||
<General_Phone />
|
<General_Phone />
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>Dolibarr</Program_Name>
|
<Program_Name>Dolibarr</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2.1</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>08</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -46,14 +46,14 @@
|
|||||||
<Program_Install_Support>No Install Support</Program_Install_Support>
|
<Program_Install_Support>No Install Support</Program_Install_Support>
|
||||||
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||||
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
<Program_Change_Info>http://www.dolibarr.org</Program_Change_Info>
|
||||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||||
<Program_System_Requirements>None</Program_System_Requirements>
|
<Program_System_Requirements>None</Program_System_Requirements>
|
||||||
<File_Info>
|
<File_Info>
|
||||||
<File_Size_Bytes>18037439</File_Size_Bytes>
|
<File_Size_Bytes>9359175</File_Size_Bytes>
|
||||||
<File_Size_K>18037</File_Size_K>
|
<File_Size_K>9139</File_Size_K>
|
||||||
<File_Size_MB>18.03</File_Size_MB>
|
<File_Size_MB>8.93</File_Size_MB>
|
||||||
</File_Info>
|
</File_Info>
|
||||||
<Expire_Info>
|
<Expire_Info>
|
||||||
<Has_Expire_Info>N</Has_Expire_Info>
|
<Has_Expire_Info>N</Has_Expire_Info>
|
||||||
@@ -73,9 +73,13 @@
|
|||||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250>
|
||||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to install
|
Simple to install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Simple to use
|
Simple to use
|
||||||
|
|
||||||
|
|
||||||
@@ -85,9 +89,13 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
|
|||||||
|
|
||||||
|
|
||||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||||
|
</English>
|
||||||
<French>
|
<French>
|
||||||
|
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||||
|
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||||
|
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||||
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||||
|
|
||||||
|
|
||||||
@@ -118,6 +126,11 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||||
|
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||||
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||||
|
</Application_URLs>
|
||||||
<Download_URLs>
|
<Download_URLs>
|
||||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||||
@@ -224,9 +237,4 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
|||||||
<Affiliates_Shareasale_Product_ID />
|
<Affiliates_Shareasale_Product_ID />
|
||||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||||
<Affiliates_SWReg_Order_Page />
|
<Affiliates_SWReg_Order_Page />
|
||||||
<Affiliates_VFree_Vendor_ID />
|
|
||||||
<Affiliates_VFree_Product_ID />
|
|
||||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
|
||||||
<Affiliates_Yaskifo_Order_Page />
|
|
||||||
<Affiliates_Yaskifo_Vendor_ID />
|
|
||||||
<Affiliates_SWReg_Vendor_ID />
|
<Affiliates_SWReg_Vendor_ID />
|
||||||
|
|||||||
@@ -34,10 +34,10 @@
|
|||||||
</Company_Info>
|
</Company_Info>
|
||||||
<Program_Info>
|
<Program_Info>
|
||||||
<Program_Name>DoliWamp</Program_Name>
|
<Program_Name>DoliWamp</Program_Name>
|
||||||
<Program_Version>3.1.0</Program_Version>
|
<Program_Version>3.2.1</Program_Version>
|
||||||
<Program_Release_Month>07</Program_Release_Month>
|
<Program_Release_Month>08</Program_Release_Month>
|
||||||
<Program_Release_Day>09</Program_Release_Day>
|
<Program_Release_Day>10</Program_Release_Day>
|
||||||
<Program_Release_Year>2011</Program_Release_Year>
|
<Program_Release_Year>2012</Program_Release_Year>
|
||||||
<Program_Cost_Dollars />
|
<Program_Cost_Dollars />
|
||||||
<Program_Cost_Other_Code />
|
<Program_Cost_Other_Code />
|
||||||
<Program_Cost_Other />
|
<Program_Cost_Other />
|
||||||
@@ -94,8 +94,8 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
|||||||
</Italian>
|
</Italian>
|
||||||
</Program_Descriptions>
|
</Program_Descriptions>
|
||||||
<Web_Info>
|
<Web_Info>
|
||||||
<Application_URLs>
|
<Application_URLs>
|
||||||
<Application_Info_URL>http://www.nltechno.com/pages/dolibarrwinbin.php</Application_Info_URL>
|
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
||||||
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
||||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ return "Regis Houssin";
|
|||||||
# script_dolibarr_versions()
|
# script_dolibarr_versions()
|
||||||
sub script_dolibarr_versions
|
sub script_dolibarr_versions
|
||||||
{
|
{
|
||||||
return ( "3.3.0", "3.2.0", "3.1.0", "3.0.1", "2.9.0" );
|
return ( "3.2.0", "3.1.1", "3.0.1", "2.9.0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_category
|
sub script_dolibarr_category
|
||||||
@@ -43,13 +43,6 @@ sub script_dolibarr_php_vers
|
|||||||
return ( 5 );
|
return ( 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_php_vars
|
|
||||||
{
|
|
||||||
return ( [ 'memory_limit', '64M', '+' ],
|
|
||||||
[ 'upload_max_filesize', '10M', '+' ],
|
|
||||||
[ 'max_execution_time', '60', '+' ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
sub script_dolibarr_php_modules
|
sub script_dolibarr_php_modules
|
||||||
{
|
{
|
||||||
local ($d, $ver, $phpver, $opts) = @_;
|
local ($d, $ver, $phpver, $opts) = @_;
|
||||||
@@ -348,21 +341,32 @@ if ($opts->{'newdb'}) {
|
|||||||
return (1, "Dolibarr directory and tables deleted.");
|
return (1, "Dolibarr directory and tables deleted.");
|
||||||
}
|
}
|
||||||
|
|
||||||
# script_dolibarr_latest(version)
|
# script_dolibarr_realversion(&domain, &opts)
|
||||||
# Returns a URL and regular expression or callback func to get the version
|
# Returns the real version number of some script install, or undef if unknown
|
||||||
sub script_dolibarr_latest
|
sub script_dolibarr_realversion
|
||||||
|
{
|
||||||
|
local ($d, $opts, $sinfo) = @_;
|
||||||
|
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
|
||||||
|
foreach my $l (@$lref) {
|
||||||
|
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
# script_dolibarr_check_latest(version)
|
||||||
|
# Checks if some version is the latest for this project, and if not returns
|
||||||
|
# a newer one. Otherwise returns undef.
|
||||||
|
sub script_dolibarr_check_latest
|
||||||
{
|
{
|
||||||
local ($ver) = @_;
|
local ($ver) = @_;
|
||||||
if ($ver >= 3.0) {
|
local @vers = &osdn_package_versions("dolibarr",
|
||||||
return ( "http://sourceforge.net/projects/dolibarr/files/".
|
$ver >= 3 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||||
"Dolibarr%20ERP-CRM",
|
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||||
"(3\\.[0-9\\.]+)" );
|
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
||||||
}
|
return "Failed to find versions" if (!@vers);
|
||||||
elsif ($ver >= 2.9) {
|
return $ver eq $vers[0] ? undef : $vers[0];
|
||||||
return ( "http://www.dolibarr.fr/files/stable/",
|
|
||||||
"dolibarr\\-(2\\.[0-9\\.]+)" );
|
|
||||||
}
|
|
||||||
return ( );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_site
|
sub script_dolibarr_site
|
||||||
@@ -376,4 +380,3 @@ return 2;
|
|||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|||||||
@@ -217,6 +217,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create config for se $seconfig
|
# Create config for se $seconfig
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
@@ -292,5 +312,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jul 23 2012 Laurent Destailleur 3.2.1-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -254,6 +254,26 @@ fi
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create config for se $seconfig
|
# Create config for se $seconfig
|
||||||
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
@@ -348,5 +368,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jul 23 2012 Laurent Destailleur 3.2.1-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -214,6 +214,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export confcomplete=`grep -c "File generated by" %{_sysconfdir}/dolibarr/conf.php 2>/dev/null`
|
||||||
|
if [ -s %{_sysconfdir}/dolibarr/conf.php -a "x$confcomplete" != "x0" ]
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
echo Create dolibarr web server config link $apachelink
|
echo Create dolibarr web server config link $apachelink
|
||||||
@@ -281,5 +301,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jul 23 2012 Laurent Destailleur 3.2.1-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -219,6 +219,26 @@ echo Create document directory $docdir
|
|||||||
# Set correct owner on config files
|
# Set correct owner on config files
|
||||||
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
%{__chown} -R root:$apachegroup /etc/dolibarr/*
|
||||||
|
|
||||||
|
# If a conf already exists and its content was already completed by installer
|
||||||
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
|
then
|
||||||
|
# File already exist. We add params not found.
|
||||||
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
|
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
echo Create dolibarr web server config link $apachelink
|
echo Create dolibarr web server config link $apachelink
|
||||||
@@ -286,5 +306,5 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 4 2012 Laurent Destailleur 3.3.0-0.1.a
|
* Mon Jul 23 2012 Laurent Destailleur 3.2.1-0.3
|
||||||
- Initial version (#723326)
|
- Initial version (#723326)
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ $force_dolibarr_lib_TCPDF_PATH='';
|
|||||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype';
|
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#------------------------------------------------------
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
export dumpfile="mysqldump_dolibarr_3.1.0.sql"
|
export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
|
||||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||||
if [ "x$mydir" = "x" ]
|
if [ "x$mydir" = "x" ]
|
||||||
then
|
then
|
||||||
|
|||||||
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
6200
dev/initdata/mysqldump_dolibarr_3.2.0.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -50,7 +50,7 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == 'update' || $action == 'add')
|
if ($action == 'update' || $action == 'add')
|
||||||
{
|
{
|
||||||
$constname=GETPOST('constname','alpha');
|
$constname=GETPOST('constname','alpha');
|
||||||
$constvalue=(GETPOST('constvalue_'.$constname,'alpha') ? GETPOST('constvalue_'.$constname,'alpha') : GETPOST('constvalue','alpha'));
|
$constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
|
||||||
|
|
||||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
||||||
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
||||||
@@ -60,7 +60,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$consttype=GETPOST('consttype','alpha');
|
$consttype=GETPOST('consttype','alpha');
|
||||||
$constnote=GETPOST('constnote','alpha');
|
$constnote=GETPOST('constnote');
|
||||||
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
@@ -78,7 +78,7 @@ if ($action == 'update' || $action == 'add')
|
|||||||
// Action activation d'un sous module du module adherent
|
// Action activation d'un sous module du module adherent
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value','alpha'),'',0,'',$conf->entity);
|
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
print $db->error();
|
print $db->error();
|
||||||
@@ -271,4 +271,4 @@ dol_fiche_end();
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ if ($conf->global->ADHERENT_USE_MAILMAN)
|
|||||||
'ADHERENT_MAILMAN_LISTS'
|
'ADHERENT_MAILMAN_LISTS'
|
||||||
);
|
);
|
||||||
|
|
||||||
print_fiche_titre("Mailman mailing list system",$lien,'');
|
print_fiche_titre($langs->trans('MailmanTitle'),$lien,'');
|
||||||
|
|
||||||
// JQuery activity
|
// JQuery activity
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ $mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
|
|||||||
@@ -39,8 +39,12 @@ $langs->load("users");
|
|||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
|
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$rowid=GETPOST('rowid','int');
|
||||||
|
$typeid=GETPOST('typeid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->cotisation->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@@ -50,10 +54,6 @@ $errmsg='';
|
|||||||
$defaultdelay=1;
|
$defaultdelay=1;
|
||||||
$defaultdelayunit='y';
|
$defaultdelayunit='y';
|
||||||
|
|
||||||
$action=GETPOST('action');
|
|
||||||
$rowid=GETPOST('rowid');
|
|
||||||
$typeid=GETPOST('typeid');
|
|
||||||
|
|
||||||
if ($rowid)
|
if ($rowid)
|
||||||
{
|
{
|
||||||
// Load member
|
// Load member
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build and output PDF
|
// Build and output PDF
|
||||||
if (empty($mode) || $mode=='card' || $mode='cardlogin')
|
if (empty($mode) || $mode=='card' || $mode=='cardlogin')
|
||||||
{
|
{
|
||||||
if (! count($arrayofmembers))
|
if (! count($arrayofmembers))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -184,13 +184,13 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function makeSubstitution($text)
|
function makeSubstitution($text)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$birthday = dol_print_date($this->naiss,'day');
|
$birthday = dol_print_date($this->naiss,'day');
|
||||||
|
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
if (dol_textishtml($text,1)) $msgishtml = 1;
|
if (dol_textishtml($text,1)) $msgishtml = 1;
|
||||||
|
|
||||||
$infos='';
|
$infos='';
|
||||||
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
|
||||||
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
|
||||||
@@ -202,12 +202,15 @@ class Adherent extends CommonObject
|
|||||||
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
|
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
|
||||||
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
|
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
|
||||||
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
|
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
|
||||||
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
|
{
|
||||||
|
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
|
||||||
|
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
|
||||||
|
}
|
||||||
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
|
||||||
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
|
||||||
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
$infos.= $langs->transnoentities("Public").": ".yn($this->public);
|
||||||
|
|
||||||
// Substitutions
|
// Substitutions
|
||||||
$substitutionarray=array(
|
$substitutionarray=array(
|
||||||
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
||||||
@@ -227,9 +230,9 @@ class Adherent extends CommonObject
|
|||||||
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
'%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login,
|
||||||
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass
|
||||||
);
|
);
|
||||||
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
return make_substitutions($text,$substitutionarray);
|
return make_substitutions($text,$substitutionarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -696,41 +699,52 @@ class Adherent extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid;
|
||||||
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid;
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid;
|
// Remove linked user
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
$ret=$this->setUserId(0);
|
||||||
$resql=$this->db->query($sql);
|
if ($ret > 0)
|
||||||
if ($resql)
|
{
|
||||||
{
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid;
|
||||||
if ($this->db->affected_rows($resql))
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
{
|
$resql=$this->db->query($sql);
|
||||||
// Appel des triggers
|
if ($resql)
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
{
|
||||||
$interface=new Interfaces($this->db);
|
if ($this->db->affected_rows($resql))
|
||||||
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
|
{
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// Appel des triggers
|
||||||
// Fin appel triggers
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
$this->db->commit();
|
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
|
||||||
return 1;
|
if ($result < 0) {
|
||||||
}
|
$error++; $this->errors=$interface->errors;
|
||||||
else
|
}
|
||||||
{
|
// Fin appel triggers
|
||||||
// Rien a effacer
|
|
||||||
$this->db->rollback();
|
$this->db->commit();
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
// Rien a effacer
|
||||||
$this->error=$this->db->error();
|
$this->db->rollback();
|
||||||
$this->db->rollback();
|
return 0;
|
||||||
return -3;
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error=$this->db->error();
|
||||||
|
$this->db->rollback();
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -968,7 +982,7 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($rowid,$ref='',$fk_soc='')
|
function fetch($rowid,$ref='',$fk_soc='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $langs;
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
|
$sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.adresse as address, d.cp as zip, d.ville as town, d.note,";
|
||||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||||
@@ -989,10 +1003,12 @@ class Adherent extends CommonObject
|
|||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.fk_departement = dep.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member";
|
||||||
$sql.= " WHERE d.fk_adherent_type = t.rowid";
|
$sql.= " WHERE d.fk_adherent_type = t.rowid";
|
||||||
$sql.= " AND d.entity = ".$conf->entity;
|
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
elseif ($ref || $fk_soc) {
|
||||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
else $sql.= " AND d.rowid=".$rowid;
|
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
||||||
|
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -27,22 +27,32 @@
|
|||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.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/adherent_type.class.php");
|
||||||
|
|
||||||
|
$langs->load("members");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|
||||||
|
$id=GETPOST('id','int');
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$confirm=GETPOST('confirm','alpha');
|
||||||
|
|
||||||
$mesg = "";
|
$mesg='';
|
||||||
|
if (isset($_SESSION['DolMessage']))
|
||||||
|
{
|
||||||
|
$mesg=$_SESSION['DolMessage'];
|
||||||
|
unset($_SESSION['DolMessage']);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id','int');
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$id = $user->societe_id;
|
$id = $user->societe_id;
|
||||||
}
|
}
|
||||||
//$result = restrictedArea($user, 'societe', $id);
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@@ -65,16 +75,25 @@ $upload_dir = $conf->adherent->dir_output . "/" . get_exdir($id,2,0,1) . '/' . $
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Envoie fichier
|
// Envoie fichier
|
||||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -96,11 +115,14 @@ if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Suppression fichier
|
// Suppression fichier
|
||||||
if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes')
|
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$file = $upload_dir . "/" . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$langs->load("other");
|
||||||
|
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
|
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -197,21 +219,21 @@ if ($id > 0)
|
|||||||
/*
|
/*
|
||||||
* Confirmation suppression fichier
|
* Confirmation suppression fichier
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$member->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$id,'',0,0,$user->rights->adherent->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$member->id,'',0,0,$user->rights->adherent->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
$param='&socid='.$societe->id;
|
$param='&socid='.$societe->id;
|
||||||
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($id,2,0,1).'/'.$id.'/');
|
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
|
||||||
|
|
||||||
print "<br><br>";
|
print "<br><br>";
|
||||||
}
|
}
|
||||||
@@ -226,9 +248,7 @@ else
|
|||||||
print $langs->trans("ErrorRecordNotFound");
|
print $langs->trans("ErrorRecordNotFound");
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -41,21 +41,22 @@ $langs->load("bills");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
|
|
||||||
|
$action=GETPOST('action','alpha');
|
||||||
|
$confirm=GETPOST('confirm','alpha');
|
||||||
|
$rowid=GETPOST('rowid','int');
|
||||||
|
$typeid=GETPOST('typeid','int');
|
||||||
|
$userid=GETPOST('userid','int');
|
||||||
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
$errmsg=''; $errmsgs=array();
|
$errmsg=''; $errmsgs=array();
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
|
||||||
$confirm=GETPOST('confirm','alpha');
|
|
||||||
$rowid=GETPOST('rowid','int');
|
|
||||||
$typeid=GETPOST('typeid','int');
|
|
||||||
$userid=GETPOST('userid','int');
|
|
||||||
$socid=GETPOST('socid','int');
|
|
||||||
|
|
||||||
if ($rowid > 0)
|
if ($rowid > 0)
|
||||||
{
|
{
|
||||||
// Load member
|
// Load member
|
||||||
@@ -67,16 +68,12 @@ if ($rowid > 0)
|
|||||||
if ($object->user_id)
|
if ($object->user_id)
|
||||||
{
|
{
|
||||||
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
|
// $user est le user qui edite, $object->user_id est l'id de l'utilisateur lies au membre edite
|
||||||
$caneditfielduser=( (($user->id == $object->user_id) && $user->rights->user->self->creer)
|
$caneditfielduser=((($user->id == $object->user_id) && $user->rights->user->self->creer)
|
||||||
|| (($user->id != $object->user_id) && $user->rights->user->user->creer) );
|
|| (($user->id != $object->user_id) && $user->rights->user->user->creer));
|
||||||
$caneditpassworduser=( (($user->id == $object->user_id) && $user->rights->user->self->password)
|
$caneditpassworduser=((($user->id == $object->user_id) && $user->rights->user->self->password)
|
||||||
|| (($user->id != $adh->user_id) && $user->rights->user->user->password) );
|
|| (($user->id != $object->user_id) && $user->rights->user->user->password));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define variables to know what current user can do on members
|
// Define variables to know what current user can do on members
|
||||||
$canaddmember=$user->rights->adherent->creer;
|
$canaddmember=$user->rights->adherent->creer;
|
||||||
@@ -163,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$nuser = new User($db);
|
$nuser = new User($db);
|
||||||
$result=$nuser->create_from_member($object,GETPOST('login','alpha'));
|
$result=$nuser->create_from_member($object,GETPOST('login'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@@ -184,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
$result=$company->create_from_member($object,GETPOST('companyname','alpha'));
|
$result=$company->create_from_member($object,GETPOST('companyname'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@@ -203,8 +200,13 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->email)
|
if ($object->email)
|
||||||
{
|
{
|
||||||
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
$from=$conf->email_from;
|
||||||
$mesg=$langs->trans("CardSent");
|
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||||
|
|
||||||
|
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
||||||
|
|
||||||
|
$langs->load("mails");
|
||||||
|
$mesg=$langs->trans("MailSuccessfulySent", $from, $object->email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -822,8 +824,8 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
$res=$object->fetch($rowid);
|
$res=$object->fetch($rowid);
|
||||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||||
//$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
//if ($res < 0) { dol_print_error($db); exit; }
|
if ($res < 0) { dol_print_error($db); exit; }
|
||||||
|
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$adht->fetch($object->typeid);
|
$adht->fetch($object->typeid);
|
||||||
@@ -1049,13 +1051,14 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
if ($rowid && $action != 'edit')
|
if ($rowid && $action != 'edit')
|
||||||
{
|
{
|
||||||
/* ************************************************************************** */
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Mode affichage */
|
/* Mode affichage */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
//$object = new Adherent($db);
|
|
||||||
$res=$object->fetch($rowid);
|
$res=$object->fetch($rowid);
|
||||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||||
@@ -1509,7 +1512,7 @@ if ($rowid && $action != 'edit')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Action SPIP
|
// Action SPIP
|
||||||
if ($conf->global->ADHERENT_USE_SPIP)
|
if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP)
|
||||||
{
|
{
|
||||||
$isinspip=$object->is_in_spip();
|
$isinspip=$object->is_in_spip();
|
||||||
if ($isinspip == 1)
|
if ($isinspip == 1)
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -59,7 +60,10 @@ $AdherentType=array();
|
|||||||
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
|
$sql = "SELECT t.rowid, t.libelle, t.cotisation,";
|
||||||
$sql.= " d.statut, count(d.rowid) as somme";
|
$sql.= " d.statut, count(d.rowid) as somme";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d ON t.rowid = d.fk_adherent_type";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
|
||||||
|
$sql.= " ON t.rowid = d.fk_adherent_type";
|
||||||
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
|
$sql.= " WHERE t.entity IN (".getEntity().")";
|
||||||
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
|
$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut";
|
||||||
|
|
||||||
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
|
dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG);
|
||||||
@@ -94,8 +98,9 @@ $now=dol_now();
|
|||||||
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
|
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
|
||||||
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
|
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
//$sql.= " WHERE d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
$sql.= " WHERE d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
//$sql.= " AND d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= ".$db->idate($now).')';
|
||||||
|
$sql.= " AND d.statut = 1 AND d.datefin >= ".$db->idate($now);
|
||||||
$sql.= " AND t.rowid = d.fk_adherent_type";
|
$sql.= " AND t.rowid = d.fk_adherent_type";
|
||||||
$sql.= " GROUP BY d.fk_adherent_type";
|
$sql.= " GROUP BY d.fk_adherent_type";
|
||||||
|
|
||||||
@@ -212,7 +217,8 @@ $sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
|||||||
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
$sql.= " a.tms as datem, datefin as date_end_subscription,";
|
||||||
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||||
$sql.= " WHERE a.fk_adherent_type = ta.rowid";
|
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND a.fk_adherent_type = ta.rowid";
|
||||||
$sql.= $db->order("a.tms","DESC");
|
$sql.= $db->order("a.tms","DESC");
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
@@ -241,7 +247,7 @@ if ($resql)
|
|||||||
$statictype->libelle=$obj->libelle;
|
$statictype->libelle=$obj->libelle;
|
||||||
print '<td>'.$staticmember->getNomUrl(1,24).'</td>';
|
print '<td>'.$staticmember->getNomUrl(1,24).'</td>';
|
||||||
print '<td>'.$statictype->getNomUrl(1,16).'</td>';
|
print '<td>'.$statictype->getNomUrl(1,16).'</td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->date_end),'dayhour').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->datem),'dayhour').'</td>';
|
||||||
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
|
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
@@ -260,11 +266,12 @@ else
|
|||||||
*/
|
*/
|
||||||
$max=5;
|
$max=5;
|
||||||
|
|
||||||
$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
|
$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
|
||||||
$sql.= " datefin as date_end_subscription,";
|
$sql.= " datefin as date_end_subscription,";
|
||||||
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
|
$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";
|
||||||
$sql.= " WHERE c.fk_adherent = a.rowid";
|
$sql.= " WHERE a.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND c.fk_adherent = a.rowid";
|
||||||
$sql.= $db->order("c.tms","DESC");
|
$sql.= $db->order("c.tms","DESC");
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
@@ -350,7 +357,8 @@ $numb=0;
|
|||||||
|
|
||||||
$sql = "SELECT c.cotisation, c.dateadh";
|
$sql = "SELECT c.cotisation, c.dateadh";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c";
|
||||||
$sql.= " WHERE d.rowid = c.fk_adherent";
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.= " AND d.rowid = c.fk_adherent";
|
||||||
if(isset($date_select) && $date_select != '')
|
if(isset($date_select) && $date_select != '')
|
||||||
{
|
{
|
||||||
$sql .= " AND dateadh LIKE '$date_select%'";
|
$sql .= " AND dateadh LIKE '$date_select%'";
|
||||||
@@ -406,7 +414,6 @@ print '</td></tr>';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,8 +32,10 @@ $langs->load("bills");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
if (!$user->rights->adherent->lire)
|
$id=(GETPOST('id','int') ? GETPOST('id','int') : GETPOST('rowid','int'));
|
||||||
accessforbidden();
|
|
||||||
|
// Security check
|
||||||
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -43,9 +45,8 @@ if (!$user->rights->adherent->lire)
|
|||||||
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||||
|
|
||||||
$adh = new Adherent($db);
|
$adh = new Adherent($db);
|
||||||
$adh->id=$_GET["id"];
|
$adh->fetch($id);
|
||||||
$adh->fetch($_GET["id"]);
|
$adh->info($id);
|
||||||
$adh->info($_GET["id"]);
|
|
||||||
|
|
||||||
$head = member_prepare_head($adh);
|
$head = member_prepare_head($adh);
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@ print '</td></tr></table>';
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ $search_login=GETPOST("search_login");
|
|||||||
$type=GETPOST("type");
|
$type=GETPOST("type");
|
||||||
$search_email=GETPOST("search_email");
|
$search_email=GETPOST("search_email");
|
||||||
$search_categ=GETPOST("search_categ");
|
$search_categ=GETPOST("search_categ");
|
||||||
$sall=GETPOST("sall",'int');
|
$sall=GETPOST("sall");
|
||||||
|
|
||||||
if (GETPOST("button_removefilter"))
|
if (GETPOST("button_removefilter"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,14 +27,15 @@ 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/adherent.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$langs->load("companies");
|
||||||
$id=GETPOST('id','int');
|
$langs->load("members");
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("members");
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
if (!$user->rights->adherent->lire) accessforbidden();
|
$action=GETPOST('action','alpha');
|
||||||
|
$id=GETPOST('id','int');
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$result=restrictedArea($user,'adherent',$id);
|
||||||
|
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
@@ -49,7 +50,7 @@ if ($result > 0)
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@@ -174,7 +175,7 @@ if ($id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ if ($mode)
|
|||||||
$data = array();
|
$data = array();
|
||||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
|
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, c.code, c.libelle as label";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_pays as c on d.pays = c.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY c.libelle, c.code";
|
$sql.=" GROUP BY c.libelle, c.code";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
@@ -88,7 +89,8 @@ if ($mode)
|
|||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c on d.fk_departement = c.rowid";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r on c.fk_region = r.code_region";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
$sql.=" GROUP BY p.libelle, p.code, c.nom";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
@@ -102,7 +104,8 @@ if ($mode)
|
|||||||
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
|
$sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
|
$sql.=" FROM ".MAIN_DB_PREFIX."adherent as d";
|
||||||
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
$sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid";
|
||||||
$sql.=" WHERE d.statut = 1";
|
$sql.=" WHERE d.entity IN (".getEntity().")";
|
||||||
|
$sql.=" AND d.statut = 1";
|
||||||
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
$sql.=" GROUP BY p.libelle, p.code, d.ville";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -49,8 +49,8 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) { $sortorder="DESC"; }
|
if (! $sortorder) { $sortorder="DESC"; }
|
||||||
if (! $sortfield) { $sortfield="d.nom"; }
|
if (! $sortfield) { $sortfield="d.nom"; }
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->rights->adherent->lire) accessforbidden();
|
$result=restrictedArea($user,'adherent',$rowid,'adherent_type');
|
||||||
|
|
||||||
if (GETPOST('button_removefilter'))
|
if (GETPOST('button_removefilter'))
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,8 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
|
|
||||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||||
|
$sql.= " WHERE d.entity IN (".getEntity().")";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@@ -267,10 +268,8 @@ if ($rowid > 0)
|
|||||||
if ($action != 'edit')
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$adht->id = $rowid;
|
|
||||||
$adht->fetch($rowid);
|
$adht->fetch($rowid);
|
||||||
|
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?rowid='.$adht->id;
|
||||||
@@ -344,7 +343,7 @@ if ($rowid > 0)
|
|||||||
$sql.= " t.libelle as type, t.cotisation";
|
$sql.= " t.libelle as type, t.cotisation";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
|
||||||
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
$sql.= " WHERE d.fk_adherent_type = t.rowid ";
|
||||||
$sql.= " AND d.entity = ".$conf->entity;
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
$sql.= " AND t.rowid = ".$adht->id;
|
$sql.= " AND t.rowid = ".$adht->id;
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -112,7 +112,7 @@ $dirbarcode=array_merge(array("/core/modules/barcode/"),$conf->barcode_modules);
|
|||||||
|
|
||||||
foreach($dirbarcode as $reldir)
|
foreach($dirbarcode as $reldir)
|
||||||
{
|
{
|
||||||
$dir=dol_buildpath($reldir,0);
|
$dir=dol_buildpath($reldir);
|
||||||
$newdir=dol_osencode($dir);
|
$newdir=dol_osencode($dir);
|
||||||
|
|
||||||
// Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php)
|
// Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php)
|
||||||
@@ -334,4 +334,4 @@ dol_htmloutput_mesg($mesg);
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
|
|||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
$langs->load("orders");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@@ -759,7 +759,7 @@ else
|
|||||||
// Forme juridique
|
// Forme juridique
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
|
||||||
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1);
|
print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// ProfId1
|
// ProfId1
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ if (!$user->admin) accessforbidden();
|
|||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$value=GETPOST('value','alpha');
|
$value=GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
|
||||||
$scandir = GETPOST('scandir','alpha');
|
|
||||||
$type='shipping';
|
|
||||||
|
|
||||||
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
||||||
{
|
{
|
||||||
@@ -53,59 +50,6 @@ if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($action == 'updateMask')
|
|
||||||
{
|
|
||||||
$maskconst=GETPOST('maskconstexpedition','alpha');
|
|
||||||
$maskvalue=GETPOST('maskexpedition','alpha');
|
|
||||||
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'set_SHIPPING_FREE_TEXT')
|
|
||||||
{
|
|
||||||
$freetext=GETPOST('SHIPPING_FREE_TEXT','alpha');
|
|
||||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
|
||||||
{
|
|
||||||
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'specimen')
|
if ($action == 'specimen')
|
||||||
{
|
{
|
||||||
$modele=GETPOST('module','alpha');
|
$modele=GETPOST('module','alpha');
|
||||||
@@ -118,11 +62,11 @@ if ($action == 'specimen')
|
|||||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||||
foreach($dirmodels as $reldir)
|
foreach($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
$file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php",0);
|
$file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_expedition_".$modele.".modules.php",0);
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
$filefound=1;
|
$filefound=1;
|
||||||
$classname = "pdf_".$modele;
|
$classname = "pdf_expedition_".$modele;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,8 +84,8 @@ if ($action == 'specimen')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<font class="error">'.$obj->error.'</font>';
|
$mesg='<font class="error">'.$module->error.'</font>';
|
||||||
dol_syslog($obj->error, LOG_ERR);
|
dol_syslog($module->error, LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -154,13 +98,30 @@ if ($action == 'specimen')
|
|||||||
// Activate a model
|
// Activate a model
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
$label = GETPOST('label','alpha');
|
||||||
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
|
$type='shipping';
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
|
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
||||||
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
|
$sql.= ")";
|
||||||
|
if ($db->query($sql))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'del')
|
if ($action == 'del')
|
||||||
{
|
{
|
||||||
$ret = delDocumentModel($value, $type);
|
$type='shipping';
|
||||||
if ($ret > 0)
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql.= " WHERE nom = '".$db->escape($value)."'";
|
||||||
|
$sql.= " AND type = '".$type."'";
|
||||||
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
|
if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
|
||||||
}
|
}
|
||||||
@@ -169,18 +130,37 @@ if ($action == 'del')
|
|||||||
// Set default model
|
// Set default model
|
||||||
if ($action == 'setdoc')
|
if ($action == 'setdoc')
|
||||||
{
|
{
|
||||||
|
$label = GETPOST('label','alpha');
|
||||||
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
{
|
{
|
||||||
// La constante qui a ete lue en avant du nouveau set
|
|
||||||
// on passe donc par une variable pour avoir un affichage coherent
|
|
||||||
$conf->global->EXPEDITION_ADDON_PDF = $value;
|
$conf->global->EXPEDITION_ADDON_PDF = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On active le modele
|
// On active le modele
|
||||||
$ret = delDocumentModel($value, $type);
|
$type='shipping';
|
||||||
if ($ret > 0)
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql_del.= " WHERE nom = '".$db->escape($value)."'";
|
||||||
|
$sql_del.= " AND type = '".$type."'";
|
||||||
|
$sql_del.= " AND entity = ".$conf->entity;
|
||||||
|
$result1=$db->query($sql_del);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
|
$sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", ";
|
||||||
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
|
$sql.= ")";
|
||||||
|
$result2=$db->query($sql);
|
||||||
|
if ($result1 && $result2)
|
||||||
{
|
{
|
||||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,8 +240,28 @@ if ($action == 'setmod')
|
|||||||
// TODO Verifier si module numerotation choisi peut etre active
|
// TODO Verifier si module numerotation choisi peut etre active
|
||||||
// par appel methode canBeActivated
|
// par appel methode canBeActivated
|
||||||
|
|
||||||
dolibarr_set_const($db, "EXPEDITION_ADDON",$value,'chaine',0,'',$conf->entity);
|
$module=GETPOST('module','alpha');
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "EXPEDITION_ADDON",$module,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'updateMask')
|
||||||
|
{
|
||||||
|
$maskconst=GETPOST('maskconstexpedition','alpha');
|
||||||
|
$maskvalue=GETPOST('maskexpedition','alpha');
|
||||||
|
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setmodel')
|
if ($action == 'setmodel')
|
||||||
@@ -269,6 +269,39 @@ if ($action == 'setmodel')
|
|||||||
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_SHIPPING_DRAFT_WATERMARK')
|
||||||
|
{
|
||||||
|
$draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
|
||||||
|
$res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_SHIPPING_FREE_TEXT')
|
||||||
|
{
|
||||||
|
$free=GETPOST('SHIPPING_FREE_TEXT','alpha');
|
||||||
|
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
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).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
print '<td align="center">'."\n";
|
print '<td align="center">'."\n";
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -543,7 +543,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td align=\"center\">\n";
|
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.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
else
|
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.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ foreach($modules as $const => $desc)
|
|||||||
|
|
||||||
if (GETPOST('save','alpha'))
|
if (GETPOST('save','alpha'))
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield','alpha'),'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if ($res > 0) $mesg=$langs->trans("RecordModifiedSuccessfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -103,56 +105,64 @@ print '<br>';
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
if (empty($conf->use_javascript_ajax))
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
|
||||||
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
// Modules
|
|
||||||
foreach($modules as $const => $desc)
|
|
||||||
{
|
{
|
||||||
// Si condition non remplie, on ne propose pas l'option
|
dol_htmloutput_errors('',array($langs->trans("NotAvailable"),$langs->trans("JavascriptDisabled")),1);
|
||||||
if (! $conditions[$const]) continue;
|
|
||||||
|
|
||||||
$var=!$var;
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
|
|
||||||
print '<td>'.$langs->trans($desc).'</td>';
|
|
||||||
print '<td align="center" width="100">';
|
|
||||||
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
|
||||||
$value = $conf->global->$constante;
|
|
||||||
if($value == 0)
|
|
||||||
{
|
|
||||||
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
|
||||||
}
|
|
||||||
else if($value == 1)
|
|
||||||
{
|
|
||||||
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</td>";
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
||||||
|
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
print '</table>'."\n";
|
// Modules
|
||||||
|
foreach($modules as $const => $desc)
|
||||||
|
{
|
||||||
|
// Si condition non remplie, on ne propose pas l'option
|
||||||
|
if (! $conditions[$const]) continue;
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
|
||||||
|
print '<td>'.$langs->trans($desc).'</td>';
|
||||||
|
print '<td align="center" width="100">';
|
||||||
|
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
||||||
|
$value = $conf->global->$constante;
|
||||||
|
if($value == 0)
|
||||||
|
{
|
||||||
|
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
|
}
|
||||||
|
else if($value == 1)
|
||||||
|
{
|
||||||
|
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<br>'."\n";
|
print "</td>";
|
||||||
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
print '</tr>';
|
||||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
}
|
||||||
$uselocalbrowser=true;
|
|
||||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
|
|
||||||
$editor->Create();
|
|
||||||
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
|
||||||
print '</form>'."\n";
|
|
||||||
|
|
||||||
/*
|
print '</table>'."\n";
|
||||||
print '<!-- Result -->';
|
|
||||||
print $_POST["formtestfield"];
|
dol_htmloutput_mesg($mesg);
|
||||||
print '<!-- Result -->';
|
|
||||||
print $conf->global->FCKEDITOR_TEST;
|
print '<br>'."\n";
|
||||||
*/
|
print_fiche_titre($langs->trans("TestSubmitForm"),'','');
|
||||||
|
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
|
$uselocalbrowser=true;
|
||||||
|
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true, $uselocalbrowser);
|
||||||
|
$editor->Create();
|
||||||
|
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
/*
|
||||||
|
print '<!-- Result -->';
|
||||||
|
print $_POST["formtestfield"];
|
||||||
|
print '<!-- Result -->';
|
||||||
|
print $conf->global->FCKEDITOR_TEST;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ if ($action == 'updateMask')
|
|||||||
{
|
{
|
||||||
$maskconstorder=GETPOST('maskconstorder','alpha');
|
$maskconstorder=GETPOST('maskconstorder','alpha');
|
||||||
$maskorder=GETPOST('maskorder','alpha');
|
$maskorder=GETPOST('maskorder','alpha');
|
||||||
|
|
||||||
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity);
|
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
@@ -76,7 +76,7 @@ if ($action == 'specimen') // For orders
|
|||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
$commande->initAsSpecimen();
|
$commande->initAsSpecimen();
|
||||||
$commande->thirdparty=$specimenthirdparty;
|
$commande->thirdparty=$specimenthirdparty;
|
||||||
|
|
||||||
// Search template files
|
// Search template files
|
||||||
$file=''; $classname=''; $filefound=0;
|
$file=''; $classname=''; $filefound=0;
|
||||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||||
@@ -90,13 +90,13 @@ if ($action == 'specimen') // For orders
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($filefound)
|
if ($filefound)
|
||||||
{
|
{
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
$module = new $classname($db);
|
$module = new $classname($db,$commande);
|
||||||
|
|
||||||
if ($module->write_file($commande,$langs) > 0)
|
if ($module->write_file($commande,$langs) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
|
||||||
@@ -122,7 +122,7 @@ if ($action == 'specimenfacture') // For invoices
|
|||||||
$facture = new FactureFournisseur($db);
|
$facture = new FactureFournisseur($db);
|
||||||
$facture->initAsSpecimen();
|
$facture->initAsSpecimen();
|
||||||
$facture->thirdparty=$specimenthirdparty; // Define who should has build the invoice (so the supplier)
|
$facture->thirdparty=$specimenthirdparty; // Define who should has build the invoice (so the supplier)
|
||||||
|
|
||||||
// Search template files
|
// Search template files
|
||||||
$file=''; $classname=''; $filefound=0;
|
$file=''; $classname=''; $filefound=0;
|
||||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||||
@@ -136,13 +136,13 @@ if ($action == 'specimenfacture') // For invoices
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($filefound)
|
if ($filefound)
|
||||||
{
|
{
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
$module = new $classname($db);
|
$module = new $classname($db,$facture);
|
||||||
|
|
||||||
if ($module->write_file($facture,$langs) > 0)
|
if ($module->write_file($facture,$langs) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
|
||||||
@@ -165,7 +165,7 @@ if ($action == 'set')
|
|||||||
{
|
{
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
||||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
@@ -197,7 +197,7 @@ if ($action == 'setdoc')
|
|||||||
{
|
{
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if ($type == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
if ($type == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ print "<br>\n";
|
|||||||
|
|
||||||
if ($action == 'edit') // Edit
|
if ($action == 'edit') // Edit
|
||||||
{
|
{
|
||||||
|
//WYSIWYG Editor
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
@@ -132,12 +135,10 @@ if ($action == 'edit') // Edit
|
|||||||
|
|
||||||
print '</table><br>'."\n";
|
print '</table><br>'."\n";
|
||||||
|
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
show_theme('',1);
|
show_theme('',1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Liste des zone de recherche permanantes supportees
|
// Liste des zone de recherche permanantes supportees
|
||||||
print '<table summary="search" class="noborder" width="100%">';
|
print '<table summary="search" class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
|
||||||
@@ -218,7 +219,7 @@ if ($action == 'edit') // Edit
|
|||||||
|
|
||||||
// Hide wiki link on login page
|
// Hide wiki link on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
||||||
print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
print $form->selectyesno('MAIN_HELP_DISABLELINK',isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
@@ -227,18 +228,19 @@ if ($action == 'edit') // Edit
|
|||||||
// Message on login page
|
// Message on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||||
// Editeur wysiwyg
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
$doleditor = new DolEditor('main_home', $conf->global->MAIN_HOME, '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90);
|
||||||
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Message of the day on home page
|
// Message of the day on home page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
$doleditor = new DolEditor('main_motd', $conf->global->MAIN_MOTD, '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -366,7 +368,7 @@ else // Show
|
|||||||
|
|
||||||
// Link to wiki help
|
// Link to wiki help
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/common/helpdoc.png','',1)).'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
||||||
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE',GETPOST("type"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("version"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION',GETPOST("LDAP_SERVER_PROTOCOLVERSION"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST',GETPOST("host"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE',GETPOST("slave"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++;
|
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT',GETPOST("port"),'chaine',0,'',$conf->entity)) $error++;
|
||||||
@@ -169,7 +169,7 @@ print '<tr '.$bc[$var].'><td>'.$langs->trans("Version").'</td><td>';
|
|||||||
$arraylist=array();
|
$arraylist=array();
|
||||||
$arraylist['3']='Version 3';
|
$arraylist['3']='Version 3';
|
||||||
$arraylist['2']='Version 2';
|
$arraylist['2']='Version 2';
|
||||||
print $form->selectarray('version',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
||||||
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
|
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
|
||||||
|
|
||||||
// Serveur primaire
|
// Serveur primaire
|
||||||
|
|||||||
@@ -41,15 +41,17 @@ $action = GETPOST('action','alpha');
|
|||||||
if ($action == 'setvalue' && $user->admin)
|
if ($action == 'setvalue' && $user->admin)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
$mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha');
|
||||||
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
||||||
|
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@@ -101,11 +103,31 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
|
|||||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
/*
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("ActivateCheckRead").'</td><td>';
|
||||||
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1)
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
|
||||||
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml']))
|
|||||||
$result = dol_delete_file($pathtodelete,1);
|
$result = dol_delete_file($pathtodelete,1);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>';
|
$langs->load("other");
|
||||||
|
$message = '<div class="ok">'.$langs->trans("FileWasRemoved",$filetodelete).'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php');
|
||||||
@@ -210,7 +211,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
|
|||||||
$body=make_substitutions($body,$substitutionarrayfortest);
|
$body=make_substitutions($body,$substitutionarrayfortest);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
|
||||||
$mailfile = new CMailFile(
|
$mailfile = new CMailFile(
|
||||||
$subject,
|
$subject,
|
||||||
$sendto,
|
$sendto,
|
||||||
$email_from,
|
$email_from,
|
||||||
@@ -223,7 +224,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
|
|||||||
$deliveryreceipt,
|
$deliveryreceipt,
|
||||||
$msgishtml,
|
$msgishtml,
|
||||||
$errors_to
|
$errors_to
|
||||||
);
|
);
|
||||||
|
|
||||||
$result=$mailfile->sendfile();
|
$result=$mailfile->sendfile();
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
@@ -79,37 +80,13 @@ $db->begin();
|
|||||||
|
|
||||||
// Charge les modules soumis a permissions
|
// Charge les modules soumis a permissions
|
||||||
$modules = array();
|
$modules = array();
|
||||||
$modulesdir = array();
|
$modulesdir = dolGetModulesDirs();
|
||||||
|
|
||||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
|
||||||
{
|
|
||||||
$modulesdir[] = $dirroot . "/core/modules/";
|
|
||||||
|
|
||||||
if ($type == 'alt')
|
|
||||||
{
|
|
||||||
$handle=@opendir($dirroot);
|
|
||||||
if (is_resource($handle))
|
|
||||||
{
|
|
||||||
while (($file = readdir($handle))!==false)
|
|
||||||
{
|
|
||||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
|
||||||
{
|
|
||||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
|
||||||
{
|
|
||||||
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($modulesdir as $dir)
|
foreach ($modulesdir as $dir)
|
||||||
{
|
{
|
||||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||||
//print $dir."\n<br>";
|
//print $dir."\n<br>";
|
||||||
$handle=@opendir($dir);
|
$handle=@opendir(dol_osencode($dir));
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
@@ -135,7 +112,6 @@ foreach ($modulesdir as $dir)
|
|||||||
if ($objMod->rights_class)
|
if ($objMod->rights_class)
|
||||||
{
|
{
|
||||||
$ret=$objMod->insert_permissions(0);
|
$ret=$objMod->insert_permissions(0);
|
||||||
|
|
||||||
$modules[$objMod->rights_class]=$objMod;
|
$modules[$objMod->rights_class]=$objMod;
|
||||||
//print "modules[".$objMod->rights_class."]=$objMod;";
|
//print "modules[".$objMod->rights_class."]=$objMod;";
|
||||||
}
|
}
|
||||||
@@ -151,7 +127,7 @@ $db->commit();
|
|||||||
$sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault";
|
$sql = "SELECT r.id, r.libelle, r.module, r.perms, r.subperms, r.bydefault";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
$sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
|
$sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous"
|
||||||
$sql.= " AND entity in (".(!empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
$sql.= " AND entity IN (".(! empty($conf->multicompany->transverse_mode)?"1,":"").$conf->entity.")";
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled
|
||||||
$sql.= " ORDER BY r.module, r.id";
|
$sql.= " ORDER BY r.module, r.id";
|
||||||
|
|
||||||
|
|||||||
@@ -222,13 +222,13 @@ foreach ($dirmodels as $reldir)
|
|||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->PROJECT_ADDON == $classname)
|
if ($conf->global->PROJECT_ADDON == 'mod_'.$classname)
|
||||||
{
|
{
|
||||||
print img_picto($langs->trans("Activated"),'switch_on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ print '<td>'.$langs->trans("ConnectionTimeout").'</td><td align="right">';
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_USE_CONNECT_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_CONNECT_TIMEOUT.'">';
|
print '<input class="flat" name="MAIN_USE_CONNECT_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_CONNECT_TIMEOUT.'">';
|
||||||
print ' '.$langs->trans("seconds");
|
print ' '.strtolower($langs->trans("Seconds"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ print '<td>'.$langs->trans("ResponseTimeout").'</td><td align="right">';
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_RESPONSE_TIMEOUT.'">';
|
print '<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_RESPONSE_TIMEOUT.'">';
|
||||||
print ' '.$langs->trans("seconds");
|
print ' '.strtolower($langs->trans("Seconds"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
$result=dol_mkdir($upload_dir); // Create dir if not exists
|
$result=dol_mkdir($upload_dir); // Create dir if not exists
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],1,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1,0,$_FILES['userfile']['error']);
|
||||||
|
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@ print '<td>'.$langs->trans("SessionTimeOut").'</td><td align="right">';
|
|||||||
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.$langs->trans("seconds");
|
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
@@ -178,14 +178,14 @@ $var=true;
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>';
|
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_FILE_ON" '.$option.' value="1" '.($syslog_file_on?' checked="checked"':'').'> '.$langs->trans("SyslogSimpleFile").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">';
|
print '<td nowrap="nowrap">'.$langs->trans("SyslogFilename").': <input type="text" class="flat" name="filename" '.$option.' size="60" value="'.$defaultsyslogfile.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT"));
|
print "<td align=\"left\">".$form->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>';
|
print '<tr '.$bc[$var].'><td width="140"><input '.$bc[$var].' type="checkbox" name="SYSLOG_SYSLOG_ON" '.$option.' value="1" '.($syslog_syslog_on?' checked="checked"':'').'> '.$langs->trans("SyslogSyslog").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">';
|
print '<td nowrap="nowrap">'.$langs->trans("SyslogFacility").': <input type="text" class="flat" name="facility" '.$option.' value="'.$defaultsyslogfacility.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows');
|
print "<td align=\"left\">".$form->textwithpicto('','Only LOG_USER supported on Windows');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -202,7 +202,7 @@ try
|
|||||||
if (! class_exists('FirePHP')) print ' disabled="disabled"';
|
if (! class_exists('FirePHP')) print ' disabled="disabled"';
|
||||||
else print ($syslog_firephp_on?' checked="checked"':"");
|
else print ($syslog_firephp_on?' checked="checked"':"");
|
||||||
print '> '.$langs->trans("FirePHP").'</td>';
|
print '> '.$langs->trans("FirePHP").'</td>';
|
||||||
print '<td width="250" nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed');
|
print "<td align=\"left\">".$form->textwithpicto('','FirePHP must be installed onto PHP and FirePHP plugin for Firefox must also be installed');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -232,7 +232,7 @@ print '<td align="right"><input type="submit" class="button" '.$option.' value="
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width=\"140\">'.$langs->trans("SyslogLevel").'</td>';
|
print '<tr '.$bc[$var].'><td width="140">'.$langs->trans("SyslogLevel").'</td>';
|
||||||
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
|
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
|
||||||
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>';
|
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL==LOG_EMERG?'SELECTED':'').'>LOG_EMERG ('.LOG_EMERG.')</option>';
|
||||||
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>';
|
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL==LOG_ALERT?'SELECTED':'').'>LOG_ALERT ('.LOG_ALERT.')</option>';
|
||||||
|
|||||||
@@ -157,10 +157,16 @@ $txt =$langs->trans("OSTZ").' (variable system TZ): '.($_ENV["TZ"]?$_ENV["TZ"]:$
|
|||||||
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
$txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
||||||
$a=getServerTimeZoneString();
|
$a=getServerTimeZoneInt('now');
|
||||||
$a.=' '.(getServerTimeZoneInt()>=0?'+':'').getServerTimeZoneInt();
|
$b=getServerTimeZoneInt('winter');
|
||||||
$a.=' ('.(getServerTimeZoneInt()>=0?'+':'').(getServerTimeZoneInt()*3600).')';
|
$c=getServerTimeZoneInt('summer');
|
||||||
print $form->textwithtooltip($a,$txt,2,1,img_info(''));
|
$daylight=(is_numeric($c) && is_numeric($b))?round($c-$b):'unknown';
|
||||||
|
//print $a." ".$b." ".$c." ".$daylight;
|
||||||
|
$val=($a>=0?'+':'').$a;
|
||||||
|
$val.=' ('.($a==='unknown'?'unknown':($a>=0?'+':'').($a*3600)).')';
|
||||||
|
$val.=' '.getServerTimeZoneString().' '.($b>=0?'+':'').$b.' ('.($b>=0?'+':'').($b*3600).')';
|
||||||
|
$val.=' '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':yn($daylight));
|
||||||
|
print $form->textwithtooltip($val,$txt,2,1,img_info(''));
|
||||||
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="300"> => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n";
|
print '<tr '.$bc[$var].'><td width="300"> => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now(),'dayhour','tzserver').'</td></tr>'."\n";
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ print "<br>\n";
|
|||||||
|
|
||||||
// Php
|
// Php
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Php")."</td></tr>\n";
|
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("PHP")."</td></tr>\n";
|
||||||
$phpversion=version_php();
|
$phpversion=version_php();
|
||||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
print "<tr $bc[0]><td width=\"280\">".$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
||||||
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
|
print "<tr $bc[1]><td>".$langs->trans("PhpWebLink")."</td><td>".php_sapi_name()."</td></tr>\n";
|
||||||
|
|||||||
@@ -47,29 +47,30 @@ $modules = array();
|
|||||||
$modules_names = array();
|
$modules_names = array();
|
||||||
$modules_files = array();
|
$modules_files = array();
|
||||||
|
|
||||||
|
// Search modules dirs
|
||||||
|
$modulesdir = array();
|
||||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||||
{
|
{
|
||||||
$modulesdir[] = $dirroot . "/core/modules/";
|
$modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
|
||||||
|
|
||||||
if ($type == 'alt')
|
$handle=@opendir($dirroot);
|
||||||
{
|
if (is_resource($handle))
|
||||||
$handle=@opendir($dirroot);
|
{
|
||||||
if (is_resource($handle))
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
$modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
|
||||||
{
|
}
|
||||||
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
|
}
|
||||||
}
|
}
|
||||||
}
|
closedir($handle);
|
||||||
}
|
}
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//var_dump($modulesdir);
|
||||||
|
|
||||||
|
|
||||||
// Load list of modules
|
// Load list of modules
|
||||||
foreach($modulesdir as $dir)
|
foreach($modulesdir as $dir)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ if ($what == 'mysql')
|
|||||||
if (! empty($dolibarr_main_db_pass))
|
if (! empty($dolibarr_main_db_pass))
|
||||||
{
|
{
|
||||||
$paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"';
|
$paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"';
|
||||||
$paramclear.=' -p"'.str_replace('"','\"',$dolibarr_main_db_pass).'"';
|
$paramclear.=' -p"'.str_replace(array('"','`'),array('\"','\`'),$dolibarr_main_db_pass).'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
|
print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
|
|||||||
|
|
||||||
|
|
||||||
$urldolibarr='http://www.dolibarr.org/downloads/';
|
$urldolibarr='http://www.dolibarr.org/downloads/';
|
||||||
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
|
|
||||||
$urldolibarrmodules='http://www.dolistore.com/';
|
$urldolibarrmodules='http://www.dolistore.com/';
|
||||||
//$urldolibarrthemes='http://www.dolibarr.org/';
|
|
||||||
$urldolibarrthemes='http://www.dolistore.com/';
|
$urldolibarrthemes='http://www.dolistore.com/';
|
||||||
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
||||||
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
||||||
@@ -141,4 +139,4 @@ print $langs->trans("SetupIsReadyForUse").'<br>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ $workflowcodes=array();
|
|||||||
$workflow=array(
|
$workflow=array(
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER')
|
'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_ORDER')
|
||||||
|
//,'invoice' => array('WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER')
|
||||||
),
|
),
|
||||||
'invoice' => array (
|
'invoice' => array (
|
||||||
'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')
|
'order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')
|
||||||
@@ -87,14 +88,14 @@ $workflow=array(
|
|||||||
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
|
//, 'propal' => array('WORKFLOW_PROPAL_AUTOCREATE_INVOICE')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$workflow = array_merge($workflow, $conf->modules_parts['workflow']);
|
if (! empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) $workflow = array_merge($workflow, $conf->modules_parts['workflow']);
|
||||||
|
|
||||||
foreach($workflow as $child => $parents)
|
foreach($workflow as $child => $parents)
|
||||||
{
|
{
|
||||||
if ($conf->$child->enabled)
|
if ($conf->$child->enabled)
|
||||||
{
|
{
|
||||||
$langs->Load($child.'@'.$child);
|
$langs->Load($child.'@'.$child);
|
||||||
|
|
||||||
foreach($parents as $parent => $actions)
|
foreach($parents as $parent => $actions)
|
||||||
{
|
{
|
||||||
if ($conf->$parent->enabled)
|
if ($conf->$parent->enabled)
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ print '<tr><td valign="top" width="40%" class="notopnoleft">';
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/* Chiffre d'affaire
|
/* Chiffre d'affaires
|
||||||
*/
|
*/
|
||||||
//print_barre_liste("Chiffre d'affaire", $page, "ca.php");
|
//print_barre_liste("Chiffre d'affaires", $page, "ca.php");
|
||||||
|
|
||||||
print_titre($langs->trans('SalesTurnover'));
|
print_titre($langs->trans('SalesTurnover'));
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ if ($id || $ref)
|
|||||||
$objecttype = 'adherent&categorie';
|
$objecttype = 'adherent&categorie';
|
||||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||||
$dbtablename = 'adherent';
|
$dbtablename = 'adherent';
|
||||||
$fieldid = isset($ref)?'ref':'rowid';
|
$fieldid = ! empty($ref)?'ref':'rowid';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -889,17 +889,14 @@ class Categorie
|
|||||||
}
|
}
|
||||||
else // mother_id undefined (so it's root)
|
else // mother_id undefined (so it's root)
|
||||||
{
|
{
|
||||||
/* We have to select any rowid from llx_categorie which which category's type and label
|
/* We have to select any rowid from llx_categorie that is not at root level
|
||||||
* are equals to those of the calling category, AND which doesn't exist in categorie association
|
*/
|
||||||
* as children (rowid != fk_categorie_fille)
|
$sql = "SELECT c.rowid";
|
||||||
*/
|
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c ";
|
||||||
$sql = "SELECT c.rowid";
|
$sql.= " WHERE c.type=".$this->type;
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c ";
|
$sql.= " AND c.label='".$this->db->escape($this->label)."'";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."categorie_association as ca";
|
$sql.= " AND c.entity IN (".getEntity('category',1).")";
|
||||||
$sql.= " ON c.rowid!=ca.fk_categorie_fille";
|
$sql.= " AND c.rowid NOT IN (SELECT ca.fk_categorie_fille FROM ".MAIN_DB_PREFIX."categorie_association as ca)";
|
||||||
$sql.= " WHERE c.type=".$this->type;
|
|
||||||
$sql.= " AND c.label='".$this->db->escape($this->label)."'";
|
|
||||||
$sql.= " AND c.entity IN (".getEntity('category',1).")";
|
|
||||||
}
|
}
|
||||||
dol_syslog(get_class($this)."::already_exists sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::already_exists sql=".$sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/cactioncomm.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/actioncomm.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||||
|
|
||||||
@@ -67,17 +68,24 @@ if (! $sortfield) $sortfield="name";
|
|||||||
*/
|
*/
|
||||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
|
||||||
|
|
||||||
// Creation repertoire si n'existe pas
|
// Creation repertoire si n'existe pas
|
||||||
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid);
|
||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ if ($action == 'create')
|
|||||||
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">';
|
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add_action">';
|
print '<input type="hidden" name="action" value="add_action">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1') ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||||
|
|
||||||
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
|
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
|
||||||
else print_fiche_titre($langs->trans("AddAnAction"));
|
else print_fiche_titre($langs->trans("AddAnAction"));
|
||||||
@@ -447,7 +447,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>';
|
||||||
|
|
||||||
// Full day
|
// Full day
|
||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
$datep=$actioncomm->datep;
|
$datep=$actioncomm->datep;
|
||||||
@@ -673,7 +673,7 @@ if ($id)
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
|
print '<input type="hidden" name="ref_ext" value="'.$act->ref_ext.'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.((! empty($backtopage) && $backtopage != '1')? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1'? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@@ -687,7 +687,7 @@ if ($id)
|
|||||||
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>';
|
||||||
|
|
||||||
// Full day event
|
// Full day event
|
||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
|
||||||
@@ -741,7 +741,7 @@ if ($id)
|
|||||||
|
|
||||||
// Contact
|
// Contact
|
||||||
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
|
||||||
print $form->selectarray("contactid", $act->societe->contact_array(), $act->contact->id, 1);
|
print $form->selectarray("contactid", (empty($act->societe->id)?array():$act->societe->contact_array()), $act->contact->id, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ if ($action=='delete_action')
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
|
$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||||
llxHeader('',$langs->trans("Agenda"),$help_url);
|
llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
@@ -744,11 +744,13 @@ if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), arr
|
|||||||
if (empty($action) || $action == 'show_month') // View by month
|
if (empty($action) || $action == 'show_month') // View by month
|
||||||
{
|
{
|
||||||
$newparam=$param; // newparam is for birthday links
|
$newparam=$param; // newparam is for birthday links
|
||||||
|
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
|
||||||
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
||||||
echo '<table width="100%" class="nocellnopadd">';
|
echo '<table width="100%" class="nocellnopadd">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@@ -810,11 +812,13 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
elseif ($action == 'show_week') // View by week
|
elseif ($action == 'show_week') // View by week
|
||||||
{
|
{
|
||||||
$newparam=$param; // newparam is for birthday links
|
$newparam=$param; // newparam is for birthday links
|
||||||
|
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
|
||||||
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
|
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
|
||||||
echo '<table width="100%" class="nocellnopadd">';
|
echo '<table width="100%" class="nocellnopadd">';
|
||||||
echo ' <tr class="liste_titre">';
|
echo ' <tr class="liste_titre">';
|
||||||
$i=0;
|
$i=0;
|
||||||
@@ -866,9 +870,6 @@ else // View by day
|
|||||||
$newparam=$param; // newparam is for birthday links
|
$newparam=$param; // newparam is for birthday links
|
||||||
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
|
||||||
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
|
|
||||||
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
|
|
||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
|
||||||
// Code to show just one day
|
// Code to show just one day
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
$today=0;
|
$today=0;
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ $object = new Address($db);
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Cancel
|
// Cancel
|
||||||
if (GETPOST("cancel") && ! empty($backtopage))
|
if (GETPOST("cancel") && ! empty($backtopage))
|
||||||
{
|
{
|
||||||
header("Location: ".$backtopage);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' || $action == 'update')
|
if ($action == 'add' || $action == 'update')
|
||||||
@@ -80,7 +80,7 @@ if ($action == 'add' || $action == 'update')
|
|||||||
{
|
{
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
{
|
{
|
||||||
Header("Location: ".$backtopage);
|
Header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else if ($origin == 'commande')
|
else if ($origin == 'commande')
|
||||||
@@ -93,10 +93,10 @@ if ($action == 'add' || $action == 'update')
|
|||||||
Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
|
Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
elseif ($origin == 'shipment')
|
elseif ($origin == 'shipment')
|
||||||
{
|
{
|
||||||
Header("Location: ../expedition/fiche.php?id=".$originid);
|
Header("Location: ../expedition/fiche.php?id=".$originid);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -118,10 +118,10 @@ if ($action == 'add' || $action == 'update')
|
|||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
{
|
{
|
||||||
Header("Location: ".$backtopage);
|
Header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else if ($origin == 'commande')
|
else if ($origin == 'commande')
|
||||||
{
|
{
|
||||||
@@ -286,10 +286,10 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<br><center>';
|
print '<br><center>';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans('Add').'">';
|
print '<input type="submit" class="button" value="'.$langs->trans('Add').'">';
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
}
|
}
|
||||||
print '</center>'."\n";
|
print '</center>'."\n";
|
||||||
|
|
||||||
@@ -384,10 +384,10 @@ elseif ($action == 'edit')
|
|||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
print '<center>';
|
print '<center>';
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@@ -87,14 +87,14 @@ if ($action == 'setcustomeraccountancycode')
|
|||||||
if ($action == 'setconditions' && $user->rights->societe->creer)
|
if ($action == 'setconditions' && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
// mode de reglement
|
// mode de reglement
|
||||||
if ($action == 'setmode' && $user->rights->societe->creer)
|
if ($action == 'setmode' && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
$result=$object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
// assujetissement a la TVA
|
// assujetissement a la TVA
|
||||||
@@ -796,10 +796,10 @@ if ($id > 0)
|
|||||||
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Addresses list
|
// Addresses list
|
||||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
|
||||||
{
|
{
|
||||||
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||||
|
|||||||
@@ -151,13 +151,26 @@ if ($action == 'delete')
|
|||||||
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
|
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{ //on récurpére l'id du mailing
|
||||||
$file = $dirmod."/modules_mailings.php";
|
$id = GETPOST('id','int');
|
||||||
$classname = "MailingTargets";
|
|
||||||
require_once($file);
|
|
||||||
|
|
||||||
$obj = new $classname($db);
|
if (!empty($id))
|
||||||
$obj->update_nb($id);
|
{
|
||||||
|
$file = $dirmod."/modules_mailings.php";
|
||||||
|
$classname = "MailingTargets";
|
||||||
|
require_once($file);
|
||||||
|
|
||||||
|
$obj = new $classname($db);
|
||||||
|
$obj->update_nb($id);
|
||||||
|
|
||||||
|
Header("Location: cibles.php?id=".$id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ $substitutionarray=array(
|
|||||||
'__SIGNATURE__' => 'Signature',
|
'__SIGNATURE__' => 'Signature',
|
||||||
'__PERSONALIZED__' => 'Personalized'
|
'__PERSONALIZED__' => 'Personalized'
|
||||||
);
|
);
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarray=array_merge(
|
$substitutionarray=array_merge(
|
||||||
$substitutionarray,
|
$substitutionarray,
|
||||||
array(
|
array(
|
||||||
'__CHECK_READ__' => 'CheckMail',
|
'__CHECK_READ__' => 'CheckMail',
|
||||||
'__UNSUSCRIBE__' => 'Unsuscribe'
|
'__UNSUBSCRIBE__' => 'Unsubscribe'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,15 +81,15 @@ $substitutionarrayfortest=array(
|
|||||||
'__SIGNATURE__' => 'TESTSignature',
|
'__SIGNATURE__' => 'TESTSignature',
|
||||||
'__PERSONALIZED__' => 'TESTPersonalized'
|
'__PERSONALIZED__' => 'TESTPersonalized'
|
||||||
);
|
);
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarrayfortest=array_merge(
|
$substitutionarrayfortest=array_merge(
|
||||||
$substitutionarrayfortest,
|
$substitutionarrayfortest,
|
||||||
array(
|
array(
|
||||||
'__CHECK_READ__' => 'TESTCheckMail',
|
'__CHECK_READ__' => 'TESTCheckMail',
|
||||||
'__UNSUSCRIBE__' => 'TESTCheckMail'
|
'__UNSUBSCRIBE__' => 'TESTUnsubscribe'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action clone object
|
// Action clone object
|
||||||
@@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
|||||||
'__ID__' => $obj->source_id,
|
'__ID__' => $obj->source_id,
|
||||||
'__EMAIL__' => $obj->email,
|
'__EMAIL__' => $obj->email,
|
||||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
|
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="0" height="0" style="width:0px;height:0px" border="0"/>',
|
||||||
'__UNSUSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||||
'__LASTNAME__' => $obj->nom,
|
'__LASTNAME__' => $obj->nom,
|
||||||
'__FIRSTNAME__' => $obj->prenom,
|
'__FIRSTNAME__' => $obj->prenom,
|
||||||
'__OTHER1__' => $other1,
|
'__OTHER1__' => $other1,
|
||||||
@@ -547,60 +547,60 @@ if ($action == 'update' && empty($_POST["removedfile"]) && empty($_POST["cancel"
|
|||||||
|
|
||||||
// Action confirmation validation
|
// Action confirmation validation
|
||||||
if ($action == 'confirm_valid' && $confirm == 'yes')
|
if ($action == 'confirm_valid' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id) >= 0)
|
if ($object->fetch($id) >= 0)
|
||||||
{
|
{
|
||||||
$object->valid($user);
|
$object->valid($user);
|
||||||
|
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resend
|
// Resend
|
||||||
if ($action == 'confirm_reset' && $confirm == 'yes')
|
if ($action == 'confirm_reset' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id) >= 0)
|
if ($object->fetch($id) >= 0)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$result=$object->valid($user);
|
$result=$object->valid($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$result=$object->reset_targets_status($user);
|
$result=$object->reset_targets_status($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg=$object->error;
|
$mesg=$object->error;
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action confirmation suppression
|
// Action confirmation suppression
|
||||||
if ($action == 'confirm_delete' && $confirm == 'yes')
|
if ($action == 'confirm_delete' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
if ($object->delete($object->id))
|
if ($object->delete($object->id))
|
||||||
{
|
{
|
||||||
Header("Location: liste.php");
|
Header("Location: liste.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -681,14 +681,12 @@ else
|
|||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm reset
|
// Confirm reset
|
||||||
else if ($action == 'reset')
|
else if ($action == 'reset')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirm delete
|
// Confirm delete
|
||||||
else if ($action == 'delete')
|
else if ($action == 'delete')
|
||||||
{
|
{
|
||||||
@@ -696,7 +694,8 @@ else
|
|||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action != 'edit')
|
|
||||||
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Mailing en mode visu
|
* Mailing en mode visu
|
||||||
@@ -747,12 +746,12 @@ else
|
|||||||
|
|
||||||
// From
|
// From
|
||||||
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||||
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
print $form->editfieldval("MailFrom",'email_from',$object->email_from,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Errors to
|
// Errors to
|
||||||
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
print '<tr><td>'.$form->editfieldkey("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string').'</td><td colspan="3">';
|
||||||
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'string');
|
print $form->editfieldval("MailErrorsTo",'email_errorsto',$object->email_errorsto,$object,$user->rights->mailing->creer && $object->statut < 3,'email');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
@@ -763,7 +762,7 @@ else
|
|||||||
print $langs->trans("TotalNbOfDistinctRecipients");
|
print $langs->trans("TotalNbOfDistinctRecipients");
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if ($object->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||||
{
|
{
|
||||||
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
|
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
|
||||||
{
|
{
|
||||||
@@ -955,9 +954,13 @@ else
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Ref
|
||||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
||||||
|
// Topic
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$object->titre.'</td></tr>';
|
||||||
|
// From
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailFrom").'</td><td colspan="3">'.dol_print_email($object->email_from,0,0,0,0,1).'</td></tr>';
|
||||||
|
// To
|
||||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td colspan="3">'.dol_print_email($object->email_errorsto,0,0,0,0,1).'</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
@@ -1043,10 +1046,10 @@ else
|
|||||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||||
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
||||||
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
||||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
||||||
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
print '__UNSUBSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
||||||
}
|
}
|
||||||
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
|
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
|
||||||
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
|
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -155,7 +155,7 @@ if ($result)
|
|||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$nbemail = $obj->nbemail;
|
$nbemail = $obj->nbemail;
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||||
{
|
{
|
||||||
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||||
print $form->textwithpicto($nbemail,$text,1,'warning');
|
print $form->textwithpicto($nbemail,$text,1,'warning');
|
||||||
@@ -192,7 +192,7 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ $result = restrictedArea($user, $module, $objectid, $dbtable);
|
|||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id, $ref);
|
$ret=$object->fetch($id, $ref);
|
||||||
}
|
}
|
||||||
@@ -136,6 +136,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
|
|||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->propale->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@@ -153,29 +154,29 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->prop
|
|||||||
// Remove line
|
// Remove line
|
||||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->propale->creer)
|
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
$result = $object->deleteline($lineid);
|
$result = $object->deleteline($lineid);
|
||||||
// reorder lines
|
// reorder lines
|
||||||
if ($result) $object->line_order(true);
|
if ($result) $object->line_order(true);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang='';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id); // Reload to get new records
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||||
}
|
}
|
||||||
|
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,18 +248,18 @@ else if ($action == 'set_ref_client' && $user->rights->propale->creer)
|
|||||||
$object->set_ref_client($user, $_POST['ref_client']);
|
$object->set_ref_client($user, $_POST['ref_client']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote_public' && $user->rights->propale->creer)
|
else if ($action == 'setnote_public' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->propale->creer)
|
else if ($action == 'setnote' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create proposal
|
// Create proposal
|
||||||
@@ -834,6 +835,7 @@ else if ($action == "addline" && $user->rights->propale->creer)
|
|||||||
unset($_POST['np_price']);
|
unset($_POST['np_price']);
|
||||||
unset($_POST['dp_desc']);
|
unset($_POST['dp_desc']);
|
||||||
unset($_POST['np_tva_tx']);
|
unset($_POST['np_tva_tx']);
|
||||||
|
unset($_POST['np_desc']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -950,6 +952,23 @@ else if ($action == 'builddoc' && $user->rights->propale->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove file in doc form
|
||||||
|
else if ($action == 'remove_file')
|
||||||
|
{
|
||||||
|
if ($object->fetch($id))
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
$langs->load("other");
|
||||||
|
$upload_dir = $conf->propal->dir_output;
|
||||||
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
|
dol_delete_file($file,0,0,0,$object);
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set project
|
// Set project
|
||||||
else if ($action == 'classin' && $user->rights->propale->creer)
|
else if ($action == 'classin' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
@@ -1047,63 +1066,63 @@ else if ($action == 'down' && $user->rights->propale->creer)
|
|||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
if ($action == 'addcontact' && $user->rights->propale->creer)
|
if ($action == 'addcontact' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bascule du statut d'un contact
|
// Bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut' && $user->rights->propale->creer)
|
else if ($action == 'swapstatut' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
if ($object->fetch($id) > 0)
|
if ($object->fetch($id) > 0)
|
||||||
{
|
{
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact' && $user->rights->propale->creer)
|
else if ($action == 'deletecontact' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1146,7 +1165,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
//'text' => $langs->trans("ConfirmClone"),
|
//'text' => $langs->trans("ConfirmClone"),
|
||||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||||
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)'))
|
array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=2 OR s.client=3)'))
|
||||||
);
|
);
|
||||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||||
@@ -1542,19 +1561,19 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||||
$formcompany= new FormCompany($db);
|
$formcompany= new FormCompany($db);
|
||||||
|
|
||||||
$blocname = 'contacts';
|
$blocname = 'contacts';
|
||||||
$title = $langs->trans('ContactsAddresses');
|
$title = $langs->trans('ContactsAddresses');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
{
|
{
|
||||||
$blocname = 'notes';
|
$blocname = 'notes';
|
||||||
$title = $langs->trans('Notes');
|
$title = $langs->trans('Notes');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
@@ -1886,9 +1905,9 @@ else
|
|||||||
{
|
{
|
||||||
$sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'";
|
$sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'";
|
||||||
}
|
}
|
||||||
if ($search_refcustomer)
|
if ($search_refcustomer)
|
||||||
{
|
{
|
||||||
$sql.= " AND p.ref_client LIKE '%".$db->escape(trim($search_refcustomer))."%'";
|
$sql.= " AND p.ref_client LIKE '%".$db->escape(trim($search_refcustomer))."%'";
|
||||||
}
|
}
|
||||||
if ($search_societe)
|
if ($search_societe)
|
||||||
{
|
{
|
||||||
@@ -1961,8 +1980,8 @@ else
|
|||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
|
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" colspan="1" align="center">';
|
print '<td class="liste_titre" colspan="1" align="center">';
|
||||||
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
print $langs->trans('Month').': <input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||||
@@ -2002,7 +2021,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
if ($objp->fk_statut == 1 && $objp->dfv < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
if ($objp->fk_statut == 1 && $db->jdate($objp->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
@@ -2028,10 +2047,10 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $companystatic->getNomUrl(1,'customer');
|
print $companystatic->getNomUrl(1,'customer');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Customer ref
|
// Customer ref
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
print $objp->ref_client;
|
print $objp->ref_client;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Date propale
|
// Date propale
|
||||||
|
|||||||
@@ -969,7 +969,7 @@ class Propal extends CommonObject
|
|||||||
$sql.= ", p.fk_cond_reglement";
|
$sql.= ", p.fk_cond_reglement";
|
||||||
$sql.= ", p.fk_mode_reglement";
|
$sql.= ", p.fk_mode_reglement";
|
||||||
$sql.= ", c.label as statut_label";
|
$sql.= ", c.label as statut_label";
|
||||||
$sql.= ", ca.code as availability_code, ca.label as availability";
|
$sql.= ", ca.code as availability_code, ca.label as availability";
|
||||||
$sql.= ", dr.code as demand_reason_code, dr.label as demand_reason";
|
$sql.= ", dr.code as demand_reason_code, dr.label as demand_reason";
|
||||||
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc";
|
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc";
|
||||||
$sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement";
|
$sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement";
|
||||||
@@ -1588,6 +1588,7 @@ class Propal extends CommonObject
|
|||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
$this->statut = 0;
|
$this->statut = 0;
|
||||||
|
$this->brouillon = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1800,16 +1801,16 @@ class Propal extends CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// We remove directory
|
// We remove directory
|
||||||
$propalref = dol_sanitizeFileName($this->ref);
|
$ref = dol_sanitizeFileName($this->ref);
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propalref ;
|
$dir = $conf->propal->dir_output . "/" . $ref ;
|
||||||
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
$file = $dir . "/" . $ref . ".pdf";
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
dol_delete_preview($this);
|
dol_delete_preview($this);
|
||||||
|
|
||||||
if (!dol_delete_file($file))
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
{
|
{
|
||||||
$this->error='ErrorFailToDeleteFile';
|
$this->error='ErrorFailToDeleteFile';
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -1818,7 +1819,7 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
$res=@dol_delete_dir($dir);
|
$res=@dol_delete_dir_recursive($dir);
|
||||||
if (! $res)
|
if (! $res)
|
||||||
{
|
{
|
||||||
$this->error='ErrorFailToDeleteDir';
|
$this->error='ErrorFailToDeleteDir';
|
||||||
|
|||||||
@@ -110,11 +110,11 @@ else if ($action == 'deletecontact' && $user->rights->propale->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setaddress' && $user->rights->propale->creer)
|
else if ($action == 'setaddress' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->setDeliveryAddress($_POST['fk_address']);
|
$result=$object->setDeliveryAddress($_POST['fk_address']);
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -174,27 +174,27 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
// Delivery address
|
// Delivery address
|
||||||
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
|
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('DeliveryAddress');
|
print $langs->trans('DeliveryAddress');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&socid='.$object->socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
|
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&socid='.$object->socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
|
|
||||||
if ($action == 'editdelivery_address')
|
if ($action == 'editdelivery_address')
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -28,15 +28,23 @@ require("../../main.inc.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/propal.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
|
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
$langs->load('other');
|
$langs->load('other');
|
||||||
|
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm','alpha');
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref','alpha');
|
||||||
|
|
||||||
|
$mesg='';
|
||||||
|
if (isset($_SESSION['DolMessage']))
|
||||||
|
{
|
||||||
|
$mesg=$_SESSION['DolMessage'];
|
||||||
|
unset($_SESSION['DolMessage']);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
@@ -58,6 +66,11 @@ if (! $sortorder) $sortorder="ASC";
|
|||||||
if (! $sortfield) $sortfield="name";
|
if (! $sortfield) $sortfield="name";
|
||||||
|
|
||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
|
$object->fetch($id,$ref);
|
||||||
|
if ($object->id > 0)
|
||||||
|
{
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@@ -66,7 +79,7 @@ $object = new Propal($db);
|
|||||||
// Envoi fichier
|
// Envoi fichier
|
||||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
@@ -74,10 +87,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -102,14 +124,16 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
// Delete
|
// Delete
|
||||||
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$langs->load("other");
|
||||||
|
|
||||||
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
|
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,83 +146,73 @@ llxHeader();
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
if ($object->fetch($id,$ref))
|
$upload_dir = $conf->propal->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||||
{
|
|
||||||
$object->fetch_thirdparty();
|
$head = propal_prepare_head($object);
|
||||||
|
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal');
|
||||||
$upload_dir = $conf->propal->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
|
||||||
|
|
||||||
$head = propal_prepare_head($object);
|
// Construit liste des fichiers
|
||||||
dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal');
|
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
|
$totalsize=0;
|
||||||
|
foreach($filearray as $key => $file)
|
||||||
// Construit liste des fichiers
|
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
|
||||||
$totalsize=0;
|
|
||||||
foreach($filearray as $key => $file)
|
|
||||||
{
|
|
||||||
$totalsize+=$file['size'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border"width="100%">';
|
|
||||||
|
|
||||||
$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder".'">'.$langs->trans("BackToList").'</a>';
|
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
|
||||||
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Ref client
|
|
||||||
print '<tr><td>';
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
|
||||||
print '</td>';
|
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
print $object->ref_client;
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Customer
|
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg,$mesgs);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Confirmation suppression fichier
|
|
||||||
*/
|
|
||||||
if ($action == 'delete')
|
|
||||||
{
|
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
|
||||||
if ($ret == 'html') print '<br>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
|
||||||
$formfile=new FormFile($db);
|
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer);
|
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
|
||||||
$param='&id='.$object->id;
|
|
||||||
$formfile->list_of_documents($filearray,$object,'propal',$param);
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print '<table class="border"width="100%">';
|
||||||
|
|
||||||
|
$linkback='<a href="'.DOL_URL_ROOT.'/comm/propal.php'."?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder".'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||||
|
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Ref client
|
||||||
|
print '<tr><td>';
|
||||||
|
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
||||||
|
print $langs->trans('RefCustomer').'</td><td align="left">';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr></table>';
|
||||||
|
print '</td><td colspan="3">';
|
||||||
|
print $object->ref_client;
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Customer
|
||||||
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
|
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
dol_htmloutput_mesg($mesg,$mesgs);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Confirmation suppression fichier
|
||||||
|
*/
|
||||||
|
if ($action == 'delete')
|
||||||
|
{
|
||||||
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
|
if ($ret == 'html') print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche formulaire upload
|
||||||
|
$formfile=new FormFile($db);
|
||||||
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id,'',0,0,$user->rights->propale->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
|
// List of document
|
||||||
|
$param='&id='.$object->id;
|
||||||
|
$formfile->list_of_documents($filearray,$object,'propal',$param);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -48,9 +48,10 @@ if ($user->societe_id > 0)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$propalstatic=new Propal($db);
|
$propalstatic=new Propal($db);
|
||||||
|
$companystatic=new Societe($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos";
|
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo_Presupuestos";
|
||||||
|
|
||||||
llxHeader("",$langs->trans("ProspectionArea"),$help_url);
|
llxHeader("",$langs->trans("ProspectionArea"),$help_url);
|
||||||
|
|
||||||
@@ -155,7 +156,7 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($conf->propal->enabled)
|
if ($conf->propal->enabled)
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@@ -182,9 +183,18 @@ if ($conf->propal->enabled)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td nowrap="nowrap">';
|
|
||||||
print "<a href=".DOL_URL_ROOT."/comm/propal.php?id=".$obj->rowid.">".img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref."</a></td>";
|
$propalstatic->id=$obj->rowid;
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
$propalstatic->ref=$obj->ref;
|
||||||
|
print '<td nowrap="nowrap">'.$propalstatic->getNomUrl(1).'</td>';
|
||||||
|
|
||||||
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td>'.$companystatic->getNomUrl(1,'customer',24).'</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -201,7 +211,7 @@ $max=5;
|
|||||||
* Last modified proposals
|
* Last modified proposals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid,";
|
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,";
|
||||||
$sql.= " date_cloture as datec";
|
$sql.= " date_cloture as datec";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
@@ -255,7 +265,12 @@ if ($resql)
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
|
||||||
|
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
|
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@@ -274,7 +289,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
{
|
{
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@@ -324,8 +339,13 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
|||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
$companystatic->id=$obj->socid;
|
||||||
|
$companystatic->name=$obj->socname;
|
||||||
|
$companystatic->client=$obj->client;
|
||||||
|
$companystatic->canvas=$obj->canvas;
|
||||||
|
print '<td align="left">'.$companystatic->getNomUrl(1,'customer',44).'</td>'."\n";
|
||||||
|
|
||||||
print '<td align="left"><a href="fiche.php?socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,44).'</a></td>'."\n";
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
|
||||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||||
|
|||||||
@@ -47,18 +47,18 @@ $object = new Propal($db);
|
|||||||
/* Actions */
|
/* Actions */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
if ($action == 'setnote_public' && $user->rights->propale->creer)
|
if ($action == 'setnote_public' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->propale->creer)
|
else if ($action == 'setnote' && $user->rights->propale->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -66,7 +67,6 @@ $stats = new PropaleStats($db, $socid, $userid);
|
|||||||
|
|
||||||
// Build graphic number of object
|
// Build graphic number of object
|
||||||
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
|
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
|
||||||
//var_dump($data);
|
|
||||||
// $data = array(array('Lib',val1,val2,val3),...)
|
// $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
|
||||||
|
|
||||||
@@ -110,7 +110,6 @@ if (! $mesg)
|
|||||||
|
|
||||||
// Build graphic amount of object
|
// Build graphic amount of object
|
||||||
$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
|
$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
|
||||||
//var_dump($data);
|
|
||||||
// $data = array(array('Lib',val1,val2,val3),...)
|
// $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
@@ -151,13 +150,7 @@ if (! $mesg)
|
|||||||
$px2->draw($filenameamount,$fileurlamount);
|
$px2->draw($filenameamount,$fileurlamount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$res = $stats->getAverageByMonth($year);
|
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -177,8 +170,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i=$startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
@@ -220,34 +212,36 @@ complete_head_from_modules($conf,$langs,$object,$head,$h,'propal_stats');
|
|||||||
|
|
||||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||||
|
|
||||||
|
if (empty($socid))
|
||||||
|
{
|
||||||
|
print '<table class="notopnoleftnopadd" width="100%"><tr>';
|
||||||
|
print '<td align="center" valign="top">';
|
||||||
|
|
||||||
print '<table class="notopnoleftnopadd" width="100%"><tr>';
|
// Show filter box
|
||||||
print '<td align="center" valign="top">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
// Show filter box
|
print '<table class="border" width="100%">';
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
// Company
|
||||||
print '<table class="border" width="100%">';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
$filter='s.client in (1,2,3)';
|
||||||
// Company
|
print $form->select_company($socid,'socid',$filter,1);
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '</td></tr>';
|
||||||
$filter='s.client in (1,2,3)';
|
// User
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
||||||
print '</td></tr>';
|
print $form->select_users($userid,'userid',1);
|
||||||
// User
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
// Year
|
||||||
print $form->select_users($userid,'userid',1);
|
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||||
print '</td></tr>';
|
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||||
// Year
|
arsort($arrayyears);
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print $form->selectarray('year',$arrayyears,$year,0);
|
||||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
print '</td></tr>';
|
||||||
arsort($arrayyears);
|
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||||
print $form->selectarray('year',$arrayyears,$year,0);
|
print '</table>';
|
||||||
print '</td></tr>';
|
print '</form>';
|
||||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
print '<br><br>';
|
||||||
print '</table>';
|
}
|
||||||
print '</form>';
|
|
||||||
print '<br><br>';
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
dol_syslog("Rename ok");
|
dol_syslog("Rename ok");
|
||||||
// Suppression ancien fichier PDF dans nouveau rep
|
// Suppression ancien fichier PDF dans nouveau rep
|
||||||
dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'.*');
|
dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'*.*');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -620,7 +620,7 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
// $date_commande is deprecated
|
// $date_commande is deprecated
|
||||||
$date = ($this->date_commande ? $this->date_commande : $this->date);
|
$date = ($this->date_commande ? $this->date_commande : $this->date);
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@@ -684,7 +684,7 @@ class Commande extends CommonObject
|
|||||||
$this->lines[$i]->remise_percent,
|
$this->lines[$i]->remise_percent,
|
||||||
$this->lines[$i]->info_bits,
|
$this->lines[$i]->info_bits,
|
||||||
$this->lines[$i]->fk_remise_except,
|
$this->lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$this->lines[$i]->date_start,
|
$this->lines[$i]->date_start,
|
||||||
$this->lines[$i]->date_end,
|
$this->lines[$i]->date_end,
|
||||||
@@ -923,13 +923,13 @@ class Commande extends CommonObject
|
|||||||
$this->note_public = $object->note_public;
|
$this->note_public = $object->note_public;
|
||||||
|
|
||||||
$this->origin = $object->element;
|
$this->origin = $object->element;
|
||||||
$this->origin_id = $object->id;
|
$this->origin_id = $object->id;
|
||||||
|
|
||||||
// Possibility to add external linked objects with hooks
|
// Possibility to add external linked objects with hooks
|
||||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||||
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
||||||
{
|
{
|
||||||
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
|
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $this->create($user);
|
$ret = $this->create($user);
|
||||||
@@ -939,7 +939,7 @@ class Commande extends CommonObject
|
|||||||
// Actions hooked (by external module)
|
// Actions hooked (by external module)
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
}
|
}
|
||||||
$hookmanager->initHooks(array('orderdao'));
|
$hookmanager->initHooks(array('orderdao'));
|
||||||
@@ -1234,13 +1234,11 @@ class Commande extends CommonObject
|
|||||||
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
|
||||||
$sql.= ', ca.code as availability_code';
|
$sql.= ', ca.code as availability_code';
|
||||||
$sql.= ', dr.code as demand_reason_code';
|
$sql.= ', dr.code as demand_reason_code';
|
||||||
$sql.= ', el.fk_source';
|
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON (c.fk_availability = ca.rowid)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON (c.fk_demand_reason = ca.rowid)';
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = c.rowid AND el.targettype = '".$this->element."'";
|
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||||
if ($id) $sql.= " AND c.rowid=".$id;
|
if ($id) $sql.= " AND c.rowid=".$id;
|
||||||
if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'";
|
if ($ref) $sql.= " AND c.ref='".$this->db->escape($ref)."'";
|
||||||
@@ -1292,7 +1290,6 @@ class Commande extends CommonObject
|
|||||||
$this->demand_reason_code = $obj->demand_reason_code;
|
$this->demand_reason_code = $obj->demand_reason_code;
|
||||||
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
||||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||||
$this->propale_id = $obj->fk_source;
|
|
||||||
|
|
||||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||||
|
|
||||||
@@ -1302,22 +1299,6 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
$this->db->free();
|
$this->db->free();
|
||||||
|
|
||||||
if ($this->propale_id)
|
|
||||||
{
|
|
||||||
$sqlp = "SELECT ref";
|
|
||||||
$sqlp.= " FROM ".MAIN_DB_PREFIX."propal";
|
|
||||||
$sqlp.= " WHERE rowid = ".$this->propale_id;
|
|
||||||
|
|
||||||
$resqlprop = $this->db->query($sqlp);
|
|
||||||
|
|
||||||
if ($resqlprop)
|
|
||||||
{
|
|
||||||
$objp = $this->db->fetch_object($resqlprop);
|
|
||||||
$this->propale_ref = $objp->ref;
|
|
||||||
$this->db->free($resqlprop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lines
|
* Lines
|
||||||
*/
|
*/
|
||||||
@@ -2088,11 +2069,16 @@ class Commande extends CommonObject
|
|||||||
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;';
|
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;';
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
if (($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1) && $this->propale_id)
|
if (! empty($conf->propal->enabled) && ! empty($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER))
|
||||||
{
|
{
|
||||||
$propal = new Propal($this->db);
|
$this->fetchObjectLinked('','propal',$this->id,$this->element);
|
||||||
$propal->fetch($this->propale_id);
|
if (! empty($this->linkedObjects))
|
||||||
$propal->classer_facturee();
|
{
|
||||||
|
foreach($this->linkedObjects['propal'] as $element)
|
||||||
|
{
|
||||||
|
$ret=$element->classer_facturee();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -2124,7 +2110,7 @@ class Commande extends CommonObject
|
|||||||
* @param int $skip_update_total Skip update of total
|
* @param int $skip_update_total Skip update of total
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@@ -2304,7 +2290,7 @@ class Commande extends CommonObject
|
|||||||
{
|
{
|
||||||
dol_delete_preview($this);
|
dol_delete_preview($this);
|
||||||
|
|
||||||
if (!dol_delete_file($file))
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2313,7 +2299,7 @@ class Commande extends CommonObject
|
|||||||
}
|
}
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
if (!dol_delete_dir($dir))
|
if (! dol_delete_dir_recursive($dir))
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
@@ -2363,7 +2349,8 @@ class Commande extends CommonObject
|
|||||||
$clause = " AND";
|
$clause = " AND";
|
||||||
}
|
}
|
||||||
$sql.= $clause." c.entity = ".$conf->entity;
|
$sql.= $clause." c.entity = ".$conf->entity;
|
||||||
$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
|
//$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
|
||||||
|
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||||
if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
|
if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@@ -2444,7 +2431,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort');
|
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort');
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort');
|
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort');
|
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort');
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$langs->trans('StatusOrderSentShort');
|
if ($statut==2) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort');
|
||||||
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
|
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
|
||||||
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort');
|
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort');
|
||||||
}
|
}
|
||||||
@@ -2462,7 +2449,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled');
|
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled');
|
||||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft');
|
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft');
|
||||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated');
|
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated');
|
||||||
if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderOnProcess');
|
if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderSent');
|
||||||
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
|
if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
|
||||||
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed');
|
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed');
|
||||||
}
|
}
|
||||||
@@ -2471,7 +2458,7 @@ class Commande extends CommonObject
|
|||||||
if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5');
|
||||||
if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
||||||
if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
||||||
if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3');
|
||||||
if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
|
if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
|
||||||
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,8 +29,7 @@ include_once DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php";
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CommandeStats
|
* Class to manage order statistics
|
||||||
* \brief Classe permettant la gestion des stats des commandes
|
|
||||||
*/
|
*/
|
||||||
class CommandeStats extends Stats
|
class CommandeStats extends Stats
|
||||||
{
|
{
|
||||||
@@ -46,7 +46,7 @@ class CommandeStats extends Stats
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param int $socid Id third party for filter
|
* @param int $socid Id third party for filter
|
||||||
* @param string $mode Option
|
* @param string $mode Option
|
||||||
* @param int $userid Id user for filter
|
* @param int $userid Id user for filter
|
||||||
@@ -66,7 +66,7 @@ class CommandeStats extends Stats
|
|||||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
||||||
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$this->field='total_ht';
|
$this->field='total_ht';
|
||||||
$this->where.= " c.fk_statut > 0";
|
$this->where.= " c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
@@ -74,7 +74,7 @@ class CommandeStats extends Stats
|
|||||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
|
||||||
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
$this->field='total_ht';
|
$this->field='total_ht';
|
||||||
$this->where.= " c.fk_statut > 0";
|
$this->where.= " c.fk_statut > 2"; // Only approved & ordered
|
||||||
}
|
}
|
||||||
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
||||||
|
|
||||||
@@ -97,10 +97,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, count(*) nb";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -119,7 +119,7 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%Y') as dm, count(*), sum(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%Y') as dm, count(*), sum(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
@@ -140,10 +140,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, sum(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -162,10 +162,10 @@ class CommandeStats extends Stats
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%m') as dm, avg(c.".$this->field.")";
|
$sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE date_format(c.date_valid,'%Y') = '".$year."'";
|
$sql.= " WHERE date_format(c.date_commande,'%Y') = '".$year."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
$sql.= $this->db->order('dm','DESC');
|
$sql.= $this->db->order('dm','DESC');
|
||||||
@@ -182,7 +182,7 @@ class CommandeStats extends Stats
|
|||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$sql = "SELECT date_format(c.date_valid,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg";
|
$sql = "SELECT date_format(c.date_commande,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ else if ($action == 'deletecontact' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setaddress' && $user->rights->commande->creer)
|
else if ($action == 'setaddress' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->setDeliveryAddress($_POST['fk_address']);
|
$object->setDeliveryAddress($_POST['fk_address']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -173,27 +173,27 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
// Delivery address
|
// Delivery address
|
||||||
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
|
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('DeliveryAddress');
|
print $langs->trans('DeliveryAddress');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&socid='.$object->socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
|
if ($action != 'editdelivery_address' && $object->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_address&socid='.$object->socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
|
|
||||||
if ($action == 'editdelivery_address')
|
if ($action == 'editdelivery_address')
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','commande',$object->id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id);
|
$formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','commande',$object->id);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php");
|
||||||
|
|
||||||
@@ -39,6 +40,13 @@ $confirm = GETPOST('confirm');
|
|||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
|
$mesg='';
|
||||||
|
if (isset($_SESSION['DolMessage']))
|
||||||
|
{
|
||||||
|
$mesg=$_SESSION['DolMessage'];
|
||||||
|
unset($_SESSION['DolMessage']);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -58,7 +66,6 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="name";
|
if (! $sortfield) $sortfield="name";
|
||||||
|
|
||||||
|
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
|
|
||||||
|
|
||||||
@@ -77,10 +84,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -103,16 +119,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
else if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$langs->load("other");
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
|
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,13 +185,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$object->id,'',0,0,$user->rights->commande->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -58,12 +58,18 @@ $confirm = GETPOST('confirm');
|
|||||||
$lineid = GETPOST('lineid');
|
$lineid = GETPOST('lineid');
|
||||||
$mesg = GETPOST('mesg');
|
$mesg = GETPOST('mesg');
|
||||||
|
|
||||||
$object = new Commande($db);
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$id,'');
|
$result=restrictedArea($user,'commande',$id,'');
|
||||||
|
|
||||||
|
$object = new Commande($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
@@ -128,6 +134,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
if ($user->rights->commande->supprimer)
|
if ($user->rights->commande->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@@ -464,7 +471,28 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db,$object->error);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
|
{
|
||||||
|
// Define output language
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang=GETPOST('lang_id','alpha');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("",$conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
|
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
||||||
@@ -479,18 +507,18 @@ else if ($action == 'setremiseabsolue' && $user->rights->commande->creer)
|
|||||||
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote_public' && $user->rights->commande->creer)
|
else if ($action == 'setnote_public' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->commande->creer)
|
else if ($action == 'setnote' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -996,10 +1024,13 @@ else if ($action == 'remove_file')
|
|||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
$langs->load("other");
|
||||||
$upload_dir = $conf->commande->dir_output;
|
$upload_dir = $conf->commande->dir_output;
|
||||||
$file = $upload_dir . '/' . $_GET['file'];
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
dol_delete_file($file);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1191,64 +1222,64 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
if ($action == 'addcontact' && $user->rights->commande->creer)
|
if ($action == 'addcontact' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// bascule du statut d'un contact
|
// bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut' && $user->rights->commande->creer)
|
else if ($action == 'swapstatut' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact' && $user->rights->commande->creer)
|
else if ($action == 'deletecontact' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1271,6 +1302,9 @@ $formorder = new FormOrder($db);
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
if ($action == 'create' && $user->rights->commande->creer)
|
if ($action == 'create' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
|
//WYSIWYG Editor
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||||
|
|
||||||
print_fiche_titre($langs->trans('CreateOrder'));
|
print_fiche_titre($langs->trans('CreateOrder'));
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg,$mesgs,'error');
|
dol_htmloutput_mesg($mesg,$mesgs,'error');
|
||||||
@@ -1457,13 +1491,12 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
|
print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
|
||||||
// Note publique
|
// Note publique
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
//print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
|
//print '<textarea name="note_public" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_public.'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -1474,8 +1507,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
$doleditor = new DolEditor('note', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
//print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
|
//print '<textarea name="note" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'</textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -2016,24 +2049,24 @@ else
|
|||||||
print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
|
print '<td colspan="2">'.$object->getLibStatut(4).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||||
$formcompany= new FormCompany($db);
|
$formcompany= new FormCompany($db);
|
||||||
|
|
||||||
$blocname = 'contacts';
|
$blocname = 'contacts';
|
||||||
$title = $langs->trans('ContactsAddresses');
|
$title = $langs->trans('ContactsAddresses');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
{
|
{
|
||||||
$blocname = 'notes';
|
$blocname = 'notes';
|
||||||
$title = $langs->trans('Notes');
|
$title = $langs->trans('Notes');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if ($user->societe_id > 0)
|
|||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo Pedidos de clientes";
|
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||||
|
|
||||||
llxHeader("",$langs->trans("Orders"),$help_url);
|
llxHeader("",$langs->trans("Orders"),$help_url);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@@ -108,12 +108,13 @@ if ($viewstatut <> '')
|
|||||||
}
|
}
|
||||||
if ($viewstatut == -2) // To process
|
if ($viewstatut == -2) // To process
|
||||||
{
|
{
|
||||||
$sql .= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
||||||
|
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($ordermonth > 0)
|
if ($ordermonth > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'";
|
$sql.= " AND date_format(c.date_valid, '%Y-%m') = '".$orderyear."-".$ordermonth."'"; // TODO do not use date_format but a between
|
||||||
}
|
}
|
||||||
if ($orderyear > 0)
|
if ($orderyear > 0)
|
||||||
{
|
{
|
||||||
@@ -178,7 +179,7 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&socid='.$socid.'&viewstatut='.$viewstatut,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('RefCustomerOrder'),'liste.php','c.ref_client','','&socid='.$socid.'&viewstatut='.$viewstatut,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('OrderDate'),'liste.php','c.date_commande','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('DeliveryDate'),'liste.php','c.date_livraison','','&socid='.$socid.'&viewstatut='.$viewstatut, 'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&socid='.$socid.'&viewstatut='.$viewstatut,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Status'),'liste.php','c.fk_statut','','&socid='.$socid.'&viewstatut='.$viewstatut,'align="right"',$sortfield,$sortorder);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="get" action="liste.php">';
|
print '<form method="get" action="liste.php">';
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -168,12 +170,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = $stats->getAverageByMonth($year);
|
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -193,8 +190,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i=$startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
@@ -240,34 +236,37 @@ complete_head_from_modules($conf,$langs,$object,$head,$h,$type);
|
|||||||
|
|
||||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||||
|
|
||||||
print '<table class="notopnoleftnopadd" width="100%"><tr>';
|
if (empty($socid))
|
||||||
print '<td align="center" valign="top">';
|
{
|
||||||
|
print '<table class="notopnoleftnopadd" width="100%"><tr>';
|
||||||
|
print '<td align="center" valign="top">';
|
||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
print '<tr><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||||
// Company
|
// Company
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print $form->select_company($socid,'socid',$filter,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
print '<tr><td>'.$langs->trans("User").'/'.$langs->trans("SalesRepresentative").'</td><td>';
|
||||||
print $form->select_users($userid,'userid',1);
|
print $form->select_users($userid,'userid',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||||
arsort($arrayyears);
|
arsort($arrayyears);
|
||||||
print $form->selectarray('year',$arrayyears,$year,0);
|
print $form->selectarray('year',$arrayyears,$year,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ $fieldtype = (! empty($ref) ? 'ref' :'rowid');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
|
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
|
||||||
|
|
||||||
|
$paiementtype=GETPOST('paiementtype','alpha',3);
|
||||||
$req_nb=GETPOST("req_nb",'',3);
|
$req_nb=GETPOST("req_nb",'',3);
|
||||||
$thirdparty=GETPOST("thirdparty",'',3);
|
$thirdparty=GETPOST("thirdparty",'',3);
|
||||||
$vline=GETPOST("vline");
|
$vline=GETPOST("vline");
|
||||||
@@ -78,17 +79,17 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
|
|||||||
{
|
{
|
||||||
$amount = - price2num($_POST["debit"]);
|
$amount = - price2num($_POST["debit"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
|
$dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
|
||||||
$operation=$_POST["operation"];
|
$operation=$_POST["operation"];
|
||||||
$num_chq=$_POST["num_chq"];
|
$num_chq=$_POST["num_chq"];
|
||||||
$label=$_POST["label"];
|
$label=$_POST["label"];
|
||||||
$cat1=$_POST["cat1"];
|
$cat1=$_POST["cat1"];
|
||||||
|
|
||||||
if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date"));
|
if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date"));
|
||||||
if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
|
if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
|
||||||
if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
|
if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
|
||||||
|
|
||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@@ -143,15 +144,15 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result=$object->fetch($id, $ref);
|
$result=$object->fetch($id, $ref);
|
||||||
|
|
||||||
// Chargement des categories bancaires dans $options
|
// Chargement des categories bancaires dans $options
|
||||||
$nbcategories=0;
|
$nbcategories=0;
|
||||||
|
|
||||||
$sql = "SELECT rowid, label";
|
$sql = "SELECT rowid, label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY label";
|
$sql.= " ORDER BY label";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@@ -168,7 +169,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Definition de sql_rech et param
|
// Definition de sql_rech et param
|
||||||
$param='';
|
$param='';
|
||||||
$sql_rech='';
|
$sql_rech='';
|
||||||
@@ -203,13 +204,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$param.='&thirdparty='.urlencode($thirdparty);
|
$param.='&thirdparty='.urlencode($thirdparty);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
if (GETPOST("paiementtype"))
|
if ($paiementtype)
|
||||||
{
|
{
|
||||||
$sql_rech.=" AND b.fk_type = '".$db->escape(GETPOST("paiementtype"))."'";
|
$sql_rech.=" AND b.fk_type = '".$db->escape($paiementtype)."'";
|
||||||
$param.='&paiementtype='.urlencode(GETPOST("paiementtype"));
|
$param.='&paiementtype='.urlencode($paiementtype);
|
||||||
$mode_search = 1;
|
$mode_search = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT count(*) as nb";
|
$sql = "SELECT count(*) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
|
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
|
||||||
@@ -222,7 +223,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$sql.= " AND b.fk_account = ba.rowid";
|
$sql.= " AND b.fk_account = ba.rowid";
|
||||||
$sql.= " AND ba.entity = ".$conf->entity;
|
$sql.= " AND ba.entity = ".$conf->entity;
|
||||||
$sql.= $sql_rech;
|
$sql.= $sql_rech;
|
||||||
|
|
||||||
dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG);
|
dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@@ -230,7 +231,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
$nbline = $obj->nb;
|
$nbline = $obj->nb;
|
||||||
$total_lines = $nbline;
|
$total_lines = $nbline;
|
||||||
|
|
||||||
if ($nbline > $viewline ) $limit = $nbline - $viewline ;
|
if ($nbline > $viewline ) $limit = $nbline - $viewline ;
|
||||||
else $limit = $viewline;
|
else $limit = $viewline;
|
||||||
|
|
||||||
@@ -240,7 +241,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($page > 0)
|
if ($page > 0)
|
||||||
{
|
{
|
||||||
$limitsql = $nbline - ($page * $viewline);
|
$limitsql = $nbline - ($page * $viewline);
|
||||||
@@ -253,34 +254,34 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$limitsql = $nbline;
|
$limitsql = $nbline;
|
||||||
}
|
}
|
||||||
//print $limitsql.'-'.$page.'-'.$viewline;
|
//print $limitsql.'-'.$page.'-'.$viewline;
|
||||||
|
|
||||||
// Onglets
|
// Onglets
|
||||||
$head=bank_prepare_head($object);
|
$head=bank_prepare_head($object);
|
||||||
dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account');
|
dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object,'ref','',1,'ref');
|
print $form->showrefnav($object,'ref','',1,'ref');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
|
||||||
print '<td colspan="3">'.$object->label.'</td></tr>';
|
print '<td colspan="3">'.$object->label.'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
dol_htmloutput_errors($mesg);
|
dol_htmloutput_errors($mesg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search form
|
* Search form
|
||||||
*/
|
*/
|
||||||
$param.='&account='.$object->id;
|
$param.='&account='.$object->id;
|
||||||
|
|
||||||
// Define transaction list navigation string
|
// Define transaction list navigation string
|
||||||
$navig='';
|
$navig='';
|
||||||
$navig.='<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
|
$navig.='<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
|
||||||
@@ -289,6 +290,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&page='.($page+1).'">'.img_previous().'</a>';
|
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&page='.($page+1).'">'.img_previous().'</a>';
|
||||||
$navig.= $langs->trans("Page")." "; // ' Page ';
|
$navig.= $langs->trans("Page")." "; // ' Page ';
|
||||||
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($nbpage-$page).'">';
|
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($nbpage-$page).'">';
|
||||||
|
$navig.='<input type="hidden" name="paiementtype" value="'.$paiementtype.'">';
|
||||||
$navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">';
|
$navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">';
|
||||||
$navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">';
|
$navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">';
|
||||||
$navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">';
|
$navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">';
|
||||||
@@ -303,7 +305,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
$navig.='</form>';
|
$navig.='</form>';
|
||||||
//var_dump($navig);
|
//var_dump($navig);
|
||||||
|
|
||||||
// Confirmation delete
|
// Confirmation delete
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
@@ -311,15 +313,15 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="notopnoleftnoright" width="100%">';
|
print '<table class="notopnoleftnoright" width="100%">';
|
||||||
|
|
||||||
// Show title
|
// Show title
|
||||||
if ($action != 'addline' && $action != 'delete')
|
if ($action != 'addline' && $action != 'delete')
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>';
|
print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Form to add a transaction with no invoice
|
// Form to add a transaction with no invoice
|
||||||
if ($user->rights->banque->modifier && $action == 'addline')
|
if ($user->rights->banque->modifier && $action == 'addline')
|
||||||
{
|
{
|
||||||
@@ -328,11 +330,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="vline" value="'.$vline.'">';
|
print '<input type="hidden" name="vline" value="'.$vline.'">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>';
|
print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
@@ -343,7 +345,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align=right>'.$langs->trans("Credit").'</td>';
|
print '<td align=right>'.$langs->trans("Credit").'</td>';
|
||||||
print '<td colspan="2" align="center"> </td>';
|
print '<td colspan="2" align="center"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr '.$bc[false].'>';
|
print '<tr '.$bc[false].'>';
|
||||||
print '<td nowrap="nowrap" colspan="2">';
|
print '<td nowrap="nowrap" colspan="2">';
|
||||||
$form->select_date($dateop,'op',0,0,0,'transaction');
|
$form->select_date($dateop,'op',0,0,0,'transaction');
|
||||||
@@ -366,14 +368,14 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
print '<tr class="noborder"><td colspan="8"> </td></tr>'."\n";
|
print '<tr class="noborder"><td colspan="8"> </td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affiche tableau des transactions bancaires
|
* Affiche tableau des transactions bancaires
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Ligne de titre tableau des ecritures
|
// Ligne de titre tableau des ecritures
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
@@ -389,19 +391,19 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort");
|
if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort");
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="search">';
|
print '<input type="hidden" name="action" value="search">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
|
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
|
||||||
$filtertype='';
|
$filtertype='';
|
||||||
print $form->select_types_paiements($_REQUEST['paiementtype'],'paiementtype',$filtertype,2,1,1,8);
|
print $form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
|
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
|
||||||
print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>';
|
print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>';
|
||||||
@@ -412,13 +414,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Another solution
|
* Another solution
|
||||||
* create temporary table solde type=heap select amount from llx_bank limit 100 ;
|
* create temporary table solde type=heap select amount from llx_bank limit 100 ;
|
||||||
* select sum(amount) from solde ;
|
* select sum(amount) from solde ;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
|
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
|
||||||
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
|
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
|
||||||
if ($mode_search)
|
if ($mode_search)
|
||||||
@@ -428,11 +430,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
/*
|
/*
|
||||||
if ($mode_search && $conf->adherent->enabled)
|
if ($mode_search && $conf->adherent->enabled)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($mode_search && $conf->tax->enabled)
|
if ($mode_search && $conf->tax->enabled)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||||
@@ -459,22 +461,22 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$sql.= $sql_rech;
|
$sql.= $sql_rech;
|
||||||
$sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day
|
$sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day
|
||||||
$sql.= $db->plimit($limitsql, 0);
|
$sql.= $db->plimit($limitsql, 0);
|
||||||
|
|
||||||
dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG);
|
dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$nows=dol_print_date($now,'%Y%m%d');
|
$nows=dol_print_date($now,'%Y%m%d');
|
||||||
|
|
||||||
//$form->load_cache_types_paiements();
|
//$form->load_cache_types_paiements();
|
||||||
//$form->cache_types_paiements
|
//$form->cache_types_paiements
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0; $total = 0; $sep = 0;
|
$i = 0; $total = 0; $sep = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
@@ -482,7 +484,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($i >= ($nbline - $viewline))
|
if ($i >= ($nbline - $viewline))
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
// Is it a transaction in future ?
|
// Is it a transaction in future ?
|
||||||
$dos=dol_print_date($db->jdate($objp->do),'%Y%m%d');
|
$dos=dol_print_date($db->jdate($objp->do),'%Y%m%d');
|
||||||
//print "dos=".$dos." nows=".$nows;
|
//print "dos=".$dos." nows=".$nows;
|
||||||
@@ -496,26 +498,26 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
|
|
||||||
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n";
|
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n";
|
||||||
|
|
||||||
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day");
|
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day");
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Payment type
|
// Payment type
|
||||||
print "<td nowrap>";
|
print "<td nowrap>";
|
||||||
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
|
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
|
||||||
// $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type);
|
// $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type);
|
||||||
|
|
||||||
if ($objp->fk_type == 'SOLD') $label=' ';
|
if ($objp->fk_type == 'SOLD') $label=' ';
|
||||||
print $label;
|
print $label;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Num
|
// Num
|
||||||
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td>';
|
print '<td>';
|
||||||
// Show generic description
|
// Show generic description
|
||||||
@@ -545,7 +547,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='company')
|
else if ($links[$key]['type']=='company')
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='payment_sc')
|
else if ($links[$key]['type']=='payment_sc')
|
||||||
{
|
{
|
||||||
@@ -567,11 +569,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='member')
|
else if ($links[$key]['type']=='member')
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='sc')
|
else if ($links[$key]['type']=='sc')
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -592,7 +594,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Add third party column
|
// Add third party column
|
||||||
print '<td>';
|
print '<td>';
|
||||||
foreach($links as $key=>$val)
|
foreach($links as $key=>$val)
|
||||||
@@ -627,7 +629,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
if ($objp->amount < 0)
|
if ($objp->amount < 0)
|
||||||
{
|
{
|
||||||
@@ -637,7 +639,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
print '<td> </td><td align="right" nowrap="nowrap"> '.price($objp->amount).'</td>'."\n";
|
print '<td> </td><td align="right" nowrap="nowrap"> '.price($objp->amount).'</td>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Balance
|
// Balance
|
||||||
if ($action != 'search')
|
if ($action != 'search')
|
||||||
{
|
{
|
||||||
@@ -654,7 +656,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
print '<td align="right">-</td>';
|
print '<td align="right">-</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transaction reconciliated or edit link
|
// Transaction reconciliated or edit link
|
||||||
if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
|
if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
|
||||||
{
|
{
|
||||||
@@ -697,13 +699,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show total
|
// Show total
|
||||||
if ($page == 0 && ! $mode_search)
|
if ($page == 0 && ! $mode_search)
|
||||||
{
|
{
|
||||||
@@ -721,19 +723,19 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "\n</div>\n";
|
print "\n</div>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action != 'delete')
|
if ($action != 'delete')
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate
|
if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate
|
||||||
{
|
{
|
||||||
if ($user->rights->banque->consolidate)
|
if ($user->rights->banque->consolidate)
|
||||||
@@ -745,7 +747,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action != 'addline')
|
if ($action != 'addline')
|
||||||
{
|
{
|
||||||
if ($user->rights->banque->modifier)
|
if ($user->rights->banque->modifier)
|
||||||
@@ -757,10 +759,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
|
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -771,4 +773,4 @@ else
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'class')
|
if ($user->rights->banque->modifier && $action == 'class')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid = ".$rowid." AND fk_categ = ".$_POST["cat1"];
|
||||||
if (! $db->query($sql))
|
if (! $db->query($sql))
|
||||||
@@ -90,7 +90,7 @@ if ($action == 'class')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "update")
|
if ($user->rights->banque->modifier && $action == "update")
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
@@ -584,8 +584,11 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|||||||
print '<input type="hidden" name="action" value="class">';
|
print '<input type="hidden" name="action" value="class">';
|
||||||
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
print '<input type="hidden" name="orig_account" value="'.$orig_account.'">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Rubriques").'</td><td colspan="2">';
|
||||||
print '<select class="flat" name="cat1">'.$options.'</select> ';
|
if ($user->rights->banque->modifier)
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
{
|
||||||
|
print '<select class="flat" name="cat1">'.$options.'</select> ';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
|
|||||||
@@ -255,6 +255,9 @@ $form = new Form($db);
|
|||||||
*/
|
*/
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
|
//WYSIWYG Editor
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("NewTrip"));
|
print_fiche_titre($langs->trans("NewTrip"));
|
||||||
|
|
||||||
dol_htmloutput_errors($mesg);
|
dol_htmloutput_errors($mesg);
|
||||||
@@ -295,9 +298,10 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note_public',GETPOST('note_public','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100);
|
$doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Private note
|
// Private note
|
||||||
@@ -306,9 +310,10 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note_private',GETPOST('note_private','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100);
|
$doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,6 +337,9 @@ else if ($id)
|
|||||||
|
|
||||||
if ($action == 'edit' && $user->rights->deplacement->creer)
|
if ($action == 'edit' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
|
//WYSIWYG Editor
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
if ($object->socid)
|
if ($object->socid)
|
||||||
{
|
{
|
||||||
@@ -382,9 +390,10 @@ else if ($id)
|
|||||||
// Public note
|
// Public note
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||||
print '<td valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note_public',$object->note_public,600,200,'dolibarr_notes','In',false,true,true,ROWS_8,'100');
|
$doleditor = new DolEditor('note_public', $object->note_public, 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '100');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Private note
|
// Private note
|
||||||
@@ -392,9 +401,10 @@ else if ($id)
|
|||||||
{
|
{
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||||
print '<td valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('note_private',$object->note_private,600,200,'dolibarr_notes','In',false,true,true,ROWS_8,'100');
|
$doleditor = new DolEditor('note_private', $object->note_private, 600, 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '100');
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,8 +509,8 @@ else if ($id)
|
|||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
// Notes
|
// Notes
|
||||||
$blocname = 'notes';
|
$blocname = 'notes';
|
||||||
$title = $langs->trans('Notes');
|
$title = $langs->trans('Notes');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -137,12 +138,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$res = $stats->getAverageByMonth($year);
|
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||||
$data = array();
|
|
||||||
for ($i = 1 ; $i < 13 ; $i++)
|
|
||||||
{
|
|
||||||
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir || $user->societe_id)
|
if (!$user->rights->societe->client->voir || $user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -162,8 +158,7 @@ $mesg = $px3->isGraphKo();
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$px3->SetData($data);
|
$px3->SetData($data);
|
||||||
//$i=$startyear;$legend=array();
|
$i = $startyear;$legend=array();
|
||||||
$i=$endyear;$legend=array();
|
|
||||||
while ($i <= $endyear)
|
while ($i <= $endyear)
|
||||||
{
|
{
|
||||||
$legend[]=$i;
|
$legend[]=$i;
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
|
|||||||
|
|
||||||
$object=new Facture($db);
|
$object=new Facture($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$ret=$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
@@ -143,53 +149,54 @@ else if ($action == 'reopen' && $user->rights->facture->creer)
|
|||||||
// Delete invoice
|
// Delete invoice
|
||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
$result = $object->delete();
|
$object->fetch_thirdparty();
|
||||||
if ($result > 0)
|
$result = $object->delete();
|
||||||
{
|
if ($result > 0)
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"]);
|
{
|
||||||
exit;
|
Header('Location: '.$_SERVER["PHP_SELF"]);
|
||||||
}
|
exit;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
$mesg='<div class="error">'.$object->error.'</div>';
|
{
|
||||||
|
$mesg='<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete line
|
// Delete line
|
||||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer)
|
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $object->deleteline($_GET['lineid'], $user);
|
$result = $object->deleteline($_GET['lineid'], $user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang='';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id); // Reload to get new records
|
$ret=$object->fetch($id); // Reload to get new records
|
||||||
$result=facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
$result=facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||||
}
|
}
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
|
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<div clas="error">'.$object->error.'</div>';
|
$mesg='<div clas="error">'.$object->error.'</div>';
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,18 +317,18 @@ else if ($action == 'set_ref_client' && $user->rights->facture->creer)
|
|||||||
$object->set_ref_client($_POST['ref_client']);
|
$object->set_ref_client($_POST['ref_client']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote_public' && $user->rights->facture->creer)
|
else if ($action == 'setnote_public' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setnote' && $user->rights->facture->creer)
|
else if ($action == 'setnote' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify to validated
|
// Classify to validated
|
||||||
@@ -1112,7 +1119,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
|||||||
unset($_POST['qty']);
|
unset($_POST['qty']);
|
||||||
unset($_POST['type']);
|
unset($_POST['type']);
|
||||||
unset($_POST['idprod']);
|
unset($_POST['idprod']);
|
||||||
unset($_POST['remmise_percent']);
|
unset($_POST['remise_percent']);
|
||||||
unset($_POST['dp_desc']);
|
unset($_POST['dp_desc']);
|
||||||
unset($_POST['np_desc']);
|
unset($_POST['np_desc']);
|
||||||
unset($_POST['np_price']);
|
unset($_POST['np_price']);
|
||||||
@@ -1506,64 +1513,81 @@ else if ($action == 'builddoc') // En get ou en post
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
// Remove file in doc form
|
||||||
|
else if ($action == 'remove_file')
|
||||||
{
|
{
|
||||||
if ($action == 'addcontact' && $user->rights->facture->creer)
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if ($result > 0 && $id > 0)
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
$langs->load("other");
|
||||||
|
$upload_dir = $conf->facture->dir_output;
|
||||||
|
$file = $upload_dir . '/' . GETPOST('file');
|
||||||
|
dol_delete_file($file,0,0,0,$object);
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
|
{
|
||||||
|
if ($action == 'addcontact' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
|
if ($result > 0 && $id > 0)
|
||||||
{
|
{
|
||||||
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
|
||||||
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
$result = $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// bascule du statut d'un contact
|
// bascule du statut d'un contact
|
||||||
else if ($action == 'swapstatut' && $user->rights->facture->creer)
|
else if ($action == 'swapstatut' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Efface un contact
|
// Efface un contact
|
||||||
else if ($action == 'deletecontact' && $user->rights->facture->creer)
|
else if ($action == 'deletecontact' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2801,22 +2825,22 @@ else
|
|||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||||
$formcompany= new FormCompany($db);
|
$formcompany= new FormCompany($db);
|
||||||
|
|
||||||
$blocname = 'contacts';
|
$blocname = 'contacts';
|
||||||
$title = $langs->trans('ContactsAddresses');
|
$title = $langs->trans('ContactsAddresses');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
{
|
{
|
||||||
$blocname = 'notes';
|
$blocname = 'notes';
|
||||||
$title = $langs->trans('Notes');
|
$title = $langs->trans('Notes');
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3256,7 +3280,7 @@ else
|
|||||||
if ($userid)
|
if ($userid)
|
||||||
{
|
{
|
||||||
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
|
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
|
||||||
else $sql.=' AND f.fk_user_author = '.$user->id;
|
else $sql.=' AND f.fk_user_author = '.$userid;
|
||||||
}
|
}
|
||||||
if ($_GET['filtre'])
|
if ($_GET['filtre'])
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -146,20 +146,20 @@ class FactureRec extends Facture
|
|||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
$result_insert = $this->addline(
|
$result_insert = $this->addline(
|
||||||
$this->id,
|
$this->id,
|
||||||
$facsrc->lines[$i]->desc,
|
$facsrc->lines[$i]->desc,
|
||||||
$facsrc->lines[$i]->subprice,
|
$facsrc->lines[$i]->subprice,
|
||||||
$facsrc->lines[$i]->qty,
|
$facsrc->lines[$i]->qty,
|
||||||
$facsrc->lines[$i]->tva_tx,
|
$facsrc->lines[$i]->tva_tx,
|
||||||
$facsrc->lines[$i]->fk_product,
|
$facsrc->lines[$i]->fk_product,
|
||||||
$facsrc->lines[$i]->remise_percent,
|
$facsrc->lines[$i]->remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$facsrc->lines[$i]->product_type,
|
$facsrc->lines[$i]->product_type,
|
||||||
$facsrc->lines[$i]->rang,
|
$facsrc->lines[$i]->rang,
|
||||||
$facsrc->lines[$i]->special_code
|
$facsrc->lines[$i]->special_code
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result_insert < 0)
|
if ($result_insert < 0)
|
||||||
|
|||||||
@@ -256,30 +256,30 @@ class Facture extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO mutualiser
|
// TODO mutualiser
|
||||||
if ($origin == 'commande')
|
if ($origin == 'commande')
|
||||||
{
|
{
|
||||||
// On recupere les differents contact interne et externe
|
// On recupere les differents contact interne et externe
|
||||||
$order = new Commande($this->db);
|
$order = new Commande($this->db);
|
||||||
$order->id = $origin_id;
|
$order->id = $origin_id;
|
||||||
|
|
||||||
// On recupere le commercial suivi propale
|
// On recupere le commercial suivi propale
|
||||||
$this->userid = $order->getIdcontact('internal', 'SALESREPFOLL');
|
$this->userid = $order->getIdcontact('internal', 'SALESREPFOLL');
|
||||||
|
|
||||||
if ($this->userid)
|
if ($this->userid)
|
||||||
{
|
{
|
||||||
//On passe le commercial suivi commande en commercial suivi paiement
|
//On passe le commercial suivi commande en commercial suivi paiement
|
||||||
$this->add_contact($this->userid[0], 'SALESREPFOLL', 'internal');
|
$this->add_contact($this->userid[0], 'SALESREPFOLL', 'internal');
|
||||||
}
|
}
|
||||||
|
|
||||||
// On recupere le contact client facturation commande
|
// On recupere le contact client facturation commande
|
||||||
$this->contactid = $order->getIdcontact('external', 'BILLING');
|
$this->contactid = $order->getIdcontact('external', 'BILLING');
|
||||||
|
|
||||||
if ($this->contactid)
|
if ($this->contactid)
|
||||||
{
|
{
|
||||||
//On passe le contact client facturation commande en contact client facturation
|
//On passe le contact client facturation commande en contact client facturation
|
||||||
$this->add_contact($this->contactid[0], 'BILLING', 'external');
|
$this->add_contact($this->contactid[0], 'BILLING', 'external');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -349,7 +349,7 @@ class Facture extends CommonObject
|
|||||||
$this->lines[$i]->fk_code_ventilation,
|
$this->lines[$i]->fk_code_ventilation,
|
||||||
$this->lines[$i]->info_bits,
|
$this->lines[$i]->info_bits,
|
||||||
$this->lines[$i]->fk_remise_except,
|
$this->lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$this->lines[$i]->product_type,
|
$this->lines[$i]->product_type,
|
||||||
$this->lines[$i]->rang,
|
$this->lines[$i]->rang,
|
||||||
@@ -400,7 +400,13 @@ class Facture extends CommonObject
|
|||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$_facrec->lines[$i]->fk_product,
|
$_facrec->lines[$i]->fk_product,
|
||||||
$_facrec->lines[$i]->remise_percent,
|
$_facrec->lines[$i]->remise_percent,
|
||||||
'','',0,0,'','HT',0,
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
'',
|
||||||
|
'HT',
|
||||||
|
0,
|
||||||
$_facrec->lines[$i]->product_type,
|
$_facrec->lines[$i]->product_type,
|
||||||
$_facrec->lines[$i]->rang,
|
$_facrec->lines[$i]->rang,
|
||||||
$_facrec->lines[$i]->special_code
|
$_facrec->lines[$i]->special_code
|
||||||
@@ -674,11 +680,11 @@ class Facture extends CommonObject
|
|||||||
$this->origin = $object->element;
|
$this->origin = $object->element;
|
||||||
$this->origin_id = $object->id;
|
$this->origin_id = $object->id;
|
||||||
|
|
||||||
// Possibility to add external linked objects with hooks
|
// Possibility to add external linked objects with hooks
|
||||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||||
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
||||||
{
|
{
|
||||||
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
|
$this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $this->create($user);
|
$ret = $this->create($user);
|
||||||
@@ -1166,6 +1172,7 @@ class Facture extends CommonObject
|
|||||||
function delete($rowid=0, $notrigger=0)
|
function delete($rowid=0, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
|
||||||
if (! $rowid) $rowid=$this->id;
|
if (! $rowid) $rowid=$this->id;
|
||||||
|
|
||||||
@@ -1236,6 +1243,34 @@ class Facture extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
// On efface le repertoire de pdf provisoire
|
||||||
|
$ref = dol_sanitizeFileName($this->ref);
|
||||||
|
if ($conf->facture->dir_output)
|
||||||
|
{
|
||||||
|
$dir = $conf->facture->dir_output . "/" . $ref;
|
||||||
|
$file = $conf->facture->dir_output . "/" . $ref . "/" . $ref . ".pdf";
|
||||||
|
if (file_exists($file)) // We must delete all files before deleting directory
|
||||||
|
{
|
||||||
|
$ret=dol_delete_preview($this);
|
||||||
|
|
||||||
|
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorCanNotDeleteFile",$file);
|
||||||
|
$this->db->rollback();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (file_exists($dir))
|
||||||
|
{
|
||||||
|
if (! dol_delete_dir_recursive($dir)) // For remove dir and meta
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorCanNotDeleteDir",$dir);
|
||||||
|
$this->db->rollback();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1519,7 +1554,7 @@ class Facture extends CommonObject
|
|||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
dol_syslog(get_class($this).'::validate force_number='.$force_number,' idwarehouse='.$idwarehouse, LOG_WARNING);
|
dol_syslog(get_class($this).'::validate force_number='.$force_number.', idwarehouse='.$idwarehouse, LOG_WARNING);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $this->brouillon)
|
if (! $this->brouillon)
|
||||||
@@ -1679,7 +1714,7 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
dol_syslog("Rename ok");
|
dol_syslog("Rename ok");
|
||||||
// Suppression ancien fichier PDF dans nouveau rep
|
// Suppression ancien fichier PDF dans nouveau rep
|
||||||
dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'.*');
|
dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'*.*');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1691,6 +1726,7 @@ class Facture extends CommonObject
|
|||||||
$this->ref = $num;
|
$this->ref = $num;
|
||||||
$this->facnumber=$num;
|
$this->facnumber=$num;
|
||||||
$this->statut=1;
|
$this->statut=1;
|
||||||
|
$this->brouillon=0;
|
||||||
$this->date_validation=$now;
|
$this->date_validation=$now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ $langs->load("companies");
|
|||||||
|
|
||||||
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
|
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@@ -166,9 +166,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Contacts lines
|
// Contacts lines
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/discount.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/invoice.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||||
|
|
||||||
$langs->load('propal');
|
$langs->load('propal');
|
||||||
@@ -42,6 +43,13 @@ $confirm = GETPOST('confirm');
|
|||||||
$id = GETPOST('facid','int');
|
$id = GETPOST('facid','int');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
|
$mesg='';
|
||||||
|
if (isset($_SESSION['DolMessage']))
|
||||||
|
{
|
||||||
|
$mesg=$_SESSION['DolMessage'];
|
||||||
|
unset($_SESSION['DolMessage']);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id)
|
if ($user->societe_id)
|
||||||
{
|
{
|
||||||
@@ -79,10 +87,19 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
|
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0,0,$_FILES['userfile']['error']);
|
$resupload=dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),0,0,$_FILES['userfile']['error']);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
|
||||||
|
{
|
||||||
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on logon for example
|
||||||
|
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthsmall, $maxheightsmall, '_small', $quality, "thumbs");
|
||||||
|
// Create mini thumbs for image (Ratio is near 16/9)
|
||||||
|
// Used on menu or for setup page for example
|
||||||
|
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], $maxwidthmini, $maxheightmini, '_mini', $quality, "thumbs");
|
||||||
|
}
|
||||||
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -109,12 +126,15 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
if ($object->fetch($id))
|
if ($object->fetch($id))
|
||||||
{
|
{
|
||||||
|
$langs->load("other");
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->facture->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file,0,0,0,$object);
|
dol_delete_file($file,0,0,0,$object);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$_SESSION['DolMessage'] = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('urlfile')).'</div>';
|
||||||
|
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,14 +204,14 @@ if ($id > 0 || ! empty($ref))
|
|||||||
*/
|
*/
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer,50,$object);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -58,7 +58,7 @@ $sortfield="f.datef";
|
|||||||
|
|
||||||
|
|
||||||
// Create predefined invoice
|
// Create predefined invoice
|
||||||
if ($_POST["action"] == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$facturerec = new FactureRec($db);
|
$facturerec = new FactureRec($db);
|
||||||
$facturerec->titre = $_POST["titre"];
|
$facturerec->titre = $_POST["titre"];
|
||||||
@@ -71,17 +71,16 @@ if ($_POST["action"] == 'add')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_GET["action"] = "create";
|
$action = "create";
|
||||||
$_GET["facid"] = $_POST["facid"];
|
|
||||||
$mesg = '<div class="error">'.$facturerec->error.'</div>';
|
$mesg = '<div class="error">'.$facturerec->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppression
|
// Suppression
|
||||||
if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
|
if ($action == 'delete' && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
$facrec = new FactureRec($db);
|
$facrec = new FactureRec($db);
|
||||||
$facrec->fetch(GETPOST('facid','int'));
|
$facrec->fetch($facid);
|
||||||
$facrec->delete();
|
$facrec->delete();
|
||||||
$facid = 0 ;
|
$facid = 0 ;
|
||||||
}
|
}
|
||||||
@@ -99,7 +98,7 @@ $form = new Form($db);
|
|||||||
/*
|
/*
|
||||||
* Create mode
|
* Create mode
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
print_fiche_titre($langs->trans("CreateRepeatableInvoice"));
|
print_fiche_titre($langs->trans("CreateRepeatableInvoice"));
|
||||||
|
|
||||||
@@ -108,7 +107,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$facture = new Facture($db); // Source invoice
|
$facture = new Facture($db); // Source invoice
|
||||||
$product_static=new Product($db);
|
$product_static=new Product($db);
|
||||||
|
|
||||||
if ($facture->fetch($_GET["facid"]) > 0)
|
if ($facture->fetch($facid) > 0)
|
||||||
{
|
{
|
||||||
print '<form action="fiche-rec.php" method="post">';
|
print '<form action="fiche-rec.php" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user