mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Compare commits
629 Commits
3.5.beta1_
...
3.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70c262a99f | ||
|
|
77b3c9d2eb | ||
|
|
ad0e78a56a | ||
|
|
8768ece9f7 | ||
|
|
4c60873d06 | ||
|
|
873d44e2c0 | ||
|
|
18f8c80b98 | ||
|
|
2d15e2c759 | ||
|
|
7de0438299 | ||
|
|
40a53d4b57 | ||
|
|
28b252849f | ||
|
|
c5d5d6a8d6 | ||
|
|
d15aeb268f | ||
|
|
47ff6a68bb | ||
|
|
ee72a9a4e6 | ||
|
|
85436f871c | ||
|
|
0e9477167d | ||
|
|
35ddcf2958 | ||
|
|
bd3a64d580 | ||
|
|
1de5cb18f9 | ||
|
|
779aaa51ab | ||
|
|
526c383f10 | ||
|
|
ca556485e0 | ||
|
|
1ec53873f3 | ||
|
|
0f32354a80 | ||
|
|
b2477b6764 | ||
|
|
3efd44fd28 | ||
|
|
ee41273286 | ||
|
|
cd277aaf12 | ||
|
|
f83b47be9f | ||
|
|
557fb0a9b1 | ||
|
|
549f5c8426 | ||
|
|
1bdeb171c7 | ||
|
|
8e8fb27286 | ||
|
|
f50ad96beb | ||
|
|
7149fd76c7 | ||
|
|
98805ace4a | ||
|
|
7986c95ce3 | ||
|
|
7254aecbb7 | ||
|
|
21b43d7604 | ||
|
|
21d6e22f03 | ||
|
|
6fed307d70 | ||
|
|
cd1313280c | ||
|
|
f634427f73 | ||
|
|
35051f8c77 | ||
|
|
4c64767e7b | ||
|
|
ce24a7e9ad | ||
|
|
9e7f3686db | ||
|
|
4f5441dc81 | ||
|
|
eb7d802a8f | ||
|
|
021f6e90e2 | ||
|
|
9341db3e86 | ||
|
|
8a0bddf4c5 | ||
|
|
a7c892e23b | ||
|
|
b8aee5f462 | ||
|
|
cd84a5fd17 | ||
|
|
79c2e31439 | ||
|
|
3852fe4a1c | ||
|
|
9519c89110 | ||
|
|
46926aa685 | ||
|
|
d7e111b3bd | ||
|
|
8bd2a1bc32 | ||
|
|
d35cbb27de | ||
|
|
163fcc8179 | ||
|
|
398e286be9 | ||
|
|
57f8f30494 | ||
|
|
60e616f63e | ||
|
|
70debe9d9f | ||
|
|
5b6b8f1d5b | ||
|
|
fb0a4803c2 | ||
|
|
0d18892506 | ||
|
|
8642e2027c | ||
|
|
0ba82d3c6e | ||
|
|
6253385b17 | ||
|
|
79e4c283db | ||
|
|
becd65f9d3 | ||
|
|
919a7cd4a6 | ||
|
|
22767bac36 | ||
|
|
4074547589 | ||
|
|
031fd2f8b8 | ||
|
|
d72167d543 | ||
|
|
6a95f73036 | ||
|
|
af4d48aec0 | ||
|
|
9a5b46330a | ||
|
|
b9be26f9f1 | ||
|
|
fed3ac9b70 | ||
|
|
8de8e9d886 | ||
|
|
9aacb0e7ed | ||
|
|
0725fea923 | ||
|
|
ac45051b53 | ||
|
|
fa1c88d80b | ||
|
|
4f1df33e51 | ||
|
|
3a246bdca9 | ||
|
|
12ee5dece2 | ||
|
|
b455686b57 | ||
|
|
6d4a9833e2 | ||
|
|
c704182b4d | ||
|
|
bd1a10c116 | ||
|
|
b61ccb8234 | ||
|
|
462f65614d | ||
|
|
c5689b86b4 | ||
|
|
ecfff5636b | ||
|
|
abe76708de | ||
|
|
e7f7dd49a5 | ||
|
|
9bada81b63 | ||
|
|
795dcad59f | ||
|
|
938f31f383 | ||
|
|
d2d84c3e48 | ||
|
|
0f329e72ef | ||
|
|
4d298b1891 | ||
|
|
ffeb2778e5 | ||
|
|
b688d287e8 | ||
|
|
28204d66b1 | ||
|
|
78b40eaa8c | ||
|
|
db5fe44b93 | ||
|
|
45b3a02e8b | ||
|
|
2c310e26a6 | ||
|
|
374be1854e | ||
|
|
eae92695d6 | ||
|
|
364085bd20 | ||
|
|
511a44a7e6 | ||
|
|
2b4f0bd4b1 | ||
|
|
e959568a1d | ||
|
|
63ecb859d6 | ||
|
|
c0c555b78f | ||
|
|
68e42bc24e | ||
|
|
6e5f3b8bdd | ||
|
|
1df18f1e93 | ||
|
|
4d379e572a | ||
|
|
b8550bb985 | ||
|
|
d4db5916f0 | ||
|
|
e99883f1a6 | ||
|
|
5b63b56143 | ||
|
|
ab7a17fe73 | ||
|
|
0e3184c436 | ||
|
|
7fd34e5ff6 | ||
|
|
7afdad60a0 | ||
|
|
2d8214a940 | ||
|
|
5b40eff0fa | ||
|
|
667908baf8 | ||
|
|
283297294b | ||
|
|
48973c6d02 | ||
|
|
9a6f22a86e | ||
|
|
67220a15ca | ||
|
|
36aedf618c | ||
|
|
e09a16b427 | ||
|
|
eccfa7ec21 | ||
|
|
555a49d66e | ||
|
|
5a7fe6b4a7 | ||
|
|
d2d0d715a9 | ||
|
|
f1120b8749 | ||
|
|
2ee5076970 | ||
|
|
ee1e7471ff | ||
|
|
f6cda9deb6 | ||
|
|
f0503dfaa9 | ||
|
|
8d66497384 | ||
|
|
d992d5cb22 | ||
|
|
68893b205c | ||
|
|
601b2744e0 | ||
|
|
4a4084e096 | ||
|
|
76f890b72f | ||
|
|
0b3dd9d7bb | ||
|
|
165f9617e9 | ||
|
|
5fd47b34b0 | ||
|
|
0bdcda50c6 | ||
|
|
808abb6b4e | ||
|
|
b1ea05e0d1 | ||
|
|
0e54780377 | ||
|
|
7fc052ce19 | ||
|
|
50df4e1ff1 | ||
|
|
13eff7d629 | ||
|
|
6d40c10b95 | ||
|
|
247c49e094 | ||
|
|
bec70d1f0e | ||
|
|
f0eb9b8a15 | ||
|
|
f44a45feb2 | ||
|
|
0bf88ce44f | ||
|
|
e142bd252d | ||
|
|
2e0fc364bd | ||
|
|
f0bda47d96 | ||
|
|
a59a0151fb | ||
|
|
cfb791c584 | ||
|
|
436f585b69 | ||
|
|
3e39cd279d | ||
|
|
8248f63826 | ||
|
|
29ae579298 | ||
|
|
8207b7c243 | ||
|
|
d07c767f25 | ||
|
|
538e6c5dc2 | ||
|
|
da2f35e1a2 | ||
|
|
94bf105b13 | ||
|
|
3bb4de3e86 | ||
|
|
94a217bdc1 | ||
|
|
a7d0a7d663 | ||
|
|
fce34301f9 | ||
|
|
91b104aeb8 | ||
|
|
22412443fe | ||
|
|
76e4ba06a4 | ||
|
|
fcfe94d4ec | ||
|
|
ec1aef0191 | ||
|
|
8c9d145759 | ||
|
|
d6b2f96c19 | ||
|
|
81f1098d41 | ||
|
|
331341bf5a | ||
|
|
39e2c3262a | ||
|
|
aad7d32f7d | ||
|
|
e971e4dfff | ||
|
|
11353786a1 | ||
|
|
d9c7dc8697 | ||
|
|
18b163c6db | ||
|
|
47b1a2c082 | ||
|
|
2bc579324d | ||
|
|
4d3290e4bf | ||
|
|
e4da8623f8 | ||
|
|
168412a2d6 | ||
|
|
0a0ef548ef | ||
|
|
f98838616e | ||
|
|
a1e0d84e37 | ||
|
|
8e247e8615 | ||
|
|
2e840a3d37 | ||
|
|
3b3b66e612 | ||
|
|
7e08ee9437 | ||
|
|
8036151778 | ||
|
|
11e0fb8f7a | ||
|
|
1dca56c213 | ||
|
|
49ea174d06 | ||
|
|
9c6df4faf4 | ||
|
|
ca36a4dd97 | ||
|
|
6bfc0d14b2 | ||
|
|
7127f5fc21 | ||
|
|
cfec85c2d6 | ||
|
|
dce354adc3 | ||
|
|
ba70794c1d | ||
|
|
7864fe3cfd | ||
|
|
6e9b8dc77a | ||
|
|
290b810bb8 | ||
|
|
d65374bb02 | ||
|
|
3c87e1e20d | ||
|
|
ef2f8ea67d | ||
|
|
bba2892752 | ||
|
|
dc754bbdc2 | ||
|
|
0e25939373 | ||
|
|
db9ef992eb | ||
|
|
648bf73bac | ||
|
|
ed40e6d9b0 | ||
|
|
dc1ccbfae8 | ||
|
|
4248431dc9 | ||
|
|
8cd538cce4 | ||
|
|
7ecb313798 | ||
|
|
6cc20cb731 | ||
|
|
5a4b5dcc26 | ||
|
|
ad0d79a831 | ||
|
|
684be44846 | ||
|
|
4d84fc46a4 | ||
|
|
1f3f6cc7b8 | ||
|
|
c94083b56e | ||
|
|
42f032ded3 | ||
|
|
b83f664ced | ||
|
|
88aa0ad4da | ||
|
|
5cd6c05384 | ||
|
|
c51fa7048c | ||
|
|
4844aed67e | ||
|
|
895f5452b4 | ||
|
|
0247241277 | ||
|
|
75703a03cc | ||
|
|
f0eb98c27a | ||
|
|
a6b188ed93 | ||
|
|
ad420bbf42 | ||
|
|
aa4ae60826 | ||
|
|
ce3047203f | ||
|
|
286bdf91d4 | ||
|
|
d226abcdfc | ||
|
|
a89a4ee81a | ||
|
|
c49af3da48 | ||
|
|
72250f656e | ||
|
|
705192215a | ||
|
|
565fb615bc | ||
|
|
bf07bd5b24 | ||
|
|
f804833b9c | ||
|
|
825640d645 | ||
|
|
beb93e9245 | ||
|
|
a05d9b864a | ||
|
|
7aa2c9dcd1 | ||
|
|
37b0780523 | ||
|
|
d8cd7571ec | ||
|
|
b637b28c8b | ||
|
|
0e819ab5cd | ||
|
|
73e60e0629 | ||
|
|
adf55408a4 | ||
|
|
fa0470bdb9 | ||
|
|
01a9b23f26 | ||
|
|
62e209520a | ||
|
|
76d111b09f | ||
|
|
87db1d880b | ||
|
|
598a241366 | ||
|
|
f60f5b2751 | ||
|
|
b99eddc73e | ||
|
|
b96c977fa1 | ||
|
|
42a3cbd27c | ||
|
|
d4c007a909 | ||
|
|
24ce511671 | ||
|
|
f2ba1a538b | ||
|
|
533199c151 | ||
|
|
c2a8967b52 | ||
|
|
6c7e173bba | ||
|
|
a3372a9a0a | ||
|
|
d7bb138f43 | ||
|
|
0ff9533786 | ||
|
|
2c92818488 | ||
|
|
c49aabe574 | ||
|
|
bb191021de | ||
|
|
bc4cfd66db | ||
|
|
b6a910cf34 | ||
|
|
3e712c9c8c | ||
|
|
0907d81fcb | ||
|
|
1ad1b25f6e | ||
|
|
1b38d36f28 | ||
|
|
38e695b960 | ||
|
|
b12fb56be4 | ||
|
|
1e50543496 | ||
|
|
c0ef63fd74 | ||
|
|
ff9c84fd0e | ||
|
|
6c26684284 | ||
|
|
11efc20755 | ||
|
|
c6991f97d4 | ||
|
|
4aea74d6fd | ||
|
|
c54c06e8d3 | ||
|
|
45b1273992 | ||
|
|
131bbce6f3 | ||
|
|
2f88406677 | ||
|
|
dbd1c57f0a | ||
|
|
820cdde97b | ||
|
|
0b9e8d6832 | ||
|
|
30428ec6e5 | ||
|
|
a6e4ba7001 | ||
|
|
bfd229d484 | ||
|
|
f207aabe7a | ||
|
|
fdc1209986 | ||
|
|
eaa6d987b6 | ||
|
|
84e3457023 | ||
|
|
8f1a553395 | ||
|
|
395066519b | ||
|
|
d39ed05c5d | ||
|
|
8d1e10cd76 | ||
|
|
f86cf6c440 | ||
|
|
71a85464d5 | ||
|
|
a7c246cec1 | ||
|
|
e24555822e | ||
|
|
771d576e2b | ||
|
|
e4860679de | ||
|
|
22d31817de | ||
|
|
b3ff58e864 | ||
|
|
ecd14cb751 | ||
|
|
d024ec3daa | ||
|
|
438d7b0fb2 | ||
|
|
c0650d6da3 | ||
|
|
a0c0578863 | ||
|
|
d0b05bb5af | ||
|
|
d1e62bebf0 | ||
|
|
5b2f9af7dc | ||
|
|
1ac5bd3f28 | ||
|
|
bdf8100d84 | ||
|
|
d5606b6045 | ||
|
|
a3e55822a4 | ||
|
|
b9d37fd6f7 | ||
|
|
1fc50c137b | ||
|
|
c88bb553bd | ||
|
|
88ae0a7945 | ||
|
|
894e6a296f | ||
|
|
74d6698f7d | ||
|
|
5f8e896e0c | ||
|
|
afc729c694 | ||
|
|
2178ab6007 | ||
|
|
f71b39b1c3 | ||
|
|
c3af8b6b29 | ||
|
|
6729f03ee6 | ||
|
|
0383dc4706 | ||
|
|
18ed9d5ca7 | ||
|
|
e8e5f4d943 | ||
|
|
203a98d4ae | ||
|
|
216e9b390d | ||
|
|
4cf2e2503c | ||
|
|
1ddf9f6ac5 | ||
|
|
baebc7e91d | ||
|
|
f1d0879419 | ||
|
|
8f9143cef7 | ||
|
|
fae27842b7 | ||
|
|
08e44135bf | ||
|
|
65b6dca554 | ||
|
|
4cf2c3d58c | ||
|
|
8cd0647d7e | ||
|
|
bb8f113e67 | ||
|
|
b75137d4ff | ||
|
|
1f7e6a42c2 | ||
|
|
e45406694b | ||
|
|
aa3c16b6af | ||
|
|
8e313ef32d | ||
|
|
628e8bea83 | ||
|
|
6615ee7e6f | ||
|
|
6ffdc039a2 | ||
|
|
64031f92fa | ||
|
|
8496b1787c | ||
|
|
cca303cee6 | ||
|
|
f852c9a5bb | ||
|
|
4a1f6713ff | ||
|
|
6f5e78d27e | ||
|
|
29e029161f | ||
|
|
00b0031ddf | ||
|
|
ea0bbb5896 | ||
|
|
7f950d8b45 | ||
|
|
0d853cf73d | ||
|
|
9e9a386852 | ||
|
|
e63dcc5343 | ||
|
|
23f7de0873 | ||
|
|
358175b357 | ||
|
|
35596acf40 | ||
|
|
cb539399a0 | ||
|
|
4adf5fc1b9 | ||
|
|
a9d5363799 | ||
|
|
03006db5a7 | ||
|
|
1ef08a88a4 | ||
|
|
a26e337550 | ||
|
|
040e3eec78 | ||
|
|
71484a4e1e | ||
|
|
f88e9425ec | ||
|
|
361d34f7db | ||
|
|
306a51f6bd | ||
|
|
413e0908fe | ||
|
|
63e1ecccd3 | ||
|
|
b04a12c39a | ||
|
|
e654dac578 | ||
|
|
4c29bddfda | ||
|
|
f305524e29 | ||
|
|
7c10632d7a | ||
|
|
7446714351 | ||
|
|
ed21b573ea | ||
|
|
0fe870395f | ||
|
|
c92d0fe966 | ||
|
|
0e743d5024 | ||
|
|
568c296c6c | ||
|
|
25bbe824f1 | ||
|
|
583a3dadb1 | ||
|
|
0f9f610635 | ||
|
|
7945011955 | ||
|
|
83f99b5ba6 | ||
|
|
c885389ac6 | ||
|
|
68718c6100 | ||
|
|
870b78fc19 | ||
|
|
6596a105e7 | ||
|
|
04efe611af | ||
|
|
9d2dee207a | ||
|
|
a94fb12e5e | ||
|
|
c04d454d4f | ||
|
|
0501491475 | ||
|
|
b28d15574e | ||
|
|
a71e4c598a | ||
|
|
4d31a0ca2a | ||
|
|
2d260fa6dd | ||
|
|
69f0d596ba | ||
|
|
e8101e3cde | ||
|
|
2b63fd67b5 | ||
|
|
5703dfe55a | ||
|
|
3884c33535 | ||
|
|
d209d931e4 | ||
|
|
4356496ee8 | ||
|
|
afa5bdb837 | ||
|
|
56867b6fd9 | ||
|
|
6a5b3e2020 | ||
|
|
48570f599a | ||
|
|
cc43fac0aa | ||
|
|
00064ed500 | ||
|
|
a2368daa57 | ||
|
|
89a5638908 | ||
|
|
930328f235 | ||
|
|
0f4ceca8ec | ||
|
|
45aac81b71 | ||
|
|
33d55faf6b | ||
|
|
3c0ee64648 | ||
|
|
946c91dc72 | ||
|
|
d28eacebd7 | ||
|
|
8ec50fce23 | ||
|
|
b7190d2609 | ||
|
|
5b243abe4b | ||
|
|
c5230ea2ff | ||
|
|
d0d9cce146 | ||
|
|
c8f1a26d25 | ||
|
|
618bf4d75e | ||
|
|
0aba9b02b8 | ||
|
|
7696730680 | ||
|
|
85ea8b4161 | ||
|
|
1e008ede3c | ||
|
|
52b66a839b | ||
|
|
c324f6a9a3 | ||
|
|
ef9db84a88 | ||
|
|
a92aa14459 | ||
|
|
a2380805c8 | ||
|
|
4099038083 | ||
|
|
b3a1d695cd | ||
|
|
200553c001 | ||
|
|
8050f8e9fe | ||
|
|
e8c7bb9c62 | ||
|
|
4acb9f8cba | ||
|
|
a0358dc0c2 | ||
|
|
673c701ebc | ||
|
|
05e0af0f23 | ||
|
|
8b60c79033 | ||
|
|
5a1df20c80 | ||
|
|
b911d30684 | ||
|
|
b9c8852471 | ||
|
|
3d7d8c7d5d | ||
|
|
2e5320a532 | ||
|
|
cf3d6d410c | ||
|
|
fe0006c71d | ||
|
|
a8e31ad956 | ||
|
|
588a30fa80 | ||
|
|
e63542d8a6 | ||
|
|
5a8f4905d6 | ||
|
|
7a714906a0 | ||
|
|
d57aa65d30 | ||
|
|
d23130739b | ||
|
|
7dbe2bcf2c | ||
|
|
652d7db0b4 | ||
|
|
6d8871b4cf | ||
|
|
0065adc298 | ||
|
|
e66371c6d1 | ||
|
|
844531e1d2 | ||
|
|
b965103fc3 | ||
|
|
995bec6112 | ||
|
|
a73275b9c1 | ||
|
|
4d0f554f33 | ||
|
|
34d598d9e6 | ||
|
|
87f214dad4 | ||
|
|
8fca860a2d | ||
|
|
4ad5413163 | ||
|
|
6bf2220a67 | ||
|
|
d01a66ac9d | ||
|
|
3c097f34b8 | ||
|
|
8c88b699d6 | ||
|
|
84d6c96d79 | ||
|
|
058578c5b3 | ||
|
|
3af6f683d9 | ||
|
|
2b12c492e2 | ||
|
|
0ed2f4b891 | ||
|
|
5b7f2e0c53 | ||
|
|
a76d5f8a1d | ||
|
|
d04f5c3148 | ||
|
|
53f01685e3 | ||
|
|
b549f62e1d | ||
|
|
0dfbfbc19a | ||
|
|
b3eec934b8 | ||
|
|
86a2da31b4 | ||
|
|
6b6467b86c | ||
|
|
6b6855dff5 | ||
|
|
665f4ac83a | ||
|
|
18b55d5503 | ||
|
|
7633e46ee2 | ||
|
|
4b3778d116 | ||
|
|
238b483ad8 | ||
|
|
d5028e3316 | ||
|
|
4d664fee3a | ||
|
|
4b26d8441b | ||
|
|
bb69fcf0d7 | ||
|
|
9170259351 | ||
|
|
2b74f03eb6 | ||
|
|
594781ec62 | ||
|
|
2b29f45a43 | ||
|
|
1fc2e495ba | ||
|
|
1c6edf2d03 | ||
|
|
150118245f | ||
|
|
6d41500136 | ||
|
|
b6eecb0394 | ||
|
|
9faa832560 | ||
|
|
9be462e43c | ||
|
|
8e1fd7a083 | ||
|
|
9746702d78 | ||
|
|
e514b50d7e | ||
|
|
c845124b92 | ||
|
|
01ea84a917 | ||
|
|
d5ab0723ba | ||
|
|
74f83b235a | ||
|
|
fa43476890 | ||
|
|
9e0f8c5f57 | ||
|
|
8907c9944d | ||
|
|
638764f86d | ||
|
|
1f6cccc3dc | ||
|
|
8cd98b90dc | ||
|
|
be30cb8cbf | ||
|
|
6a86c31067 | ||
|
|
8e4c3dbd1b | ||
|
|
2793785833 | ||
|
|
b82cbf1385 | ||
|
|
3a23feefdf | ||
|
|
65274d4db3 | ||
|
|
c7be0ee9e2 | ||
|
|
c41ac34356 | ||
|
|
8653f3f026 | ||
|
|
59085d7331 | ||
|
|
aaf1dd1b27 | ||
|
|
eb79b73ead | ||
|
|
b2df689669 | ||
|
|
8105021cfd | ||
|
|
c5f29e14a4 | ||
|
|
6aea0bf7a1 | ||
|
|
a4ce2d5f72 | ||
|
|
662f48ddc2 | ||
|
|
e8a80e2365 | ||
|
|
987c09b882 | ||
|
|
399093f501 | ||
|
|
b8a8ee3fb2 | ||
|
|
d7ab92c2a7 | ||
|
|
74f30a2ef6 | ||
|
|
6f2f2d588f | ||
|
|
3ddb6d1126 | ||
|
|
cb487a5362 | ||
|
|
bf5d3331f6 | ||
|
|
7e78e6881a | ||
|
|
22a06355d9 | ||
|
|
a10b836e8a | ||
|
|
3574146baa | ||
|
|
4282a67050 | ||
|
|
3c2fcc1382 | ||
|
|
77f7bd62cd | ||
|
|
1080dda492 | ||
|
|
270499838d | ||
|
|
200ec5ab06 | ||
|
|
171238c514 | ||
|
|
60b78ac41e | ||
|
|
93f8a601ba | ||
|
|
70603214d8 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,3 +15,5 @@ doxygen_warnings.log
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
Thumbs.db
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
notifications:
|
||||
email:
|
||||
on_success: never # [always|never|change] default: change
|
||||
on_failure: always # [always|never|change] default: always
|
||||
on_failure: change # [always|never|change] default: always
|
||||
|
||||
services:
|
||||
- memcached # will start memcached
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
lang_map = uz: uz_UZ
|
||||
|
||||
[dolibarr.admin]
|
||||
file_filter = htdocs/langs/<lang>/admin.lang
|
||||
|
||||
@@ -60,6 +60,7 @@ Copyright (C) 2013
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Adolfo Segura <adolfo.segura@gmail.com>
|
||||
|
||||
Copyright (C) 2012
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
129
ChangeLog
129
ChangeLog
@@ -24,9 +24,6 @@ For users:
|
||||
- New: Add object_hour and object_date_rfc as substitution tag for open document generation.
|
||||
- New: Add options to send an email when paypal or paybox payment is done.
|
||||
- New: Clone product/service composition.
|
||||
- New: [ task #926 ] Add extrafield feature on order lines.
|
||||
- New: [ task #927 ] Add extrafield feature on Proposal lines.
|
||||
- New: [ task #928 ] Add extrafield feature on invoice lines.
|
||||
- New: Add option ADHERENT_LOGIN_NOT_REQUIRED.
|
||||
- New: Add a cron module to define scheduled jobs.
|
||||
- New: Add new graphical boxes (customer and supplier invoices and orders per month).
|
||||
@@ -64,11 +61,14 @@ For users:
|
||||
- New: Add field oustanding limit into thirdparty properties.
|
||||
- New: Can enter a vat payment of zero.
|
||||
- New: Add path to installed dir of external modules + Name and web of module provider.
|
||||
- New: Add option to use a specific mask for uploaded filename
|
||||
- New: Add option to use a specific mask for uploaded filename.
|
||||
- New: Can attach external links to objects as we can attach files.
|
||||
- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
|
||||
- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count.
|
||||
- Fix: [ bug #1022 ] correct margin calculation for credit notes.
|
||||
- Fix: Better management of using ajax for upload form (to solve problem when enabling ajax jquery multifile upload in some cases).
|
||||
- Fix: Lost stats filters into year selection.
|
||||
- Fix: Some config data are shared between suppliers orders and suppliers invoices
|
||||
|
||||
New experimental module:
|
||||
- New: [ task #157 ] Add a Skype button (adherents / third parties / contacts)
|
||||
@@ -127,40 +127,80 @@ parameter. All methods addline in this case were modified to remove this paramet
|
||||
|
||||
5) Property ->tel on objects is now ->phone
|
||||
|
||||
|
||||
6) Trigger LINEPROPAL_MODIFY is renamed into LINEPROPAL_UPDATE and
|
||||
Trigger CONTRACT_LINE_DELETE rnamed into LINECONTRACT_DELETE to match naming rules.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
|
||||
Fix: Bad get of localtaxes into contracts add lines
|
||||
|
||||
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
|
||||
Fix: Warning into bank conciliation feature.
|
||||
Fix: Bad get of localtaxes into contracts add lines.
|
||||
Fix: Add a limit into list to avoid browser to hang when database is too large.
|
||||
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
|
||||
|
||||
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
|
||||
Fix: Warning into bank conciliation feature.
|
||||
Fix: Bad get of localtaxes into contracts add lines.
|
||||
Fix: Add a limit into list to avoid browser to hang when database is too large.
|
||||
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
|
||||
|
||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
||||
Fix: field's problem into company's page (RIB).
|
||||
Fix: Document cerfa doesn't contained firstname & lastname from donator.
|
||||
Fix: Bad rounding on margin calculations and display.
|
||||
Fix: Option drop table into backup was broken.
|
||||
Fix: [ bug #1105 ] Searching Boxes other search option.
|
||||
Fix: wrong buy price update.
|
||||
Fix: [ bug #1142 ] Set paiement on invoice (PGSql).
|
||||
Fix: [ bug #1145 ] Agenda button list type do not display.
|
||||
Fix: [ bug #1148 ] Product consomation : supplier order bad status.
|
||||
Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists.
|
||||
Fix: [ bug #1174 ] Product translated description not good into PDF.
|
||||
Fix: [ bug #1163 ] SQL Error when searching for supplier orders.
|
||||
Fix: [ bug #1162 ] Translaction for morning and afternoon.
|
||||
Fix: [ bug #1161 ] Search on product label.
|
||||
Fix: [ bug #1075 ] POS module doesn't decrement stock of products in delayed payment mode.
|
||||
Fix: [ bug #1171 ] Documents lost in interventions after validating.
|
||||
Fix: fix unsubscribe URL into mailing when sending manually (not by script).
|
||||
Fix: [ bug #1182 ] ODT company_country tag is htmlencoded.
|
||||
Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type.
|
||||
Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal.
|
||||
Fix: Removed analytics tags into doc page.
|
||||
Fix: Call Image on this instead of pdf.
|
||||
Fix: Missing parameter for photo.
|
||||
Fix: Bad SQL request for turnover report.
|
||||
|
||||
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
|
||||
Fix: Display buying price on line edit when no supplier price is defined
|
||||
Fix: Retrieving of margin info when invoice created automatically from order
|
||||
Fix: Reordering supplier products in list by supplier or supplier ref was crashing
|
||||
Fix: [ bug #1029 ] Tulip numbering mask
|
||||
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
|
||||
Fix: [ bug #1033 ] SUPPLIER REF disappeared
|
||||
Fix: update extrafield do not display immediately after update
|
||||
Fix: Fix bug with canvas thirdparty
|
||||
Fix: [ bug #1037 ] Consumption> Supplier invoices related
|
||||
Fix: User group name do not display in card (view or edit mode)
|
||||
Fix: Link "Show all supplier invoice" on supplier card not working
|
||||
Fix: [ bug #1039 ] Pre-defined invoices conversion
|
||||
Fix: If only service module is activated, it's impossible to delete service
|
||||
Fix: [ bug #1043 ] Bad interventions ref numbering
|
||||
Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted
|
||||
Fix: Localtaxes balance not showing
|
||||
Fix: Intervention box links to contracts id
|
||||
Fix: Compatibility with multicompany module
|
||||
Fix: Edit propal line was losing product supplier price id
|
||||
Fix: Delete linked element to supplier invoice when deleted
|
||||
Fix: [ bug #1061 ] Bad info shipped products
|
||||
Fix: [ bug #1062 ] Documents lost in propals and contracts validating
|
||||
Fix: Supplier price displayed on document lines and margin infos didnt take discount
|
||||
Fix: sorting on qty did not work in supplier product list
|
||||
Fix: there was no escaping on filter fields in supplier product list
|
||||
Fix: bugs on margin reports and better margin calculation on credit notes
|
||||
Qual: Add travis-ci integration
|
||||
|
||||
Fix: Display buying price on line edit when no supplier price is defined.
|
||||
Fix: Retrieving of margin info when invoice created automatically from order.
|
||||
Fix: Reordering supplier products in list by supplier or supplier ref was crashing.
|
||||
Fix: [ bug #1029 ] Tulip numbering mask.
|
||||
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card.
|
||||
Fix: [ bug #1033 ] SUPPLIER REF disappeared.
|
||||
Fix: update extrafield do not display immediatly after update.
|
||||
Fix: Fix bug with canvas thirdparty.
|
||||
Fix: [ bug #1037 ] Consumption> Supplier invoices related.
|
||||
Fix: User group name do not display in card (view or edit mode).
|
||||
Fix: Link "Show all supplier invoice" on suplier card not working.
|
||||
Fix: [ bug #1039 ] Pre-defined invoices conversion.
|
||||
Fix: If only service module is activated, it's impossible to delete service.
|
||||
Fix: [ bug #1043 ] Bad interventions ref numbering.
|
||||
Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted.
|
||||
Fix: Localtaxes balance not showing.
|
||||
Fix: Intervention box links to contracts id.
|
||||
Fix: Compatiblity with multicompany module.
|
||||
Fix: Edit propal line was losing product supplier price id.
|
||||
Fix: Delete linked element to supplier invoice when deleted.
|
||||
Fix: [ bug #1061 ] Bad info shipped products.
|
||||
Fix: [ bug #1062 ] Documents lost in propals and contracts validating.
|
||||
Fix: Supplier price displayed on document lines and margin infos didnt take discount.
|
||||
Fix: sorting on qty did not work in supplier product list.
|
||||
Fix: there was no escaping on filter fields in supplier product list.
|
||||
Fix: bugs on margin reports and better margin calculation on credit notes.
|
||||
Qual: Add travis-ci integration.
|
||||
|
||||
***** ChangeLog for 3.4 compared to 3.3.* *****
|
||||
For users:
|
||||
@@ -258,6 +298,13 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.3.5 compared to 3.3.4 *****
|
||||
- Fix: Change to make debian package ok despite removal of ckeditor.
|
||||
- Fix: jcrop file to match debian rules
|
||||
- Fix: Add missing country UK.
|
||||
- Fix: Minor fix into package.
|
||||
- Fix: Add missing label on project field.
|
||||
|
||||
***** ChangeLog for 3.3.4 compared to 3.3.3 *****
|
||||
- Fix: [ bug #1001 ] Social Contribution : State not correct
|
||||
- Fix: Better management of pdf generation when tcpdf is not available.
|
||||
@@ -428,7 +475,6 @@ Dolibarr license has also been updated from GPLv2+ to GPLv3+.
|
||||
|
||||
|
||||
***** ChangeLog for 3.2.3 compared to 3.2.2 *****
|
||||
|
||||
- Fix: Some permission into agenda module.
|
||||
- Fix: Generation of PDF was not using correct font for some languages.
|
||||
- Fix some translations.
|
||||
@@ -582,7 +628,6 @@ WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol
|
||||
|
||||
|
||||
***** 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
|
||||
@@ -591,7 +636,6 @@ 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
|
||||
@@ -604,7 +648,6 @@ Fix: bug #405 - Late icon always displayed on comm/propal.php
|
||||
|
||||
|
||||
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
|
||||
|
||||
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
|
||||
credit notes are not removed from total amount of invoice but are just
|
||||
payments used to reducs remain to pay.
|
||||
@@ -726,7 +769,6 @@ For translators:
|
||||
|
||||
|
||||
***** ChangeLog for 3.0 compared to 2.9.* *****
|
||||
|
||||
For users:
|
||||
- New: Can edit date of cheque receipts.
|
||||
- New: Add Sales journal and Purchase journal report.
|
||||
@@ -822,7 +864,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.9 compared to 2.8.* *****
|
||||
|
||||
For users:
|
||||
- New: POS module allow to choose which warehouse to use.
|
||||
- New: Support "Department/State" field on company setup, contact,
|
||||
@@ -940,7 +981,6 @@ For users:
|
||||
|
||||
|
||||
***** ChangeLog for 2.8 compared to 2.7.* *****
|
||||
|
||||
For users:
|
||||
- New: Support note on trips module
|
||||
- New: Can link contacts to projects
|
||||
@@ -991,7 +1031,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.7.1 compared to 2.7 *****
|
||||
|
||||
For users:
|
||||
- Fix: Bad decimal management for it_IT and fr_BE languages.
|
||||
- Fix: A third party created from a member is created as a
|
||||
@@ -1004,7 +1043,6 @@ For users:
|
||||
|
||||
|
||||
***** ChangeLog for 2.7 compared to 2.6.* *****
|
||||
|
||||
For users:
|
||||
- New: Add a print icon to show a page to print without menus.
|
||||
- New: Can add a free text on bank cheque receipts.
|
||||
@@ -1103,7 +1141,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.6 compared to 2.5.* *****
|
||||
|
||||
For users:
|
||||
- New: Add filter on status in emailing selector for Dolibarr users.
|
||||
- New: Can add bookmarks on all pages.
|
||||
@@ -1186,7 +1223,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.5 compared to 2.4.* *****
|
||||
|
||||
For users:
|
||||
- Sessions timeout can be configured to overwrite PHP setup.
|
||||
- Can filter on date in services list.
|
||||
@@ -1250,7 +1286,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.4 compared to 2.2.* *****
|
||||
|
||||
For users:
|
||||
- Add a calendar module (module agenda) with ical/vcal/rss export.
|
||||
- Look enhancement in graphics (thanks artichow).
|
||||
@@ -1305,7 +1340,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.2 compared to 2.1.* *****
|
||||
|
||||
- Add more statistics on main page.
|
||||
- Add option to add message on login page.
|
||||
- Management of categories for third parties.
|
||||
@@ -1339,7 +1373,6 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.1 compared to 2.0.* *****
|
||||
|
||||
- Added a better installer.
|
||||
- Support user and groups permissions.
|
||||
- Translation in english and support for several languages.
|
||||
@@ -1404,12 +1437,10 @@ For developers:
|
||||
|
||||
|
||||
***** ChangeLog for 2.0.1 compared to 2.0 *****
|
||||
|
||||
Minor bug fixes
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 2.0 compared to 1.0.* *****
|
||||
|
||||
ChangeLog file size is so important, that it is not included inside Dolibarr
|
||||
package. You can find it at www.dolibarr.org
|
||||
|
||||
80
README.md
80
README.md
@@ -76,61 +76,63 @@ See ChangeLog file found into package.
|
||||
|
||||
### Main modules/features:
|
||||
|
||||
- Customers, Prospects or Suppliers directory
|
||||
- Products and services catalog
|
||||
- Bank accounts management
|
||||
- Orders management
|
||||
- Commercial proposals management
|
||||
- Contracts management
|
||||
- Invoices management
|
||||
- Payments management
|
||||
- Standing orders management
|
||||
- Stock management
|
||||
- Shipping management
|
||||
- Customers, Prospects or Suppliers directory.
|
||||
- Products and services catalog.
|
||||
- Bank accounts management.
|
||||
- Orders management.
|
||||
- Commercial proposals management.
|
||||
- Contracts management.
|
||||
- Invoices management.
|
||||
- Payments management.
|
||||
- Standing orders management.
|
||||
- Stock management.
|
||||
- Shipping management.
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- Agenda with ical,vcal export for third tools integration
|
||||
- EDM (Electronic Document Management)
|
||||
- Foundations members management
|
||||
- Employee's holidays management
|
||||
- Mass Emailing
|
||||
- Realize surveys
|
||||
- Point of Sale
|
||||
- Agenda with ical,vcal export for third tools integration.
|
||||
- EDM (Electronic Document Management).
|
||||
- Foundations members management.
|
||||
- Employee's holidays management.
|
||||
- Mass Emailing.
|
||||
- Realize surveys.
|
||||
- Point of Sale.
|
||||
|
||||
### Other modules:
|
||||
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- LDAP connectivity
|
||||
- Third parties or products categories
|
||||
- ClickToDial integration
|
||||
- RSS integration
|
||||
- Bookmarks management.
|
||||
- Donations management.
|
||||
- Reporting.
|
||||
- Data export/import.
|
||||
- Third parties or products categories.
|
||||
- LDAP connectivity.
|
||||
- ClickToDial integration.
|
||||
- RSS integration.
|
||||
- Can be extended with a lot of other external modules available onto DoliStore.com.
|
||||
|
||||
### Miscellaneous:
|
||||
|
||||
- Multi-user, with several permissions levels for each feature.
|
||||
- Serveral menu managers (can be used by internal users, as a back-office, with a particular menu, or by external users, as a front-office, with another menu and permissions).
|
||||
- Very user friendly and easy to use.
|
||||
- Optional WYSIWYG forms, optional Ajax forms.
|
||||
- Several skins.
|
||||
- Code is highly customizable (a lot of use of modules and submodules).
|
||||
- Works with Mysql 4.1 or higher, or PostgreSql 8.14 or higher.
|
||||
- Works with PHP 5.0 or higher.
|
||||
- An easy to understand and maintain code (PHP with no heavy frameworks).
|
||||
- A trigger architecture to allow you to make Dolibarr business events run PHP code to update your own information system.
|
||||
- "NPR VAT Rate" (French particularity for managing VAT in DOM-TOM called "Non Perçue Récupérable").
|
||||
|
||||
- Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one).
|
||||
- Works with PHP 5.2.1, MySql 4.1 or PostgreSQL 8.1.
|
||||
- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture).
|
||||
- Support countries specific features:
|
||||
Spanish Tax RE and ISPF.
|
||||
French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM).
|
||||
Canadian double taxes (federal/province) and other countries using cumulative VAT.
|
||||
Tunisian tax stamp.
|
||||
Compatible with European directives (2006/112/CE ... 2010/45/UE) (http://europa.eu/legislation_summaries/taxation/l31057_en.htm)
|
||||
...
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET (TODO LIST)
|
||||
|
||||
This is features that Dolibarr does not support completely yet:
|
||||
|
||||
- No double party accountancy (only bank management).
|
||||
- No double party accountancy (only bank and treasury management).
|
||||
- Dolibarr manage one currency at once (mono-currency).
|
||||
- Dolibarr manage one master company/foundation (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Dolibarr manage one master activity (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Tasks on module project can't have dependencies between each other.
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Dolibarr does not include any Webmail.
|
||||
- Dolibarr can't do coffee (not yet).
|
||||
|
||||
70
build/README
70
build/README
@@ -7,10 +7,27 @@ All sub-directories of "build" directory contains files required to build
|
||||
automatically Dolibarr packages.
|
||||
There are several tools:
|
||||
|
||||
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Edit version in makepack-dolibarr.pl file.
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
Note: Prerequisites to build tgz, debian, rpm package
|
||||
> apt-get install tar dpkg dpatch p7zip-full rpm zip
|
||||
|
||||
Note: Prerequisites to build autoexe DoliWamp package:
|
||||
> Install InnoSetup
|
||||
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp"
|
||||
For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0
|
||||
For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
|
||||
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
|
||||
For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
|
||||
> To build from Windows (running from makepack-dolibarr.pl script is however
|
||||
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
|
||||
The .exe file will be build into directory build.
|
||||
|
||||
- To build a translaction package, launch the script
|
||||
> perl makepack-dolibarrlang.pl
|
||||
|
||||
@@ -20,17 +37,6 @@ There are several tools:
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
- To build an autoexe DoliWamp package:
|
||||
> Install InnoSetup (http://www.jrsoftware.org)
|
||||
> Install WampServer into "C:\Program Files\Wamp" (http://www.wampserver.com)
|
||||
> Install WampServer addon to have versions:
|
||||
Apache2.2.6, Mysql5.0.45, Php5.2.5
|
||||
> Modify file build/exe/doliwamp.iss to change variable SourceDir
|
||||
with value of Dolibarr repository.
|
||||
> Modify AppVerName and OutputBaseFilename.
|
||||
> Launch innosetup, open file build/exe/doliwamp.iss and click on
|
||||
button "Compile". The .exe file will be build into directory build.
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolybarr-doxygen-build.pl
|
||||
|
||||
@@ -43,24 +49,33 @@ generated packages will not contains this "build" directory.
|
||||
|
||||
We can find in "build", following sub-directories:
|
||||
|
||||
* deb:
|
||||
* aps:
|
||||
To build APS package.
|
||||
|
||||
* debian:
|
||||
To build Debian package.
|
||||
|
||||
* rpm:
|
||||
To build Redhat or Mandrake package.
|
||||
* dmg:
|
||||
To build Mac OS package (not ready yet).
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
* exe:
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* tgz:
|
||||
To build a zip package.
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
* live:
|
||||
Doc file to explain how to create a demo live CD.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
* pad:
|
||||
To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
@@ -68,5 +83,14 @@ To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
* patch:
|
||||
Script file to generate a patch file to distribute a Dolibarr mod.
|
||||
|
||||
* dmg:
|
||||
To build dmg DoliMamp package for Mac OS X
|
||||
* perl:
|
||||
Tool to install dolibarr when using virtualmin pro
|
||||
|
||||
* rpm:
|
||||
To build Redhat, Opensuse or Mandriva package.
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
|
||||
@@ -39,7 +39,13 @@ END
|
||||
|
||||
|
||||
# To use Alioth.debian.org
|
||||
* Create a login
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
User eldy-guest
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
* Check login on page https://alioth.debian.org/users/login
|
||||
Ex: https://alioth.debian.org/users/eldy-guest
|
||||
* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH
|
||||
* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/
|
||||
|
||||
@@ -192,8 +198,7 @@ To update dolibarr debian package
|
||||
* You can git clone debian git repo
|
||||
> git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian]
|
||||
or better
|
||||
> mkdir gitdebian
|
||||
> cd gitdebian
|
||||
> cd ~; mkdir git-debian; cd git-debian
|
||||
> gbp-clone git.debian.org:/git/collab-maint/dolibarr.git
|
||||
|
||||
* You can then create a PHP project from Eclipse called dolibarr-debian
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
dolibarr (3.5.0-1) unstable; urgency=low
|
||||
dolibarr (3.5.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 31 Jan 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 27 Apr 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
@@ -1,40 +1,47 @@
|
||||
Source: dolibarr
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Standards-Version: 3.9.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 7), po-debconf, dpatch
|
||||
Build-Depends: debhelper (>= 9), po-debconf, dpatch
|
||||
Comments: This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
|
||||
Package: dolibarr
|
||||
Architecture: all
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-mysql | php5-mysqli,
|
||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime, php5-geoip,
|
||||
libphp-adodb,
|
||||
libnusoap-php,
|
||||
libphp-pclzip,
|
||||
libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
||||
ttf-dejavu-core,
|
||||
php5-cli,
|
||||
# Required PHP extensions
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
# libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
# Required javascript libraries
|
||||
# libjs-jquery, libjs-jquery-ui, libjs-flot, ckeditor,
|
||||
# Misc dependencies
|
||||
# fonts-dejavu-core | ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
mysql-server,
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: apache2 | lighttpd | httpd, mysql-client
|
||||
Recommends: mysql-client, apache2 | lighttpd | httpd
|
||||
Suggests: www-browser
|
||||
Architecture: all
|
||||
Description: Web based software to manage a small company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
||||
and medium companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
.
|
||||
It's a web software you can install as a standalone program or on any web
|
||||
hosting provider to use it from anywhere with any web browser.
|
||||
.
|
||||
Dolibarr was designed to be easy to use. Only features you need are
|
||||
visible, depending on which module were activated.
|
||||
Dolibarr was designed to be easy to use. Only the features that you need are
|
||||
visible, depending on which modules were activated.
|
||||
.
|
||||
Most common used modules are:
|
||||
.
|
||||
Customers, Suppliers or Prospects directory,
|
||||
|
||||
@@ -6,7 +6,7 @@ debian/lighttpd/50-dolibarr.conf etc/lighttpd/conf-available/
|
||||
debian/install.forced.php.install etc/dolibarr/
|
||||
htdocs usr/share/dolibarr/
|
||||
scripts usr/share/dolibarr/
|
||||
ChangeLog usr/share/doc/dolibarr/
|
||||
changelog usr/share/doc/dolibarr/
|
||||
README usr/share/doc/dolibarr/
|
||||
doc/install usr/share/doc/dolibarr/
|
||||
doc/user usr/share/doc/dolibarr/
|
||||
|
||||
@@ -13,6 +13,11 @@ set -e
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
|
||||
# Needs to be run outside of functions to have access to parameters
|
||||
. /usr/share/apache2/apache2-maintscript-helper
|
||||
fi
|
||||
|
||||
setup_empty_conf() {
|
||||
echo Create empty file $config
|
||||
mkdir -p /etc/dolibarr
|
||||
@@ -37,20 +42,23 @@ enable_install_upgrade_wizard() {
|
||||
|
||||
apache_install() {
|
||||
webserver=$1
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Add link for Apache config file"
|
||||
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||
if which a2enconf >/dev/null 2>&1 ;then
|
||||
# a2enconf exists for ubuntu only
|
||||
a2enconf dolibarr
|
||||
else
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Add link for Apache config file"
|
||||
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
lighttpd_install() {
|
||||
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
|
||||
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
||||
echo "Enable lighttpd link for dolibarr config file"
|
||||
lighty-enable-mod dolibarr fastcgi-php
|
||||
else
|
||||
echo "Lighttpd not installed, skipping"
|
||||
fi
|
||||
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
||||
echo "Enable lighttpd link for dolibarr config file"
|
||||
lighty-enable-mod dolibarr fastcgi-php
|
||||
else
|
||||
echo "Lighttpd not installed, skipping"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -79,6 +87,12 @@ case "$1" in
|
||||
else
|
||||
echo This is not a first install
|
||||
fi
|
||||
|
||||
# Apache 2 setup
|
||||
if which a2enmod >/dev/null 2>&1 ;then
|
||||
a2enmod alias
|
||||
fi
|
||||
|
||||
apache_install
|
||||
lighttpd_install
|
||||
|
||||
|
||||
@@ -177,18 +177,19 @@ case "$1" in
|
||||
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
|
||||
fi
|
||||
mysqlcmd="mysql $hostopt $passopt -u $dbadmin"
|
||||
|
||||
mysqlcmdnopass="mysql $hostopt -u $dbadmin"
|
||||
|
||||
# Now run the drop user
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then
|
||||
echo postrm Database login $dbuser@localhost removed
|
||||
else
|
||||
error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then
|
||||
echo postrm Database login $dbuser@% removed
|
||||
else
|
||||
error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
|
||||
|
||||
@@ -27,20 +27,20 @@ $force_install_lockinstall='444';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
|
||||
// If we enable/disable libraries declaration during install, we must also check they are
|
||||
// not removed from package (see in rules file),
|
||||
// declared into dependencies (see in control file)
|
||||
$force_dolibarr_lib_TCPDF_PATH='';
|
||||
$force_dolibarr_lib_FPDF_PATH='/usr/share/php/fpdf';
|
||||
$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
$force_dolibarr_lib_GEOIP_PATH='';
|
||||
$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
// - not removed from package (see rm in rules file),
|
||||
// - declared into dependencies (see Depends in control file)
|
||||
//$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_lib_FPDF_PATH='/usr/share/php/fpdf';
|
||||
//$force_dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi';
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
//$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
|
||||
?>
|
||||
@@ -90,32 +90,33 @@ clean:
|
||||
rm -fr build/rpm
|
||||
rm -fr build/zip
|
||||
|
||||
# clean from all embedded libraries (we use package dependencies instead)
|
||||
rm -fr htdocs/includes/adodbtime
|
||||
rm -fr htdocs/includes/ckeditor
|
||||
# clean from all PHP embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/adodbtime
|
||||
# rm -fr htdocs/includes/fpdfi
|
||||
rm -fr htdocs/includes/fonts
|
||||
rm -fr htdocs/includes/geoip
|
||||
rm -fr htdocs/includes/nusoap
|
||||
rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
rm -fr htdocs/includes/phpmailer
|
||||
rm -fr htdocs/includes/jquery/css
|
||||
rm -fr htdocs/includes/jquery/js
|
||||
rm -fr htdocs/includes/jquery/plugins/flot
|
||||
rm -fr htdocs/includes/jquery/plugins/jstree
|
||||
rm -fr htdocs/includes/jquery/plugins/lightbox
|
||||
# rm -fr htdocs/includes/geoip
|
||||
# rm -fr htdocs/includes/nusoap
|
||||
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
# clean from all JS-CSS embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/ckeditor
|
||||
# rm -fr htdocs/includes/jquery/js
|
||||
# rm -fr htdocs/includes/jquery/css
|
||||
# rm -fr htdocs/includes/jquery/plugins/flot
|
||||
# clean from all embedded fonts (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/fonts
|
||||
|
||||
# clean from useless files
|
||||
rm -fr htdocs/includes/jquery/plugins/multiselect
|
||||
rm -fr htdocs/includes/phpexcel/PHPExcel/Shared/PDF
|
||||
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/freefont-20100919
|
||||
rm -fr htdocs/includes/tcpdf/fonts/utils
|
||||
|
||||
# clean from files to avoid warning of missing dependencies
|
||||
rm -fr htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.py
|
||||
|
||||
# Licence files are included into copyright file.
|
||||
rm -fr htdocs/includes/phpexcel/license.txt
|
||||
# Licence files are already included into copyright file.
|
||||
rm -f htdocs/includes/jquery/plugins/flot/LICENSE.txt
|
||||
rm -f htdocs/includes/phpexcel/license.txt
|
||||
rm -f htdocs/includes/tcpdf/LICENSE.TXT
|
||||
|
||||
dh $@
|
||||
|
||||
0
build/doxygen/dolibarr-doxygen-build.pl
Normal file → Executable file
0
build/doxygen/dolibarr-doxygen-build.pl
Normal file → Executable file
0
build/doxygen/dolibarr-doxygen-filter.pl
Normal file → Executable file
0
build/doxygen/dolibarr-doxygen-filter.pl
Normal file → Executable file
0
build/doxygen/dolibarr-doxygen-getversion.pl
Normal file → Executable file
0
build/doxygen/dolibarr-doxygen-getversion.pl
Normal file → Executable file
@@ -22,7 +22,7 @@ File added into doxygen generated documentation
|
||||
|
||||
<hr class="footer" />
|
||||
<address class="footer"><small>Generated on $datetime
|
||||
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen </a> $doxygenversion </small></address>
|
||||
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
|
||||
|
||||
|
||||
<!-- Google AdSense -->
|
||||
@@ -40,5 +40,6 @@ google_ad_height = 60;
|
||||
<!-- End google adsense -->
|
||||
<br>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,15 +17,15 @@
|
||||
; ----- Change this -----
|
||||
AppName=DoliWamp
|
||||
; 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.5.0-beta
|
||||
AppVerName=DoliWamp-3.5.0
|
||||
; 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.5.0-beta
|
||||
; Define full path from wich all relative path are defined
|
||||
OutputBaseFilename=DoliWamp-3.5.0
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
; Define full path from which all relative path are defined
|
||||
; You must modify this to put here your dolibarr root directory
|
||||
;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
|
||||
SourceDir=..\..\..
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
AppId=doliwamp
|
||||
AppPublisher=NLTechno
|
||||
AppPublisherURL=http://www.nltechno.com
|
||||
@@ -51,7 +51,6 @@ CreateUninstallRegKey=yes
|
||||
OutputDir=build
|
||||
ShowLanguageDialog=auto
|
||||
ShowUndisplayableLanguages=no
|
||||
;LanguageDetectionMethod=none
|
||||
LanguageDetectionMethod=uilanguage
|
||||
;SignedUninstaller=yes
|
||||
|
||||
@@ -109,7 +108,7 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m
|
||||
; Mysql data files (does not overwrite if exists)
|
||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||
; Dolibarr
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
|
||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
|
||||
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
|
||||
#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild'
|
||||
#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules'
|
||||
#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
@@ -10,7 +18,7 @@ use Cwd;
|
||||
$PROJECT="dolibarr";
|
||||
$MAJOR="3";
|
||||
$MINOR="5";
|
||||
$BUILD="0-beta"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
|
||||
$BUILD="0"; # 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
|
||||
|
||||
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@@ -23,7 +31,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
|
||||
"RPM_FEDORA"=>"rpmbuild",
|
||||
"RPM_MANDRIVA"=>"rpmbuild",
|
||||
"RPM_OPENSUSE"=>"rpmbuild",
|
||||
"DEB"=>"dpkg",
|
||||
"DEB"=>"dpkg dpatch",
|
||||
"APS"=>"zip",
|
||||
"EXEDOLIWAMP"=>"ISCC.exe"
|
||||
);
|
||||
@@ -38,7 +46,7 @@ $FILENAMETGZ="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMEXZ="$PROJECT-$MAJOR.$MINOR.$BUILD";
|
||||
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
|
||||
$FILENAMEDEB="see later";
|
||||
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
|
||||
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
|
||||
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
|
||||
@@ -59,6 +67,23 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
$SOURCE="$DIR/..";
|
||||
$DESTI="$SOURCE/build";
|
||||
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Missing environment variables.\n";
|
||||
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
|
||||
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
|
||||
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Detect OS type
|
||||
# --------------
|
||||
@@ -66,7 +91,7 @@ if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='
|
||||
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
|
||||
if (! $OS) {
|
||||
print "$PROG.$Extension was not able to detect your OS.\n";
|
||||
print "Error: Can't detect your OS.\n";
|
||||
print "Can't continue.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
@@ -105,8 +130,8 @@ for (0..@ARGV-1) {
|
||||
$FILENAMESNAPSHOT.="-".$PREFIX;
|
||||
}
|
||||
}
|
||||
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
|
||||
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";
|
||||
@@ -200,7 +225,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
last;
|
||||
} else {
|
||||
# Pas erreur ou erreur autre que programme absent
|
||||
print " Found ".$REQUIREMENTTARGET{$target}."\n";
|
||||
print " Found ".$req."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,6 +355,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
@@ -339,6 +365,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
@@ -388,6 +416,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'TGZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMETGZ.tgz...\n";
|
||||
@@ -414,6 +443,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'XZ')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMEXZ.xz...\n";
|
||||
@@ -444,6 +474,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'ZIP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/standard');
|
||||
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
|
||||
|
||||
print "Remove target $FILENAMEZIP.zip...\n";
|
||||
@@ -478,6 +509,7 @@ if ($nboftargetok) {
|
||||
if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
|
||||
if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
|
||||
if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
|
||||
mkdir($DESTI.'/'.$subdir);
|
||||
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
|
||||
|
||||
$ARCH='noarch';
|
||||
@@ -487,11 +519,12 @@ if ($nboftargetok) {
|
||||
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
|
||||
$newbuild =~ s/beta/0.2.beta1/gi; # beta
|
||||
$newbuild =~ s/rc./0.3.rc1/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale
|
||||
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
|
||||
#$newbuild =~ s/beta/1/gi; # beta
|
||||
#$newbuild =~ s/rc./2/gi; # rc
|
||||
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
|
||||
#print "newbuild=".$newbuild."\n";exit;
|
||||
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
|
||||
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
|
||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||
@@ -573,6 +606,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'DEB')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_debian-ubuntu');
|
||||
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
|
||||
|
||||
$olddir=getcwd();
|
||||
@@ -581,15 +615,17 @@ if ($nboftargetok) {
|
||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||
$newbuild =~ s/beta/2/gi; # beta
|
||||
$newbuild =~ s/rc./3/gi; # rc
|
||||
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale
|
||||
# now newbuild is 0-1 or 0-4 for example
|
||||
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc
|
||||
# now newbuild is 0-1 or 0-3 for example
|
||||
print "Version is $MAJOR.$MINOR.$newbuild\n";
|
||||
$build = $newbuild;
|
||||
$build =~ s/-.*$//g;
|
||||
# now build is 0 for example
|
||||
# $build .= '+nmu1';
|
||||
# now build is 0+nmu1 for example
|
||||
|
||||
|
||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
||||
|
||||
print "Remove target ${FILENAMEDEB}_all.deb...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}_all.deb");
|
||||
print "Remove target ${FILENAMEDEB}.dsc...\n";
|
||||
@@ -644,12 +680,14 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
||||
# We remove embedded libraries or fonts (this is also inside rules file, target clean)
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`,
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`;
|
||||
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`,
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`;
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`;
|
||||
# Rename upstream changelog to match debian rules
|
||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||
|
||||
# Prepare source package (init debian dir)
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
@@ -721,6 +759,8 @@ if ($nboftargetok) {
|
||||
|
||||
chdir("$olddir");
|
||||
|
||||
print "You can check package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
|
||||
|
||||
# Move to final dir
|
||||
print "Move *_all.deb to $NEWDESTI\n";
|
||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||
@@ -733,6 +773,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'APS')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_aps');
|
||||
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
|
||||
|
||||
$newbuild = $BUILD;
|
||||
@@ -817,6 +858,7 @@ if ($nboftargetok) {
|
||||
if ($target eq 'EXEDOLIWAMP')
|
||||
{
|
||||
$NEWDESTI=$DESTI;
|
||||
mkdir($DESTI.'/package_windows');
|
||||
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
|
||||
|
||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarrmodule.pl
|
||||
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
||||
# \author (c)2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
$OWNER="ldestailleur";
|
||||
$GROUP="ldestailleur";
|
||||
|
||||
|
||||
@LISTETARGET=("TGZ"); # Possible packages
|
||||
@LISTETARGET=("ZIP"); # Possible packages
|
||||
%REQUIREMENTTARGET=( # Tool requirement for each package
|
||||
"TGZ"=>"tar",
|
||||
"ZIP"=>"7z"
|
||||
@@ -35,9 +37,9 @@ if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='
|
||||
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
|
||||
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
|
||||
if (! $OS) {
|
||||
print "makepack-dolbarrmodule.pl was not able to detect your OS.\n";
|
||||
print "$PROG.$Extension was not able to detect your OS.\n";
|
||||
print "Can't continue.\n";
|
||||
print "makepack-dolibarrmodule.pl aborted.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
@@ -57,7 +59,7 @@ if ($OS =~ /windows/) {
|
||||
if (! $TEMP || ! -d $TEMP) {
|
||||
print "Error: A temporary directory can not be find.\n";
|
||||
print "Check that TEMP or TMP environment variable is set correctly.\n";
|
||||
print "makepack-dolibarrmodule.pl aborted.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 2;
|
||||
}
|
||||
@@ -86,18 +88,6 @@ print "Source directory: $SOURCE\n";
|
||||
print "Target directory: $NEWDESTI\n";
|
||||
|
||||
|
||||
# Ask and set version $MAJOR, $MINOR and $BUILD
|
||||
print "Enter value for version: ";
|
||||
$PROJVERSION=<STDIN>;
|
||||
chomp($PROJVERSION);
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
if ($MINOR eq '')
|
||||
{
|
||||
print "Enter value for minor version: ";
|
||||
$MINOR=<STDIN>;
|
||||
chomp($MINOR);
|
||||
}
|
||||
|
||||
# Ask module
|
||||
print "Enter name for your module (mymodule, mywonderfulmondule, ... or 'all') : ";
|
||||
$PROJECTINPUT=<STDIN>;
|
||||
@@ -128,6 +118,8 @@ else
|
||||
# Loop on each projects
|
||||
foreach my $PROJECT (@PROJECTLIST) {
|
||||
|
||||
$PROJECTLC=lc($PROJECT);
|
||||
|
||||
if (! -f "makepack-".$PROJECT.".conf")
|
||||
{
|
||||
print "Error: can't open conf file makepack-".$PROJECT.".conf\n";
|
||||
@@ -139,9 +131,28 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
exit 2;
|
||||
}
|
||||
|
||||
$FILENAME="$PROJECT";
|
||||
$FILENAMETGZ="module_$PROJECT-$MAJOR.$MINOR".($BUILD ne ''?".$BUILD":"");
|
||||
$FILENAMEZIP="module_$PROJECT-$MAJOR.$MINOR".($BUILD ne ''?".$BUILD":"");
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
print "Version detected for module ".$PROJECT.": ";
|
||||
$result=open(IN,"<".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
|
||||
if (! $result) { die "Error: Can't open descriptor file ".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n"; }
|
||||
while(<IN>)
|
||||
{
|
||||
if ($_ =~ /this->version\s*=\s*'([\d\.]+)'/) { $PROJVERSION=$1; break; }
|
||||
}
|
||||
close IN;
|
||||
print $PROJVERSION."\n";
|
||||
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
if ($MINOR eq '')
|
||||
{
|
||||
print "Enter value for minor version for module ".$PROJECT.": ";
|
||||
$MINOR=<STDIN>;
|
||||
chomp($MINOR);
|
||||
}
|
||||
|
||||
$FILENAME="$PROJECTLC";
|
||||
$FILENAMETGZ="module_$PROJECTLC-$MAJOR.$MINOR".($BUILD ne ''?".$BUILD":"");
|
||||
$FILENAMEZIP="module_$PROJECTLC-$MAJOR.$MINOR".($BUILD ne ''?".$BUILD":"");
|
||||
if (-d "/usr/src/redhat") {
|
||||
# redhat
|
||||
$RPMDIR="/usr/src/redhat";
|
||||
@@ -228,7 +239,7 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
$ret=`rm -fr "$BUILDROOT"`;
|
||||
|
||||
mkdir "$BUILDROOT";
|
||||
mkdir "$BUILDROOT/$PROJECT";
|
||||
mkdir "$BUILDROOT/$PROJECTLC";
|
||||
|
||||
$result=open(IN,"<makepack-".$PROJECT.".conf");
|
||||
if (! $result) { die "Error: Can't open conf file makepack-".$PROJECT.".conf for reading.\n"; }
|
||||
@@ -238,44 +249,44 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
|
||||
$_ =~ s/\n//;
|
||||
$_ =~ /^(.*)\/[^\/]+/;
|
||||
print "Create directory $BUILDROOT/$PROJECT/$1\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT/$1"`;
|
||||
print "Create directory $BUILDROOT/$PROJECTLC/$1\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECTLC/$1"`;
|
||||
if ($_ !~ /version\-/)
|
||||
{
|
||||
print "Copy $SOURCE/$_ into $BUILDROOT/$PROJECT/$_\n";
|
||||
$ret=`cp -pr "$SOURCE/$_" "$BUILDROOT/$PROJECT/$_"`;
|
||||
print "Copy $SOURCE/$_ into $BUILDROOT/$PROJECTLC/$_\n";
|
||||
$ret=`cp -pr "$SOURCE/$_" "$BUILDROOT/$PROJECTLC/$_"`;
|
||||
if ($? != 0) { die "Failed to make copy of a file declared into makepack-".$PROJECT.".conf file (Fails on line ".$_.")\n"; }
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
|
||||
@timearray=localtime(time());
|
||||
$fulldate=($timearray[5]+1900).'-'.($timearray[4]+1).'-'.$timearray[3].' '.$timearray[2].':'.$timearray[1];
|
||||
open(VF,">$BUILDROOT/$PROJECT/build/version-".$PROJECT.".txt");
|
||||
open(VF,">$BUILDROOT/$PROJECTLC/build/version-".$PROJECTLC.".txt");
|
||||
|
||||
print "Create version file $BUILDROOT/$PROJECT/build/version-".$PROJECT.".txt with date ".$fulldate."\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT/build"`;
|
||||
print "Create version file $BUILDROOT/$PROJECTLC/build/version-".$PROJECTLC.".txt with date ".$fulldate."\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECTLC/build"`;
|
||||
print VF "Version: ".$MAJOR.".".$MINOR.($BUILD ne ''?".$BUILD":"")."\n";
|
||||
print VF "Build : ".$fulldate."\n";
|
||||
close VF;
|
||||
}
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/index.php`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/build/html`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf*sav*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/Thumbs.db $BUILDROOT/$PROJECTLC/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/CVS* $BUILDROOT/$PROJECTLC/*/CVS* $BUILDROOT/$PROJECTLC/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/*/CVS*`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@@ -313,9 +324,9 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
unlink "$NEWDESTI/$FILENAMEZIP.zip";
|
||||
print "Compress $FILENAMEZIP into $FILENAMEZIP.zip...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT/$PROJECT\n";
|
||||
print "Go to directory $BUILDROOT/$PROJECTLC\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$BUILDROOT/$PROJECT");
|
||||
chdir("$BUILDROOT/$PROJECTLC");
|
||||
$cmd= "7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip *";
|
||||
print $cmd."\n";
|
||||
$ret= `$cmd`;
|
||||
@@ -323,6 +334,7 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
|
||||
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
|
||||
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
|
||||
$ret=`chown $OWNER.$GROUP "$NEWDESTI/$FILENAMEZIP.zip"`;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,3 +34,12 @@ Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/
|
||||
Then add into advanded - attributes
|
||||
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||
OBS:QualityCategory Testing
|
||||
|
||||
|
||||
# Move project into official directory
|
||||
- Enter a bug to ask to be a maintener of a category or to add a new one.
|
||||
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
|
||||
https://build.opensuse.org/project/show/Application:ERP
|
||||
- Once done, go into project, category, subproject and enter a subproject for your application.
|
||||
Fo example: Dolibarr
|
||||
- Then go onto project into your home and ask a publish to the category/you project your created.
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<CompanyName />
|
||||
<Program_Info>
|
||||
<Program_Name>DoliWamp</Program_Name>
|
||||
<Program_Version>3.3.0</Program_Version>
|
||||
<Program_Release_Month>08</Program_Release_Month>
|
||||
<Program_Release_Day>10</Program_Release_Day>
|
||||
<Program_Release_Year>2012</Program_Release_Year>
|
||||
<Program_Version>3.5.0</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<CompanyName />
|
||||
<Program_Info>
|
||||
<Program_Name>Dolibarr</Program_Name>
|
||||
<Program_Version>3.3.0</Program_Version>
|
||||
<Program_Release_Month>08</Program_Release_Month>
|
||||
<Program_Release_Day>10</Program_Release_Day>
|
||||
<Program_Release_Year>2012</Program_Release_Year>
|
||||
<Program_Version>3.5.0</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>Dolibarr</Program_Name>
|
||||
<Program_Version>3.4</Program_Version>
|
||||
<Program_Release_Month>07</Program_Release_Month>
|
||||
<Program_Release_Day>07</Program_Release_Day>
|
||||
<Program_Release_Year>2013</Program_Release_Year>
|
||||
<Program_Version>3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
<Contact_Info>
|
||||
<Author_First_Name>NLTechno</Author_First_Name>
|
||||
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||
<Author_Email>dolibarr@nltechno.com</Author_Email>
|
||||
<Author_Email>contact@nltechno.com</Author_Email>
|
||||
<Contact_First_Name>NLTechno</Contact_First_Name>
|
||||
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
||||
<Contact_Email>dolibarr@nltechno.com</Contact_Email>
|
||||
<Contact_Email>contact@nltechno.com</Contact_Email>
|
||||
</Contact_Info>
|
||||
<Support_Info>
|
||||
<Sales_Email>dolibarr@nltechno.com</Sales_Email>
|
||||
<Support_Email>dolibarr@nltechno.com</Support_Email>
|
||||
<General_Email>dolibarr@nltechno.com</General_Email>
|
||||
<Sales_Email>support@nltechno.com</Sales_Email>
|
||||
<Support_Email>support@nltechno.com</Support_Email>
|
||||
<General_Email>support@nltechno.com</General_Email>
|
||||
<Sales_Phone />
|
||||
<Support_Phone />
|
||||
<General_Phone />
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>DoliWamp</Program_Name>
|
||||
<Program_Version>3.4</Program_Version>
|
||||
<Program_Release_Month>07</Program_Release_Month>
|
||||
<Program_Release_Day>07</Program_Release_Day>
|
||||
<Program_Release_Year>2013</Program_Release_Year>
|
||||
<Program_Version>3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
|
||||
@@ -117,9 +117,9 @@ do
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
else
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
fi
|
||||
done >>%{name}.lang
|
||||
|
||||
@@ -238,20 +238,20 @@ echo Create document directory $docdir
|
||||
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
|
||||
# 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 Linux
|
||||
@@ -264,13 +264,13 @@ restorecon -R -v /var/lib/dolibarr
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
if [ ! -L $apachelink ]; then
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
@@ -302,33 +302,33 @@ echo
|
||||
|
||||
if [ "x$1" = "x0" ] ;
|
||||
then
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
/sbin/service httpd restart
|
||||
fi
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
/sbin/service httpd restart
|
||||
fi
|
||||
else
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Wed Nov 6 2013 Laurent Destailleur 3.5.0-0.2.b
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -190,9 +190,9 @@ do
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
else
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
fi
|
||||
done >>%{name}.lang
|
||||
|
||||
@@ -323,28 +323,28 @@ export installconfig="%{_sysconfdir}/dolibarr/install.forced.php"
|
||||
# Detect OS
|
||||
os='unknown';
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||
export os='fedora-redhat';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
export apacheuser='apache';
|
||||
export apachegroup='apache';
|
||||
export os='fedora-redhat';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
export apacheuser='apache';
|
||||
export apachegroup='apache';
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='opensuse';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
export apacheuser='wwwrun';
|
||||
export apachegroup='www';
|
||||
export os='opensuse';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
export apacheuser='wwwrun';
|
||||
export apachegroup='www';
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||
export os='mageia-mandriva';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
export apacheuser='apache';
|
||||
export apachegroup='apache';
|
||||
export os='mageia-mandriva';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
export apacheuser='apache';
|
||||
export apachegroup='apache';
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='ubuntu-debian';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
export apacheuser='www-data';
|
||||
export apachegroup='www-data';
|
||||
export os='ubuntu-debian';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
export apacheuser='www-data';
|
||||
export apachegroup='www-data';
|
||||
fi
|
||||
echo OS detected: $os
|
||||
%endif
|
||||
@@ -363,16 +363,16 @@ echo Create document directory $docdir
|
||||
# Create install.forced.php into Dolibarr install directory
|
||||
if [ "x$os" = "xubuntu-debian" ]
|
||||
then
|
||||
superuserlogin=''
|
||||
superuserpassword=''
|
||||
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
||||
# Load superuser login and pass
|
||||
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
||||
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
||||
fi
|
||||
echo Mysql superuser found to use is $superuserlogin
|
||||
%{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||
%{__chmod} -R 660 $installconfig
|
||||
superuserlogin=''
|
||||
superuserpassword=''
|
||||
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
||||
# Load superuser login and pass
|
||||
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
||||
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
||||
fi
|
||||
echo Mysql superuser found to use is $superuserlogin
|
||||
%{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||
%{__chmod} -R 660 $installconfig
|
||||
fi
|
||||
%endif
|
||||
|
||||
@@ -383,29 +383,29 @@ fi
|
||||
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
|
||||
# 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
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
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
|
||||
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
|
||||
%else
|
||||
%if 0%{?mdkversion}
|
||||
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
|
||||
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
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
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
|
||||
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
|
||||
%else
|
||||
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
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
@@ -418,12 +418,12 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||
%endif
|
||||
%if 0%{?mdkversion} || 0%{?suse_version}
|
||||
%else
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||
restorecon -R -v /etc/dolibarr
|
||||
restorecon -R -v /var/lib/dolibarr
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||
restorecon -R -v /etc/dolibarr
|
||||
restorecon -R -v /var/lib/dolibarr
|
||||
%endif
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version}
|
||||
%else
|
||||
@@ -432,13 +432,13 @@ fi
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
if [ ! -L $apachelink ]; then
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
@@ -451,30 +451,30 @@ echo Restart web server
|
||||
/sbin/service httpd restart
|
||||
%else
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
%endif
|
||||
|
||||
# Restart mysql server
|
||||
echo Restart mysql server
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
/sbin/service mysqld restart
|
||||
/sbin/service mysqld restart
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysql restart
|
||||
/sbin/service mysql restart
|
||||
fi
|
||||
%else
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
/etc/init.d/mysqld restart
|
||||
fi
|
||||
if [ -f /etc/init.d/mysql ]; then
|
||||
/etc/init.d/mysql restart
|
||||
/etc/init.d/mysql restart
|
||||
fi
|
||||
%endif
|
||||
%endif
|
||||
@@ -497,66 +497,66 @@ echo
|
||||
|
||||
if [ "x$1" = "x0" ] ;
|
||||
then
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
# Define vars
|
||||
os='unknown';
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
%else
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||
export os='fedora-redhat';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='opensuse';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||
export os='mageia-mandriva';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='ubuntu-debian';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
fi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
/sbin/service httpd restart
|
||||
%else
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
# Define vars
|
||||
os='unknown';
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
%else
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||
export os='fedora-redhat';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='opensuse';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||
export os='mageia-mandriva';
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
fi
|
||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||
export os='ubuntu-debian';
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
fi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
/sbin/service httpd restart
|
||||
%else
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
else
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Wed Nov 6 2013 Laurent Destailleur 3.5.0-0.2.b
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -114,9 +114,9 @@ do
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
else
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
fi
|
||||
done >>%{name}.lang
|
||||
|
||||
@@ -235,31 +235,31 @@ echo Create document directory $docdir
|
||||
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/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
# 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
|
||||
if [ ! -L $apachelink ]; then
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
@@ -269,19 +269,19 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
|
||||
# Restart mysql
|
||||
echo Restart mysql
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
/etc/init.d/mysqld restart
|
||||
fi
|
||||
if [ -f /etc/init.d/mysql ]; then
|
||||
/etc/init.d/mysql restart
|
||||
/etc/init.d/mysql restart
|
||||
fi
|
||||
|
||||
# Show result
|
||||
@@ -301,39 +301,39 @@ echo
|
||||
|
||||
if [ "x$1" = "x0" ] ;
|
||||
then
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
fi
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Wed Nov 6 2013 Laurent Destailleur 3.5.0-0.2.b
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -115,9 +115,9 @@ do
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
else
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
fi
|
||||
done >>%{name}.lang
|
||||
|
||||
@@ -246,31 +246,31 @@ echo Create document directory $docdir
|
||||
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
|
||||
# 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
|
||||
if [ ! -L $apachelink ]; then
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
@@ -280,18 +280,18 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
|
||||
# Restart mysql
|
||||
echo Restart mysql
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysql restart
|
||||
/sbin/service mysql restart
|
||||
fi
|
||||
|
||||
# Show result
|
||||
@@ -311,39 +311,39 @@ echo
|
||||
|
||||
if [ "x$1" = "x0" ] ;
|
||||
then
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
fi
|
||||
# Remove
|
||||
echo "Removed package"
|
||||
|
||||
# Define vars
|
||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||
|
||||
# Remove apache link
|
||||
if [ -L $apachelink ] ;
|
||||
then
|
||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||
%{__rm} -f $apachelink
|
||||
status=purge
|
||||
fi
|
||||
|
||||
# Restart web servers if required
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then
|
||||
# Restart web server
|
||||
echo Restart web server
|
||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||
%{_sysconfdir}/init.d/httpd restart
|
||||
fi
|
||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||
%{_sysconfdir}/init.d/apache2 restart
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
# Upgrade
|
||||
echo "No remove action done (this is an upgrade)"
|
||||
fi
|
||||
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Wed Nov 6 2013 Laurent Destailleur 3.5.0-0.2.b
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -49,3 +49,14 @@ with
|
||||
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
|
||||
window.location.href=pRef
|
||||
* Replace hard coded string with i18n["String"];
|
||||
|
||||
|
||||
JCROP:
|
||||
------
|
||||
* Remove analytics tag into file index.html
|
||||
|
||||
|
||||
JQUERYFILETREE:
|
||||
---------------
|
||||
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
|
||||
|
||||
|
||||
26
dev/fixnotabfiles.sh
Executable file
26
dev/fixnotabfiles.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------
|
||||
# Script to find files that are not Unix encoded
|
||||
#
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
# Usage: fixnotabfiles.sh [list|fix]
|
||||
#------------------------------------------------------
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: fixnotabfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
# To detec
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
echo Feature not implemented. Please fix files manually.
|
||||
fi
|
||||
File diff suppressed because one or more lines are too long
@@ -154,14 +154,14 @@ class autoTranslator
|
||||
if (isset($this->_translatedFiles[$file]) && count($this->_translatedFiles[$file])>0)
|
||||
{
|
||||
$fp = fopen($destPath, 'a');
|
||||
fwrite($fp, "\r\n");
|
||||
fwrite($fp, "\r\n");
|
||||
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\r\n");
|
||||
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\r\n");
|
||||
fwrite($fp, "\n");
|
||||
fwrite($fp, "\n");
|
||||
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
|
||||
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
|
||||
foreach( $this->_translatedFiles[$file] as $line) {
|
||||
fwrite($fp, $line . "\r\n");
|
||||
fwrite($fp, $line . "\n");
|
||||
}
|
||||
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\r\n");
|
||||
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
|
||||
fclose($fp);
|
||||
}
|
||||
return;
|
||||
@@ -177,11 +177,11 @@ class autoTranslator
|
||||
private function createTranslationFile($path,$my_destlang)
|
||||
{
|
||||
$fp = fopen($path, 'w+');
|
||||
fwrite($fp, "/*\r\n");
|
||||
fwrite($fp, " * Language code: {$my_destlang}\r\n");
|
||||
fwrite($fp, " * Automatic generated via autotranslator.php tool\r\n");
|
||||
fwrite($fp, " * Generation date " . $this->_time. "\r\n");
|
||||
fwrite($fp, " */\r\n");
|
||||
fwrite($fp, "/*\n");
|
||||
fwrite($fp, " * Language code: {$my_destlang}\n");
|
||||
fwrite($fp, " * Automatic generated via autotranslator.php tool\n");
|
||||
fwrite($fp, " * Generation date " . $this->_time. "\n");
|
||||
fwrite($fp, " */\n");
|
||||
fclose($fp);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ fi
|
||||
|
||||
if [ "x$1" = "xall" ]
|
||||
then
|
||||
for fic in ar_SA bg_BG ca_ES da_DK de_DE el_GR es_ES et_EE fa_IR fi_FI fr_FR he_IL hu_HU is_IS it_IT ja_JP ko_KR nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sl_SI sv_SE tr_TR vi_VN zh_CN zh_TW
|
||||
for fic in ar_SA bg_BG ca_ES cs_CZ da_DK de_DE el_GR es_ES et_EE fa_IR fi_FI fr_FR he_IL hu_HU is_IS it_IT ja_JP ko_KR lv_LV nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sk_SK sl_SI sv_SE tr_TR uz_UZ vi_VN zh_CN zh_TW
|
||||
do
|
||||
echo "tx pull -l $fic $2 $3"
|
||||
tx pull -l $fic $2 $3
|
||||
|
||||
@@ -13,17 +13,17 @@ then
|
||||
echo "This push local files to transifex."
|
||||
echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer."
|
||||
echo " Using -f will overwrite translation but not memory."
|
||||
echo "Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--skip] [--no-interactive]"
|
||||
echo "Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
if [ "x$1" = "xall" ]
|
||||
then
|
||||
for fic in ar_SA bg_BG ca_ES da_DK de_DE el_GR es_ES et_EE fa_IR fi_FI fr_FR he_IL hu_HU is_IS it_IT ja_JP ko_KR nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sl_SI sv_SE tr_TR vi_VN zh_CN zh_TW
|
||||
for fic in ar_SA bg_BG ca_ES cs_CZ da_DK de_DE el_GR es_ES et_EE fa_IR fi_FI fr_FR he_IL hu_HU is_IS it_IT ja_JP ko_KR lv_LV nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sk_SK sl_SI sv_SE tr_TR uz_UZ vi_VN zh_CN zh_TW
|
||||
do
|
||||
echo "tx push -t -l $fic $2 $3"
|
||||
tx push -t -l $fic $2 $3
|
||||
echo "tx push --skip -t -l $fic $2 $3"
|
||||
tx push --skip -t -l $fic $2 $3
|
||||
done
|
||||
else
|
||||
if [ "x$1" = "xsource" ]
|
||||
@@ -31,7 +31,7 @@ then
|
||||
echo "tx push -s $2 $3"
|
||||
tx push -s $2 $3
|
||||
else
|
||||
echo "tx push -t -l $1 $2 $3 $4"
|
||||
tx push -t -l $1 $2 $3 $4
|
||||
echo "tx push --skip -t -l $1 $2 $3 $4"
|
||||
tx push --skip -t -l $1 $2 $3 $4
|
||||
fi
|
||||
fi
|
||||
|
||||
16
htdocs/.gitignore
vendored
16
htdocs/.gitignore
vendored
@@ -1,11 +1,11 @@
|
||||
/test.php
|
||||
/custom*
|
||||
/bootstrap
|
||||
/extensions
|
||||
/google
|
||||
/multicompany
|
||||
/numberingpack
|
||||
/ovh
|
||||
/extensions*
|
||||
/nltechno*
|
||||
/bootstrap*
|
||||
/google*
|
||||
/multicompany*
|
||||
/numberingpack*
|
||||
/ovh*
|
||||
/pos
|
||||
/skincoloreditor
|
||||
/ultimatepdf
|
||||
/ultimatepdf*
|
||||
|
||||
@@ -263,7 +263,7 @@ print '<br>';
|
||||
|
||||
|
||||
/*
|
||||
* Edition des variables globales non rattachées à un theme specifique
|
||||
* Editing global variables not related to a specific theme
|
||||
*/
|
||||
$constantes=array(
|
||||
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT',
|
||||
@@ -295,4 +295,4 @@ dol_fiche_end();
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -1344,7 +1344,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql.= " statut = 1";
|
||||
$sql.= ", datevalid = ".$this->db->idate($now);
|
||||
$sql.= ", datevalid = '".$this->db->idate($now)."'";
|
||||
$sql.= ", fk_user_valid=".$user->id;
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||
$object->email = trim($_POST["email"]);
|
||||
$object->skype = trim($_POST["skype"]);
|
||||
$object->skype = trim($_POST["skype"]);
|
||||
$object->birth = $birthdate;
|
||||
|
||||
$object->typeid = $_POST["typeid"];
|
||||
@@ -321,6 +321,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$result=$object->update($user,0,$nosyncuser,$nosyncuserpass);
|
||||
if ($result >= 0 && ! count($object->errors))
|
||||
{
|
||||
// Logo/Photo save
|
||||
$dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos';
|
||||
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
||||
if ($file_OK)
|
||||
@@ -361,8 +362,21 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$errmsgs[] = "ErrorBadImageFormat";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch($_FILES['photo']['error'])
|
||||
{
|
||||
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||
case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
|
||||
$errors[] = "ErrorFileSizeTooLarge";
|
||||
break;
|
||||
case 3: //uploaded file was only partially uploaded
|
||||
$errors[] = "ErrorFilePartiallyUploaded";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$rowid=$object->id;
|
||||
$rowid=$object->id;
|
||||
$action='';
|
||||
|
||||
if (! empty($backtopage))
|
||||
@@ -414,7 +428,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$phone=$_POST["phone"];
|
||||
$phone_perso=$_POST["phone_perso"];
|
||||
$phone_mobile=$_POST["phone_mobile"];
|
||||
$skype=$_POST["member_skype"];
|
||||
$skype=$_POST["member_skype"];
|
||||
$email=$_POST["member_email"];
|
||||
$login=$_POST["member_login"];
|
||||
$pass=$_POST["password"];
|
||||
@@ -439,7 +453,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$object->phone = $phone;
|
||||
$object->phone_perso = $phone_perso;
|
||||
$object->phone_mobile= $phone_mobile;
|
||||
$object->skype = $skype;
|
||||
$object->skype = $skype;
|
||||
$object->email = $email;
|
||||
$object->login = $login;
|
||||
$object->pass = $pass;
|
||||
@@ -847,12 +861,12 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||
@@ -1089,11 +1103,12 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled)) {
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
@@ -1257,10 +1272,10 @@ else
|
||||
// Cree un tableau formulaire
|
||||
$formquestion=array();
|
||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false));
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
||||
if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
||||
$formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>'');
|
||||
}
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP)) {
|
||||
if (! empty($conf->mailman->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP)) {
|
||||
$formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>'');
|
||||
}
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1);
|
||||
@@ -1313,7 +1328,7 @@ else
|
||||
|
||||
/*
|
||||
* Confirm add in spip
|
||||
*/
|
||||
*/
|
||||
if ($action == 'add_spip')
|
||||
{
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
@@ -1321,7 +1336,7 @@ else
|
||||
|
||||
/*
|
||||
* Confirm removed from spip
|
||||
*/
|
||||
*/
|
||||
if ($action == 'del_spip')
|
||||
{
|
||||
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
@@ -1330,6 +1345,7 @@ else
|
||||
$rowspan=17;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
if (! empty($conf->skype->enabled)) $rowspan++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@@ -1412,8 +1428,11 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||
|
||||
// Skype
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
@@ -256,9 +256,9 @@ if ($resql)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
print '<td align="right" colspan="2" class="liste_titre">';
|
||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print ' ';
|
||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/agenda.php
|
||||
* \file htdocs/admin/agenda_other.php
|
||||
* \ingroup agenda
|
||||
* \brief Autocreate actions for agenda module setup page
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
@@ -48,8 +48,9 @@ if ($actionsave)
|
||||
$i+=dolibarr_set_const($db,'MAIN_AGENDA_XCAL_EXPORTKEY',trim(GETPOST('MAIN_AGENDA_XCAL_EXPORTKEY','alpha')),'chaine',0,'',$conf->entity);
|
||||
$i+=dolibarr_set_const($db,'MAIN_AGENDA_EXPORT_PAST_DELAY',trim(GETPOST('MAIN_AGENDA_EXPORT_PAST_DELAY','alpha')),'chaine',0,'',$conf->entity);
|
||||
$i+=dolibarr_set_const($db,'MAIN_AGENDA_EXPORT_CACHE',trim(GETPOST('MAIN_AGENDA_EXPORT_CACHE','alpha')),'chaine',0,'',$conf->entity);
|
||||
|
||||
if ($i >= 3)
|
||||
$i+=dolibarr_set_const($db,'AGENDA_EXPORT_FIX_TZ',trim(GETPOST('AGENDA_EXPORT_FIX_TZ','alpha')),'chaine',0,'',$conf->entity);
|
||||
|
||||
if ($i >= 4)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
@@ -117,6 +118,24 @@ print "</tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td width="25%">'.$langs->trans("Parameter")."</td>";
|
||||
print "<td>".$langs->trans("Value")."</td>";
|
||||
print "</tr>";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td class="fieldrequired">'.$langs->trans("FixTZ")."</td>";
|
||||
print "<td>";
|
||||
print '<input class="flat" type="text" size="4" name="AGENDA_EXPORT_FIX_TZ" value="'.$conf->global->AGENDA_EXPORT_FIX_TZ.'">';
|
||||
print ' '.$langs->trans("FillThisOnlyIfRequired");
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
|
||||
@@ -177,13 +177,13 @@ while ($i < $nbofbank)
|
||||
if ($conf->global->BANK_SHOW_ORDER_OPTION == $i)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&value='.$i.'">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
|
||||
@@ -289,8 +289,8 @@ if (! isset($_SERVER['WINDIR']))
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
// Module produits
|
||||
if (! empty($conf->societe->enabled))
|
||||
// Module products
|
||||
if (! empty($conf->product->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
@@ -307,8 +307,8 @@ if (! empty($conf->societe->enabled))
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
// Module produits
|
||||
if (! empty($conf->product->enabled))
|
||||
// Module thirdparty
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
|
||||
@@ -292,14 +292,14 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
// Country
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td>';
|
||||
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td class="maxwidthonsmartphone">';
|
||||
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
|
||||
print $form->select_country($mysoc->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td class="maxwidthonsmartphone">';
|
||||
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@@ -561,9 +561,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</td></tr>";
|
||||
@@ -595,7 +595,8 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
$var=true;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
|
||||
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</td></tr>";
|
||||
@@ -941,7 +942,7 @@ else
|
||||
$var=true;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</td></tr>";
|
||||
@@ -974,7 +975,7 @@ else
|
||||
$var=true;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
|
||||
print '<td colspan="2">';
|
||||
print "<table>";
|
||||
print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</td></tr>";
|
||||
|
||||
@@ -42,9 +42,6 @@ $consts=GETPOST('const');
|
||||
$constname=GETPOST('constname','alpha');
|
||||
$constvalue=GETPOST('constvalue');
|
||||
$constnote=GETPOST('constnote','alpha');
|
||||
$consttype=(GETPOST('consttype','alpha')?GETPOST('consttype','alpha'):'chaine');
|
||||
|
||||
$typeconst=array('yesno' => 'yesno', 'texte' => 'texte', 'chaine' => 'chaine');
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +49,7 @@ $typeconst=array('yesno' => 'yesno', 'texte' => 'texte', 'chaine' => 'chaine');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'add')
|
||||
if ($action == 'add' || (GETPOST('add') && $action != 'update'))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
@@ -69,9 +66,13 @@ if ($action == 'add')
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (dolibarr_set_const($db, $constname, $constvalue, $typeconst[$consttype], 1, $constnote, $entity) >= 0)
|
||||
if (dolibarr_set_const($db, $constname, $constvalue, 'chaine', 1, $constnote, $entity) >= 0)
|
||||
{
|
||||
setEventMessage($langs->trans("RecordSaved"));
|
||||
$action="";
|
||||
$constname="";
|
||||
$constvalue="";
|
||||
$constnote="";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -176,6 +177,10 @@ print_fiche_titre($langs->trans("OtherSetup"),'','setup');
|
||||
print $langs->trans("ConstDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
@@ -189,15 +194,12 @@ print "</tr>\n";
|
||||
// Line to add new record
|
||||
$var=false;
|
||||
print "\n";
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
print '<tr '.$bc[$var].'><td><input type="text" class="flat" size="24" name="constname" value=""></td>'."\n";
|
||||
print '<tr '.$bc[$var].'><td><input type="text" class="flat" size="24" name="constname" value="'.$constname.'"></td>'."\n";
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="30" name="constvalue" value="">';
|
||||
print '<input type="text" class="flat" size="30" name="constvalue" value="'.$constvalue.'">';
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="flat" size="40" name="constnote" value="">';
|
||||
print '<input type="text" class="flat" size="40" name="constnote" value="'.$constnote.'">';
|
||||
print '</td>';
|
||||
// Limit to superadmin
|
||||
if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
@@ -205,22 +207,17 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||
}
|
||||
print '<td align="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="Button">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '</form>';
|
||||
print "\n";
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" id="action" name="action" value="">';
|
||||
|
||||
// Show constants
|
||||
$sql = "SELECT";
|
||||
@@ -250,21 +247,20 @@ if ($result)
|
||||
$var=!$var;
|
||||
|
||||
print "\n";
|
||||
print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->name.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][type]" value="'.$obj->type.'">';
|
||||
|
||||
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td>'."\n";
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.htmlspecialchars($obj->value).'"';
|
||||
print '>';
|
||||
print '</td><td>';
|
||||
print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->name.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][type]" value="'.$obj->type.'">';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.htmlspecialchars($obj->value).'">';
|
||||
print '</td>';
|
||||
|
||||
// Note
|
||||
print '<input type="text" id="note_'.$i.'"class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'"';
|
||||
print '>';
|
||||
print '<td>';
|
||||
print '<input type="text" id="note_'.$i.'"class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'">';
|
||||
print '</td>';
|
||||
|
||||
// Entity limit to superadmin
|
||||
@@ -273,13 +269,14 @@ if ($result)
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<input type="checkbox" class="flat checkboxfordelete" id="check_'.$i.'" name="const['.$i.'][check]" value="1">';
|
||||
|
||||
@@ -446,7 +446,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
// Other checks
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
|
||||
$ok=0;
|
||||
$ok=0;
|
||||
setEventMessage($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'),'errors');
|
||||
}
|
||||
if (isset($_POST["code"]))
|
||||
@@ -456,8 +456,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$ok=0;
|
||||
setEventMessage($langs->transnoentities('ErrorCodeCantContainZero'),'errors');
|
||||
}
|
||||
// FIXME regresion if code with not in numeric base
|
||||
/*if (!is_numeric($_POST['code']))
|
||||
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
|
||||
{
|
||||
$ok = 0;
|
||||
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
||||
@@ -1100,7 +1099,7 @@ if ($id)
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) $iserasable = 0;
|
||||
else if ($obj->code == 'RECEP') $iserasable = 0;
|
||||
else if ($obj->code == 'EF0') $iserasable = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0;
|
||||
|
||||
@@ -1316,9 +1315,9 @@ function fieldList($fieldlist,$obj='',$tabname='')
|
||||
$size='';
|
||||
if ($fieldlist[$field]=='libelle') $size='size="32" ';
|
||||
if ($fieldlist[$field]=='tracking') $size='size="92" ';
|
||||
if ($fieldlist[$field]=='accountancy_code') $size='size="15" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_sell') $size='size="15" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_buy') $size='size="15" ';
|
||||
if ($fieldlist[$field]=='accountancy_code') $size='size="10" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_sell') $size='size="10" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_buy') $size='size="10" ';
|
||||
print '<input type="text" '.$size.' class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ print '<br>';
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription4",DOL_URL_ROOT.'/admin/modules.php?mainmenu=home');
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->global->MAIN_MINNB_MODULE)) // If only user module enabled
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
|
||||
{
|
||||
$langs->load("errors");
|
||||
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"));
|
||||
@@ -97,6 +97,7 @@ if (count($conf->modules) <= (empty($conf->global->MAIN_MINNB_MODULE)?1:$conf->g
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Add hook to add information
|
||||
$reshook=$hookmanager->executeHooks('addHomeSetup',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -40,15 +40,6 @@ $action = GETPOST('action','alpha');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'setMAILING_EMAIL_UNSUBSCRIBE')
|
||||
{
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
if ($action == 'unsetMAILING_EMAIL_UNSUBSCRIBE')
|
||||
{
|
||||
$res=dolibarr_del_const($db, "MAILING_EMAIL_UNSUBSCRIBE");
|
||||
}
|
||||
|
||||
if ($action == 'setvalue')
|
||||
{
|
||||
$db->begin();
|
||||
@@ -62,22 +53,8 @@ if ($action == 'setvalue')
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
if ($checkread=='on')
|
||||
{
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
else if ($checkread=='off')
|
||||
{
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",0,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
|
||||
//Create temporary encryption key if nedded
|
||||
if (($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) && (empty($checkread_key)))
|
||||
{
|
||||
$checkread_key=getRandomPassword(true);
|
||||
}
|
||||
// Create temporary encryption key if nedded
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@@ -157,32 +134,13 @@ 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"));
|
||||
print '</td></tr>';
|
||||
|
||||
// TODO the precedent values are deleted after turn on this switch
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ActivateCheckRead").'</td><td>';
|
||||
if (!empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetMAILING_EMAIL_UNSUBSCRIBE">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
$readonly='';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setMAILING_EMAIL_UNSUBSCRIBE">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a>';
|
||||
$readonly='disabled="disabled"';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Constant to add salt into the unsubscribe and check read tag.
|
||||
// It is also used as a security key parameter.
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ActivateCheckReadKey").'</td><td>';
|
||||
print '<input size="32" type="text" name="MAILING_EMAIL_UNSUBSCRIBE_KEY" id="MAILING_EMAIL_UNSUBSCRIBE_KEY" '.$readonly.' value="'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY.'">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||
print '<input size="32" type="text" name="MAILING_EMAIL_UNSUBSCRIBE_KEY" id="MAILING_EMAIL_UNSUBSCRIBE_KEY" value="'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY.'">';
|
||||
if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -136,44 +136,57 @@ foreach ($modulesdir as $dir)
|
||||
try
|
||||
{
|
||||
$res=include_once $dir.$file;
|
||||
$objMod = new $modName($db);
|
||||
$modNameLoaded[$modName]=$dir;
|
||||
if (class_exists($modName))
|
||||
{
|
||||
try {
|
||||
$objMod = new $modName($db);
|
||||
$modNameLoaded[$modName]=$dir;
|
||||
|
||||
if ($objMod->numero > 0)
|
||||
{
|
||||
$j = $objMod->numero;
|
||||
}
|
||||
else
|
||||
{
|
||||
$j = 1000 + $i;
|
||||
}
|
||||
if ($objMod->numero > 0)
|
||||
{
|
||||
$j = $objMod->numero;
|
||||
}
|
||||
else
|
||||
{
|
||||
$j = 1000 + $i;
|
||||
}
|
||||
|
||||
$modulequalified=1;
|
||||
$modulequalified=1;
|
||||
|
||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
||||
// We discard modules according to property disabled
|
||||
if (isset($objMod->hidden) && $objMod->hidden) $modulequalified=false;
|
||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
||||
// We discard modules according to property disabled
|
||||
if (! empty($objMod->hidden)) $modulequalified=false;
|
||||
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
if ($modulequalified)
|
||||
{
|
||||
$modules[$i] = $objMod;
|
||||
$filename[$i]= $modName;
|
||||
$orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number
|
||||
$dirmod[$i] = $dir;
|
||||
// Set categ[$i]
|
||||
$special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev';
|
||||
if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories
|
||||
else $categ[$special]=1;
|
||||
$j++;
|
||||
$i++;
|
||||
}
|
||||
else dol_syslog("Module ".get_class($objMod)." not qualified");
|
||||
}
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
if ($modulequalified)
|
||||
{
|
||||
$modules[$i] = $objMod;
|
||||
$filename[$i]= $modName;
|
||||
$orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number
|
||||
$dirmod[$i] = $dir;
|
||||
// Set categ[$i]
|
||||
$special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev';
|
||||
if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories
|
||||
else $categ[$special]=1;
|
||||
$j++;
|
||||
$i++;
|
||||
}
|
||||
else dol_syslog("Module ".get_class($objMod)." not qualified");
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||
|
||||
@@ -77,10 +77,12 @@ if ($action == "set")
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -196,13 +196,14 @@ print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<center>';
|
||||
print '<br><center>';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</center>';
|
||||
|
||||
print '</form><br>';
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -327,7 +327,7 @@ dol_fiche_end();
|
||||
// Form to test upload
|
||||
print '<br>';
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0);
|
||||
|
||||
// List of document
|
||||
$filearray=dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1);
|
||||
|
||||
@@ -458,10 +458,10 @@ print "</tr>\n";
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_FREE_TEXT">';
|
||||
print '<input type="hidden" name="action" value="set_SUPPLIER_INVOICE_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="SUPPLIER_ORDER_FREE_TEXT" class="flat" cols="120">'.$conf->global->SUPPLIER_ORDER_FREE_TEXT.'</textarea>';
|
||||
print '<textarea name="SUPPLIER_INVOICE_FREE_TEXT" class="flat" cols="120">'.$conf->global->SUPPLIER_INVOICE_FREE_TEXT.'</textarea>';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -49,7 +50,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='commande_fournisseur'; //Must be the $table_element of the class that manage extrafield
|
||||
$elementtype='facture_fourn'; //Must be the $table_element of the class that manage extrafield
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
|
||||
@@ -105,6 +105,11 @@ $url='http://wiki.dolibarr.org/index.php/Subscribe';
|
||||
if (preg_match('/^fr_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Adh%C3%A9rer';
|
||||
if (preg_match('/^es_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Subscribirse';
|
||||
print '<li><a href="'.$url.'" target="_blank">'.$langs->trans("SubscribeToFoundation").'</a></li>';
|
||||
|
||||
print '<li><a href="http://facebook.com/dolibarr" target="_blank">FaceBook</a></li>';
|
||||
print '<li><a href="http://twitter.com/dolibarr" target="_blank">Twitter</a></li>';
|
||||
print '<li><a href="http://plus.google.com/+DolibarrOrg" target="_blank">Google Plus page</a></li>';
|
||||
|
||||
print '</ul>';
|
||||
|
||||
|
||||
|
||||
@@ -74,15 +74,27 @@ foreach($modulesdir as $dir)
|
||||
else
|
||||
{
|
||||
// File to load
|
||||
include_once $dir.$file;
|
||||
|
||||
$objMod = new $modName($db);
|
||||
|
||||
$modules[$objMod->numero]=$objMod;
|
||||
$modules_names[$objMod->numero]=$objMod->name;
|
||||
$modules_files[$objMod->numero]=$file;
|
||||
$modules_fullpath[$file]=$dir.$file;
|
||||
$picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
|
||||
$res=include_once $dir.$file;
|
||||
if (class_exists($modName))
|
||||
{
|
||||
try {
|
||||
$objMod = new $modName($db);
|
||||
|
||||
$modules[$objMod->numero]=$objMod;
|
||||
$modules_names[$objMod->numero]=$objMod->name;
|
||||
$modules_files[$objMod->numero]=$file;
|
||||
$modules_fullpath[$file]=$dir.$file;
|
||||
$picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ $test1=function_exists('xcache_info');
|
||||
if ($test1)
|
||||
{
|
||||
print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled");
|
||||
print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xcache.php'.'">Xcache admin page</a>';
|
||||
print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xcache.php'.'">Xcache admin page</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -188,7 +188,7 @@ if ($result)
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right" class="liste_titre">';
|
||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -80,6 +80,7 @@ $workflowcodes=array(
|
||||
'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array('enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order'),
|
||||
'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array('enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order','warning'=>'WarningCloseAlways'),
|
||||
'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array('enabled'=>'! empty($conf->commande->enabled) && ! empty($conf->facture->enabled)', 'picto'=>'bill'),
|
||||
// For the following 2 options, if module invoice is disabled, they does not exists, so "Classify billed" for order must be done manually from order card.
|
||||
'WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER'=>array('enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'bill','warning'=>'WarningCloseAlways'),
|
||||
'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array('enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'bill','warning'=>'WarningCloseAlways'),
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT.'/boutique/commande/class/boutiquecommande.class.
|
||||
|
||||
|
||||
/**
|
||||
* \class BoutiqueCommande
|
||||
* \brief Classe permettant la gestion des commandes OSC
|
||||
* Class to manage orders OSC
|
||||
*/
|
||||
class BoutiqueCommande
|
||||
{
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/deconnexion.php
|
||||
* \ingroup cashdesk
|
||||
* \brief Manage deconnexion for point of sale module
|
||||
*/
|
||||
|
||||
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Uncomment creates pb to relogon after a disconnect
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@uers.sourceforge.net>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Adolfo Segura <adolfo.segura@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -37,7 +39,20 @@ if ( GETPOST('filtre') ) {
|
||||
$sql.= " AND p.tosell = 1";
|
||||
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
|
||||
$sql.= " AND (p.ref LIKE '%".$db->escape(GETPOST('filtre'))."%' OR p.label LIKE '%".$db->escape(GETPOST('filtre'))."%'";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '%".$db->escape(GETPOST('filtre'))."%')";
|
||||
if (! empty($conf->barcode->enabled)) {
|
||||
|
||||
$filtre = GETPOST('filtre');
|
||||
|
||||
//If the barcode looks like an EAN13 format and the last digit is included in it,
|
||||
//then whe look for the 12-digit too
|
||||
//As the twelve-digit string will also hit the 13-digit code, we only look for this one
|
||||
if (strlen($filtre) == 13) {
|
||||
$crit_12digit = substr($filtre, 0, 12);
|
||||
$sql .= " OR p.barcode LIKE '%".$db->escape($crit_12digit)."%')";
|
||||
} else {
|
||||
$sql.= " OR p.barcode LIKE '%".$db->escape($filtre)."%')";
|
||||
}
|
||||
}
|
||||
else $sql.= ")";
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This page is called each time we press a key in the code
|
||||
* search form to show product combo list.
|
||||
* \file htdocs/cashdesk/facturation_dhtml.php
|
||||
* \ingroup cashdesk
|
||||
* \brief This page is called each time we press a key in the code search form to show product combo list.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/facturation_verif.php
|
||||
* \ingroup cashdesk
|
||||
* \brief facturation_verif.php
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
* We set here login choices into session.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/index_verif.php
|
||||
* \ingroup cashdesk
|
||||
* \brief index_verif.php
|
||||
*/
|
||||
|
||||
include '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';
|
||||
|
||||
@@ -140,9 +140,9 @@ print $object->ref;
|
||||
|
||||
<table class="totaux">
|
||||
<?php
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalHT").'</th><td class="nowrap">'.price2num($obj_facturation->prixTotalHt(),'MT')." ".$conf->currency."</td></tr>\n";
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalVAT").'</th><td class="nowrap">'.price2num($obj_facturation->montantTva(),'MT')." ".$conf->currency."</td></tr>\n";
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalTTC").'</th><td class="nowrap">'.price2num($obj_facturation->prixTotalTtc(),'MT')." ".$conf->currency."</td></tr>\n";
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalHT").'</th><td class="nowrap">'.price(price2num($obj_facturation->prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalVAT").'</th><td class="nowrap">'.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
|
||||
echo '<tr><th class="nowrap">'.$langs->trans("TotalTTC").'</th><td class="nowrap">'.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/validation.php
|
||||
* \ingroup cashdesk
|
||||
* \brief validation.php
|
||||
*/
|
||||
|
||||
// Affichage des templates
|
||||
require ('tpl/validation1.tpl.php');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2008 J<EFBFBD>r<EFBFBD>mie Ollivier <jeremie.o@laposte.net>
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
*
|
||||
* 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
|
||||
@@ -15,7 +15,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Affichage des templates
|
||||
require ('tpl/validation2.tpl.php');
|
||||
/**
|
||||
* \file htdocs/cashdesk/validation_ok.php
|
||||
* \ingroup cashdesk
|
||||
* \brief validation_ok.php
|
||||
*/
|
||||
|
||||
// Affichage des templates
|
||||
require ('tpl/validation2.tpl.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/validation_ticket.php
|
||||
* \ingroup cashdesk
|
||||
* \brief validation_ticket.php
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/cashdesk/validation_verif.php
|
||||
* \ingroup cashdesk
|
||||
* \brief validation_verif.php
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
|
||||
@@ -212,7 +218,7 @@ switch ($action)
|
||||
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiementLe()));
|
||||
if ($resultcreate > 0)
|
||||
{
|
||||
$resultvalid=$invoice->validate($user,$obj_facturation->numInvoice());
|
||||
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -118,7 +118,8 @@ if (empty($reshook))
|
||||
}
|
||||
if ($type==1 && $user->rights->societe->creer)
|
||||
{
|
||||
$object = new Societe($db);
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
$object = new Fournisseur($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
@@ -152,7 +153,7 @@ if (empty($reshook))
|
||||
setEventMessage($cat->errors,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add object into a category
|
||||
if ($parent > 0)
|
||||
{
|
||||
@@ -165,7 +166,8 @@ if (empty($reshook))
|
||||
}
|
||||
if ($type==1 && $user->rights->societe->creer)
|
||||
{
|
||||
$object = new Societe($db);
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
$object = new Fournisseur($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
@@ -319,11 +321,11 @@ if ($socid)
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
if ($soc->client) formCategory($db,$soc,2,$socid);
|
||||
if ($soc->client) formCategory($db,$soc,2,$socid,$user->rights->societe->creer);
|
||||
|
||||
if ($soc->client && $soc->fournisseur) print '<br><br>';
|
||||
|
||||
if ($soc->fournisseur) formCategory($db,$soc,1,$socid);
|
||||
if ($soc->fournisseur) formCategory($db,$soc,1,$socid,$user->rights->societe->creer);
|
||||
}
|
||||
else if ($id || $ref)
|
||||
{
|
||||
@@ -377,7 +379,7 @@ else if ($id || $ref)
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
formCategory($db,$product,0);
|
||||
formCategory($db,$product,0,$socid,($user->rights->produit->creer || $user->rights->service->creer));
|
||||
}
|
||||
|
||||
if ($type == 3)
|
||||
@@ -456,7 +458,7 @@ else if ($id || $ref)
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
formCategory($db,$member,3);
|
||||
formCategory($db,$member,3,0,$user->rights->adherent->creer);
|
||||
}
|
||||
if ($type == 4)
|
||||
{
|
||||
@@ -602,7 +604,7 @@ else if ($id || $ref)
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
formCategory($db,$object,4);
|
||||
formCategory($db,$object,4,$socid, $user->rights->societe->creer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,13 +612,14 @@ else if ($id || $ref)
|
||||
/**
|
||||
* Function to output a form to add object into a category
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
* @param Object $object Object we want to see categories it can be classified into
|
||||
* @param int $typeid Type of category (0, 1, 2, 3)
|
||||
* @param int $socid Id thirdparty
|
||||
* @param DoliDb $db Database handler
|
||||
* @param Object $object Object we want to see categories it can be classified into
|
||||
* @param int $typeid Type of category (0, 1, 2, 3)
|
||||
* @param int $socid Id thirdparty
|
||||
* @param string $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify'
|
||||
* @return int 0
|
||||
*/
|
||||
function formCategory($db,$object,$typeid,$socid=0)
|
||||
function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||
{
|
||||
global $user,$langs,$form,$bc;
|
||||
|
||||
@@ -626,33 +629,37 @@ function formCategory($db,$object,$typeid,$socid=0)
|
||||
if ($typeid == 3) $title = $langs->trans("MembersCategoriesShort");
|
||||
if ($typeid == 4) $title = $langs->trans("ContactCategoriesShort");
|
||||
|
||||
// Form to add record into a category
|
||||
print '<br>';
|
||||
print_fiche_titre($title,'','');
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/categories/categorie.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
|
||||
print '<input type="hidden" name="type" value="'.$typeid.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="40%">';
|
||||
print $langs->trans("ClassifyInCategory").' ';
|
||||
print $form->select_all_categories($typeid,'auto');
|
||||
print '</td><td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Classify").'"></td>';
|
||||
if ($user->rights->categorie->creer)
|
||||
|
||||
// Form to add record into a category
|
||||
if ($showclassifyform)
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/categories/fiche.php?action=create&origin='.$object->id.'&type='.$typeid.'&urlfrom='.urlencode($_SERVER["PHP_SELF"].'?'.(($typeid==1||$typeid==2)?'socid':'id').'='.$object->id.'&type='.$typeid).'">';
|
||||
print $langs->trans("CreateCat").' ';
|
||||
print img_picto($langs->trans("Create"),'filenew');
|
||||
print "</a>";
|
||||
print '</td>';
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/categories/categorie.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
|
||||
print '<input type="hidden" name="type" value="'.$typeid.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="40%">';
|
||||
print $langs->trans("ClassifyInCategory").' ';
|
||||
print $form->select_all_categories($typeid,'auto');
|
||||
print '</td><td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Classify").'"></td>';
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/categories/fiche.php?action=create&origin='.$object->id.'&type='.$typeid.'&urlfrom='.urlencode($_SERVER["PHP_SELF"].'?'.(($typeid==1||$typeid==2)?'socid':'id').'='.$object->id.'&type='.$typeid).'">';
|
||||
print $langs->trans("CreateCat").' ';
|
||||
print img_picto($langs->trans("Create"),'filenew');
|
||||
print "</a>";
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
}
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br/>';
|
||||
|
||||
|
||||
$c = new Categorie($db);
|
||||
|
||||
@@ -386,7 +386,7 @@ class Categorie
|
||||
* Link an object to the category
|
||||
*
|
||||
* @param Object $obj Object to link to category
|
||||
* @param string $type Type of category (member, supplier, product, customer, contact)
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked
|
||||
*/
|
||||
function add_type($obj,$type)
|
||||
@@ -397,11 +397,14 @@ class Categorie
|
||||
|
||||
if ($this->id == -1) return -2;
|
||||
|
||||
if ($type == 'company') $type='societe';
|
||||
if ($type == 'fournisseur') $type='societe';
|
||||
// For backward compatibility
|
||||
if ($type == 'company') $type='societe';
|
||||
if ($type == 'customer') $type='societe';
|
||||
if ($type == 'supplier') $type='fournisseur';
|
||||
|
||||
$column_name=$type;
|
||||
if ($type=='contact') $column_name='socpeople';
|
||||
if ($type=='fournisseur') $column_name='societe';
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")";
|
||||
$sql .= " VALUES (".$this->id.", ".$obj->id.")";
|
||||
@@ -479,7 +482,7 @@ class Categorie
|
||||
* Delete object from category
|
||||
*
|
||||
* @param Object $obj Object
|
||||
* @param string $type Type
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @return int 1 if OK, -1 if KO
|
||||
*/
|
||||
function del_type($obj,$type)
|
||||
@@ -488,11 +491,14 @@ class Categorie
|
||||
|
||||
$error=0;
|
||||
|
||||
if ($type == 'company') $type='societe';
|
||||
if ($type == 'fournisseur') $type='societe';
|
||||
// For backward compatibility
|
||||
if ($type == 'company') $type='societe';
|
||||
if ($type == 'customer') $type='societe';
|
||||
if ($type == 'supplier') $type='fournisseur';
|
||||
|
||||
$column_name=$type;
|
||||
if ($type=='contact') $column_name='socpeople';
|
||||
if ($type=='fournisseur') $column_name='societe';
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type;
|
||||
$sql .= " WHERE fk_categorie = ".$this->id;
|
||||
@@ -522,13 +528,13 @@ class Categorie
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of contents of a category
|
||||
* Return list of id of elements having this category
|
||||
*
|
||||
* @param string $field Field name for select in table. Full field name will be fk_field.
|
||||
* @param string $classname PHP Class of object to store entity
|
||||
* @param string $category_table Table name for select in table. Full table name will be PREFIX_categorie_table.
|
||||
* @param string $object_table Table name for select in table. Full table name will be PREFIX_table.
|
||||
* @return void
|
||||
* @return mixed -1 if KO, array of instance of object if OK
|
||||
*/
|
||||
function get_type($field,$classname,$category_table='',$object_table='')
|
||||
{
|
||||
@@ -565,6 +571,49 @@ class Categorie
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check for the presence of an object in a category
|
||||
*
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @param int $object_id id of the object to search
|
||||
* @return int number of occurrences
|
||||
*/
|
||||
function containsObject($type, $object_id)
|
||||
{
|
||||
$field = ''; $classname = ''; $category_table = ''; $object_table = '';
|
||||
if ($type == 'product') {
|
||||
$field = 'product';
|
||||
}
|
||||
if ($type == 'customer') {
|
||||
$field = 'societe';
|
||||
}
|
||||
if ($type == 'supplier') {
|
||||
$field = 'societe';
|
||||
$category_table = 'fournisseur';
|
||||
}
|
||||
if ($type == 'member') {
|
||||
$field = 'member';
|
||||
$category_table = '';
|
||||
}
|
||||
if ($type == 'contact') {
|
||||
$field = 'socpeople';
|
||||
$category_table = 'contact';
|
||||
}
|
||||
if (empty($category_table)) {
|
||||
$category_table = $field;
|
||||
}
|
||||
$sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table;
|
||||
$sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id;
|
||||
dol_syslog(get_class($this)."::containsObject sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
return $this->db->fetch_object($resql)->nb;
|
||||
} else {
|
||||
$this->error=$this->db->error().' sql='.$sql;
|
||||
dol_syslog(get_class($this)."::containsObject ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return childs of a category
|
||||
|
||||
@@ -365,6 +365,8 @@ if($object->type == 2)
|
||||
$var=true;
|
||||
foreach ($socs as $key => $soc)
|
||||
{
|
||||
if ($user->societe_id > 0 && $soc->id != $user->societe_id) continue; // External user always see only themself
|
||||
|
||||
$i++;
|
||||
$var=!$var;
|
||||
print "\t<tr ".$bc[$var].">\n";
|
||||
|
||||
@@ -611,6 +611,7 @@ class ActionComm extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nbtodo++;
|
||||
@@ -823,7 +824,8 @@ class ActionComm extends CommonObject
|
||||
|
||||
require_once (DOL_DOCUMENT_ROOT ."/core/lib/xcal.lib.php");
|
||||
require_once (DOL_DOCUMENT_ROOT ."/core/lib/date.lib.php");
|
||||
|
||||
require_once (DOL_DOCUMENT_ROOT ."/core/lib/files.lib.php");
|
||||
|
||||
dol_syslog(get_class($this)."::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);
|
||||
|
||||
// Check parameters
|
||||
@@ -886,7 +888,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " AND a.entity = ".$conf->entity;
|
||||
foreach ($filters as $key => $value)
|
||||
{
|
||||
if ($key == 'notolderthan') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'";
|
||||
if ($key == 'notolderthan' && $value != '') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'";
|
||||
if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'";
|
||||
if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0);
|
||||
if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0);
|
||||
@@ -933,6 +935,7 @@ class ActionComm extends CommonObject
|
||||
if ($resql)
|
||||
{
|
||||
// Note: Output of sql request is encoded in $conf->file->character_set_client
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$qualified=true;
|
||||
@@ -941,8 +944,8 @@ class ActionComm extends CommonObject
|
||||
$event=array();
|
||||
$event['uid']='dolibarragenda-'.$this->db->database_name.'-'.$obj->id."@".$_SERVER["SERVER_NAME"];
|
||||
$event['type']=$type;
|
||||
$datestart=$this->db->jdate($obj->datep);
|
||||
$dateend=$this->db->jdate($obj->datep2);
|
||||
$datestart=$this->db->jdate($obj->datep)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||
$dateend=$this->db->jdate($obj->datep2)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||
$duration=$obj->durationp;
|
||||
$event['summary']=$obj->label.($obj->socname?" (".$obj->socname.")":"");
|
||||
$event['desc']=$obj->note;
|
||||
@@ -961,8 +964,8 @@ class ActionComm extends CommonObject
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
$url=$urlwithroot.'/comm/action/fiche.php?id='.$obj->id;
|
||||
$event['url']=$url;
|
||||
$event['created']=$this->db->jdate($obj->datec);
|
||||
$event['modified']=$this->db->jdate($obj->datem);
|
||||
$event['created']=$this->db->jdate($obj->datec)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||
$event['modified']=$this->db->jdate($obj->datem)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||
|
||||
if ($qualified && $datestart)
|
||||
{
|
||||
@@ -1009,10 +1012,11 @@ class ActionComm extends CommonObject
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
if (rename($outputfiletmp,$outputfile)) $result=1;
|
||||
if (dol_move($outputfiletmp,$outputfile,0,1)) $result=1;
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::build_exportfile failed to rename ".$outputfiletmp." to ".$outputfile, LOG_ERR);
|
||||
$this->error='Failed to rename '.$outputfiletmp.' into '.$outputfile;
|
||||
dol_syslog(get_class($this)."::build_exportfile ".$this->error, LOG_ERR);
|
||||
dol_delete_file($outputfiletmp,0,1);
|
||||
$result=-1;
|
||||
}
|
||||
|
||||
@@ -78,14 +78,14 @@ class CActionComm
|
||||
$this->libelle = $obj->libelle;
|
||||
$this->active = $obj->active;
|
||||
|
||||
$this->db->free($resql);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->free($resql);
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -270,7 +270,7 @@ class ICal
|
||||
* Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)
|
||||
*
|
||||
* @param string $ical_date String date
|
||||
* @return timestamp
|
||||
* @return int
|
||||
*/
|
||||
function ical_date_to_unix($ical_date)
|
||||
{
|
||||
@@ -395,4 +395,4 @@ class ICal
|
||||
return $this->cal;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -167,7 +167,8 @@ if ($action == 'add_action')
|
||||
$actioncomm->datep = $datep;
|
||||
$actioncomm->datef = $datef;
|
||||
$actioncomm->percentage = $percentage;
|
||||
$actioncomm->duree=((GETPOST('dureehour') * 60) + GETPOST('dureemin')) * 60;
|
||||
$actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) *
|
||||
60;
|
||||
|
||||
$usertodo=new User($db);
|
||||
if ($_POST["affectedto"] > 0)
|
||||
@@ -192,7 +193,7 @@ if ($action == 'add_action')
|
||||
}
|
||||
|
||||
// Special for module webcal and phenix
|
||||
// FIXME external modules
|
||||
// TODO external modules
|
||||
if (! empty($conf->webcalendar->enabled) && GETPOST('add_webcal') == 'on') $actioncomm->use_webcal=1;
|
||||
if (! empty($conf->phenix->enabled) && GETPOST('add_phenix') == 'on') $actioncomm->use_phenix=1;
|
||||
|
||||
@@ -483,7 +484,7 @@ if ($action == 'create')
|
||||
|
||||
// Full day
|
||||
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
|
||||
$datep=$actioncomm->datep;
|
||||
if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0);
|
||||
@@ -518,7 +519,7 @@ if ($action == 'create')
|
||||
if (GETPOST("afaire") == 1) $percent=0;
|
||||
else if (GETPOST("afaire") == 2) $percent=100;
|
||||
}
|
||||
print $htmlactions->form_select_status_action('formaction',$percent,1,'complete');
|
||||
$htmlactions->form_select_status_action('formaction',$percent,1,'complete');
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
@@ -564,7 +565,7 @@ if ($action == 'create')
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$events=array();
|
||||
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
//For external user force the company to user company
|
||||
@@ -580,16 +581,15 @@ if ($action == 'create')
|
||||
print '<tr><td class="nowrap">'.$langs->trans("ActionOnContact").'</td><td>';
|
||||
$form->select_contacts(GETPOST('socid','int'),GETPOST('contactid'),'contactid',1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
|
||||
$formproject=new FormProjets($db);
|
||||
|
||||
// Projet associe
|
||||
$langs->load("project");
|
||||
$langs->load("projects");
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td>';
|
||||
|
||||
@@ -622,10 +622,10 @@ if ($action == 'create')
|
||||
$doleditor=new DolEditor('note',(GETPOST('note')?GETPOST('note'):$actioncomm->note),'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$parameters=array('id'=>$actioncomm->id);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
@@ -774,7 +774,7 @@ if ($id > 0)
|
||||
// Status
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||
$percent=GETPOST("percentage")?GETPOST("percentage"):$act->percentage;
|
||||
print $htmlactions->form_select_status_action('formaction',$percent,1);
|
||||
$htmlactions->form_select_status_action('formaction',$percent,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Location
|
||||
@@ -860,7 +860,7 @@ if ($id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
@@ -1042,7 +1042,7 @@ if ($id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -312,11 +312,9 @@ $sql.= ' a.priority, a.fulldayevent, a.location,';
|
||||
$sql.= ' a.fk_soc, a.fk_contact,';
|
||||
$sql.= ' ca.code';
|
||||
$sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,';
|
||||
$sql.= " ".MAIN_DB_PREFIX.'user as u,';
|
||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
$sql.= ' WHERE a.fk_action = ca.id';
|
||||
$sql.= ' AND a.fk_user_author = u.rowid';
|
||||
$sql.= ' AND a.entity IN ('.getEntity().')';
|
||||
if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
|
||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
||||
@@ -325,28 +323,28 @@ if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit
|
||||
if ($action == 'show_day')
|
||||
{
|
||||
$sql.= " AND (";
|
||||
$sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')";
|
||||
$sql.= " OR ";
|
||||
$sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')";
|
||||
$sql.= " OR ";
|
||||
$sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')";
|
||||
$sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'";
|
||||
$sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')";
|
||||
$sql.= ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
// To limit array
|
||||
$sql.= " AND (";
|
||||
$sql.= " (datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before
|
||||
$sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before
|
||||
$sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; // End 7 days after + 3 to go from 28 to 31
|
||||
$sql.= " OR ";
|
||||
$sql.= " (datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'";
|
||||
$sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'";
|
||||
$sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')";
|
||||
$sql.= " OR ";
|
||||
$sql.= " (datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'";
|
||||
$sql.= " AND datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')";
|
||||
$sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'";
|
||||
$sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')";
|
||||
$sql.= ')';
|
||||
}
|
||||
if ($type) $sql.= " AND ca.id = ".$type;
|
||||
@@ -1012,7 +1010,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
// Must defined rule to choose color of who to use.
|
||||
// event->usertodo->id will still contains user id of owner
|
||||
// event->userstodo will be an array in future.
|
||||
// $color=$user->color;
|
||||
// $color=$user->color;
|
||||
}
|
||||
else if ($event->type_code == 'ICALEVENT')
|
||||
{
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/societe/admin/societe_extrafields.php
|
||||
* \ingroup societe
|
||||
* \file htdocs/comm/admin/propal_extrafields.php
|
||||
* \ingroup propal
|
||||
* \brief Page to setup extra fields of third party
|
||||
*/
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ $search_lastname=GETPOST('search_nom')?GETPOST('search_nom'):GETPOST('search_las
|
||||
$search_firstname=GETPOST('search_firstname')?GETPOST('search_firstname'):GETPOST('search_firstname'); // For backward compatibility
|
||||
$search_company=GETPOST('search_societe')?GETPOST('search_societe'):GETPOST('search_company'); // For backward compatibility
|
||||
$contactname=GETPOST('contactname');
|
||||
$begin=GETPOST('begin','alpha');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid','int');
|
||||
@@ -87,13 +88,7 @@ if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
|
||||
if (dol_strlen($stcomm))
|
||||
{
|
||||
$sql.= " AND s.fk_stcomm=$stcomm";
|
||||
}
|
||||
|
||||
// FIXME $begin not exist
|
||||
if (dol_strlen($begin)) // filtre sur la premiere lettre du nom
|
||||
{
|
||||
$sql.= " AND upper(p.name) LIKE '".$begin."%'";
|
||||
$sql.= " AND s.fk_stcomm=".$db->escape($stcomm);
|
||||
}
|
||||
|
||||
if (! empty($search_lastname))
|
||||
@@ -113,7 +108,7 @@ if (! empty($search_company))
|
||||
|
||||
if (! empty($contactname)) // acces a partir du module de recherche
|
||||
{
|
||||
$sql.= " AND (p.name LIKE '%".$db->escape(strtolower($contactname))."%' OR lower(p.firstname) LIKE '%".$db->escape(strtolower($contactname))."%') ";
|
||||
$sql.= " AND (p.name LIKE '%".$db->escape($contactname)."%' OR lower(p.firstname) LIKE '%".$db->escape($contactname)."%') ";
|
||||
$sortfield = "p.name";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
@@ -124,55 +119,57 @@ $sql.= $db->plimit($limit+1, $offset);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses"));
|
||||
print_barre_liste($title.($label?" (".$label.")":""),$page, $_SERVER["PHP_SELF"], "&type=$type",$sortfield,$sortorder,"",$num);
|
||||
$param="&type=".$type;
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.name", $begin,"&type=$type","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin,"&type=$type","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin,"&type=$type","",$sortfield,$sortorder);
|
||||
print '<td class="liste_titre">'.$langs->trans("Email").'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans("Phone").'</td>';
|
||||
print "</tr>\n";
|
||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses"));
|
||||
print_barre_liste($title.($label?" (".$label.")":""),$page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,"",$num);
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?type='.$_GET["type"].'" method="GET">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_lastname" size="12" value="'.$search_lastname.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_firstname" size="12" value="'.$search_firstname.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_company" size="12" value="'.$search_company.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><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 '</form>';
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.name", $begin, $param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param,"",$sortfield,$sortorder);
|
||||
print '<td class="liste_titre">'.$langs->trans("Email").'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans("Phone").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
$i = 0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?type='.$_GET["type"].'" method="GET">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_lastname" size="12" value="'.$search_lastname.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_firstname" size="12" value="'.$search_firstname.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat" name="search_company" size="12" value="'.$search_company.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
$var=!$var;
|
||||
$var=True;
|
||||
$i = 0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowContact"),"contact");
|
||||
print '</a> <a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.$obj->name.'</a></td>';
|
||||
print "<td>$obj->firstname</TD>";
|
||||
$var=!$var;
|
||||
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?type='.$type.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").'</a> ';
|
||||
print "<a href=\"".$urlfiche."?socid=".$obj->rowid."\">$obj->nom</a></td>\n";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowContact"),"contact");
|
||||
print '</a> <a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$obj->cidp.'&socid='.$obj->rowid.'">'.$obj->name.'</a></td>';
|
||||
print "<td>$obj->firstname</TD>";
|
||||
|
||||
print '<td>'.dol_print_phone($obj->email,$obj->cidp,$obj->rowid,'AC_EMAIL').'</td>';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?type='.$type.'&socid='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").'</a> ';
|
||||
print "<a href=\"".$urlfiche."?socid=".$obj->rowid."\">$obj->nom</a></td>\n";
|
||||
|
||||
print '<td>'.dol_print_phone($obj->phone,$obj->country_code,$obj->cidp,$obj->rowid,'AC_TEL').' </td>';
|
||||
print '<td>'.dol_print_phone($obj->email,$obj->cidp,$obj->rowid,'AC_EMAIL').'</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table></p>";
|
||||
$db->free($resql);
|
||||
print '<td>'.dol_print_phone($obj->phone,$obj->country_code,$obj->cidp,$obj->rowid,'AC_TEL').' </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table></p>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -182,5 +179,4 @@ else
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -198,11 +198,11 @@ if ($id > 0)
|
||||
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||
$object->next_prev_filter="te.client in (1,3)";
|
||||
$object->next_prev_filter="te.client in (1,2,3)";
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -250,9 +250,12 @@ if ($id > 0)
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
if (! empty($object->country_code))
|
||||
{
|
||||
$img=picto_from_langcode($object->country_code);
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
@@ -272,7 +275,7 @@ if ($id > 0)
|
||||
{
|
||||
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Assujeti a TVA ou pas
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
||||
@@ -389,7 +392,7 @@ if ($id > 0)
|
||||
print '<td>';
|
||||
print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer);
|
||||
print '</td><td colspan="3">';
|
||||
print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer);
|
||||
print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer,'amount',($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -473,8 +473,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
||||
while ($i < $num)
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</td></tr>';
|
||||
|
||||
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
@@ -511,7 +513,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0) {
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
else if ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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
|
||||
@@ -52,11 +53,15 @@ $search_zipcode=GETPOST("search_zipcode");
|
||||
$search_town=GETPOST("search_town");
|
||||
$search_code=GETPOST("search_code");
|
||||
$search_compta=GETPOST("search_compta");
|
||||
$search_status = GETPOST("search_status",'int');
|
||||
if ($search_status=='') $search_status=1; // always display activ customer first
|
||||
|
||||
// Load sale and categ filters
|
||||
$search_sale = GETPOST("search_sale");
|
||||
$search_categ = GETPOST("search_categ",'int');
|
||||
$catid = GETPOST("catid",'int');
|
||||
// If the internal user must only see his customers, force searching by him
|
||||
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('customerlist'));
|
||||
@@ -83,6 +88,7 @@ if (GETPOST("button_removefilter_x"))
|
||||
$search_idprof2='';
|
||||
$search_idprof3='';
|
||||
$search_idprof4='';
|
||||
$seach_status=1;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +98,7 @@ if (GETPOST("button_removefilter_x"))
|
||||
*/
|
||||
|
||||
$formother=new FormOther($db);
|
||||
$form = new Form($db);
|
||||
$thirdpartystatic=new Societe($db);
|
||||
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
@@ -99,17 +106,15 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
||||
$sql.= " s.datec, s.datea, s.canvas";
|
||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||
$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
// We'll need this table joined to the select in order to filter by sale
|
||||
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||
$sql.= " AND s.client IN (1, 3)";
|
||||
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
||||
if (!$user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||
@@ -125,6 +130,8 @@ if ($search_town) {
|
||||
}
|
||||
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
||||
if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'";
|
||||
|
||||
if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status);
|
||||
// Insert sale filter
|
||||
if ($search_sale)
|
||||
{
|
||||
@@ -142,8 +149,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
dol_syslog('comm:list.php: sql='.$sql,LOG_DEBUG);
|
||||
|
||||
dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@@ -152,6 +158,7 @@ if ($result)
|
||||
$param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town;
|
||||
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
||||
if ($search_sale != '') $param.='&search_sale='.$search_sale;
|
||||
if ($search_status != '') $param.='&search_status='.$search_status;
|
||||
|
||||
print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
|
||||
@@ -190,7 +197,7 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
|
||||
print '<td class="liste_titre" width="1%"> </td>';
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
@@ -218,11 +225,17 @@ if ($result)
|
||||
print '<input type="text" class="flat" name="search_compta" value="'.$search_compta.'" size="10">';
|
||||
print '</td>';
|
||||
|
||||
print '</td><td> </td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print ' ';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
|
||||
$parameters=array();
|
||||
@@ -243,6 +256,7 @@ if ($result)
|
||||
$thirdpartystatic->id=$obj->rowid;
|
||||
$thirdpartystatic->name=$obj->name;
|
||||
$thirdpartystatic->client=$obj->client;
|
||||
$thirdpartystatic->code_client=$obj->code_client;
|
||||
$thirdpartystatic->canvas=$obj->canvas;
|
||||
$thirdpartystatic->status=$obj->status;
|
||||
print $thirdpartystatic->getNomUrl(1);
|
||||
@@ -252,9 +266,10 @@ if ($result)
|
||||
print '<td>'.$obj->code_client.'</td>';
|
||||
print '<td>'.$obj->code_compta.'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||
print '<td align="right">'.$thirdpartystatic->getLibStatut(3);
|
||||
print '<td align="center">'.$thirdpartystatic->getLibStatut(3);
|
||||
print '</td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
$parameters=array('obj' => $obj);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
@@ -434,9 +434,9 @@ if ($object->fetch($id) >= 0)
|
||||
print '</td>';
|
||||
// Source
|
||||
print '<td class="liste_titre" align="right" colspan="3">';
|
||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print ' ';
|
||||
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -67,13 +67,10 @@ $object->substitutionarray=array(
|
||||
'__OTHER4__' => 'Other4',
|
||||
'__OTHER5__' => 'Other5',
|
||||
'__SIGNATURE__' => 'TagSignature',
|
||||
'__CHECK_READ__' => 'TagCheckMail'
|
||||
'__CHECK_READ__' => 'TagCheckMail',
|
||||
'__UNSUBSCRIBE__' => 'TagUnsubscribe'
|
||||
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet
|
||||
);
|
||||
if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE))
|
||||
{
|
||||
$object->substitutionarray=array_merge($object->substitutionarray, array('__UNSUBSCRIBE__' => 'TagUnsubscribe'));
|
||||
}
|
||||
|
||||
$object->substitutionarrayfortest=array(
|
||||
'__ID__' => 'TESTIdRecord',
|
||||
@@ -86,19 +83,12 @@ $object->substitutionarrayfortest=array(
|
||||
'__OTHER3__' => 'TESTOther3',
|
||||
'__OTHER4__' => 'TESTOther4',
|
||||
'__OTHER5__' => 'TESTOther5',
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:'')
|
||||
//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:''),
|
||||
'__CHECK_READ__' => 'TagCheckMail',
|
||||
'__UNSUBSCRIBE__' => 'TagUnsubscribe'
|
||||
//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet
|
||||
);
|
||||
if (!empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE))
|
||||
{
|
||||
$object->substitutionarrayfortest=array_merge(
|
||||
$object->substitutionarrayfortest,
|
||||
array(
|
||||
'__CHECK_READ__' => 'TESTCheckMail',
|
||||
'__UNSUBSCRIBE__' => 'TESTUnsubscribe'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -221,8 +211,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
||||
$substitutionarray=array(
|
||||
'__ID__' => $obj->source_id,
|
||||
'__EMAIL__' => $obj->email,
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
||||
'__LASTNAME__' => $obj->lastname,
|
||||
'__FIRSTNAME__' => $obj->firstname,
|
||||
@@ -1090,7 +1080,7 @@ else
|
||||
{
|
||||
$out.= '<div id="attachfile_'.$key.'">';
|
||||
$out.= img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name'];
|
||||
$out.= ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key+1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
$out.= ' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Search"),'delete.png','','',1).'" value="'.($key+1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
$out.= '<br></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ if ($result)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
if (! $filteremail) print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
@@ -634,13 +634,33 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer)
|
||||
}
|
||||
|
||||
// Add line
|
||||
else if ($action == "addline" && $user->rights->propal->creer)
|
||||
else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer)
|
||||
{
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
$predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||
// Set if we used free entry or predefined product
|
||||
if (GETPOST('addline_libre'))
|
||||
{
|
||||
$predef='';
|
||||
$idprod=0;
|
||||
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
}
|
||||
if (GETPOST('addline_predefined'))
|
||||
{
|
||||
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):''));
|
||||
$price_ht = '';
|
||||
$tva_tx = '';
|
||||
}
|
||||
if (GETPOST('usenewaddlineform')) {
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
$product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):'')));
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
}
|
||||
$qty = GETPOST('qty'.$predef);
|
||||
$remise_percent=GETPOST('remise_percent'.$predef);
|
||||
|
||||
//Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
@@ -673,13 +693,15 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod)))
|
||||
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod)))
|
||||
{
|
||||
$pu_ht=0;
|
||||
$pu_ttc=0;
|
||||
$price_min=0;
|
||||
$price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT');
|
||||
|
||||
$db->begin();
|
||||
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
@@ -791,8 +813,8 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
}
|
||||
|
||||
// Margin
|
||||
$fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):'');
|
||||
$buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):'');
|
||||
$fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):'');
|
||||
$buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):'');
|
||||
|
||||
$date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||
$date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||
@@ -804,7 +826,7 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
$info_bits=0;
|
||||
if ($tva_npr) $info_bits |= 0x01;
|
||||
|
||||
if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min)))
|
||||
if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min)))
|
||||
{
|
||||
$mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency));
|
||||
setEventMessage($mesg, 'errors');
|
||||
@@ -815,12 +837,12 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
$result=$object->addline(
|
||||
$desc,
|
||||
$pu_ht,
|
||||
GETPOST('qty'),
|
||||
$qty,
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$idprod,
|
||||
GETPOST('remise_percent'),
|
||||
$remise_percent,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$info_bits,
|
||||
@@ -838,6 +860,8 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@@ -854,7 +878,6 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['type']);
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['remise_percent']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['price_ttc']);
|
||||
@@ -866,13 +889,21 @@ else if ($action == "addline" && $user->rights->propal->creer)
|
||||
unset($_POST['buying_price']);
|
||||
unset($_POST['np_marginRate']);
|
||||
unset($_POST['np_markRate']);
|
||||
|
||||
// old method
|
||||
unset($_POST['np_desc']);
|
||||
unset($_POST['dp_desc']);
|
||||
|
||||
unset($_POST['idprod']);
|
||||
unset($_POST['qty_predef']);
|
||||
unset($_POST['remise_percent_predef']);
|
||||
unset($_POST['fournprice_predef']);
|
||||
unset($_POST['buying_price_predef']);
|
||||
unset($_POST['np_marginRate_predef']);
|
||||
unset($_POST['np_markRate_predef']);
|
||||
unset($_POST['np_desc']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -956,6 +987,8 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$result = $object->updateline(
|
||||
GETPOST('lineid'),
|
||||
$pu_ht,
|
||||
@@ -981,6 +1014,8 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@@ -1010,6 +1045,8 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -1162,7 +1199,7 @@ else if ($action == 'update_extras')
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute'));
|
||||
if($ret < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
if (! $error)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
@@ -1179,7 +1216,7 @@ else if ($action == 'update_extras')
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
}
|
||||
|
||||
|
||||
if ($error) $action = 'edit_extras';
|
||||
}
|
||||
|
||||
@@ -1924,11 +1961,11 @@ else
|
||||
print '<input type="hidden" name="attribute" value="'.$key.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
|
||||
print $extrafields->showInputField($key,$value);
|
||||
|
||||
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
@@ -1943,8 +1980,8 @@ else
|
||||
|
||||
// Amount HT
|
||||
print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($object->total_ht).'</b></td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($object->total_ht,'',$langs,0,-1,-1,$conf->currency).'</b></td>';
|
||||
print '<td></td>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
@@ -1956,28 +1993,28 @@ else
|
||||
|
||||
// Amount VAT
|
||||
print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_tva).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_tva,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax1).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax1,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax2).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax2,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Amount TTC
|
||||
print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_ttc).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_ttc,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td height="10">'.$langs->trans('Status').'</td><td align="left" colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
||||
@@ -2003,15 +2040,25 @@ else
|
||||
* Lines
|
||||
*/
|
||||
|
||||
// Show object lines
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">
|
||||
<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">
|
||||
<input type="hidden" name="action" value="'.(($action != 'editline')?'addline':'updateligne').'">
|
||||
<input type="hidden" name="mode" value="">
|
||||
<input type="hidden" name="id" value="'.$object->id.'">
|
||||
';
|
||||
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && $object->statut == 0)
|
||||
{
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
|
||||
}
|
||||
|
||||
print '<table id="tablelines" class="noborder" width="100%">';
|
||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||
|
||||
// Show object lines
|
||||
$result = $object->getLinesArray();
|
||||
if (! empty($object->lines))
|
||||
$ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1);
|
||||
|
||||
@@ -2047,8 +2094,9 @@ else
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print "\n";
|
||||
print "</form>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
if ($action == 'statut')
|
||||
{
|
||||
|
||||
@@ -296,7 +296,7 @@ class Propal extends CommonObject
|
||||
* @param int $fk_product Id du produit/service predefini
|
||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param dobule $pu_ttc Prix unitaire TTC
|
||||
* @param double $pu_ttc Prix unitaire TTC
|
||||
* @param int $info_bits Bits de type de lignes
|
||||
* @param int $type Type of line (product, service)
|
||||
* @param int $rang Position of line
|
||||
@@ -305,8 +305,8 @@ class Propal extends CommonObject
|
||||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price without tax
|
||||
* @param string $label ???
|
||||
* @param timestamp $date_start Start date of the line
|
||||
* @param timestamp $date_end End date of the line
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_option extrafields array
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
@@ -355,9 +355,9 @@ class Propal extends CommonObject
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc);
|
||||
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -479,8 +479,8 @@ class Propal extends CommonObject
|
||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||
* @param string $label ???
|
||||
* @param int $type 0/1=Product/service
|
||||
* @param timestamp $date_start Start date of the line
|
||||
* @param timestamp $date_end End date of the line
|
||||
* @param int $date_start Start date of the line
|
||||
* @param int $date_end End date of the line
|
||||
* @param array $array_option extrafields array
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
@@ -510,9 +510,9 @@ class Propal extends CommonObject
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc);
|
||||
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'', $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
@@ -551,7 +551,7 @@ class Propal extends CommonObject
|
||||
$this->line->localtax1_tx = $txlocaltax1;
|
||||
$this->line->localtax2_tx = $txlocaltax2;
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
$this->line->remise_percent = $remise_percent;
|
||||
$this->line->subprice = $pu;
|
||||
$this->line->info_bits = $info_bits;
|
||||
@@ -1318,7 +1318,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Rename directory if dir was a temporary ref
|
||||
@@ -1333,17 +1333,17 @@ class Propal extends CommonObject
|
||||
if (file_exists($dirsource))
|
||||
{
|
||||
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
|
||||
|
||||
|
||||
if (@rename($dirsource, $dirdest))
|
||||
{
|
||||
|
||||
|
||||
dol_syslog("Rename ok");
|
||||
// Deleting old PDF in new rep
|
||||
dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->brouillon=0;
|
||||
$this->statut = 1;
|
||||
$this->user_valid_id=$user->id;
|
||||
@@ -1370,7 +1370,7 @@ class Propal extends CommonObject
|
||||
* Define proposal date
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param timestamp $date Date
|
||||
* @param int $date Date
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function set_date($user, $date)
|
||||
@@ -1407,7 +1407,7 @@ class Propal extends CommonObject
|
||||
* Define end validity date
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param timestamp $date_fin_validite End of validity date
|
||||
* @param int $date_fin_validite End of validity date
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function set_echeance($user, $date_fin_validite)
|
||||
@@ -1434,7 +1434,7 @@ class Propal extends CommonObject
|
||||
* Set delivery date
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param timestamp $date_livraison Delivery date
|
||||
* @param int $date_livraison Delivery date
|
||||
* @return int <0 if ko, >0 if ok
|
||||
*/
|
||||
function set_date_livraison($user, $date_livraison)
|
||||
@@ -1625,7 +1625,7 @@ class Propal extends CommonObject
|
||||
*
|
||||
* @param User $user Object user that close
|
||||
* @param int $statut Statut
|
||||
* @param text $note Comment
|
||||
* @param string $note Comment
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@@ -1688,7 +1688,7 @@ class Propal extends CommonObject
|
||||
*
|
||||
* @param User $user Object user that close
|
||||
* @param int $statut Statut
|
||||
* @param text $note Comment
|
||||
* @param string $note Comment
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function cloture($user, $statut, $note)
|
||||
@@ -1710,7 +1710,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
if ($statut == 2)
|
||||
{
|
||||
// Classe la société rattachée comme client
|
||||
// The connected company is classified as a client
|
||||
$soc=new Societe($this->db);
|
||||
$soc->id = $this->socid;
|
||||
$result=$soc->set_as_client();
|
||||
@@ -2056,7 +2056,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->propal->dir_output)
|
||||
if ($conf->propal->dir_output && !empty($this->ref))
|
||||
{
|
||||
$dir = $conf->propal->dir_output . "/" . $ref ;
|
||||
$file = $dir . "/" . $ref . ".pdf";
|
||||
@@ -2368,6 +2368,7 @@ class Propal extends CommonObject
|
||||
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
||||
if ($mode == 'signed') $delay_warning=$conf->propal->facturation->warning_delay;
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nbtodo++;
|
||||
@@ -2506,6 +2507,7 @@ class Propal extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nb["proposals"]=$obj->nb;
|
||||
@@ -3036,7 +3038,8 @@ class PropaleLigne extends CommonObject
|
||||
if (empty($this->localtax2_type)) $this->localtax2_type=0;
|
||||
if (empty($this->marque_tx)) $this->marque_tx=0;
|
||||
if (empty($this->marge_tx)) $this->marge_tx=0;
|
||||
if (empty($this->remise)) $this->remise=0;
|
||||
if (empty($this->price)) $this->price=0; // TODO A virer
|
||||
if (empty($this->remise)) $this->remise=0; // TODO A virer
|
||||
if (empty($this->remise_percent)) $this->remise_percent=0;
|
||||
if (empty($this->info_bits)) $this->info_bits=0;
|
||||
if (empty($this->special_code)) $this->special_code=0;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/document.php
|
||||
* \ingroup propale
|
||||
* \brief Page de gestion des documents attaches a une proposition commerciale
|
||||
* \ingroup propal
|
||||
* \brief Management page of documents attached to a business proposal
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
@@ -313,8 +313,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
|
||||
while ($i < $num)
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</a></td></tr>';
|
||||
|
||||
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
@@ -356,7 +358,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
$i++;
|
||||
$total += $obj->total_ttc;
|
||||
}
|
||||
if ($total>0) {
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
else if ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
print "</table><br>";
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/info.php
|
||||
* \ingroup propale
|
||||
* \ingroup propal
|
||||
* \brief Page d'affichage des infos d'une proposition commerciale
|
||||
*/
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal.php
|
||||
* \ingroup propale
|
||||
* \file htdocs/comm/propal/list.php
|
||||
* \ingroup propal
|
||||
* \brief Page of commercial proposals card and list
|
||||
*/
|
||||
|
||||
@@ -182,11 +182,7 @@ if ($search_montant_ht)
|
||||
$sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'";
|
||||
}
|
||||
if ($sall) {
|
||||
/*$scrit = explode(' ', $sall);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql.= " AND (s.nom LIKE '%".$db->escape($crit)."%' OR p.note LIKE '%".$db->escape($crit)."%' OR pd.description LIKE '%".$db->escape($crit)."%')";
|
||||
}*/
|
||||
$sql .= natural_search(array('s.nom', 'p.note_private', 'pd.description'), $sall);
|
||||
$sql .= natural_search(array('s.nom', 'p.note_private', 'p.note_public', 'pd.description'), $sall);
|
||||
}
|
||||
if ($socid) $sql.= ' AND s.rowid = '.$socid;
|
||||
if ($viewstatut <> '')
|
||||
@@ -313,7 +309,7 @@ if ($result)
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$formpropal->select_propal_statut($viewstatut,1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -426,14 +422,14 @@ if ($result)
|
||||
{
|
||||
if($num<$limit){
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT").'</td>';
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHT").'</td>';
|
||||
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT for this page").'</td>';
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("TotalHTforthispage").'</td>';
|
||||
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/note.php
|
||||
* \ingroup propale
|
||||
* \ingroup propal
|
||||
* \brief Fiche d'information sur une proposition commerciale
|
||||
*/
|
||||
|
||||
|
||||
@@ -267,14 +267,14 @@ foreach ($data as $val)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/tpl/linkedobjectblock.tpl.php
|
||||
* \ingroup propal
|
||||
* \brief Template to show objects linked to proposals
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ $search_town = GETPOST("search_town");
|
||||
$search_state = GETPOST("search_state");
|
||||
$search_datec = GETPOST("search_datec");
|
||||
$search_categ = GETPOST("search_categ",'int');
|
||||
$search_status = GETPOST("search_status",'int');
|
||||
if ($search_status=='') $search_status=1; // always display activ customer first
|
||||
$catid = GETPOST("catid",'int');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@@ -142,7 +144,7 @@ else dol_print_error($db);
|
||||
// Load sale and categ filters
|
||||
$search_sale = GETPOST('search_sale');
|
||||
$search_categ = GETPOST('search_categ');
|
||||
// If the user must only see his prospect, force searching by him
|
||||
// If the internal user must only see his prospect, force searching by him
|
||||
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
||||
|
||||
// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state)
|
||||
@@ -173,22 +175,22 @@ if ($action == 'cstc')
|
||||
*/
|
||||
|
||||
$formother=new FormOther($db);
|
||||
$form=new Form($db);
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,";
|
||||
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status, s.code_client, s.client,";
|
||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
||||
$sql.= " d.nom as departement";
|
||||
// Updated by Matelli
|
||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st";
|
||||
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)";
|
||||
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
|
||||
$sql.= " WHERE s.fk_stcomm = st.id";
|
||||
$sql.= " AND s.client IN (2, 3)";
|
||||
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
||||
if ($user->societe_id) $sql.= " AND s.rowid = " .$user->societe_id;
|
||||
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
|
||||
if ($socid) $sql.= " AND s.rowid = " .$socid;
|
||||
if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm;
|
||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
@@ -205,6 +207,7 @@ if ($search_state) {
|
||||
$sql .= natural_search('d.nom', $search_state);
|
||||
}
|
||||
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
||||
if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status);
|
||||
// Insert levels filters
|
||||
if ($search_levels)
|
||||
{
|
||||
@@ -220,7 +223,6 @@ if ($socname) {
|
||||
$sortfield = "s.nom";
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
@@ -228,10 +230,10 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
|
||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@@ -265,6 +267,7 @@ if ($resql)
|
||||
if ($search_level_to != '') $param.='&search_level_to='.$search_level_to;
|
||||
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
||||
if ($search_sale != '') $param.='&search_sale='.$search_sale;
|
||||
if ($search_status != '') $param.='&search_status='.$search_status;
|
||||
// $param and $urladd should have the same value
|
||||
$urladd = $param;
|
||||
|
||||
@@ -306,7 +309,8 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("StatusProsp"),$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@@ -368,9 +372,13 @@ if ($resql)
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||
print '</td>';
|
||||
|
||||
// Print the search button
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="liste_titre" name="button_search" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input class="liste_titre" name="button_search" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
|
||||
$parameters=array();
|
||||
@@ -395,6 +403,8 @@ if ($resql)
|
||||
$prospectstatic->id=$obj->rowid;
|
||||
$prospectstatic->nom=$obj->nom;
|
||||
$prospectstatic->status=$obj->status;
|
||||
$prospectstatic->code_client=$obj->code_client;
|
||||
$prospectstatic->client=$obj->client;
|
||||
$prospectstatic->fk_prospectlevel=$obj->fk_prospectlevel;
|
||||
print $prospectstatic->getNomUrl(1,'prospect');
|
||||
print '</td>';
|
||||
@@ -425,9 +435,10 @@ if ($resql)
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td align="center">';
|
||||
print $prospectstatic->LibStatut($prospectstatic->status,3);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
|
||||
$parameters=array('obj' => $obj);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user