Compare commits
908 Commits
scrutinize
...
12.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
192510316b | ||
|
|
6f83c8c6f3 | ||
|
|
8213756c37 | ||
|
|
a254412c61 | ||
|
|
cc1a3080d0 | ||
|
|
b5f887b3e4 | ||
|
|
694357d48e | ||
|
|
c4f80b4e71 | ||
|
|
ece9f3037a | ||
|
|
8dd44246b0 | ||
|
|
76470c9548 | ||
|
|
19be5f662d | ||
|
|
3eebbc0b14 | ||
|
|
d27c0b31fc | ||
|
|
a1534955a1 | ||
|
|
79371f66b0 | ||
|
|
4569cb82b2 | ||
|
|
04d33f4594 | ||
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
cc57d3dbc1 | ||
|
|
87b187bded | ||
|
|
df0b20aad3 | ||
|
|
e085c3989a | ||
|
|
e67c208b57 | ||
|
|
e13038dc30 | ||
|
|
744b84cb09 | ||
|
|
5c3b0847c2 | ||
|
|
f1af7ca2f2 | ||
|
|
035bc32323 | ||
|
|
a70d45b3ab | ||
|
|
1574254dcf | ||
|
|
1c129fd3ea | ||
|
|
97575854d0 | ||
|
|
2e744a4517 | ||
|
|
1ad8700810 | ||
|
|
1c8c98ac0f | ||
|
|
92cb95a184 | ||
|
|
96c7a9f77c | ||
|
|
3ebdb89133 | ||
|
|
d819d427c3 | ||
|
|
db81b32a5d | ||
|
|
793e43c7c6 | ||
|
|
d9bac75a63 | ||
|
|
e4c1978e12 | ||
|
|
a0154503f4 | ||
|
|
a9c76f2e44 | ||
|
|
5b6133ad62 | ||
|
|
90c3c90864 | ||
|
|
cacff0c2d4 | ||
|
|
22f6d204a2 | ||
|
|
b110ca6ead | ||
|
|
400f6b244b | ||
|
|
cde290c78a | ||
|
|
b23b82bd6f | ||
|
|
7dfb369a98 | ||
|
|
265aeb76e6 | ||
|
|
5ee74d7c07 | ||
|
|
1541e20870 | ||
|
|
53709cf509 | ||
|
|
10e32c056e | ||
|
|
8728ad2eff | ||
|
|
5de6c193ff | ||
|
|
1f6e9a1a9e | ||
|
|
26c6908f66 | ||
|
|
08685cc6b0 | ||
|
|
7bdfc998bf | ||
|
|
76a0caf116 | ||
|
|
c57dc82eaa | ||
|
|
f16166c47c | ||
|
|
d82c1f34e0 | ||
|
|
0a72aed3d7 | ||
|
|
856b010a45 | ||
|
|
9d6ddced56 | ||
|
|
36ba158a8b | ||
|
|
140cca7596 | ||
|
|
a5b8d0cd4b | ||
|
|
d149596043 | ||
|
|
cf05f38e54 | ||
|
|
57ebcf94c0 | ||
|
|
826bde0656 | ||
|
|
d84d09556c | ||
|
|
7937a798b7 | ||
|
|
ce8312c744 | ||
|
|
cf4beafb68 | ||
|
|
9a72f147d1 | ||
|
|
f5343c55c3 | ||
|
|
1361abffe5 | ||
|
|
9d2fb782fa | ||
|
|
632147ad88 | ||
|
|
1129222064 | ||
|
|
7cb657c991 | ||
|
|
efb9d184e4 | ||
|
|
44d4ab6f9c | ||
|
|
8f96383186 | ||
|
|
db975bbcc2 | ||
|
|
23249751d5 | ||
|
|
7af883abc1 | ||
|
|
e365a14b5a | ||
|
|
e188855dca | ||
|
|
9aa5c94612 | ||
|
|
ba724204a4 | ||
|
|
8518c772fb | ||
|
|
33e40c12c8 | ||
|
|
19b9412c13 | ||
|
|
23749b57ec | ||
|
|
3959d12a39 | ||
|
|
dd8d4e9e98 | ||
|
|
9247bbcc1d | ||
|
|
01c6de1085 | ||
|
|
6d918ad1c7 | ||
|
|
ff696e0dad | ||
|
|
3dcd1aa05d | ||
|
|
8dfe4fe05f | ||
|
|
65d59405da | ||
|
|
0e2e8fe27f | ||
|
|
7232e38dbe | ||
|
|
f2c282305e | ||
|
|
54b81312b5 | ||
|
|
1336d3e791 | ||
|
|
eb8d7f92c3 | ||
|
|
c998abe54e | ||
|
|
181991ee47 | ||
|
|
c8bcd01a10 | ||
|
|
983e28691b | ||
|
|
29950a6afa | ||
|
|
00b617d17f | ||
|
|
fc0c4295bd | ||
|
|
17773f8414 | ||
|
|
e1af439a6d | ||
|
|
bd52613331 | ||
|
|
3875d26a2f | ||
|
|
db3d16f080 | ||
|
|
bc230dbfc2 | ||
|
|
371c75e76a | ||
|
|
3a32787f15 | ||
|
|
57052e2fba | ||
|
|
2da16ade6c | ||
|
|
68ac62d09c | ||
|
|
5910d10021 | ||
|
|
eba377cdf0 | ||
|
|
10f0434116 | ||
|
|
6d00097c89 | ||
|
|
fc4a16b356 | ||
|
|
d0508d557b | ||
|
|
422191def1 | ||
|
|
620d7109b5 | ||
|
|
332fa77d90 | ||
|
|
c3d539abff | ||
|
|
6abe6462e6 | ||
|
|
505517d142 | ||
|
|
1c43a83a8b | ||
|
|
571d130c3c | ||
|
|
88cd8fface | ||
|
|
87bb971d75 | ||
|
|
65c4a21898 | ||
|
|
9d89e48d15 | ||
|
|
68bc85124b | ||
|
|
456f25d57e | ||
|
|
74f3b98ea9 | ||
|
|
cd09099409 | ||
|
|
d09d036f06 | ||
|
|
b28180d759 | ||
|
|
a0378549b8 | ||
|
|
bdf8c3ddc6 | ||
|
|
35e48f3a27 | ||
|
|
9d285ea232 | ||
|
|
35ebaf7b79 | ||
|
|
16c290f735 | ||
|
|
f88abb9a6f | ||
|
|
0d467972cd | ||
|
|
dd70d68b4c | ||
|
|
eba55d0cf2 | ||
|
|
dad251493a | ||
|
|
ab8f78f29a | ||
|
|
8da328b183 | ||
|
|
3964bd28db | ||
|
|
e637a1e59a | ||
|
|
087e269103 | ||
|
|
b610cc1c6c | ||
|
|
08f21e3fc4 | ||
|
|
108a5ff7cb | ||
|
|
864a8b4b3e | ||
|
|
9d234a8541 | ||
|
|
a983dc7506 | ||
|
|
b77ec22590 | ||
|
|
f4ed3941a7 | ||
|
|
12b2ba64eb | ||
|
|
ca6dd8850a | ||
|
|
262dd1600b | ||
|
|
c9a46ab0cc | ||
|
|
bd731d9213 | ||
|
|
cd63ede35a | ||
|
|
97e829c7de | ||
|
|
7acebd28ca | ||
|
|
712f0b897d | ||
|
|
a7cef1aa15 | ||
|
|
e93a362a0d | ||
|
|
90fa36b46a | ||
|
|
0fe46b53d8 | ||
|
|
14f52f2871 | ||
|
|
be62c2f7f4 | ||
|
|
a345d38320 | ||
|
|
026f38fe06 | ||
|
|
eea90cef56 | ||
|
|
d03cbd88ae | ||
|
|
a7f850dafb | ||
|
|
cc54ba1866 | ||
|
|
3c5bc3fef4 | ||
|
|
246f7b054e | ||
|
|
8772c53723 | ||
|
|
ce18eff133 | ||
|
|
e2c4a14939 | ||
|
|
80759541b4 | ||
|
|
0472ab4690 | ||
|
|
fa28a02d74 | ||
|
|
c3cbd29542 | ||
|
|
90be70be58 | ||
|
|
7eddf43aef | ||
|
|
c9d4ccd40a | ||
|
|
9c657206b3 | ||
|
|
56212508e7 | ||
|
|
de57769d92 | ||
|
|
c8326c1365 | ||
|
|
51eaecdc6b | ||
|
|
98a0959b64 | ||
|
|
e4056b8a1d | ||
|
|
ce9dbfccd7 | ||
|
|
96da2a6a37 | ||
|
|
50bc832532 | ||
|
|
9769e33eab | ||
|
|
5b8a6f1d71 | ||
|
|
eeef78760a | ||
|
|
657972b79b | ||
|
|
745ad8b403 | ||
|
|
564a3b66c2 | ||
|
|
33553f3347 | ||
|
|
c8a41fab11 | ||
|
|
819aa108e9 | ||
|
|
1d9310055e | ||
|
|
e81023c35a | ||
|
|
6078267f86 | ||
|
|
dcca3011ee | ||
|
|
e41a3a2f42 | ||
|
|
5117be4b36 | ||
|
|
0f91c4cfa2 | ||
|
|
65f8405ca4 | ||
|
|
6bf9a72dab | ||
|
|
06201fa9bb | ||
|
|
4e66e134bd | ||
|
|
41d9324600 | ||
|
|
a8f11fec31 | ||
|
|
057d91698f | ||
|
|
794b10ec54 | ||
|
|
0315f45198 | ||
|
|
3f72f9b544 | ||
|
|
96656ff148 | ||
|
|
c44a368213 | ||
|
|
24f8b6386e | ||
|
|
5d6735f364 | ||
|
|
92b20d3595 | ||
|
|
b7ba9df6b4 | ||
|
|
8a46fd376f | ||
|
|
0c6f3a2616 | ||
|
|
f5be9b6244 | ||
|
|
9ed7a3a5c5 | ||
|
|
729c12a8e4 | ||
|
|
4d5aa723d4 | ||
|
|
08186fdff1 | ||
|
|
b216c81c60 | ||
|
|
c37c371392 | ||
|
|
0a23cf029d | ||
|
|
5d9aa40065 | ||
|
|
4b6fb7dd47 | ||
|
|
a4f3792cec | ||
|
|
37433ffee7 | ||
|
|
e64c27e1c3 | ||
|
|
1aca7efce3 | ||
|
|
36accba5c9 | ||
|
|
d1d305e470 | ||
|
|
9b0605f979 | ||
|
|
164fe9fb4a | ||
|
|
aafb074b41 | ||
|
|
f875bcfe09 | ||
|
|
c91b9d613a | ||
|
|
3ebe6eb014 | ||
|
|
3187c096c3 | ||
|
|
1753e980b8 | ||
|
|
5c3923240d | ||
|
|
9c83bdff51 | ||
|
|
b3a6bcd34f | ||
|
|
1d5b8cbb19 | ||
|
|
2ac9099e7d | ||
|
|
6d637bf1e1 | ||
|
|
60176f7f5e | ||
|
|
7d223beae5 | ||
|
|
3359ae93d8 | ||
|
|
04e9f2c988 | ||
|
|
93558d5bbb | ||
|
|
865ecf7a94 | ||
|
|
e8d9e9e697 | ||
|
|
90443e26ac | ||
|
|
5fd4da66cb | ||
|
|
e2e6d4ba14 | ||
|
|
4bb18db905 | ||
|
|
57732d4265 | ||
|
|
90d159fbc3 | ||
|
|
6b12dd4143 | ||
|
|
6170b28c3b | ||
|
|
df2297bca3 | ||
|
|
a865f49d72 | ||
|
|
c54e010126 | ||
|
|
cb9db6e3a8 | ||
|
|
a3aba28c95 | ||
|
|
547f1dd370 | ||
|
|
985301939d | ||
|
|
5305a983c7 | ||
|
|
f923c70f38 | ||
|
|
2637f9af63 | ||
|
|
fd6147578a | ||
|
|
892a38e681 | ||
|
|
592cfb5e93 | ||
|
|
b8b2928dd1 | ||
|
|
5a15dbf545 | ||
|
|
6a2afabcac | ||
|
|
fc22565532 | ||
|
|
829f6520bd | ||
|
|
7af0bda3a5 | ||
|
|
1cbe0e3f2d | ||
|
|
db32f882e8 | ||
|
|
acadef72c1 | ||
|
|
c577d1c51e | ||
|
|
56d78cf12a | ||
|
|
8dc1e1cb33 | ||
|
|
3683461c40 | ||
|
|
b5c88d5817 | ||
|
|
c2fa19a0b4 | ||
|
|
82400ca2a5 | ||
|
|
9971aee835 | ||
|
|
8fb474c687 | ||
|
|
2fda3b1b46 | ||
|
|
f6f4968af6 | ||
|
|
824a601014 | ||
|
|
9ce23ac6b2 | ||
|
|
a4d93424dc | ||
|
|
63292255cc | ||
|
|
139ae3db00 | ||
|
|
6574e54a41 | ||
|
|
17cb441569 | ||
|
|
540e4f3d2e | ||
|
|
e6b4f1eab6 | ||
|
|
33a20ae9a1 | ||
|
|
6e4962bb39 | ||
|
|
6c1e0919c8 | ||
|
|
27e2c69e4e | ||
|
|
0d4eaca3e8 | ||
|
|
08c85a88c8 | ||
|
|
81b964db45 | ||
|
|
5e98d99321 | ||
|
|
749aeeb233 | ||
|
|
4174ebd9c0 | ||
|
|
965eb2d639 | ||
|
|
68415322ec | ||
|
|
0a871546ee | ||
|
|
e8c2085abd | ||
|
|
ea19747bc6 | ||
|
|
2e9cf8d00b | ||
|
|
9513f25a36 | ||
|
|
c7f38c4cf0 | ||
|
|
098582d7a7 | ||
|
|
b3f8a6758e | ||
|
|
804eac55e9 | ||
|
|
7a6edfd61f | ||
|
|
e9b8e81773 | ||
|
|
5a6d3b7c88 | ||
|
|
f66c506011 | ||
|
|
3d3fb17da3 | ||
|
|
c5775cc902 | ||
|
|
2ab17c44e9 | ||
|
|
ce022ab36c | ||
|
|
ee96fb6470 | ||
|
|
e2d7e84072 | ||
|
|
74345c4f21 | ||
|
|
318a783237 | ||
|
|
8c428081ab | ||
|
|
ff8aae1209 | ||
|
|
5b6439ca5e | ||
|
|
37f44f4a07 | ||
|
|
f8fcf7c16b | ||
|
|
e8bf09862f | ||
|
|
9ddd1cf8cd | ||
|
|
c35c15e782 | ||
|
|
91bf759242 | ||
|
|
7df09b6e9e | ||
|
|
bd88806982 | ||
|
|
a0e423f1b8 | ||
|
|
5e9ce734a7 | ||
|
|
1880cb92a4 | ||
|
|
ddaaabfb7a | ||
|
|
521dec7792 | ||
|
|
b6faa6b605 | ||
|
|
14a62442c4 | ||
|
|
b4f638602a | ||
|
|
6057d8aabd | ||
|
|
eabe5ae616 | ||
|
|
8c08b3945b | ||
|
|
b9a91f92ea | ||
|
|
56ae51375d | ||
|
|
30543bda71 | ||
|
|
4f693b86c2 | ||
|
|
af593099df | ||
|
|
d5865dbfcc | ||
|
|
2df54d5da7 | ||
|
|
2de2f1ce4d | ||
|
|
d89d0782c9 | ||
|
|
26dc897042 | ||
|
|
cb4c047aa3 | ||
|
|
d852816101 | ||
|
|
b3757a6f69 | ||
|
|
a29a9e5435 | ||
|
|
66bbc7f54f | ||
|
|
971b97d78f | ||
|
|
b5edfdf6f6 | ||
|
|
a5f6ee5889 | ||
|
|
631aad94e7 | ||
|
|
d905d92434 | ||
|
|
fede7b7a15 | ||
|
|
815a7683a2 | ||
|
|
7a2e28497d | ||
|
|
43836836e4 | ||
|
|
c209d9b45e | ||
|
|
b798535af9 | ||
|
|
7cb10eae2e | ||
|
|
8b555d33e7 | ||
|
|
20c30bade8 | ||
|
|
5c7685c1b8 | ||
|
|
67c6577177 | ||
|
|
cbb7751a15 | ||
|
|
c0c9ac439f | ||
|
|
e5d8267786 | ||
|
|
1ad04bb67a | ||
|
|
98c7814fa3 | ||
|
|
6aa929cbf8 | ||
|
|
7543b63a6e | ||
|
|
6de6782458 | ||
|
|
eda0b4dc37 | ||
|
|
672a07fdac | ||
|
|
c41b59b14c | ||
|
|
bf775855f6 | ||
|
|
5fd341bbd3 | ||
|
|
ef789376e7 | ||
|
|
d20ba5a665 | ||
|
|
861b583668 | ||
|
|
5afc0e33c9 | ||
|
|
8bfa7565bd | ||
|
|
2cc635fd09 | ||
|
|
5c0fba26e2 | ||
|
|
549136efeb | ||
|
|
99a17cadb7 | ||
|
|
8e8efce7d1 | ||
|
|
9db211b1a7 | ||
|
|
d59ee06438 | ||
|
|
eee936b91c | ||
|
|
c010cab47e | ||
|
|
9b0659c50a | ||
|
|
45fda63a20 | ||
|
|
d7c3cc4d18 | ||
|
|
dc3377f0f0 | ||
|
|
556651a3ae | ||
|
|
efb9ee458a | ||
|
|
57e9277376 | ||
|
|
cafc6a3da2 | ||
|
|
0c73cdb129 | ||
|
|
1d6893e928 | ||
|
|
6132843586 | ||
|
|
a848069178 | ||
|
|
a779ce36f3 | ||
|
|
73cd5e144b | ||
|
|
c306e8ebe9 | ||
|
|
e1334f34b6 | ||
|
|
83f9451b43 | ||
|
|
a249f4f35a | ||
|
|
cb4cfbd27d | ||
|
|
90d1b2d349 | ||
|
|
1282494211 | ||
|
|
9c535d6d7e | ||
|
|
0e2c27d795 | ||
|
|
e5f6a64846 | ||
|
|
71a2c20d4b | ||
|
|
a84bc05f01 | ||
|
|
1efee54541 | ||
|
|
8acc5e1486 | ||
|
|
6bcb63c53d | ||
|
|
ff6b5c768d | ||
|
|
dbbebba497 | ||
|
|
8b3c872f2a | ||
|
|
3b1143df91 | ||
|
|
ff3707b650 | ||
|
|
78052e3239 | ||
|
|
a143635f53 | ||
|
|
25823d7b90 | ||
|
|
ff9070ff9c | ||
|
|
9f9ace0565 | ||
|
|
cb94216098 | ||
|
|
414a2366fb | ||
|
|
0e1353733d | ||
|
|
d8a33b46de | ||
|
|
4428e2b18e | ||
|
|
87c8d917e9 | ||
|
|
c888ce08c1 | ||
|
|
7d14cde45e | ||
|
|
d8c262691b | ||
|
|
e9fa5a647d | ||
|
|
cdd2c165ef | ||
|
|
3f862bf43e | ||
|
|
1b55935577 | ||
|
|
3006cf770c | ||
|
|
b58b3a4932 | ||
|
|
c5f73ec12a | ||
|
|
91c594a66a | ||
|
|
041decaf93 | ||
|
|
4bba124c3f | ||
|
|
2576973dc3 | ||
|
|
83e32f96b7 | ||
|
|
c16ed62ada | ||
|
|
8b6de8fe26 | ||
|
|
6ab723e85c | ||
|
|
e9b5a52a4f | ||
|
|
3132877349 | ||
|
|
d3d0617996 | ||
|
|
3b050c3452 | ||
|
|
fc1d8a2c5b | ||
|
|
99ccfee9ed | ||
|
|
d023afb66f | ||
|
|
188ed6984f | ||
|
|
08aa3eac00 | ||
|
|
9ef5f26624 | ||
|
|
d80709a7b9 | ||
|
|
758d91b4a3 | ||
|
|
726e0ceff0 | ||
|
|
80714d8d6d | ||
|
|
244ee05a9c | ||
|
|
4f73d26f6a | ||
|
|
413fc95f9a | ||
|
|
62622a2065 | ||
|
|
1a52eb5ffa | ||
|
|
099fcd7e4e | ||
|
|
33964c659e | ||
|
|
d637bbd7e9 | ||
|
|
c63a124d1c | ||
|
|
2f98d8035c | ||
|
|
19a5caf212 | ||
|
|
2be157c91f | ||
|
|
8dfe39258b | ||
|
|
76fb64e8fe | ||
|
|
dd70bee773 | ||
|
|
e431b5aacb | ||
|
|
35448e3307 | ||
|
|
9a754625bd | ||
|
|
ae2b61d5ef | ||
|
|
9b6b1e055c | ||
|
|
86e853f27d | ||
|
|
2acf2353a3 | ||
|
|
5aba1f9ccd | ||
|
|
0e684abceb | ||
|
|
a55d23f363 | ||
|
|
12b3b72fe3 | ||
|
|
640cf50b7f | ||
|
|
755de9fff2 | ||
|
|
a0fe2a8abc | ||
|
|
560d401cff | ||
|
|
a81b3a0d61 | ||
|
|
0917b37bb9 | ||
|
|
b2d790b46a | ||
|
|
d69ce5b917 | ||
|
|
a8cdecf1b8 | ||
|
|
6b61545189 | ||
|
|
2baeec1537 | ||
|
|
7195a6880f | ||
|
|
a109dd8948 | ||
|
|
c4f8e81d5d | ||
|
|
1cd0f71c09 | ||
|
|
33a0cf078c | ||
|
|
440f923b01 | ||
|
|
8b9287055e | ||
|
|
1d5182adf0 | ||
|
|
871691bf69 | ||
|
|
fb14f7c0b8 | ||
|
|
60ab32c7fb | ||
|
|
d3cbcedce3 | ||
|
|
fd5948f716 | ||
|
|
727751e0c1 | ||
|
|
0fa7134bd1 | ||
|
|
ea47a55144 | ||
|
|
1cf86931b3 | ||
|
|
11100b3017 | ||
|
|
7e30812529 | ||
|
|
2b9ce6995f | ||
|
|
33d7998a96 | ||
|
|
e5ef455628 | ||
|
|
77f213832e | ||
|
|
080ffa6a51 | ||
|
|
f17474a8de | ||
|
|
788ef257a9 | ||
|
|
fe7be8362f | ||
|
|
a3fd6f07e9 | ||
|
|
243b227c33 | ||
|
|
24c926b32f | ||
|
|
8ca639b79f | ||
|
|
1b7d194e18 | ||
|
|
1aa7e4adeb | ||
|
|
0dc182553e | ||
|
|
2a31ca969f | ||
|
|
8918299364 | ||
|
|
42e45d4a7a | ||
|
|
93323f6d61 | ||
|
|
8f1617884a | ||
|
|
679948e207 | ||
|
|
654cf2d990 | ||
|
|
9e50a06f2b | ||
|
|
a955df21bf | ||
|
|
170814c718 | ||
|
|
7f21332533 | ||
|
|
17306bc715 | ||
|
|
d3bc6aadec | ||
|
|
7372a18283 | ||
|
|
33b138b5ba | ||
|
|
99066eaf5c | ||
|
|
4f2c6e2901 | ||
|
|
fead1b7e86 | ||
|
|
35d74035be | ||
|
|
142800f951 | ||
|
|
2be2cdaadf | ||
|
|
cf324f75d7 | ||
|
|
f9ae8acbc7 | ||
|
|
99b977a08e | ||
|
|
5164a96aa0 | ||
|
|
e8ba4de832 | ||
|
|
ca557cfacd | ||
|
|
e44b14364a | ||
|
|
19ee163f31 | ||
|
|
50b5226d10 | ||
|
|
4b9bb824d0 | ||
|
|
92a4314779 | ||
|
|
6f15683709 | ||
|
|
2f932330d3 | ||
|
|
7161ca9e70 | ||
|
|
58e33c59f4 | ||
|
|
5709216427 | ||
|
|
ca6899c138 | ||
|
|
1960c712df | ||
|
|
bb22f2ccaf | ||
|
|
d892d8c3c7 | ||
|
|
e190b010d3 | ||
|
|
8ad5dc81de | ||
|
|
f462f68056 | ||
|
|
fd4dab495f | ||
|
|
d46eb08083 | ||
|
|
a8d15fafd2 | ||
|
|
65edc377c3 | ||
|
|
40d19e6c36 | ||
|
|
79da047802 | ||
|
|
1ec763fc14 | ||
|
|
c6c697cb43 | ||
|
|
9e04217e35 | ||
|
|
a336e45098 | ||
|
|
0e2b7d8b3c | ||
|
|
c3326a0963 | ||
|
|
49a1268ba1 | ||
|
|
26791714ce | ||
|
|
d2af03856c | ||
|
|
3abceadb86 | ||
|
|
739695c442 | ||
|
|
360a85cbbc | ||
|
|
60d8fb4719 | ||
|
|
7d1d588225 | ||
|
|
8658f903fa | ||
|
|
77c335c5f3 | ||
|
|
f273273129 | ||
|
|
33f8c53cca | ||
|
|
8c87050703 | ||
|
|
ba86448bce | ||
|
|
31790e255c | ||
|
|
a61c07a205 | ||
|
|
22b2247442 | ||
|
|
f10c69680c | ||
|
|
c97fcaec87 | ||
|
|
b5db5f7474 | ||
|
|
f79dec80e6 | ||
|
|
73dfa7d44a | ||
|
|
768e143188 | ||
|
|
b04cc22350 | ||
|
|
f0d787debb | ||
|
|
6bbc25e8c3 | ||
|
|
27542ed8ed | ||
|
|
36d6b472ce | ||
|
|
10ac74162e | ||
|
|
1c32f44814 | ||
|
|
cb2c1f3ece | ||
|
|
17bd362d3c | ||
|
|
9ca2e98a66 | ||
|
|
b80bd8d1f8 | ||
|
|
7a93c11ae0 | ||
|
|
943f1022c0 | ||
|
|
5f9b53004b | ||
|
|
56c32e3c81 | ||
|
|
4f79fdb4ab | ||
|
|
7886a6e838 | ||
|
|
04c233c229 | ||
|
|
35b3d4f40a | ||
|
|
ac34fce015 | ||
|
|
4fc57d096e | ||
|
|
57b3b3db3a | ||
|
|
2592344601 | ||
|
|
b3d49c4dce | ||
|
|
4fcd3fe493 | ||
|
|
ad4a8eac52 | ||
|
|
bcf4f65cc9 | ||
|
|
7360fcd03e | ||
|
|
89854ea137 | ||
|
|
75b8794d72 | ||
|
|
51128c1d55 | ||
|
|
34e7943d09 | ||
|
|
4e72543fde | ||
|
|
111d6aa621 | ||
|
|
996e01fe6a | ||
|
|
485fe0fc62 | ||
|
|
617c9f7ea9 | ||
|
|
7c77a0d84b | ||
|
|
ee9c938ea2 | ||
|
|
669205af1c | ||
|
|
f871ade545 | ||
|
|
7ad70c7c21 | ||
|
|
d1c66059cd | ||
|
|
12b15a3d90 | ||
|
|
3770eef8dc | ||
|
|
c1b6e58bbd | ||
|
|
49db52134b | ||
|
|
e0b737b622 | ||
|
|
c69821794e | ||
|
|
aeda250df4 | ||
|
|
283d4742f4 | ||
|
|
bc7cb4a148 | ||
|
|
46bb49c490 | ||
|
|
628257d771 | ||
|
|
223205cf9d | ||
|
|
d22646e6ae | ||
|
|
2c9e490853 | ||
|
|
ddf82f3e7a | ||
|
|
b9461322d9 | ||
|
|
575bb7d420 | ||
|
|
5218550014 | ||
|
|
7685ed8295 | ||
|
|
94d57cd462 | ||
|
|
c752bfe1a6 | ||
|
|
d712e1e6d4 | ||
|
|
7a5a6a14f0 | ||
|
|
0a24298385 | ||
|
|
ac30348081 | ||
|
|
df48704154 | ||
|
|
8a7f7b3551 | ||
|
|
a1428c963b | ||
|
|
c8eaa4743c | ||
|
|
ac29db92cb | ||
|
|
35766fb5bf | ||
|
|
068587fcee | ||
|
|
af4f473c93 | ||
|
|
0ad6ee209a | ||
|
|
b324425db8 | ||
|
|
0fd865d8af | ||
|
|
17d5bb5cd4 | ||
|
|
589da1d4b9 | ||
|
|
bc1dc1e9f0 | ||
|
|
8d64485705 | ||
|
|
a2dca42965 | ||
|
|
4918b41384 | ||
|
|
662fe4c358 | ||
|
|
1c4876b417 | ||
|
|
3caf65ce6f | ||
|
|
5ec351911d | ||
|
|
fde7c4ffb3 | ||
|
|
627d09d75e | ||
|
|
7870a33fd3 | ||
|
|
9ee37153f7 | ||
|
|
560194c3b9 | ||
|
|
4f762cf73d | ||
|
|
0046bfc53f | ||
|
|
58eaef37d2 | ||
|
|
d45fe6c17f | ||
|
|
d3a2aa664f | ||
|
|
df17c2f26a | ||
|
|
c6b2ee57ca | ||
|
|
5ed2bbb204 | ||
|
|
4a5cdd0092 | ||
|
|
ac3c129735 | ||
|
|
26f07992a9 | ||
|
|
6de24e0c2e | ||
|
|
4da4499569 | ||
|
|
b043442b91 | ||
|
|
22c2cfd9ec | ||
|
|
dfa161ca30 | ||
|
|
3ccc9d3e57 | ||
|
|
bd780a8c51 | ||
|
|
f91226a9f0 | ||
|
|
168e35a035 | ||
|
|
16e3baeff2 | ||
|
|
551256b779 | ||
|
|
c9371e9eb0 | ||
|
|
a734e1caa7 | ||
|
|
3f1c00dcb2 | ||
|
|
9b1dbf8d2a | ||
|
|
d17ecbeccd | ||
|
|
7eec1155a0 | ||
|
|
faa33f2d3c | ||
|
|
817de18a5d | ||
|
|
14ea3a1697 | ||
|
|
53208e620e | ||
|
|
6042b8df4e | ||
|
|
69ea0ea791 | ||
|
|
c7d886c918 | ||
|
|
890f7a0602 | ||
|
|
5822fcfbed | ||
|
|
9cb5673c36 | ||
|
|
c5278197fb | ||
|
|
e7dbc8407f | ||
|
|
fbc911aea1 | ||
|
|
3c84962891 | ||
|
|
6c75997b27 | ||
|
|
f7228d96af | ||
|
|
823e399d8d | ||
|
|
4ae121d870 | ||
|
|
6ce006f853 | ||
|
|
217aa9c420 | ||
|
|
8ac3d5f9bf | ||
|
|
7fdc63faa6 | ||
|
|
556888d55c | ||
|
|
5e1cd459b1 | ||
|
|
b9192744cc | ||
|
|
30681f9179 | ||
|
|
f101b3e43d | ||
|
|
dff5b13700 | ||
|
|
44c5988853 | ||
|
|
2425cf82d3 | ||
|
|
0c37d31e04 | ||
|
|
0764cb2abd | ||
|
|
777ae9af9b | ||
|
|
02158928cc | ||
|
|
dd46ca9c3c | ||
|
|
2907df8253 | ||
|
|
ad05451427 | ||
|
|
b16af0a7c3 | ||
|
|
2db08c8e0d | ||
|
|
73df033000 | ||
|
|
fb27c98f9c | ||
|
|
8458025e1d | ||
|
|
4a5c7d299f | ||
|
|
59abed9153 | ||
|
|
18d4840f85 | ||
|
|
c529a92b92 | ||
|
|
bf27c56fa7 | ||
|
|
0a078da8e4 | ||
|
|
617c930574 | ||
|
|
2f11f4e104 | ||
|
|
a017943083 | ||
|
|
047785b273 | ||
|
|
4689d42afd | ||
|
|
6080e5335f | ||
|
|
9380ea4bc5 | ||
|
|
a5328f4230 | ||
|
|
6bb598498e | ||
|
|
4b7c8a0d1d | ||
|
|
e505586926 | ||
|
|
1f483d7c28 | ||
|
|
3ce7a23c70 | ||
|
|
a39ff26def | ||
|
|
bae05bbe7d | ||
|
|
f25a6b2e67 | ||
|
|
400acf9f65 | ||
|
|
2cdbfa2048 | ||
|
|
72160deef7 | ||
|
|
ad922bfde6 | ||
|
|
49ccf2a3cb | ||
|
|
45f834cb15 | ||
|
|
63a03cdad6 | ||
|
|
d9ca9fe22d | ||
|
|
5e2962ef38 | ||
|
|
3e55699275 | ||
|
|
5bae9db0a8 | ||
|
|
02c67fe2fa | ||
|
|
1591b76050 | ||
|
|
a05ea83c5c | ||
|
|
8d900baa82 | ||
|
|
e3b9012486 | ||
|
|
2749f1726c | ||
|
|
a44ffbf40c | ||
|
|
b8586d4950 | ||
|
|
db00366c5d | ||
|
|
896891130d | ||
|
|
5e4a412ec7 | ||
|
|
20fd489194 | ||
|
|
13c3a8d3b3 | ||
|
|
ee3226900c | ||
|
|
1041a58cb9 | ||
|
|
df89db3ed6 | ||
|
|
6929efc417 | ||
|
|
0d4c784a0e | ||
|
|
232f201007 | ||
|
|
145caacbea |
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,6 +16,7 @@ default.properties
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
*.iml
|
*.iml
|
||||||
|
*.orig
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
/dolibarr_genesis.mp4
|
/dolibarr_genesis.mp4
|
||||||
# Log files
|
# Log files
|
||||||
|
|||||||
78
.travis.yml
78
.travis.yml
@ -5,7 +5,7 @@
|
|||||||
# We use dist: xenial to have php 5.6+ available
|
# We use dist: xenial to have php 5.6+ available
|
||||||
os: linux
|
os: linux
|
||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: required
|
#dist: bionic
|
||||||
|
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
@ -31,53 +31,25 @@ addons:
|
|||||||
# We need pgloader for import mysql database into pgsql
|
# We need pgloader for import mysql database into pgsql
|
||||||
- pgloader
|
- pgloader
|
||||||
|
|
||||||
php:
|
|
||||||
- '5.6'
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
- '7.4'
|
|
||||||
- nightly
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Set to true for very verbose output
|
# Set to true for very verbose output
|
||||||
- DEBUG=false
|
- DEBUG=false
|
||||||
jobs:
|
|
||||||
# MariaDB overrides MySQL installation so it's not possible to test both yet
|
|
||||||
#- DB=mariadb
|
|
||||||
- DB=mysql
|
|
||||||
- DB=postgresql
|
|
||||||
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
|
|
||||||
#- WS=apache
|
|
||||||
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
|
|
||||||
#- WS=nginx
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
include:
|
||||||
exclude:
|
- if: type = push
|
||||||
- php: '7.0'
|
php: '5.6'
|
||||||
env: DB=mysql
|
env: DB=postgresql
|
||||||
- php: '7.1'
|
- if: type = pull_request OR type = push
|
||||||
env: DB=mysql
|
php: '7.4'
|
||||||
- php: '7.2'
|
env: DB=mysql
|
||||||
env: DB=mysql
|
- if: type = push AND branch = develop
|
||||||
- php: '7.3'
|
php: nightly
|
||||||
env: DB=mysql
|
env: DB=mysql
|
||||||
- php: '7.0'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.1'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.2'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.3'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: nightly
|
|
||||||
env: DB=postgresql
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
@ -110,11 +82,11 @@ install:
|
|||||||
echo "Updating Composer"
|
echo "Updating Composer"
|
||||||
rm $TRAVIS_BUILD_DIR/composer.json
|
rm $TRAVIS_BUILD_DIR/composer.json
|
||||||
rm $TRAVIS_BUILD_DIR/composer.lock
|
rm $TRAVIS_BUILD_DIR/composer.lock
|
||||||
|
composer -V
|
||||||
composer self-update
|
composer self-update
|
||||||
# To have composer making parallel downloads
|
|
||||||
composer global require hirak/prestissimo
|
|
||||||
composer -n init
|
composer -n init
|
||||||
composer -n config vendor-dir htdocs/includes
|
composer -n config vendor-dir htdocs/includes
|
||||||
|
composer -n config -g vendor-dir htdocs/includes
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -143,6 +115,9 @@ install:
|
|||||||
- |
|
- |
|
||||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||||
|
echo $PATH
|
||||||
|
ls $TRAVIS_BUILD_DIR/vendor
|
||||||
|
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
@ -169,15 +144,20 @@ before_script:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Versions information"
|
echo "Versions information"
|
||||||
|
echo
|
||||||
# Check PHP
|
# Check PHP
|
||||||
echo "PHP version"
|
echo "PHP version"
|
||||||
php -i | head -
|
php -i | head -
|
||||||
# Check PHP CodeSniffer installation
|
# Check Parallel-lint version
|
||||||
|
echo "Parallel-lint version"
|
||||||
|
which parallel-lint
|
||||||
|
parallel-lint -V
|
||||||
|
# Check PHP CodeSniffer version
|
||||||
echo "PHPCS version"
|
echo "PHPCS version"
|
||||||
which phpcs
|
which phpcs
|
||||||
phpcs --version | head -
|
phpcs --version | head -
|
||||||
phpcs -i | head -
|
phpcs -i | head -
|
||||||
# Check PHPUnit installation
|
# Check PHPUnit version
|
||||||
echo "PHPUnit version"
|
echo "PHPUnit version"
|
||||||
which phpunit
|
which phpunit
|
||||||
phpunit --version | head -
|
phpunit --version | head -
|
||||||
@ -282,17 +262,18 @@ script:
|
|||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
#parallel-lint --exclude htdocs/includes --blame .
|
#parallel-lint --exclude htdocs/includes --blame .
|
||||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
|
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Checking coding style (excluding Pull Requests builds)"
|
echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
|
||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ] && [ "$DB" = "mysql" ]; then
|
||||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi
|
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||||
|
fi
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -404,6 +385,7 @@ script:
|
|||||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||||
|
|
||||||
# Enable modules not enabled into original dump
|
# Enable modules not enabled into original dump
|
||||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
|
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||||
echo $?
|
echo $?
|
||||||
@ -424,7 +406,7 @@ script:
|
|||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- |
|
- |
|
||||||
echo "After script - Output lines of dolibarr.log"
|
echo "After script - Output last lines of dolibarr.log"
|
||||||
ls $TRAVIS_BUILD_DIR/documents
|
ls $TRAVIS_BUILD_DIR/documents
|
||||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
|
|||||||
151
ChangeLog
151
ChangeLog
@ -2,6 +2,157 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 12.0.5 compared to 12.0.4 *****
|
||||||
|
FIX: before crediting a withdrawal receipt, check whether it has been credited already
|
||||||
|
FIX: mandatory extrafields of type sellist
|
||||||
|
FIX: when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
|
||||||
|
FIX: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
|
||||||
|
FIX: "openall" filter on ticket list does not include read tickets
|
||||||
|
FIX: ticket - extrafields of type 'date' are not saved
|
||||||
|
FIX: ticket - the "openall" filter on the ticket list does not include tickets with status READ
|
||||||
|
FIX: #14290 #15900
|
||||||
|
FIX: #15388 #15891
|
||||||
|
FIX: #15465 External user sees last 5 shipments to other customers in the dashboard
|
||||||
|
FIX: #15629
|
||||||
|
FIX: #15751 Miscellaneous payment type change to 0 after updating subledger account
|
||||||
|
FIX: #15946
|
||||||
|
FIX: #15966 #15967
|
||||||
|
FIX: Accountancy - Fix some problems on CEGID export
|
||||||
|
FIX: Accountancy - label_operation is used instead of label_compte
|
||||||
|
FIX: Accountancy - Retire entire opening balance feature
|
||||||
|
FIX: add autofix of count of email target when data is corrupted
|
||||||
|
FIX: add categories params on llxHeader filter
|
||||||
|
FIX: Add critical price patch from 12 to 11.
|
||||||
|
FIX: Bad cleaning of VAT rate when numbers are into code
|
||||||
|
FIX: Bad dates filtering in the ticket list causes sql error
|
||||||
|
FIX: balance starting and ending fiscal month #14197
|
||||||
|
FIX: bom line unit display #13831
|
||||||
|
FIX: cash fence for takepos with multientity
|
||||||
|
FIX: Check of customer/vendor code fails in some cases
|
||||||
|
FIX: create ticket : thirdparty/contact notification #15629
|
||||||
|
FIX: Creation of thirdparty when setup is empty
|
||||||
|
FIX: Dates of sales start in TakePOS
|
||||||
|
FIX: dupliacete customer or supplier code must be error dipslayed with new code proposed
|
||||||
|
FIX: Export FEC - Force Carriage Return Line Feed
|
||||||
|
FIX: Facture Situation Out : status condition
|
||||||
|
FIX: Filter on date of next generation on template invoices
|
||||||
|
FIX: Fix detect dispatched product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
|
||||||
|
FIX: Invoice Situation Out : status condition
|
||||||
|
FIX: issue 15659 : Missing test if supplier conf is enabled
|
||||||
|
FIX: link to create event when task is in a project with a thirdparty
|
||||||
|
FIX: Localtax must be converted with price2num
|
||||||
|
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
|
||||||
|
FIX: missing GETPOST parameters on card_presend.tpl.php
|
||||||
|
FIX: missing socid into link to create event from project agenda tab
|
||||||
|
FIX: Must delete extrafields before main table on product deletion.
|
||||||
|
FIX: (path) htdocs removed
|
||||||
|
FIX: php alert sms.php
|
||||||
|
FIX: right to show VAT rate in product list
|
||||||
|
FIX: select default mail template
|
||||||
|
FIX: Timeout during import
|
||||||
|
FIX: update order by api
|
||||||
|
FIX: useless tracking number displayed on pdf if empty issue #14501
|
||||||
|
FIX: Visible date of payment
|
||||||
|
FIX: warning when adding a line if $remise_percent is an empty string
|
||||||
|
FIX: When creating a new POS sell, the creation date must be modified.
|
||||||
|
FIX: wrong name for search status param issue #15516
|
||||||
|
|
||||||
|
***** ChangeLog for 12.0.4 compared to 12.0.3 *****
|
||||||
|
FIX: make formConfirm an addreplace-type hook
|
||||||
|
FIX: regex to remove 'action' parameter: taking feedback from PR#15213 into account
|
||||||
|
FIX: remove 'action' parameter from redirect URL when reordering lines on a document
|
||||||
|
FIX: error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated
|
||||||
|
FIX: on survey creation, entity is always set to 1 ⇒ set it to $conf->entity
|
||||||
|
FIX: set entity to $conf->entity (instead of 1 by default) when creating a survey; otherwise the survey cannot be listed from the entity it was created on unless it is the main entity
|
||||||
|
FIX: the stringent XSS protection provided by 'alphanohtml' causes problems with some clients who used basic tags (bold, italic, underline) in product labels. Using 'restricthtml' instead could be a good compromise.
|
||||||
|
FIX: third party of object is not always fetched when initiating the e-mail presend action (e.g. from an order)
|
||||||
|
FIX: when the cronjob 'params' field is empty, the cron method is called with one empty string param instead of no params at all
|
||||||
|
FIX: XSS protection too stringent -> replace 'alphanohtml' with 'restricthtml'
|
||||||
|
FIX: #13067 including opening balance in calculation of displayed balance
|
||||||
|
FIX: #14326
|
||||||
|
FIX: #14649
|
||||||
|
FIX: #14901
|
||||||
|
FIX: #14927 Change ContratLigne property type to product_type
|
||||||
|
FIX: #14979
|
||||||
|
FIX: #15074
|
||||||
|
FIX: #15111 Fix special characters output in PDF
|
||||||
|
FIX: #15161 MO translation conflict
|
||||||
|
FIX: #15163
|
||||||
|
FIX: #15199
|
||||||
|
FIX: #15208
|
||||||
|
FIX: #15303
|
||||||
|
FIX: #15365 export of extrafields for user and resources
|
||||||
|
FIX: #15374 : "New" doesn't clear total amounts
|
||||||
|
FIX: #15501
|
||||||
|
FIX: #15572
|
||||||
|
FIX: #15590
|
||||||
|
FIX: #15618
|
||||||
|
FIX: supplier proposals as linked objects of events are not correctly fetched
|
||||||
|
FIX: when users create an event from a supplier proposal, the "linked objects" section says "Deleted"
|
||||||
|
FIX: Accountancy - Some ajustments on length of the account (general & auxiliary)
|
||||||
|
FIX: admin conf selected
|
||||||
|
FIX: also check if there is a method $object->fetch_thirdparty() before calling it
|
||||||
|
FIX: autofocus on first setup
|
||||||
|
FIX: Bad rigths to send contract
|
||||||
|
FIX: Better error message with IMAP when connection fails
|
||||||
|
FIX: Can create user but not update user with activedirectory
|
||||||
|
FIX: Can receipt of a product that required lot after disabling stock and
|
||||||
|
FIX: Can't create shipment for virtual product. Add
|
||||||
|
FIX: cant empty action comm desc
|
||||||
|
FIX: CA report by product/service : subcategory filter
|
||||||
|
FIX: Clean orphan records in llx_ecm_files into repair script.
|
||||||
|
FIX: default accountancy values and posted values
|
||||||
|
FIX: Deletion of expensereport + other generated object not complete.
|
||||||
|
FIX: disabled users must not be available in sales representative list on societe edit mode
|
||||||
|
FIX: Dol print error : conf usage thirdparty propagate extrafields to
|
||||||
|
FIX: Don't display inactive users in birthday box and company card
|
||||||
|
FIX: empty value is needed on filter list
|
||||||
|
FIX: enable HTML in product labels depending on conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML
|
||||||
|
FIX: error 500 on cash closure
|
||||||
|
FIX: excess comma
|
||||||
|
FIX: Export FEC - Remove line at zero
|
||||||
|
FIX: extrafield required error after submit
|
||||||
|
FIX: filter on project list
|
||||||
|
FIX: force payment mode to withdraw
|
||||||
|
FIX: formating of prices with foreign languages
|
||||||
|
FIX: handling $heightforinfotot when he's superior to a page height
|
||||||
|
FIX: if no PDF default model in admin for expense report, do not create a PDF
|
||||||
|
FIX: invoice payment terms edition: error management
|
||||||
|
FIX: list of fields in list of recurring invoices was empty
|
||||||
|
FIX: load default linked options for linked sellist extra fields
|
||||||
|
FIX: Loan - Return on list when you cancel create form or delete a loan
|
||||||
|
FIX: Missing lang trans
|
||||||
|
FIX: no empty value in required extrafield
|
||||||
|
FIX: Param joinfiles not sanitized
|
||||||
|
FIX: Payment by BankTransfer
|
||||||
|
FIX: pdf_getlinetotalwithtax must show total incl tax
|
||||||
|
FIX: Problem on supplier payment card
|
||||||
|
FIX: product auto volume calculation
|
||||||
|
FIX: product customer prices: missing triggers in CRUD class
|
||||||
|
FIX: Request on purchase orders in timeout even on very small databases
|
||||||
|
FIX: set paid on total discount of a product in cash desk
|
||||||
|
FIX: several warning with the barcode use in ODT templates
|
||||||
|
FIX: SHIP MODE install v12 bug insert
|
||||||
|
FIX: stripe for connect mode
|
||||||
|
FIX: subcat filter
|
||||||
|
FIX: supplier invoice: automatically calculate payment term when modifying payment condition
|
||||||
|
FIX: SUPPLIER PROPOSAL v12 bug add
|
||||||
|
FIX: table making extrafield input too small on advance target mailing
|
||||||
|
FIX: table making extrafield too small advtagertmailing
|
||||||
|
FIX: Unable to edit extrafields in expense report
|
||||||
|
FIX: update margins rates on object line edit
|
||||||
|
FIX: uses price2numjs
|
||||||
|
FIX: various payments: bad data handling for subledger account + useless db commit/rollback
|
||||||
|
FIX: virtual products: displayed value is by unit
|
||||||
|
FIX: virtual products: supplier discount was not applied in component list
|
||||||
|
FIX: warning for purchase order delivery late.
|
||||||
|
FIX: Warning on late purchase order delivery
|
||||||
|
FIX: WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider services while STOCK_SUPPORTS_SERVICES is empty
|
||||||
|
FIX: wrong tab
|
||||||
|
FIX: Yogosha report 4425 (backport)
|
||||||
|
FIX: Yogosha report 4434 (backport)
|
||||||
|
|
||||||
***** ChangeLog for 12.0.3 compared to 12.0.2 *****
|
***** ChangeLog for 12.0.3 compared to 12.0.2 *****
|
||||||
FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename
|
FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename
|
||||||
FIX: 11.0 - expenses lines overlapping the total amounts frame
|
FIX: 11.0 - expenses lines overlapping the total amounts frame
|
||||||
|
|||||||
@ -542,7 +542,7 @@ $cfg['ThemePerServer'] = FALSE; // allow diferent theme for each co
|
|||||||
* %f will be replaced by a list of field names.
|
* %f will be replaced by a list of field names.
|
||||||
* (%t and %f only applies to DefaultQueryTable)
|
* (%t and %f only applies to DefaultQueryTable)
|
||||||
*/
|
*/
|
||||||
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1';
|
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1 = 1';
|
||||||
$cfg['DefaultQueryDatabase'] = '';
|
$cfg['DefaultQueryDatabase'] = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
"vendor-dir" : "htdocs/includes"
|
"vendor-dir" : "htdocs/includes"
|
||||||
},
|
},
|
||||||
"require" : {
|
"require" : {
|
||||||
"php" : ">=5.5.0",
|
"php" : ">=5.6.0",
|
||||||
"ext-curl" : "*",
|
"ext-curl" : "*",
|
||||||
"ckeditor/ckeditor" : "4.12.1",
|
"ckeditor/ckeditor" : "4.12.1",
|
||||||
"mike42/escpos-php" : "2.2",
|
"mike42/escpos-php" : "2.2",
|
||||||
|
|||||||
@ -175,6 +175,18 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
|
|||||||
- protected $default_monospaced_font = 'courier';
|
- protected $default_monospaced_font = 'courier';
|
||||||
+ protected $default_monospaced_font = 'freemono';
|
+ protected $default_monospaced_font = 'freemono';
|
||||||
|
|
||||||
|
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
|
||||||
|
of the function, replace:
|
||||||
|
|
||||||
|
$roman = '';
|
||||||
|
|
||||||
|
with:
|
||||||
|
|
||||||
|
$roman = '';
|
||||||
|
if ($number >= 4000) {
|
||||||
|
// do not represent numbers above 4000 in Roman numerals
|
||||||
|
return strval($number);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -320,7 +332,7 @@ SELECT2
|
|||||||
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
|
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
|
||||||
|
|
||||||
.select2-hidden-accessible {
|
.select2-hidden-accessible {
|
||||||
margin: -1px !important; /* line to restore */
|
margin: -10000px !important; /* line to restore */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,8 +17,6 @@ on Internet on web following sites:<br>
|
|||||||
<br>
|
<br>
|
||||||
* <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
|
* <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
|
||||||
<br>
|
<br>
|
||||||
* <a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
|
|
||||||
<br>
|
|
||||||
* <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
|
* <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ Download
|
|||||||
Install
|
Install
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
* For a Quick guide, take a look at README file into root directory.
|
* For a Quick guide, take a look at README.md file into root directory.
|
||||||
|
|
||||||
* More complete documentations are also available on line on the Dolibarr Wiki:
|
* More complete documentations are also available on line on the Dolibarr Wiki:
|
||||||
https://wiki.dolibarr.org
|
https://wiki.dolibarr.org
|
||||||
|
|||||||
@ -22,7 +22,7 @@ Download / Herunterladen
|
|||||||
Installation
|
Installation
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
|
* Für eine kurze Einleitung, schau auf die README.md Datei im Hauptverzeichnis.
|
||||||
|
|
||||||
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
|
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
|
||||||
https://wiki.dolibarr.org/index.php/Hauptseite
|
https://wiki.dolibarr.org/index.php/Hauptseite
|
||||||
|
|||||||
@ -19,9 +19,7 @@ https://www.dolistore.org
|
|||||||
Documentation utilisateur
|
Documentation utilisateur
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
* Pour une prise en main et installation rapide, consultez le fichier
|
* Pour une prise en main et installation rapide, consultez le fichier README-FR.md à la racine.
|
||||||
README-FR à la racine.
|
|
||||||
|
|
||||||
* Une documentation utilisateur francophone plus consistante est disponible en
|
* Une documentation utilisateur francophone plus consistante est disponible en ligne sur le wiki de Dolibarr à l'adresse:
|
||||||
ligne sur le wiki de Dolibarr à l'adresse:
|
https://wiki.dolibarr.org
|
||||||
https://wiki.dolibarr.org
|
|
||||||
|
|||||||
@ -4,4 +4,5 @@ User guide
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
* All Dolibarr guides are available, on line, on the Dolibarr Web site:
|
* All Dolibarr guides are available, on line, on the Dolibarr Web site:
|
||||||
|
|
||||||
https://www.dolibarr.org
|
https://www.dolibarr.org
|
||||||
|
|||||||
@ -3,9 +3,6 @@ README (french)
|
|||||||
Documentation utilisateur
|
Documentation utilisateur
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
* Pour une prise en main et installation rapide, consultez le fichier
|
La documentation utilisateur francophone est disponible en ligne sur le site Web de Dolibarr à l'adresse:
|
||||||
README-FR à la racine.
|
|
||||||
|
|
||||||
* Une documentation utilisateur francophone plus consistante est disponible en
|
|
||||||
ligne sur le site Web de Dolibarr à l'adresse:
|
|
||||||
https://www.dolibarr.fr
|
https://www.dolibarr.fr
|
||||||
|
|||||||
@ -618,7 +618,7 @@ if ($result)
|
|||||||
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
|
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
|
||||||
$codesell = length_accountg($obj->accountancy_code_buy);
|
$codesell = length_accountg($obj->accountancy_code_buy);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
|
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
|
||||||
// Accounting account buy intra (In EEC)
|
// Accounting account buy intra (In EEC)
|
||||||
@ -628,7 +628,7 @@ if ($result)
|
|||||||
$codesell = length_accountg($obj->accountancy_code_buy_intra);
|
$codesell = length_accountg($obj->accountancy_code_buy_intra);
|
||||||
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
|
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
|
||||||
// Accounting account buy export (Out of EEC)
|
// Accounting account buy export (Out of EEC)
|
||||||
@ -638,7 +638,7 @@ if ($result)
|
|||||||
$codesell = length_accountg($obj->accountancy_code_buy_export);
|
$codesell = length_accountg($obj->accountancy_code_buy_export);
|
||||||
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
|
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
|
||||||
// Accounting account sell
|
// Accounting account sell
|
||||||
@ -648,7 +648,7 @@ if ($result)
|
|||||||
$codesell = length_accountg($obj->accountancy_code_sell);
|
$codesell = length_accountg($obj->accountancy_code_sell);
|
||||||
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
|
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
|
||||||
// Accounting account sell intra (In EEC)
|
// Accounting account sell intra (In EEC)
|
||||||
@ -658,7 +658,7 @@ if ($result)
|
|||||||
$codesell = length_accountg($obj->accountancy_code_sell_intra);
|
$codesell = length_accountg($obj->accountancy_code_sell_intra);
|
||||||
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
// Accounting account sell export (Out of EEC)
|
// Accounting account sell export (Out of EEC)
|
||||||
@ -667,13 +667,13 @@ if ($result)
|
|||||||
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
|
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
|
||||||
$codesell = length_accountg($obj->accountancy_code_sell_export);
|
$codesell = length_accountg($obj->accountancy_code_sell_export);
|
||||||
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
|
||||||
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
|
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checkbox select
|
// Checkbox select
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<input type="checkbox" class="checkforselect" name="chk_prod[]" value="'.$obj->rowid.'"/></td>';
|
print '<input type="checkbox" class="checkforselect productforselectcodeventil_'.$product_static->id.'" name="chk_prod[]" value="'.$obj->rowid.'"/></td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -697,7 +697,17 @@ if ($result)
|
|||||||
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'button\');
|
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'button\');
|
||||||
else jQuery("#changeaccount").attr(\'class\',\'button\');
|
else jQuery("#changeaccount").attr(\'class\',\'button\');
|
||||||
}
|
}
|
||||||
jQuery(".checkforselect, #checkallactions").click(function() {
|
|
||||||
|
jQuery(".checkforselect").change(function() {
|
||||||
|
init_savebutton();
|
||||||
|
});
|
||||||
|
jQuery(".productforselect").change(function() {
|
||||||
|
console.log($(this).attr("id")+" "+$(this).val());
|
||||||
|
if ($(this).val() && $(this).val() != -1) {
|
||||||
|
$(".productforselect"+$(this).attr("id")).prop(\'checked\', true);
|
||||||
|
} else {
|
||||||
|
$(".productforselect"+$(this).attr("id")).prop(\'checked\', false);
|
||||||
|
}
|
||||||
init_savebutton();
|
init_savebutton();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ $form = new Form($db);
|
|||||||
if (empty($search_date_start) && !GETPOSTISSET('formfilteraction'))
|
if (empty($search_date_start) && !GETPOSTISSET('formfilteraction'))
|
||||||
{
|
{
|
||||||
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
||||||
$sql .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'";
|
$sql .= " WHERE date_start < '".$db->idate(dol_now())."' AND date_end > '".$db->idate(dol_now())."'";
|
||||||
$sql .= $db->plimit(1);
|
$sql .= $db->plimit(1);
|
||||||
$res = $db->query($sql);
|
$res = $db->query($sql);
|
||||||
if ($res->num_rows > 0) {
|
if ($res->num_rows > 0) {
|
||||||
@ -87,6 +87,7 @@ if (empty($search_date_start) && !GETPOSTISSET('formfilteraction'))
|
|||||||
} else {
|
} else {
|
||||||
$month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
$month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||||
$year_start = dol_print_date(dol_now(), '%Y');
|
$year_start = dol_print_date(dol_now(), '%Y');
|
||||||
|
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
|
||||||
$year_end = $year_start + 1;
|
$year_end = $year_start + 1;
|
||||||
$month_end = $month_start - 1;
|
$month_end = $month_start - 1;
|
||||||
if ($month_end < 1)
|
if ($month_end < 1)
|
||||||
@ -157,11 +158,11 @@ if ($action == 'export_csv')
|
|||||||
|
|
||||||
foreach ($object->lines as $line)
|
foreach ($object->lines as $line)
|
||||||
{
|
{
|
||||||
print length_accountg($line->numero_compte).$sep;
|
print '"'.length_accountg($line->numero_compte).'"'.$sep;
|
||||||
print $object->get_compte_desc($line->numero_compte).$sep;
|
print '"'.$object->get_compte_desc($line->numero_compte).'"'.$sep;
|
||||||
print price($line->debit).$sep;
|
print '"'.price($line->debit).'"'.$sep;
|
||||||
print price($line->credit).$sep;
|
print '"'.price($line->credit).'"'.$sep;
|
||||||
print price($line->debit - $line->credit).$sep;
|
print '"'.price($line->debit - $line->credit).'"'.$sep;
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +238,8 @@ if ($action != 'export_csv')
|
|||||||
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
|
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
|
||||||
|
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
print '<td class="liste_titre" colspan="6">';
|
$colspan = (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE) ? 6 : 5);
|
||||||
|
print '<td class="liste_titre" colspan="'.$colspan.'">';
|
||||||
print $langs->trans('From');
|
print $langs->trans('From');
|
||||||
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
|
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
|
||||||
print ' ';
|
print ' ';
|
||||||
@ -254,7 +256,7 @@ if ($action != 'export_csv')
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder);
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
|
||||||
@ -265,20 +267,28 @@ if ($action != 'export_csv')
|
|||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
$sous_total_debit = 0;
|
$sous_total_debit = 0;
|
||||||
$sous_total_credit = 0;
|
$sous_total_credit = 0;
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
|
$total_opening_balance = 0;
|
||||||
|
$sous_total_opening_balance = 0;
|
||||||
|
}
|
||||||
$displayed_account = "";
|
$displayed_account = "";
|
||||||
|
|
||||||
$sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
|
// TODO Debug - In French accounting, this functionality is dangerous, it takes all the entries and adds all the accounts
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t";
|
// without time and class limits (Class 6 and 7 accounts ???) and does not take into account the "a-nouveau" journal.
|
||||||
$sql .= " WHERE t.entity = ".$conf->entity; // Never do sharing into accounting features
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
$sql .= " AND t.doc_date < '".$db->idate($search_date_start)."'";
|
$sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
|
||||||
$sql .= " GROUP BY t.numero_compte";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
||||||
|
$sql .= " WHERE t.entity = " . $conf->entity; // Never do sharing into accounting features
|
||||||
|
$sql .= " AND t.doc_date < '" . $db->idate($search_date_start) . "'";
|
||||||
|
$sql .= " GROUP BY t.numero_compte";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$nrows = $resql->num_rows;
|
$nrows = $resql->num_rows;
|
||||||
$opening_balances = array();
|
$opening_balances = array();
|
||||||
for ($i = 0; $i < $nrows; $i++) {
|
for ($i = 0; $i < $nrows; $i++) {
|
||||||
$arr = $resql->fetch_array();
|
$arr = $resql->fetch_array();
|
||||||
$opening_balances["'".$arr['numero_compte']."'"] = $arr['opening_balance'];
|
$opening_balances["'" . $arr['numero_compte'] . "'"] = $arr['opening_balance'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($object->lines as $line)
|
foreach ($object->lines as $line)
|
||||||
@ -288,6 +298,10 @@ if ($action != 'export_csv')
|
|||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||||
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
|
$opening_balance = isset($opening_balances["'".$line->numero_compte."'"]) ? $opening_balances["'".$line->numero_compte."'"] : 0;
|
||||||
|
$total_opening_balance += $opening_balance;
|
||||||
|
}
|
||||||
if (empty($description)) {
|
if (empty($description)) {
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
|
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
|
||||||
}
|
}
|
||||||
@ -298,29 +312,39 @@ if ($action != 'export_csv')
|
|||||||
{
|
{
|
||||||
// Display a sub-total per account
|
// Display a sub-total per account
|
||||||
if ($displayed_account != "") {
|
if ($displayed_account != "") {
|
||||||
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td><td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("SubTotal").':</td>';
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show first line of a break
|
// Show first line of a break
|
||||||
print '<tr class="trforbreak">';
|
print '<tr class="trforbreak">';
|
||||||
print '<td colspan="7" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
|
$colspan = (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE) ? 7 : 6);
|
||||||
|
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$displayed_account = $root_account_description;
|
$displayed_account = $root_account_description;
|
||||||
$sous_total_debit = 0;
|
$sous_total_debit = 0;
|
||||||
$sous_total_credit = 0;
|
$sous_total_credit = 0;
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) $sous_total_opening_balance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $object->get_compte_racine($line->numero_compte);
|
// $object->get_compte_racine($line->numero_compte);
|
||||||
|
|
||||||
print '<td>'.length_accountg($line->numero_compte).'</td>';
|
print '<td>'.length_accountg($line->numero_compte).'</td>';
|
||||||
print '<td>'.$description.'</td>';
|
print '<td>'.$description.'</td>';
|
||||||
print '<td class="nowraponall right">'.price($opening_balances["'".$line->numero_compte."'"]).'</td>';
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowraponall right">'.price($opening_balance).'</td>';
|
||||||
print '<td class="nowraponall right">'.price($line->debit).'</td>';
|
print '<td class="nowraponall right">'.price($line->debit).'</td>';
|
||||||
print '<td class="nowraponall right">'.price($line->credit).'</td>';
|
print '<td class="nowraponall right">'.price($line->credit).'</td>';
|
||||||
print '<td class="nowraponall right">'.price($line->debit - $line->credit).'</td>';
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
|
print '<td class="nowraponall right">'.price($opening_balance + $line->debit - $line->credit).'</td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="nowraponall right">'.price($line->debit - $line->credit).'</td>';
|
||||||
|
}
|
||||||
print '<td class="center">'.$link;
|
print '<td class="center">'.$link;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -328,13 +352,30 @@ if ($action != 'export_csv')
|
|||||||
// Records the sub-total
|
// Records the sub-total
|
||||||
$sous_total_debit += $line->debit;
|
$sous_total_debit += $line->debit;
|
||||||
$sous_total_credit += $line->credit;
|
$sous_total_credit += $line->credit;
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) $sous_total_opening_balance += $opening_balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td><td class="nowrap right">'.price(price2num($sous_total_debit - $sous_total_credit)).'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("SubTotal").':</td>';
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
|
print '<td class="nowrap right">' . price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="nowrap right">' . price(price2num($sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
|
||||||
|
}
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("AccountBalance").':</td><td class="nowrap right">'.price($total_debit).'</td><td class="nowrap right">'.price($total_credit).'</td><td class="nowrap right">'.price(price2num($total_debit - $total_credit)).'</td>';
|
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("AccountBalance").':</td>';
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($total_opening_balance).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($total_debit).'</td>';
|
||||||
|
print '<td class="nowrap right">'.price($total_credit).'</td>';
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
|
||||||
|
print '<td class="nowrap right">' . price(price2num($total_opening_balance + $total_debit - $total_credit, 'MT')) . '</td>';
|
||||||
|
} else {
|
||||||
|
print '<td class="nowrap right">' . price(price2num($total_debit - $total_credit, 'MT')) . '</td>';
|
||||||
|
}
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -45,14 +45,14 @@ $search_mvt_num = GETPOST('search_mvt_num', 'int');
|
|||||||
$search_doc_type = GETPOST("search_doc_type", 'alpha');
|
$search_doc_type = GETPOST("search_doc_type", 'alpha');
|
||||||
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
|
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
|
||||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
|
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
|
||||||
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
$search_date_creation_end = dol_mktime(23, 59, 59, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
||||||
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
||||||
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
$search_date_modification_end = dol_mktime(23, 59, 59, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
||||||
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
|
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
|
||||||
$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
|
$search_date_export_end = dol_mktime(23, 59, 59, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
|
||||||
|
|
||||||
//var_dump($search_date_start);exit;
|
//var_dump($search_date_start);exit;
|
||||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $langs->loadLangs(array("accountancy"));
|
|||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
|
|
||||||
$search_accountancy_code = GETPOST("search_accountancy_code");
|
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||||
* Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
|
||||||
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
@ -332,9 +332,9 @@ class AccountancyExport
|
|||||||
print length_accountg($line->numero_compte).$separator;
|
print length_accountg($line->numero_compte).$separator;
|
||||||
print length_accounta($line->subledger_account).$separator;
|
print length_accounta($line->subledger_account).$separator;
|
||||||
print $line->sens.$separator;
|
print $line->sens.$separator;
|
||||||
print price($line->montant).$separator;
|
print price2fec(abs($line->montant)).$separator;
|
||||||
print $line->label_operation.$separator;
|
print dol_string_unaccent($line->label_operation).$separator;
|
||||||
print $line->doc_ref;
|
print dol_string_unaccent($line->doc_ref);
|
||||||
print $end_line;
|
print $end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,6 +386,7 @@ class AccountancyExport
|
|||||||
|
|
||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||||
|
|
||||||
print $date.$separator;
|
print $date.$separator;
|
||||||
print $line->code_journal.$separator;
|
print $line->code_journal.$separator;
|
||||||
print length_accountg($line->numero_compte).$separator;
|
print length_accountg($line->numero_compte).$separator;
|
||||||
@ -394,7 +395,7 @@ class AccountancyExport
|
|||||||
print price($line->debit).$separator;
|
print price($line->debit).$separator;
|
||||||
print price($line->credit).$separator;
|
print price($line->credit).$separator;
|
||||||
print 'E'.$separator;
|
print 'E'.$separator;
|
||||||
print length_accountg($line->subledger_account).$separator;
|
print length_accounta($line->subledger_account).$separator;
|
||||||
print $end_line;
|
print $end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -438,33 +439,43 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export format : CIEL
|
* Export format : CIEL (Format XIMPORT)
|
||||||
|
* Format since 2003 compatible CIEL version > 2002 / Sage50
|
||||||
|
* Last review for this format : 2021/07/28 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
||||||
|
*
|
||||||
|
* Help : https://sage50c.online-help.sage.fr/aide-technique/
|
||||||
|
* In sage software | Use menu : "Exchange" > "Importing entries..."
|
||||||
|
*
|
||||||
|
* If you want to force filename to "XIMPORT.TXT" for automatically import file present in a directory :
|
||||||
|
* use constant ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME
|
||||||
*
|
*
|
||||||
* @param array $TData data
|
* @param array $TData data
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function exportCiel(&$TData)
|
public function exportCiel(&$TData)
|
||||||
{
|
{
|
||||||
global $conf;
|
|
||||||
|
|
||||||
$end_line = "\r\n";
|
$end_line = "\r\n";
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
|
||||||
foreach ($TData as $data) {
|
foreach ($TData as $data) {
|
||||||
$code_compta = $data->numero_compte;
|
$code_compta = length_accountg($data->numero_compte);
|
||||||
if (!empty($data->subledger_account))
|
if (!empty($data->subledger_account)) {
|
||||||
$code_compta = $data->subledger_account;
|
$code_compta = length_accounta($data->subledger_account);
|
||||||
|
}
|
||||||
|
|
||||||
|
$date_document = dol_print_date($data->doc_date, '%Y%m%d');
|
||||||
|
$date_echeance = dol_print_date($data->date_lim_reglement, '%Y%m%d');
|
||||||
|
|
||||||
$Tab = array();
|
$Tab = array();
|
||||||
$Tab['num_ecriture'] = str_pad($i, 5);
|
$Tab['num_ecriture'] = str_pad($data->piece_num, 5);
|
||||||
$Tab['code_journal'] = str_pad($data->code_journal, 2);
|
$Tab['code_journal'] = str_pad($data->code_journal, 2);
|
||||||
$Tab['date_ecriture'] = $date_ecriture;
|
$Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
|
||||||
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
|
$Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
|
||||||
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
|
$Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
|
||||||
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
|
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
|
||||||
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
|
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
|
||||||
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
|
$Tab['montant'] = str_pad(price2fec(abs($data->montant)), 13, ' ', STR_PAD_LEFT);
|
||||||
$Tab['type_montant'] = str_pad($data->sens, 1);
|
$Tab['type_montant'] = str_pad($data->sens, 1);
|
||||||
$Tab['vide'] = str_repeat(' ', 18);
|
$Tab['vide'] = str_repeat(' ', 18);
|
||||||
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
|
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
|
||||||
@ -518,9 +529,8 @@ class AccountancyExport
|
|||||||
$Tab['contrepartie'] = str_repeat(' ', 8);
|
$Tab['contrepartie'] = str_repeat(' ', 8);
|
||||||
|
|
||||||
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
|
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
|
||||||
if (!empty($data->date_echeance))
|
if (!empty($data->date_lim_reglement))
|
||||||
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%y'); // elarifr: format must be ddmmyy
|
||||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
|
|
||||||
else
|
else
|
||||||
$Tab['date_echeance'] = '000000';
|
$Tab['date_echeance'] = '000000';
|
||||||
|
|
||||||
@ -616,9 +626,8 @@ class AccountancyExport
|
|||||||
|
|
||||||
$Tab['code_stat'] = str_repeat(' ', 4);
|
$Tab['code_stat'] = str_repeat(' ', 4);
|
||||||
|
|
||||||
if (!empty($data->date_echeance))
|
if (!empty($data->date_lim_reglement))
|
||||||
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%Y');
|
||||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y');
|
|
||||||
else
|
else
|
||||||
$Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y');
|
$Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y');
|
||||||
|
|
||||||
@ -784,7 +793,7 @@ class AccountancyExport
|
|||||||
public function exportFEC($objectLines)
|
public function exportFEC($objectLines)
|
||||||
{
|
{
|
||||||
$separator = "\t";
|
$separator = "\t";
|
||||||
$end_line = "\n";
|
$end_line = "\r\n";
|
||||||
|
|
||||||
print "JournalCode".$separator;
|
print "JournalCode".$separator;
|
||||||
print "JournalLib".$separator;
|
print "JournalLib".$separator;
|
||||||
@ -807,65 +816,70 @@ class AccountancyExport
|
|||||||
print $end_line;
|
print $end_line;
|
||||||
|
|
||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
if ($line->debit == 0 && $line->credit == 0) {
|
||||||
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
unset($array[$line]);
|
||||||
$date_validation = dol_print_date($line->date_validated, '%Y%m%d');
|
} else {
|
||||||
|
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
||||||
|
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
||||||
|
$date_lettering = dol_print_date($line->date_lettering, '%Y%m%d');
|
||||||
|
$date_validation = dol_print_date($line->date_validated, '%Y%m%d');
|
||||||
|
|
||||||
// FEC:JournalCode
|
// FEC:JournalCode
|
||||||
print $line->code_journal.$separator;
|
print $line->code_journal.$separator;
|
||||||
|
|
||||||
// FEC:JournalLib
|
// FEC:JournalLib
|
||||||
print $line->journal_label.$separator;
|
print $line->journal_label.$separator;
|
||||||
|
|
||||||
// FEC:EcritureNum
|
// FEC:EcritureNum
|
||||||
print $line->piece_num.$separator;
|
print $line->piece_num.$separator;
|
||||||
|
|
||||||
// FEC:EcritureDate
|
// FEC:EcritureDate
|
||||||
print $date_document . $separator;
|
print $date_document . $separator;
|
||||||
|
|
||||||
// FEC:CompteNum
|
// FEC:CompteNum
|
||||||
print $line->numero_compte.$separator;
|
print $line->numero_compte.$separator;
|
||||||
|
|
||||||
// FEC:CompteLib
|
// FEC:CompteLib
|
||||||
print dol_string_unaccent($line->label_compte) . $separator;
|
print dol_string_unaccent($line->label_compte) . $separator;
|
||||||
|
|
||||||
// FEC:CompAuxNum
|
// FEC:CompAuxNum
|
||||||
print $line->subledger_account.$separator;
|
print $line->subledger_account.$separator;
|
||||||
|
|
||||||
// FEC:CompAuxLib
|
// FEC:CompAuxLib
|
||||||
print dol_string_unaccent($line->subledger_label) . $separator;
|
print dol_string_unaccent($line->subledger_label).$separator;
|
||||||
|
|
||||||
// FEC:PieceRef
|
// FEC:PieceRef
|
||||||
print $line->doc_ref.$separator;
|
print $line->doc_ref.$separator;
|
||||||
|
|
||||||
// FEC:PieceDate
|
// FEC:PieceDate
|
||||||
print dol_string_unaccent($date_creation) . $separator;
|
print $date_creation.$separator;
|
||||||
|
|
||||||
// FEC:EcritureLib
|
// FEC:EcritureLib
|
||||||
print $line->label_operation.$separator;
|
print dol_string_unaccent($line->label_operation).$separator;
|
||||||
|
|
||||||
// FEC:Debit
|
// FEC:Debit
|
||||||
print price2fec($line->debit).$separator;
|
print price2fec($line->debit).$separator;
|
||||||
|
|
||||||
// FEC:Credit
|
// FEC:Credit
|
||||||
print price2fec($line->credit).$separator;
|
print price2fec($line->credit).$separator;
|
||||||
|
|
||||||
// FEC:EcritureLet
|
// FEC:EcritureLet
|
||||||
print $line->lettering_code.$separator;
|
print $line->lettering_code.$separator;
|
||||||
|
|
||||||
// FEC:DateLet
|
// FEC:DateLet
|
||||||
print $line->date_lettering.$separator;
|
print $date_lettering.$separator;
|
||||||
|
|
||||||
// FEC:ValidDate
|
// FEC:ValidDate
|
||||||
print $date_validation . $separator;
|
print $date_validation.$separator;
|
||||||
|
|
||||||
// FEC:Montantdevise
|
// FEC:Montantdevise
|
||||||
print $line->multicurrency_amount.$separator;
|
print $line->multicurrency_amount.$separator;
|
||||||
|
|
||||||
// FEC:Idevise
|
// FEC:Idevise
|
||||||
print $line->multicurrency_code;
|
print $line->multicurrency_code;
|
||||||
|
|
||||||
print $end_line;
|
print $end_line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -365,7 +365,7 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= ", ".(!empty($this->subledger_account) ? ("'".$this->db->escape($this->subledger_account)."'") : "NULL");
|
$sql .= ", ".(!empty($this->subledger_account) ? ("'".$this->db->escape($this->subledger_account)."'") : "NULL");
|
||||||
$sql .= ", ".(!empty($this->subledger_label) ? ("'".$this->db->escape($this->subledger_label)."'") : "NULL");
|
$sql .= ", ".(!empty($this->subledger_label) ? ("'".$this->db->escape($this->subledger_label)."'") : "NULL");
|
||||||
$sql .= ", '".$this->db->escape($this->numero_compte)."'";
|
$sql .= ", '".$this->db->escape($this->numero_compte)."'";
|
||||||
$sql .= ", ".(!empty($this->label_operation) ? ("'".$this->db->escape($this->label_operation)."'") : "NULL");
|
$sql .= ", ".(!empty($this->label_compte) ? ("'".$this->db->escape($this->label_compte)."'") : "NULL");
|
||||||
$sql .= ", '".$this->db->escape($this->label_operation)."'";
|
$sql .= ", '".$this->db->escape($this->label_operation)."'";
|
||||||
$sql .= ", ".$this->debit;
|
$sql .= ", ".$this->debit;
|
||||||
$sql .= ", ".$this->credit;
|
$sql .= ", ".$this->credit;
|
||||||
|
|||||||
@ -121,9 +121,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as l";
|
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||||
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
|
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
|
||||||
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
|
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
|
||||||
|
|
||||||
dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1);
|
dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1);
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
|
|||||||
@ -93,87 +93,88 @@ if ($conf->accounting->enabled)
|
|||||||
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
|
||||||
print "<br>\n"; print "<br>\n";
|
if (!empty($user->rights->accounting->chartofaccount)){
|
||||||
|
print "<br>\n"; print "<br>\n";
|
||||||
|
|
||||||
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
// STEPS
|
// STEPS
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print $langs->trans("AccountancyAreaDescActionOnceBis");
|
print $langs->trans("AccountancyAreaDescActionOnceBis");
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
$step++;
|
$step++;
|
||||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
|
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
if (!empty($conf->tax->enabled))
|
if (!empty($conf->tax->enabled))
|
||||||
{
|
{
|
||||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
|
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
/*if (! empty($conf->salaries->enabled))
|
||||||
|
{
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
|
// htdocs/admin/salaries.php
|
||||||
|
print "<br>\n";
|
||||||
|
print "<br>\n";
|
||||||
|
}*/
|
||||||
|
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
||||||
|
{
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (! empty($conf->loan->enabled))
|
||||||
|
{
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
if (! empty($conf->don->enabled))
|
||||||
|
{
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
if (! empty($conf->adherents->enabled))
|
||||||
|
{
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||||
|
print "<br>\n";
|
||||||
|
}*/
|
||||||
|
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
/*if (! empty($conf->salaries->enabled))
|
|
||||||
{
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
|
||||||
// htdocs/admin/salaries.php
|
|
||||||
print "<br>\n";
|
|
||||||
print "<br>\n";
|
|
||||||
}*/
|
|
||||||
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
|
||||||
{
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
|
|
||||||
print "<br>\n";
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if (! empty($conf->loan->enabled))
|
|
||||||
{
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
|
||||||
print "<br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->don->enabled))
|
|
||||||
{
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
|
||||||
print "<br>\n";
|
|
||||||
}
|
|
||||||
if (! empty($conf->adherents->enabled))
|
|
||||||
{
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
|
||||||
print "<br>\n";
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$step++;
|
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// Step A - E
|
// Step A - E
|
||||||
|
|
||||||
|
|||||||
@ -863,7 +863,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$date.'"'.$sep;
|
print '"'.$date.'"'.$sep;
|
||||||
print '"'.$val["type_payment"].'"'.$sep;
|
print '"'.$val["type_payment"].'"'.$sep;
|
||||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print " ".$sep;
|
print " ".$sep;
|
||||||
print '"'.$reflabel.'"'.$sep;
|
print '"'.$reflabel.'"'.$sep;
|
||||||
print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep;
|
print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep;
|
||||||
@ -893,7 +893,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$key.'"'.$sep;
|
print '"'.$key.'"'.$sep;
|
||||||
print '"'.$date.'"'.$sep;
|
print '"'.$date.'"'.$sep;
|
||||||
print '"'.$val["type_payment"].'"'.$sep;
|
print '"'.$val["type_payment"].'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
if ($tabtype[$key] == 'payment_supplier') {
|
if ($tabtype[$key] == 'payment_supplier') {
|
||||||
print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep;
|
print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep;
|
||||||
} elseif ($tabtype[$key] == 'payment') {
|
} elseif ($tabtype[$key] == 'payment') {
|
||||||
@ -903,7 +903,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
} elseif ($tabtype[$key] == 'payment_salary') {
|
} elseif ($tabtype[$key] == 'payment_salary') {
|
||||||
print '"'.$conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT.'"'.$sep;
|
print '"'.$conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT.'"'.$sep;
|
||||||
} else {
|
} else {
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
}
|
}
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$reflabel.'"'.$sep;
|
print '"'.$reflabel.'"'.$sep;
|
||||||
@ -926,7 +926,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$date.'"'.$sep;
|
print '"'.$date.'"'.$sep;
|
||||||
print '"'.$val["type_payment"].'"'.$sep;
|
print '"'.$val["type_payment"].'"'.$sep;
|
||||||
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep;
|
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep;
|
||||||
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep;
|
print '"'.length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE).'"'.$sep;
|
||||||
print "".$sep;
|
print "".$sep;
|
||||||
print '"'.$reflabel.'"'.$sep;
|
print '"'.$reflabel.'"'.$sep;
|
||||||
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
|
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
|
||||||
@ -1130,7 +1130,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
if ($tabtype[$key] == 'payment_vat') $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT;
|
if ($tabtype[$key] == 'payment_vat') $account_ledger = $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT;
|
||||||
if ($tabtype[$key] == 'member') $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT;
|
if ($tabtype[$key] == 'member') $account_ledger = $conf->global->ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT;
|
||||||
if ($tabtype[$key] == 'payment_various') $account_ledger = $tabpay[$key]["account_various"];
|
if ($tabtype[$key] == 'payment_various') $account_ledger = $tabpay[$key]["account_various"];
|
||||||
$accounttoshow = length_accounta($account_ledger);
|
$accounttoshow = length_accountg($account_ledger);
|
||||||
if (empty($accounttoshow) || $accounttoshow == 'NotDefined')
|
if (empty($accounttoshow) || $accounttoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
if ($tabtype[$key] == 'unknown')
|
if ($tabtype[$key] == 'unknown')
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
@ -608,7 +608,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>".$expensereportstatic->getNomUrl(1)."</td>";
|
print "<td>".$expensereportstatic->getNomUrl(1)."</td>";
|
||||||
// Account
|
// Account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
|
$accountoshow = length_accountg($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
|
||||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
@ -92,7 +92,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
|
|||||||
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
|
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
|
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlr, f.close_code,";
|
||||||
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
|
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
|
||||||
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
||||||
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
||||||
@ -628,7 +628,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$val["refsologest"].'"'.$sep;
|
print '"'.$val["refsologest"].'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep;
|
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("Thirdparty").'"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("Thirdparty").'"'.$sep;
|
||||||
@ -694,9 +694,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$date.'"'.$sep;
|
print '"'.$date.'"'.$sep;
|
||||||
print '"'.$val["refsologest"].'"'.$sep;
|
print '"'.$val["refsologest"].'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").' NPR"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").' NPR"'.$sep;
|
||||||
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
|
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
|
||||||
@ -867,7 +867,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||||
// Account
|
// Account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("MainAccountForSuppliersNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("MainAccountForSuppliersNotDefined").'</span>';
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
@ -586,7 +586,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"'.$val["ref"].'"'.$sep;
|
print '"'.$val["ref"].'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER.'"'.$sep;
|
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER).'"'.$sep;
|
||||||
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
|
||||||
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
print '"'.$langs->trans("Thirdparty").'"'.$sep;
|
||||||
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$invoicestatic->ref.' - '.$langs->trans("Thirdparty").'"'.$sep;
|
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$invoicestatic->ref.' - '.$langs->trans("Thirdparty").'"'.$sep;
|
||||||
@ -803,7 +803,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||||
// Account
|
// Account
|
||||||
print "<td>";
|
print "<td>";
|
||||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||||
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
if (($accountoshow == "") || $accountoshow == 'NotDefined')
|
||||||
{
|
{
|
||||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||||
|
|||||||
@ -123,9 +123,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det as l";
|
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
|
||||||
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
|
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
|
||||||
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
|
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
|
||||||
|
|
||||||
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
|
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
|
||||||
$resql1 = $db->query($sql1);
|
$resql1 = $db->query($sql1);
|
||||||
|
|||||||
@ -58,9 +58,9 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
|
|||||||
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
|
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
|
||||||
|
|
||||||
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
|
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
|
||||||
}
|
} elseif ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_CIEL && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
|
||||||
else
|
$completefilename = "XIMPORT.TXT";
|
||||||
{
|
} else {
|
||||||
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
|
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -326,7 +326,7 @@ if (empty($reshook))
|
|||||||
$object->public = GETPOST("public", 'alpha');
|
$object->public = GETPOST("public", 'alpha');
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
// Check if we need to also synchronize user information
|
// Check if we need to also synchronize user information
|
||||||
|
|||||||
@ -1380,7 +1380,7 @@ class Adherent extends CommonObject
|
|||||||
$this->first_subscription_amount = $obj->subscription;
|
$this->first_subscription_amount = $obj->subscription;
|
||||||
}
|
}
|
||||||
$this->last_subscription_date = $this->db->jdate($obj->datec);
|
$this->last_subscription_date = $this->db->jdate($obj->datec);
|
||||||
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
|
$this->last_subscription_date_start = $this->db->jdate($obj->dateh);
|
||||||
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
|
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
|
||||||
$this->last_subscription_amount = $obj->subscription;
|
$this->last_subscription_amount = $obj->subscription;
|
||||||
|
|
||||||
|
|||||||
@ -257,13 +257,18 @@ class Subscription extends CommonObject
|
|||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
if (!is_numeric($this->amount)) {
|
||||||
|
$this->error = 'BadValueForParameterAmount';
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."subscription SET ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."subscription SET ";
|
||||||
$sql .= " fk_type = ".$this->fk_type.",";
|
$sql .= " fk_type = ".$this->fk_type.",";
|
||||||
$sql .= " fk_adherent = ".$this->fk_adherent.",";
|
$sql .= " fk_adherent = ".$this->fk_adherent.",";
|
||||||
$sql .= " note=".($this->note ? "'".$this->db->escape($this->note)."'" : 'null').",";
|
$sql .= " note=".($this->note ? "'".$this->db->escape($this->note)."'" : 'null').",";
|
||||||
$sql .= " subscription = '".price2num($this->amount)."',";
|
$sql .= " subscription = ".price2num($this->amount).",";
|
||||||
$sql .= " dateadh='".$this->db->idate($this->dateh)."',";
|
$sql .= " dateadh='".$this->db->idate($this->dateh)."',";
|
||||||
$sql .= " datef='".$this->db->idate($this->datef)."',";
|
$sql .= " datef='".$this->db->idate($this->datef)."',";
|
||||||
$sql .= " datec='".$this->db->idate($this->datec)."',";
|
$sql .= " datec='".$this->db->idate($this->datec)."',";
|
||||||
|
|||||||
@ -865,7 +865,7 @@ while ($i < min($num, $limit))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td class="nowrap left">';
|
print '<td class="nowrap left">';
|
||||||
if ($obj->subscription == 'yes')
|
if (!empty($obj->subscription))
|
||||||
{
|
{
|
||||||
print $langs->trans("SubscriptionNotReceived");
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
if ($obj->statut > 0) print " ".img_warning();
|
if ($obj->statut > 0) print " ".img_warning();
|
||||||
|
|||||||
@ -175,7 +175,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
|||||||
$object->vote = (boolean) trim($vote);
|
$object->vote = (boolean) trim($vote);
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
@ -510,7 +510,7 @@ if ($rowid > 0)
|
|||||||
$sql .= " AND t.rowid = ".$object->id;
|
$sql .= " AND t.rowid = ".$object->id;
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql .= natural_search(array("f.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
|
$sql .= natural_search(array("d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
|
||||||
}
|
}
|
||||||
if ($status != '')
|
if ($status != '')
|
||||||
{
|
{
|
||||||
@ -709,7 +709,7 @@ if ($rowid > 0)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td class="nowrap left">';
|
print '<td class="nowrap left">';
|
||||||
if ($objp->subscription == 'yes')
|
if (!empty($objp->subscription))
|
||||||
{
|
{
|
||||||
print $langs->trans("SubscriptionNotReceived");
|
print $langs->trans("SubscriptionNotReceived");
|
||||||
if ($objp->statut > 0) print " ".img_warning();
|
if ($objp->statut > 0) print " ".img_warning();
|
||||||
|
|||||||
@ -66,6 +66,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
|||||||
|
|
||||||
if ($action != 'updateedit' && !$error)
|
if ($action != 'updateedit' && !$error)
|
||||||
{
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -256,6 +256,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
|||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
$db->commit();
|
$db->commit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -577,6 +577,7 @@ if ($id == 11)
|
|||||||
// 'contract' => $langs->trans('Contract'),
|
// 'contract' => $langs->trans('Contract'),
|
||||||
'project' => $langs->trans('Project'),
|
'project' => $langs->trans('Project'),
|
||||||
'project_task' => $langs->trans('Task'),
|
'project_task' => $langs->trans('Task'),
|
||||||
|
'ticket' => $langs->trans('Ticket'),
|
||||||
'agenda' => $langs->trans('Agenda'),
|
'agenda' => $langs->trans('Agenda'),
|
||||||
'dolresource' => $langs->trans('Resource'),
|
'dolresource' => $langs->trans('Resource'),
|
||||||
// old deprecated
|
// old deprecated
|
||||||
@ -757,8 +758,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$keycode = $listfieldvalue[$i];
|
$keycode = $listfieldvalue[$i];
|
||||||
if (empty($keycode)) $keycode = $value;
|
if (empty($keycode)) $keycode = $value;
|
||||||
|
|
||||||
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
|
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
|
}
|
||||||
|
elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') {
|
||||||
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||||
}
|
}
|
||||||
elseif ($value == 'entity') {
|
elseif ($value == 'entity') {
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
@ -777,7 +781,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
||||||
$sql .= (int) GETPOST($keycode, 'int');
|
$sql .= (int) GETPOST($keycode, 'int');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -790,7 +794,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
if ($result) // Add is ok
|
if ($result) // Add is ok
|
||||||
{
|
{
|
||||||
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
||||||
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
|
$_POST = array('id'=>$id); // Clean $_POST array, we keep only id
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -823,8 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$keycode = $listfieldvalue[$i];
|
$keycode = $listfieldvalue[$i];
|
||||||
if (empty($keycode)) $keycode = $field;
|
if (empty($keycode)) $keycode = $field;
|
||||||
|
|
||||||
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
|
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||||
$_POST[$keycode] = price2num($_POST[$keycode], 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
|
}
|
||||||
|
elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') {
|
||||||
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8);
|
||||||
}
|
}
|
||||||
elseif ($field == 'entity') {
|
elseif ($field == 'entity') {
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
@ -1041,6 +1048,7 @@ if ($id)
|
|||||||
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
|
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
|
||||||
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
|
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
|
||||||
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
|
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
|
||||||
|
elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
|
||||||
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
|
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
|
||||||
|
|
||||||
if ($sortfield)
|
if ($sortfield)
|
||||||
@ -1454,6 +1462,7 @@ if ($id)
|
|||||||
foreach ($fieldlist as $field => $value)
|
foreach ($fieldlist as $field => $value)
|
||||||
{
|
{
|
||||||
//var_dump($fieldlist);
|
//var_dump($fieldlist);
|
||||||
|
|
||||||
$class = '';
|
$class = '';
|
||||||
$showfield = 1;
|
$showfield = 1;
|
||||||
$valuetoshow = $obj->{$fieldlist[$field]};
|
$valuetoshow = $obj->{$fieldlist[$field]};
|
||||||
|
|||||||
@ -448,6 +448,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (!$connection)
|
if (!$connection)
|
||||||
{
|
{
|
||||||
$morehtml .= 'Failed to open IMAP connection '.$connectstringsource;
|
$morehtml .= 'Failed to open IMAP connection '.$connectstringsource;
|
||||||
|
$morehtml .= '<br>'.imap_last_error();
|
||||||
|
//var_dump(imap_errors())
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -293,7 +293,7 @@ if (empty($mysoc->country_code))
|
|||||||
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
||||||
print " x ".$langs->trans("Quantity").": ".$qty;
|
print " x ".$langs->trans("Quantity").": ".$qty;
|
||||||
print " - ".$langs->trans("VAT").": ".$vat.'%';
|
print " - ".$langs->trans("VAT").": ".$vat.'%';
|
||||||
print ' -> <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
|
print ' -> <span class="opacitymedium">'.$langs->trans("TotalPriceAfterRounding").":</span> ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."<br>\n";
|
||||||
|
|
||||||
$s = 10 / 3; $qty = 2; $vat = 10;
|
$s = 10 / 3; $qty = 2; $vat = 10;
|
||||||
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||||
|
|||||||
@ -125,7 +125,7 @@ print '</td></tr>';
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("MailingDelay").'</td><td>';
|
print $langs->trans("MailingDelay").'</td><td>';
|
||||||
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
print '<input class="width75" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -720,7 +720,7 @@ else
|
|||||||
{
|
{
|
||||||
if (function_exists('fsockopen') && $port && $server)
|
if (function_exists('fsockopen') && $port && $server)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect#formmailbeforetitle">'.$langs->trans("DoTestServerAvailability").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect&date='.dol_now().'#formmailbeforetitle">'.$langs->trans("DoTestServerAvailability").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -796,6 +796,7 @@ else
|
|||||||
// Run the test to connect
|
// Run the test to connect
|
||||||
if ($action == 'testconnect')
|
if ($action == 'testconnect')
|
||||||
{
|
{
|
||||||
|
print '<div id="formmailaftertstconnect" name="formmailaftertstconnect"></div>';
|
||||||
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
@ -811,6 +812,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
setEventMessages($errormsg, null, 'errors');
|
setEventMessages($errormsg, null, 'errors');
|
||||||
|
print $errormsg;
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -257,7 +257,7 @@ if (empty($reshook))
|
|||||||
$sql = "INSERT INTO ".$tabname[$id]." (";
|
$sql = "INSERT INTO ".$tabname[$id]." (";
|
||||||
// List of fields
|
// List of fields
|
||||||
$sql .= $tabfieldinsert[$id];
|
$sql .= $tabfieldinsert[$id];
|
||||||
$sql .= ",active)";
|
$sql .= ",active,enabled)";
|
||||||
$sql .= " VALUES(";
|
$sql .= " VALUES(";
|
||||||
|
|
||||||
// List of values
|
// List of values
|
||||||
@ -280,7 +280,7 @@ if (empty($reshook))
|
|||||||
elseif ($keycode == 'content') {
|
elseif ($keycode == 'content') {
|
||||||
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
$sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'";
|
||||||
}
|
}
|
||||||
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
|
elseif (in_array($keycode, array('joinfiles', 'private', 'position', 'scale'))) {
|
||||||
$sql .= (int) GETPOST($keycode, 'int');
|
$sql .= (int) GETPOST($keycode, 'int');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -289,7 +289,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sql .= ", 1)";
|
$sql .= ", 1, 1)";
|
||||||
|
|
||||||
dol_syslog("actionadd", LOG_DEBUG);
|
dol_syslog("actionadd", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -57,6 +57,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
|||||||
|
|
||||||
if ($action != 'updateedit' && !$error)
|
if ($action != 'updateedit' && !$error)
|
||||||
{
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,6 +39,8 @@ if (!$user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$type = 'paymentorder';
|
$type = 'paymentorder';
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -74,35 +76,28 @@ if ($action == "set")
|
|||||||
else $error++;
|
else $error++;
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
||||||
if (!$res > 0) $error++;
|
if (! ($res > 0)) $error++;
|
||||||
|
|
||||||
if (GETPOST("PRELEVEMENT_USER") > 0)
|
if (GETPOST("PRELEVEMENT_USER") > 0) {
|
||||||
{
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
if (! ($res > 0)) $error++;
|
||||||
if (!$res > 0) $error++;
|
}
|
||||||
}
|
if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "") {
|
||||||
if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "")
|
$res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
||||||
{
|
if (! ($res > 0)) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
}
|
||||||
if (!$res > 0) $error++;
|
if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "") {
|
||||||
}
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity);
|
||||||
if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "")
|
if (! ($res > 0)) $error++;
|
||||||
{
|
}
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity);
|
|
||||||
if (!$res > 0) $error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GETPOST("PRELEVEMENT_ADDDAYS") || GETPOST("PRELEVEMENT_ADDDAYS") == "")
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||||
{
|
if (! ($res > 0)) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
|
||||||
if (!$res > 0) $error++;
|
if (! $error) {
|
||||||
} elseif (!$error)
|
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
@ -196,9 +191,10 @@ print '</td></tr>';
|
|||||||
//ADDDAYS
|
//ADDDAYS
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ADDDAYS").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("ADDDAYS").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
if (!$conf->global->PRELEVEMENT_ADDDAYS) $conf->global->PRELEVEMENT_ADDDAYS = 0;
|
if (empty($conf->global->PRELEVEMENT_ADDDAYS)) $conf->global->PRELEVEMENT_ADDDAYS = 0;
|
||||||
print '<input type="text" name="PRELEVEMENT_ADDDAYS" value="'.$conf->global->PRELEVEMENT_ADDDAYS.'" size="5" ></td>';
|
print '<input type="text" name="PRELEVEMENT_ADDDAYS" value="'.$conf->global->PRELEVEMENT_ADDDAYS.'" size="5" ></td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -310,7 +310,7 @@ else
|
|||||||
$formsms->withfromreadonly = 0;
|
$formsms->withfromreadonly = 0;
|
||||||
$formsms->withsubstit = 0;
|
$formsms->withsubstit = 0;
|
||||||
$formsms->withfrom = 1;
|
$formsms->withfrom = 1;
|
||||||
$formsms->withto = (isset($_POST['sendto']) ? $_POST['sendto'] : $user->user_mobile ? $user->user_mobile : 1);
|
$formsms->withto = (isset($_POST['sendto']) ? $_POST['sendto'] : ($user->user_mobile ? $user->user_mobile : 1));
|
||||||
$formsms->withbody = (isset($_POST['message']) ? (empty($_POST['message']) ? 1 : $_POST['message']) : $langs->trans("ThisIsATestMessage"));
|
$formsms->withbody = (isset($_POST['message']) ? (empty($_POST['message']) ? 1 : $_POST['message']) : $langs->trans("ThisIsATestMessage"));
|
||||||
$formsms->withbodyreadonly = 0;
|
$formsms->withbodyreadonly = 0;
|
||||||
$formsms->withcancel = 1;
|
$formsms->withcancel = 1;
|
||||||
|
|||||||
@ -83,17 +83,23 @@ else
|
|||||||
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
|
if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$version = DOL_VERSION;
|
||||||
|
if (preg_match('/[a-z]+/i', $version)) $version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log.
|
||||||
|
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
|
||||||
|
|
||||||
|
$newversion = '';
|
||||||
if (function_exists('curl_init'))
|
if (function_exists('curl_init'))
|
||||||
{
|
{
|
||||||
$conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
|
$conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
|
||||||
print ' - ';
|
print ' - ';
|
||||||
if ($action == 'getlastversion')
|
if ($action == 'getlastversion')
|
||||||
{
|
{
|
||||||
if ($sfurl)
|
if ($sfurl) {
|
||||||
{
|
$i = 0;
|
||||||
while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
|
while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
|
||||||
{
|
{
|
||||||
$title = $sfurl->channel[0]->item[$i]->title;
|
$title = $sfurl->channel[0]->item[$i]->title;
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
|
if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
|
||||||
{
|
{
|
||||||
$newversion = $reg[1];
|
$newversion = $reg[1];
|
||||||
@ -107,25 +113,23 @@ if (function_exists('curl_init'))
|
|||||||
|
|
||||||
// Show version
|
// Show version
|
||||||
print $langs->trans("LastStableVersion").' : <b>'.(($version != '0.0') ? $version : $langs->trans("Unknown")).'</b>';
|
print $langs->trans("LastStableVersion").' : <b>'.(($version != '0.0') ? $version : $langs->trans("Unknown")).'</b>';
|
||||||
}
|
if ($version != '0.0') {
|
||||||
else
|
print ' <a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
|
||||||
{
|
}
|
||||||
|
} else {
|
||||||
print $langs->trans("LastStableVersion").' : <b>'.$langs->trans("UpdateServerOffline").'</b>';
|
print $langs->trans("LastStableVersion").' : <b>'.$langs->trans("UpdateServerOffline").'</b>';
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("LastStableVersion").' : <a href="'.$_SERVER["PHP_SELF"].'?action=getlastversion" class="butAction">'.$langs->trans("Check").'</a>';
|
print $langs->trans("LastStableVersion").' : <a href="'.$_SERVER["PHP_SELF"].'?action=getlastversion" class="butAction">'.$langs->trans("Check").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now show link to the changelog
|
// Now show link to the changelog
|
||||||
print ' - ';
|
//print ' - ';
|
||||||
|
|
||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
if (preg_match('/[a-z]+/i', $version)) $version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log.
|
if (preg_match('/[a-z]+/i', $version)) $version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log.
|
||||||
|
|
||||||
print '<a href="https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog" target="_blank">'.$langs->trans("SeeChangeLog").'</a>';
|
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')</td><td>'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</td></tr>'."\n";
|
print '<tr class="oddeven"><td>'.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')</td><td>'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</td></tr>'."\n";
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("VersionLastInstall").'</td><td>'.$conf->global->MAIN_VERSION_LAST_INSTALL.'</td></tr>'."\n";
|
print '<tr class="oddeven"><td>'.$langs->trans("VersionLastInstall").'</td><td>'.$conf->global->MAIN_VERSION_LAST_INSTALL.'</td></tr>'."\n";
|
||||||
@ -221,7 +225,7 @@ if (($thousand != ',' && $thousand != '.') || ($thousand != ' '))
|
|||||||
print '<tr class="oddeven"><td> => price(1234.56)</td><td>'.price(1234.56).'</td></tr>'."\n";
|
print '<tr class="oddeven"><td> => price(1234.56)</td><td>'.price(1234.56).'</td></tr>'."\n";
|
||||||
// Timezone
|
// Timezone
|
||||||
$txt = $langs->trans("OSTZ").' (variable system TZ): '.(!empty($_ENV["TZ"]) ? $_ENV["TZ"] : $langs->trans("NotDefined")).'<br>'."\n";
|
$txt = $langs->trans("OSTZ").' (variable system TZ): '.(!empty($_ENV["TZ"]) ? $_ENV["TZ"] : $langs->trans("NotDefined")).'<br>'."\n";
|
||||||
$txt .= $langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone") ?ini_get("date.timezone") : $langs->trans("NotDefined")).''."<br>\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
$txt .= $langs->trans("PHPTZ").' (date_default_timezone_get() / php.ini date.timezone): '.(getServerTimeZoneString()." / ".(ini_get("date.timezone") ? ini_get("date.timezone") : $langs->trans("NotDefined")))."<br>\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||||
$txt .= $langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ) ? $langs->trans("NotDefined") : $conf->global->MAIN_SERVER_TZ);
|
$txt .= $langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ) ? $langs->trans("NotDefined") : $conf->global->MAIN_SERVER_TZ);
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
print '<tr class="oddeven"><td>'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
||||||
$a = getServerTimeZoneInt('now');
|
$a = getServerTimeZoneInt('now');
|
||||||
|
|||||||
@ -273,7 +273,7 @@ if (!$error && $xml)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out .= '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
$out .= '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
$out .= '</table>';
|
$out .= '</table>';
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
@ -328,7 +328,7 @@ if (!$error && $xml)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out .= '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
$out .= '<tr class="oddeven"><td colspan="7" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
$out .= '</table>';
|
$out .= '</table>';
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
@ -383,7 +383,7 @@ if (!$error && $xml)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out .= '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
$out .= '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
$out .= '</table>';
|
$out .= '</table>';
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
|
|||||||
@ -137,7 +137,7 @@ print '</table>';
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$activatedExtensions = array_map('strtolower', getActivatedExtensions());
|
$activatedExtensions = array();
|
||||||
$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
|
$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
@ -154,7 +154,6 @@ $name = "GD";
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td>".$name."</td>";
|
print "<td>".$name."</td>";
|
||||||
//print getTableColumn($name, $activatedExtensions);
|
|
||||||
print getTableColumn($name, $loadedExtensions);
|
print getTableColumn($name, $loadedExtensions);
|
||||||
print getTableColumnFunction($functions);
|
print getTableColumnFunction($functions);
|
||||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
@ -165,7 +164,6 @@ $name = "Curl";
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td>".$name."</td>";
|
print "<td>".$name."</td>";
|
||||||
//print getTableColumn($name, $activatedExtensions);
|
|
||||||
print getTableColumn($name, $loadedExtensions);
|
print getTableColumn($name, $loadedExtensions);
|
||||||
print getTableColumnFunction($functions);
|
print getTableColumnFunction($functions);
|
||||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
@ -178,7 +176,6 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td>".$name."</td>";
|
print "<td>".$name."</td>";
|
||||||
//print getTableColumn($name, $activatedExtensions);
|
|
||||||
print getTableColumn($name, $loadedExtensions);
|
print getTableColumn($name, $loadedExtensions);
|
||||||
print getTableColumnFunction($functions);
|
print getTableColumnFunction($functions);
|
||||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
@ -191,7 +188,6 @@ $name = "xDebug";
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td>".$name."</td>";
|
print "<td>".$name."</td>";
|
||||||
//print getTableColumn($name, $activatedExtensions);
|
|
||||||
print getTableColumn($name, $loadedExtensions);
|
print getTableColumn($name, $loadedExtensions);
|
||||||
print getTableColumnFunction($functions);
|
print getTableColumnFunction($functions);
|
||||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
@ -221,7 +217,7 @@ foreach ($phparray as $key => $value)
|
|||||||
print '<td>'.$keyparam.'</td>';
|
print '<td>'.$keyparam.'</td>';
|
||||||
$valtoshow = $keyvalue;
|
$valtoshow = $keyvalue;
|
||||||
if ($keyparam == 'X-ChromePhp-Data') $valtoshow = dol_trunc($keyvalue, 80);
|
if ($keyparam == 'X-ChromePhp-Data') $valtoshow = dol_trunc($keyvalue, 80);
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2" class="wordbreak">';
|
||||||
if ($keyparam == 'Path') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
if ($keyparam == 'Path') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
||||||
if ($keyparam == 'PATH') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
if ($keyparam == 'PATH') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
||||||
if ($keyparam == '_SERVER["PATH"]') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
if ($keyparam == '_SERVER["PATH"]') $valtoshow = implode('; ', explode(';', trim($valtoshow)));
|
||||||
@ -232,7 +228,7 @@ foreach ($phparray as $key => $value)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$keyparam.'</td>';
|
print '<td class="wordbreak">'.$keyparam.'</td>';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($keyvalue as $keyparam2 => $keyvalue2)
|
foreach ($keyvalue as $keyparam2 => $keyvalue2)
|
||||||
{
|
{
|
||||||
@ -256,78 +252,6 @@ foreach ($phparray as $key => $value)
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return all list with all activated, but possible not loaded PHP extensions
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
function getActivatedExtensions()
|
|
||||||
{
|
|
||||||
$file = getConfigFilePath();
|
|
||||||
$handle = fopen(GetConfigFilePath(), "r");
|
|
||||||
$content = fread($handle, filesize($file));
|
|
||||||
|
|
||||||
fclose($handle);
|
|
||||||
|
|
||||||
$configLines = explode("\r", $content);
|
|
||||||
|
|
||||||
$extensions = array();
|
|
||||||
$lastLine = "";
|
|
||||||
|
|
||||||
foreach ($configLines as $line)
|
|
||||||
{
|
|
||||||
$line = trim($line);
|
|
||||||
|
|
||||||
// ignore comment lines
|
|
||||||
if (substr($line, 0, 1) === ";")
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extension
|
|
||||||
if (substr($line, 0, 9) === "extension" && substr($line, 0, 10) !== "extension_")
|
|
||||||
{
|
|
||||||
$value = trim(end(explode("=", $line)));
|
|
||||||
|
|
||||||
$extensions[] = $value === "gd2" ? "gd" : $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// zend_extension
|
|
||||||
if (substr($line, 0, 14) === "zend_extension")
|
|
||||||
{
|
|
||||||
$extensions[] = str_replace("[", "", str_replace("]", "", $lastLine));
|
|
||||||
}
|
|
||||||
|
|
||||||
$lastLine = $line;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array_unique($extensions);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the path to the current used php config file
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function getConfigFilePath()
|
|
||||||
{
|
|
||||||
$phparray = phpinfo_array();
|
|
||||||
|
|
||||||
foreach ($phparray as $value)
|
|
||||||
{
|
|
||||||
foreach ($value as $keyparam => $keyvalue)
|
|
||||||
{
|
|
||||||
if (strtolower($keyparam) !== "loaded configuration file")
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $keyvalue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a table column with a indicator (okay or warning), based on the given name and list
|
* Return a table column with a indicator (okay or warning), based on the given name and list
|
||||||
@ -400,7 +324,7 @@ function getTableColumnFunction(array $functions)
|
|||||||
* Return a result column with a translated result text
|
* Return a result column with a translated result text
|
||||||
*
|
*
|
||||||
* @param string $name The name of the PHP extension
|
* @param string $name The name of the PHP extension
|
||||||
* @param array $activated A list with all activated PHP extensions
|
* @param array $activated A list with all activated PHP extensions. Deprecated.
|
||||||
* @param array $loaded A list with all loaded PHP extensions
|
* @param array $loaded A list with all loaded PHP extensions
|
||||||
* @param array $functions A list with all PHP functions to check
|
* @param array $functions A list with all PHP functions to check
|
||||||
*
|
*
|
||||||
|
|||||||
@ -34,7 +34,7 @@ $action = GETPOST('action', 'alpha');
|
|||||||
$what = GETPOST('what', 'alpha');
|
$what = GETPOST('what', 'alpha');
|
||||||
$export_type = GETPOST('export_type', 'alpha');
|
$export_type = GETPOST('export_type', 'alpha');
|
||||||
$file = trim(GETPOST('zipfilename_template', 'alpha'));
|
$file = trim(GETPOST('zipfilename_template', 'alpha'));
|
||||||
$compression = GETPOST('compression');
|
$compression = GETPOST('compression', 'aZ09');
|
||||||
|
|
||||||
$file = dol_sanitizeFileName($file);
|
$file = dol_sanitizeFileName($file);
|
||||||
$file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file);
|
$file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file);
|
||||||
|
|||||||
@ -197,7 +197,7 @@ if ($action == 'delete')
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formadmin = new FormAdmin($db);
|
$formadmin = new FormAdmin($db);
|
||||||
|
|
||||||
$wikihelp = 'EN:Setup Translation|FR:Paramétrage traduction|ES:Configuración';
|
$wikihelp = 'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
|
||||||
llxHeader('', $langs->trans("Setup"), $wikihelp);
|
llxHeader('', $langs->trans("Setup"), $wikihelp);
|
||||||
|
|
||||||
$param = '&mode='.$mode;
|
$param = '&mode='.$mode;
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -42,6 +43,8 @@ $action = GETPOST('action', 'alpha');
|
|||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
|
$label = GETPOST('label', 'alpha');
|
||||||
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
$type = 'user';
|
$type = 'user';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,7 @@ if ($action == 'update' && $user->rights->asset->write)
|
|||||||
$object->note = trim($comment);
|
$object->note = trim($comment);
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
|
|||||||
@ -185,6 +185,8 @@ if (empty($reshook))
|
|||||||
unset($_POST['disable_stock_change']);
|
unset($_POST['disable_stock_change']);
|
||||||
|
|
||||||
$object->fetchLines();
|
$object->fetchLines();
|
||||||
|
|
||||||
|
$object->calculateCosts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -196,7 +198,7 @@ if (empty($reshook))
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Set if we used free entry or predefined product
|
// Set if we used free entry or predefined product
|
||||||
$qty = price2num(GETPOST('qty', 'int'));
|
$qty = price2num(GETPOST('qty', 'alpha'));
|
||||||
$qty_frozen = GETPOST('qty_frozen', 'int');
|
$qty_frozen = GETPOST('qty_frozen', 'int');
|
||||||
$disable_stock_change = GETPOST('disable_stock_change', 'int');
|
$disable_stock_change = GETPOST('disable_stock_change', 'int');
|
||||||
$efficiency = price2num(GETPOST('efficiency', 'int'));
|
$efficiency = price2num(GETPOST('efficiency', 'int'));
|
||||||
@ -227,6 +229,8 @@ if (empty($reshook))
|
|||||||
unset($_POST['disable_stock_change']);
|
unset($_POST['disable_stock_change']);
|
||||||
|
|
||||||
$object->fetchLines();
|
$object->fetchLines();
|
||||||
|
|
||||||
|
$object->calculateCosts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,6 @@ if ($conf->global->PRODUCT_USE_UNITS)
|
|||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
print $form->selectUnits($line->fk_unit, "units");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -112,7 +112,6 @@ if ($conf->global->PRODUCT_USE_UNITS)
|
|||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
print $form->selectUnits($line->fk_unit, "units");
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ print '</td>';
|
|||||||
if ($conf->global->PRODUCT_USE_UNITS)
|
if ($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
print '<td class="linecoluseunit nowrap left">';
|
print '<td class="linecoluseunit nowrap left">';
|
||||||
$label = $line->getLabelOfUnit('short');
|
$label = $tmpproduct->getLabelOfUnit('short');
|
||||||
if ($label !== '') {
|
if ($label !== '') {
|
||||||
print $langs->trans($label);
|
print $langs->trans($label);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ function printDropdownBookmarksList()
|
|||||||
{
|
{
|
||||||
foreach ($_POST as $key => $val)
|
foreach ($_POST as $key => $val)
|
||||||
{
|
{
|
||||||
if (preg_match('/^search_/', $key) && $val != '') $tmpurl .= ($tmpurl ? '&' : '').$key.'='.$val;
|
if (preg_match('/^search_/', $key) && $val != '') $tmpurl .= ($tmpurl ? '&' : '').http_build_query(array($key => $val));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$url .= ($tmpurl ? '?'.$tmpurl : '');
|
$url .= ($tmpurl ? '?'.$tmpurl : '');
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if ($action == 'update' && $user->rights->categorie->creer)
|
|||||||
}
|
}
|
||||||
if (!$error && empty($object->error))
|
if (!$error && empty($object->error))
|
||||||
{
|
{
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
if (!$error && $object->update($user) > 0)
|
if (!$error && $object->update($user) > 0)
|
||||||
@ -157,7 +157,7 @@ print '</tr>';
|
|||||||
// Description
|
// Description
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td >';
|
print '<td>';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor = new DolEditor('description', $object->description, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, ROWS_6, '90%');
|
$doleditor = new DolEditor('description', $object->description, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, ROWS_6, '90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
@ -166,7 +166,7 @@ print '</td></tr>';
|
|||||||
// Color
|
// Color
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Color").'</td>';
|
print '<td>'.$langs->trans("Color").'</td>';
|
||||||
print '<td >';
|
print '<td>';
|
||||||
print $formother->selectColor($object->color, 'color');
|
print $formother->selectColor($object->color, 'color');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -269,16 +269,19 @@ dol_fiche_end();
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print "<div class='tabsAction'>\n";
|
print "<div class='tabsAction'>\n";
|
||||||
|
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
if (empty($reshook)) {
|
||||||
|
if ($user->rights->categorie->creer)
|
||||||
|
{
|
||||||
|
$socid = ($object->socid ? "&socid=".$object->socid : "");
|
||||||
|
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&type=".$type."'>".$langs->trans("Modify")."</a>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->categorie->creer)
|
if ($user->rights->categorie->supprimer)
|
||||||
{
|
{
|
||||||
$socid = ($object->socid ? "&socid=".$object->socid : "");
|
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&id=".$object->id."&type=".$type."'>".$langs->trans("Delete")."</a>";
|
||||||
print "<a class='butAction' href='edit.php?id=".$object->id.$socid."&type=".$type."'>".$langs->trans("Modify")."</a>";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->categorie->supprimer)
|
|
||||||
{
|
|
||||||
print "<a class='butActionDelete' href='".DOL_URL_ROOT."/categories/viewcat.php?action=delete&id=".$object->id."&type=".$type."'>".$langs->trans("Delete")."</a>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
@ -445,8 +445,8 @@ if (empty($reshook) && $action == 'update')
|
|||||||
$object->fetch_userassigned();
|
$object->fetch_userassigned();
|
||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
|
$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'));
|
||||||
$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
|
$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'));
|
||||||
|
|
||||||
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm');
|
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm');
|
||||||
$object->label = GETPOST("label", "alphanohtml");
|
$object->label = GETPOST("label", "alphanohtml");
|
||||||
@ -469,7 +469,6 @@ if (empty($reshook) && $action == 'update')
|
|||||||
$object->note_private = trim(GETPOST("note", "none"));
|
$object->note_private = trim(GETPOST("note", "none"));
|
||||||
$object->fk_element = GETPOST("fk_element", "int");
|
$object->fk_element = GETPOST("fk_element", "int");
|
||||||
$object->elementtype = GETPOST("elementtype", "alphanohtml");
|
$object->elementtype = GETPOST("elementtype", "alphanohtml");
|
||||||
|
|
||||||
if (!$datef && $percentage == 100)
|
if (!$datef && $percentage == 100)
|
||||||
{
|
{
|
||||||
$error++; $donotclearsession = 1;
|
$error++; $donotclearsession = 1;
|
||||||
@ -530,7 +529,7 @@ if (empty($reshook) && $action == 'update')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
|||||||
@ -763,6 +763,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->elementid = $obj->elementid;
|
$this->elementid = $obj->elementid;
|
||||||
$this->elementtype = $obj->elementtype;
|
$this->elementtype = $obj->elementtype;
|
||||||
|
|
||||||
|
$this->fetch_optionals();
|
||||||
$this->fetchResources();
|
$this->fetchResources();
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
@ -983,7 +984,7 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->label = trim($this->label);
|
$this->label = trim($this->label);
|
||||||
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
|
$this->note_private = dol_htmlcleanlastbr(trim(!isset($this->note_private) ? $this->note : $this->note_private));
|
||||||
if (empty($this->percentage)) $this->percentage = 0;
|
if (empty($this->percentage)) $this->percentage = 0;
|
||||||
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
||||||
if (empty($this->transparency)) $this->transparency = 0;
|
if (empty($this->transparency)) $this->transparency = 0;
|
||||||
@ -1201,13 +1202,20 @@ class ActionComm extends CommonObject
|
|||||||
}
|
}
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||||
|
if (!$user->rights->agenda->allactions->read) {
|
||||||
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources AS ar ON a.id = ar.fk_actioncomm AND ar.element_type ='user' AND ar.fk_element = ".$user->id;
|
||||||
|
}
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||||
$sql .= " WHERE 1 = 1";
|
$sql .= " WHERE 1 = 1";
|
||||||
if (empty($load_state_board)) $sql .= " AND a.percent >= 0 AND a.percent < 100";
|
if (empty($load_state_board)) $sql .= " AND a.percent >= 0 AND a.percent < 100";
|
||||||
$sql .= " AND a.entity IN (".getEntity('agenda').")";
|
$sql .= " AND a.entity IN (".getEntity('agenda').")";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")";
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")";
|
||||||
if ($user->socid) $sql .= " AND a.fk_soc = ".$user->socid;
|
if ($user->socid) $sql .= " AND a.fk_soc = ".$user->socid;
|
||||||
if (!$user->rights->agenda->allactions->read) $sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id.")";
|
if (!$user->rights->agenda->allactions->read) {
|
||||||
|
$sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id;
|
||||||
|
$sql .= " OR ar.fk_element = ".$user->id; // Added by PV
|
||||||
|
$sql .= ")";
|
||||||
|
}
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class AgendaEvents extends DolibarrApi
|
|||||||
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read) {
|
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read) {
|
||||||
throw new RestException(401, "Insufficient rights to read an event");
|
throw new RestException(401, "Insufficient rights to read an event");
|
||||||
}
|
}
|
||||||
if ($id == 0) {
|
if ($id === 0) {
|
||||||
$result = $this->actioncomm->initAsSpecimen();
|
$result = $this->actioncomm->initAsSpecimen();
|
||||||
} else {
|
} else {
|
||||||
$result = $this->actioncomm->fetch($id);
|
$result = $this->actioncomm->fetch($id);
|
||||||
|
|||||||
@ -269,7 +269,10 @@ if ($object->id > 0)
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans('CustomerCode').'</td><td>';
|
print $langs->trans('CustomerCode').'</td><td>';
|
||||||
print $object->code_client;
|
print $object->code_client;
|
||||||
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
$tmpcheck = $object->check_codeclient();
|
||||||
|
if ($tmpcheck != 0 && $tmpcheck != -5) {
|
||||||
|
print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
|
|||||||
@ -839,7 +839,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
|
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.fk_statut, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
|
||||||
$sql .= ", s.code_client";
|
$sql .= ", s.code_client";
|
||||||
$sql .= ", s.entity";
|
$sql .= ", s.entity";
|
||||||
$sql .= ", s.email";
|
$sql .= ", s.email";
|
||||||
@ -877,6 +877,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
|
|
||||||
$orderstatic->id = $obj->commandeid;
|
$orderstatic->id = $obj->commandeid;
|
||||||
$orderstatic->ref = $obj->ref;
|
$orderstatic->ref = $obj->ref;
|
||||||
|
$orderstatic->statut = $obj->fk_statut;
|
||||||
$orderstatic->ref_client = $obj->ref_client;
|
$orderstatic->ref_client = $obj->ref_client;
|
||||||
$orderstatic->total_ht = $obj->total_ht;
|
$orderstatic->total_ht = $obj->total_ht;
|
||||||
$orderstatic->total_tva = $obj->total_tva;
|
$orderstatic->total_tva = $obj->total_tva;
|
||||||
|
|||||||
@ -346,7 +346,7 @@ if (empty($reshook))
|
|||||||
if (!empty($conf->global->MAILING_DELAY))
|
if (!empty($conf->global->MAILING_DELAY))
|
||||||
{
|
{
|
||||||
dol_syslog("Wait a delay of MAILING_DELAY=".$conf->global->MAILING_DELAY);
|
dol_syslog("Wait a delay of MAILING_DELAY=".$conf->global->MAILING_DELAY);
|
||||||
sleep($conf->global->MAILING_DELAY);
|
usleep((float) $conf->global->MAILING_DELAY * 1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
//test if CHECK READ change statut prospect contact
|
//test if CHECK READ change statut prospect contact
|
||||||
|
|||||||
@ -66,6 +66,8 @@ $modulesdir = dolGetModulesDirs('/mailings');
|
|||||||
$object = new Mailing($db);
|
$object = new Mailing($db);
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('ciblescard', 'globalcard'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -471,6 +473,10 @@ if ($object->fetch($id) >= 0)
|
|||||||
}
|
}
|
||||||
} // End foreach dir
|
} // End foreach dir
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
@ -481,11 +487,27 @@ if ($object->fetch($id) >= 0)
|
|||||||
$sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text";
|
$sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
|
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
|
||||||
$sql .= " WHERE mc.fk_mailing=".$object->id;
|
$sql .= " WHERE mc.fk_mailing=".$object->id;
|
||||||
if ($search_lastname) $sql .= natural_search("mc.lastname", $search_lastname);
|
$asearchcriteriahasbeenset = 0;
|
||||||
if ($search_firstname) $sql .= natural_search("mc.firstname", $search_firstname);
|
if ($search_lastname) {
|
||||||
if ($search_email) $sql .= natural_search("mc.email", $search_email);
|
$sql .= natural_search("mc.lastname", $search_lastname);
|
||||||
if ($search_other) $sql .= natural_search("mc.other", $search_other);
|
$asearchcriteriahasbeenset++;
|
||||||
if ($search_dest_status != '' && $search_dest_status >= -1) $sql .= " AND mc.statut=".$db->escape($search_dest_status)." ";
|
}
|
||||||
|
if ($search_firstname) {
|
||||||
|
$sql .= natural_search("mc.firstname", $search_firstname);
|
||||||
|
$asearchcriteriahasbeenset++;
|
||||||
|
}
|
||||||
|
if ($search_email) {
|
||||||
|
$sql .= natural_search("mc.email", $search_email);
|
||||||
|
$asearchcriteriahasbeenset++;
|
||||||
|
}
|
||||||
|
if ($search_other) {
|
||||||
|
$sql .= natural_search("mc.other", $search_other);
|
||||||
|
$asearchcriteriahasbeenset++;
|
||||||
|
}
|
||||||
|
if ($search_dest_status != '' && $search_dest_status >= -1) {
|
||||||
|
$sql .= " AND mc.statut=".$db->escape($search_dest_status)." ";
|
||||||
|
$asearchcriteriahasbeenset++;
|
||||||
|
}
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
@ -499,6 +521,18 @@ if ($object->fetch($id) >= 0)
|
|||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix/update nbemail on emailing record if it differs (may happen if user edit lines from database directly)
|
||||||
|
if (empty($asearchcriteriahasbeenset)) {
|
||||||
|
if ($nbtotalofrecords != $object->email) {
|
||||||
|
dol_syslog("We found a difference in nb of record in target table and the property ->nbemail, we fix ->nbemail");
|
||||||
|
//print "nbemail=".$object->nbemail." nbtotalofrecords=".$nbtotalofrecords;
|
||||||
|
$resultrefresh = $object->refreshNbOfTargets();
|
||||||
|
if ($resultrefresh < 0) {
|
||||||
|
dol_print_error($db, $object->error, $object->errors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets
|
//$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets
|
||||||
|
|||||||
@ -595,6 +595,10 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
if ($arrayquery['options_'.$key] != '') {
|
if ($arrayquery['options_'.$key] != '') {
|
||||||
$sqlwhere[] = " (te.".$key." = ".$arrayquery['options_'.$key].")";
|
$sqlwhere[] = " (te.".$key." = ".$arrayquery['options_'.$key].")";
|
||||||
}
|
}
|
||||||
|
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
|
||||||
|
if ($arrayquery['options_'.$key] > 0) {
|
||||||
|
$sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (is_array($arrayquery['options_'.$key])) {
|
if (is_array($arrayquery['options_'.$key])) {
|
||||||
$sqlwhere[] = " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
$sqlwhere[] = " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
||||||
@ -621,7 +625,6 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$this->thirdparty_lines[$i] = $obj->rowid;
|
$this->thirdparty_lines[$i] = $obj->rowid;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -424,11 +424,16 @@ class Mailing extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Delete emailing
|
* Delete emailing
|
||||||
*
|
*
|
||||||
* @param int $rowid id du mailing a supprimer
|
* @param int $rowid Id if emailing to delete
|
||||||
* @return int 1 en cas de succes
|
* @param int $notrigger Disable triggers
|
||||||
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
public function delete($rowid)
|
public function delete($rowid, $notrigger = 0)
|
||||||
{
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing";
|
||||||
$sql .= " WHERE rowid = ".$rowid;
|
$sql .= " WHERE rowid = ".$rowid;
|
||||||
|
|
||||||
@ -436,13 +441,31 @@ class Mailing extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
return $this->delete_targets();
|
$res = $this->delete_targets();
|
||||||
|
if(empty($res)){
|
||||||
|
$this->db->rollback();
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->db->rollback();
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$notrigger){
|
||||||
|
$result = $this->call_trigger('MAILING_DELETE', $user);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
@ -461,6 +484,8 @@ class Mailing extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$this->refreshNbOfTargets();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -532,6 +557,38 @@ class Mailing extends CommonObject
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh denormalized value ->nbemail into emailing record
|
||||||
|
* Note: There is also the method update_nb into modules_mailings that is used for this.
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function refreshNbOfTargets()
|
||||||
|
{
|
||||||
|
$sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_cibles";
|
||||||
|
$sql .= " WHERE fk_mailing = ".$this->id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
if ($obj) {
|
||||||
|
$nbforupdate = $obj->nb;
|
||||||
|
|
||||||
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'mailing SET nbemail = '.((int) $nbforupdate);
|
||||||
|
$sql .= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
|
$resqlupdate = $this->db->query($sql);
|
||||||
|
if (! $resqlupdate) {
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a link to the object card (with optionally the picto)
|
* Return a link to the object card (with optionally the picto)
|
||||||
|
|||||||
@ -327,7 +327,7 @@ if (empty($reshook))
|
|||||||
$duration = GETPOST('duree_validite', 'int');
|
$duration = GETPOST('duree_validite', 'int');
|
||||||
|
|
||||||
if (empty($datep)) {
|
if (empty($datep)) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -942,6 +942,7 @@ if (empty($reshook))
|
|||||||
if (count($prodcustprice->lines) > 0) {
|
if (count($prodcustprice->lines) > 0) {
|
||||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||||
|
$price_min = price($prodcustprice->lines[0]->price_min);
|
||||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||||
$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
|
$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx);
|
||||||
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||||
@ -1621,7 +1622,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('DatePropal').'</td><td>';
|
||||||
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
|
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -2050,7 +2051,7 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('Date');
|
print $langs->trans('DatePropal');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';
|
||||||
|
|||||||
@ -483,6 +483,7 @@ class Propal extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error = $line->error;
|
$this->error = $line->error;
|
||||||
|
$this->errors = $line->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -602,6 +603,7 @@ class Propal extends CommonObject
|
|||||||
|
|
||||||
// Clean vat code
|
// Clean vat code
|
||||||
$vat_src_code = '';
|
$vat_src_code = '';
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
{
|
{
|
||||||
$vat_src_code = $reg[1];
|
$vat_src_code = $reg[1];
|
||||||
@ -726,6 +728,7 @@ class Propal extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error = $this->line->error;
|
$this->error = $this->line->error;
|
||||||
|
$this->errors = $this->line->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -779,7 +782,9 @@ class Propal extends CommonObject
|
|||||||
$qty = price2num($qty);
|
$qty = price2num($qty);
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
$pu_ht_devise = price2num($pu_ht_devise);
|
$pu_ht_devise = price2num($pu_ht_devise);
|
||||||
$txtva = price2num($txtva);
|
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||||
|
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
|
}
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
$txlocaltax2 = price2num($txlocaltax2);
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
$pa_ht = price2num($pa_ht);
|
$pa_ht = price2num($pa_ht);
|
||||||
@ -921,7 +926,7 @@ class Propal extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error = $this->line->error;
|
$this->error = $this->line->error;
|
||||||
|
$this->errors = $this->line->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1344,7 +1349,6 @@ class Propal extends CommonObject
|
|||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$object->fetch($this->id);
|
$object->fetch($this->id);
|
||||||
$object->fetch_lines();
|
|
||||||
|
|
||||||
$objsoc = new Societe($this->db);
|
$objsoc = new Societe($this->db);
|
||||||
|
|
||||||
@ -1738,7 +1742,7 @@ class Propal extends CommonObject
|
|||||||
$sql = 'SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.vat_src_code, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.localtax1_type, d.localtax2_type, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,';
|
$sql = 'SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.vat_src_code, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.localtax1_type, d.localtax2_type, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,';
|
||||||
$sql .= ' d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,';
|
$sql .= ' d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,';
|
||||||
$sql .= ' d.fk_unit,';
|
$sql .= ' d.fk_unit,';
|
||||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_batch,';
|
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch, p.barcode as product_barcode,';
|
||||||
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units,';
|
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units,';
|
||||||
$sql .= ' d.date_start, d.date_end,';
|
$sql .= ' d.date_start, d.date_end,';
|
||||||
$sql .= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
|
$sql .= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
|
||||||
@ -1800,11 +1804,14 @@ class Propal extends CommonObject
|
|||||||
$line->fk_product = $objp->fk_product;
|
$line->fk_product = $objp->fk_product;
|
||||||
|
|
||||||
$line->ref = $objp->product_ref; // deprecated
|
$line->ref = $objp->product_ref; // deprecated
|
||||||
$line->product_ref = $objp->product_ref;
|
|
||||||
$line->libelle = $objp->product_label; // deprecated
|
$line->libelle = $objp->product_label; // deprecated
|
||||||
|
|
||||||
|
$line->product_ref = $objp->product_ref;
|
||||||
$line->product_label = $objp->product_label;
|
$line->product_label = $objp->product_label;
|
||||||
$line->product_desc = $objp->product_desc; // Description produit
|
$line->product_desc = $objp->product_desc; // Description produit
|
||||||
$line->product_tobatch = $objp->product_tobatch;
|
$line->product_tobatch = $objp->product_tobatch;
|
||||||
|
$line->product_barcode = $objp->product_barcode;
|
||||||
|
|
||||||
$line->fk_product_type = $objp->fk_product_type; // deprecated
|
$line->fk_product_type = $objp->fk_product_type; // deprecated
|
||||||
$line->fk_unit = $objp->fk_unit;
|
$line->fk_unit = $objp->fk_unit;
|
||||||
$line->weight = $objp->weight;
|
$line->weight = $objp->weight;
|
||||||
@ -3924,6 +3931,18 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public $product_desc;
|
public $product_desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Product use lot
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $product_tobatch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Product barcode
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $product_barcode;
|
||||||
|
|
||||||
public $localtax1_tx; // Local tax 1
|
public $localtax1_tx; // Local tax 1
|
||||||
public $localtax2_tx; // Local tax 2
|
public $localtax2_tx; // Local tax 2
|
||||||
public $localtax1_type; // Local tax 1 type
|
public $localtax1_type; // Local tax 1 type
|
||||||
|
|||||||
@ -162,7 +162,7 @@ $arrayfields = array(
|
|||||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
||||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||||
'p.date'=>array('label'=>"Date", 'checked'=>1),
|
'p.date'=>array('label'=>"DatePropal", 'checked'=>1),
|
||||||
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
|
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
|
||||||
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
|
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
|
||||||
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),
|
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),
|
||||||
@ -282,7 +282,7 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'
|
|||||||
//llxHeader('',$langs->trans('Proposal'),$help_url);
|
//llxHeader('',$langs->trans('Proposal'),$help_url);
|
||||||
|
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
|
||||||
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
|
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
|
||||||
$sql .= " typent.code as typent_code,";
|
$sql .= " typent.code as typent_code,";
|
||||||
$sql .= " ava.rowid as availability,";
|
$sql .= " ava.rowid as availability,";
|
||||||
|
|||||||
@ -37,11 +37,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
||||||
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
||||||
|
|
||||||
$mode = GETPOST("mode") ?GETPOST("mode") : 'customer';
|
$mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer';
|
||||||
if ($mode == 'customer' && !$user->rights->propale->lire) accessforbidden();
|
if ($mode == 'customer' && !$user->rights->propale->lire) accessforbidden();
|
||||||
if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) accessforbidden();
|
if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) accessforbidden();
|
||||||
|
|
||||||
$object_status = GETPOST('object_status');
|
$object_status = GETPOST('object_status', 'intcomma');
|
||||||
$typent_id = GETPOST('typent_id', 'int');
|
$typent_id = GETPOST('typent_id', 'int');
|
||||||
$categ_id = GETPOST('categ_id', 'categ_id');
|
$categ_id = GETPOST('categ_id', 'categ_id');
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ if ($user->socid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nowyear = strftime("%Y", dol_now());
|
$nowyear = strftime("%Y", dol_now());
|
||||||
$year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear;
|
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
|
||||||
//$startyear=$year-2;
|
//$startyear=$year-2;
|
||||||
$startyear = $year - 1;
|
$startyear = $year - 1;
|
||||||
$endyear = $year;
|
$endyear = $year;
|
||||||
|
|||||||
@ -216,6 +216,8 @@ if (empty($reshook))
|
|||||||
$result = $object->deleteline($user, $lineid);
|
$result = $object->deleteline($user, $lineid);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
// reorder lines
|
||||||
|
$object->line_order(true);
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
@ -460,26 +462,15 @@ if (empty($reshook))
|
|||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$object_id = $object->create($user);
|
$object_id = $object->create($user);
|
||||||
|
|
||||||
// If some invoice's lines already known
|
|
||||||
$NBLINES = 8;
|
|
||||||
for ($i = 1; $i <= $NBLINES; $i++) {
|
|
||||||
if ($_POST['idprod'.$i]) {
|
|
||||||
$xid = 'idprod'.$i;
|
|
||||||
$xqty = 'qty'.$i;
|
|
||||||
$xremise = 'remise_percent'.$i;
|
|
||||||
$object->add_product($_POST[$xid], $_POST[$xqty], $_POST[$xremise]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert default contacts if defined
|
// Insert default contacts if defined
|
||||||
if ($object_id > 0)
|
if ($object_id > 0)
|
||||||
{
|
{
|
||||||
if (GETPOST('contactid'))
|
if (GETPOST('contactid', 'int'))
|
||||||
{
|
{
|
||||||
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
|
$result = $object->add_contact(GETPOST('contactid', 'int'), 'CUSTOMER', 'external');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -681,8 +672,11 @@ if (empty($reshook))
|
|||||||
$tva_tx = '';
|
$tva_tx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$qty = GETPOST('qty'.$predef);
|
$qty = price2num(GETPOST('qty'.$predef, 'alpha'));
|
||||||
$remise_percent = (GETPOST('remise_percent'.$predef) != '' ? GETPOST('remise_percent'.$predef) : 0);
|
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0);
|
||||||
|
if (empty($remise_percent)) {
|
||||||
|
$remise_percent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
@ -788,6 +782,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$pu_ht = price($prodcustprice->lines[0]->price);
|
$pu_ht = price($prodcustprice->lines[0]->price);
|
||||||
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
|
||||||
|
$price_min = price($prodcustprice->lines[0]->price_min);
|
||||||
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
$price_base_type = $prodcustprice->lines[0]->price_base_type;
|
||||||
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
$tva_tx = $prodcustprice->lines[0]->tva_tx;
|
||||||
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
|
||||||
@ -964,6 +959,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$ret = $object->fetch($object->id); // Reload to get new records
|
$ret = $object->fetch($object->id); // Reload to get new records
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
// Define output language
|
// Define output language
|
||||||
@ -1772,7 +1768,7 @@ if ($action == 'create' && $usercancreate)
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER)) {
|
if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER) && !empty($soc->id)) {
|
||||||
// copy from thirdparty
|
// copy from thirdparty
|
||||||
$tpExtrafields = new Extrafields($db);
|
$tpExtrafields = new Extrafields($db);
|
||||||
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
||||||
|
|||||||
@ -2002,6 +2002,7 @@ class Commande extends CommonOrder
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error = $line->error;
|
$this->error = $line->error;
|
||||||
|
$this->errors = $line->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -2033,7 +2034,7 @@ class Commande extends CommonOrder
|
|||||||
$sql .= ' l.total_ht, l.total_ttc, l.total_tva, l.total_localtax1, l.total_localtax2, l.date_start, l.date_end,';
|
$sql .= ' l.total_ht, l.total_ttc, l.total_tva, l.total_localtax1, l.total_localtax2, l.date_start, l.date_end,';
|
||||||
$sql .= ' l.fk_unit,';
|
$sql .= ' l.fk_unit,';
|
||||||
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,';
|
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,';
|
||||||
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch,';
|
$sql .= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label, p.tobatch as product_tobatch, p.barcode as product_barcode,';
|
||||||
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units';
|
$sql .= ' p.weight, p.weight_units, p.volume, p.volume_units';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
|
||||||
@ -2091,11 +2092,14 @@ class Commande extends CommonOrder
|
|||||||
$line->fk_parent_line = $objp->fk_parent_line;
|
$line->fk_parent_line = $objp->fk_parent_line;
|
||||||
|
|
||||||
$line->ref = $objp->product_ref;
|
$line->ref = $objp->product_ref;
|
||||||
$line->product_ref = $objp->product_ref;
|
|
||||||
$line->libelle = $objp->product_label;
|
$line->libelle = $objp->product_label;
|
||||||
|
|
||||||
|
$line->product_ref = $objp->product_ref;
|
||||||
$line->product_label = $objp->product_label;
|
$line->product_label = $objp->product_label;
|
||||||
$line->product_desc = $objp->product_desc;
|
$line->product_desc = $objp->product_desc;
|
||||||
$line->product_tobatch = $objp->product_tobatch;
|
$line->product_tobatch = $objp->product_tobatch;
|
||||||
|
$line->product_barcode = $objp->product_barcode;
|
||||||
|
|
||||||
$line->fk_product_type = $objp->fk_product_type; // Produit ou service
|
$line->fk_product_type = $objp->fk_product_type; // Produit ou service
|
||||||
$line->fk_unit = $objp->fk_unit;
|
$line->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
@ -2267,6 +2271,7 @@ class Commande extends CommonOrder
|
|||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
|
||||||
$sql .= ', '.MAIN_DB_PREFIX.'element_element as el';
|
$sql .= ', '.MAIN_DB_PREFIX.'element_element as el';
|
||||||
$sql .= ' WHERE el.fk_source = '.$this->id;
|
$sql .= ' WHERE el.fk_source = '.$this->id;
|
||||||
|
$sql .= " AND el.sourcetype = 'commande'";
|
||||||
$sql .= " AND el.fk_target = e.rowid";
|
$sql .= " AND el.fk_target = e.rowid";
|
||||||
$sql .= " AND el.targettype = 'shipping'";
|
$sql .= " AND el.targettype = 'shipping'";
|
||||||
|
|
||||||
@ -3117,7 +3122,9 @@ class Commande extends CommonOrder
|
|||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
$pa_ht = price2num($pa_ht);
|
$pa_ht = price2num($pa_ht);
|
||||||
$pu_ht_devise = price2num($pu_ht_devise);
|
$pu_ht_devise = price2num($pu_ht_devise);
|
||||||
$txtva = price2num($txtva);
|
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||||
|
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
|
}
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
$txlocaltax2 = price2num($txlocaltax2);
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
|
|
||||||
@ -3132,6 +3139,7 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
// Clean vat code
|
// Clean vat code
|
||||||
$vat_src_code = '';
|
$vat_src_code = '';
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
{
|
{
|
||||||
$vat_src_code = $reg[1];
|
$vat_src_code = $reg[1];
|
||||||
@ -3302,6 +3310,7 @@ class Commande extends CommonOrder
|
|||||||
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
||||||
if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf);
|
if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf);
|
||||||
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
|
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
|
||||||
|
$delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
@ -3326,6 +3335,8 @@ class Commande extends CommonOrder
|
|||||||
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
|
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
|
||||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
|
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
|
||||||
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
|
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
|
||||||
|
$sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').",";
|
||||||
|
$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").",";
|
||||||
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
|
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
|
||||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||||
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
|
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
|
||||||
@ -4043,7 +4054,7 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
return max($this->date_commande, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
|
return max($this->date, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -78,6 +78,7 @@ class CommandeStats extends Stats
|
|||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled
|
$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
|
$this->categ_link=MAIN_DB_PREFIX.'categorie_societe';
|
||||||
}
|
}
|
||||||
elseif ($mode == 'supplier')
|
elseif ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
@ -87,6 +88,7 @@ class CommandeStats extends Stats
|
|||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
$this->where .= " c.fk_statut > 2"; // Only approved & ordered
|
$this->where .= " c.fk_statut > 2"; // Only approved & ordered
|
||||||
|
$this->categ_link=MAIN_DB_PREFIX.'categorie_fournisseur';
|
||||||
}
|
}
|
||||||
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
||||||
$this->where .= ' AND c.entity IN ('.getEntity('commande').')';
|
$this->where .= ' AND c.entity IN ('.getEntity('commande').')';
|
||||||
@ -106,7 +108,7 @@ class CommandeStats extends Stats
|
|||||||
|
|
||||||
if ($categid)
|
if ($categid)
|
||||||
{
|
{
|
||||||
$this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cats ON cats.fk_soc = c.fk_soc';
|
$this->join .= ' LEFT JOIN '.$this->categ_link.' as cats ON cats.fk_soc = c.fk_soc';
|
||||||
$this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie';
|
$this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie';
|
||||||
$this->where .= ' AND cat.rowid = '.$categid;
|
$this->where .= ' AND cat.rowid = '.$categid;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -263,7 +263,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P
|
|||||||
// llxHeader('',$title,$help_url);
|
// llxHeader('',$title,$help_url);
|
||||||
|
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
|
||||||
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
|
$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
|
||||||
$sql .= " typent.code as typent_code,";
|
$sql .= " typent.code as typent_code,";
|
||||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||||
|
|||||||
@ -38,11 +38,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
|||||||
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
||||||
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
||||||
|
|
||||||
$mode = GETPOST("mode") ?GETPOST("mode") : 'customer';
|
$mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer';
|
||||||
if ($mode == 'customer' && !$user->rights->commande->lire) accessforbidden();
|
if ($mode == 'customer' && !$user->rights->commande->lire) accessforbidden();
|
||||||
if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) accessforbidden();
|
if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) accessforbidden();
|
||||||
|
|
||||||
$object_status = GETPOST('object_status');
|
$object_status = GETPOST('object_status', 'intcomma');
|
||||||
$typent_id = GETPOST('typent_id', 'int');
|
$typent_id = GETPOST('typent_id', 'int');
|
||||||
$categ_id = GETPOST('categ_id', 'categ_id');
|
$categ_id = GETPOST('categ_id', 'categ_id');
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ if ($mode == 'customer')
|
|||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$cat_type = Categorie::TYPE_SUPPLIER;
|
$cat_type = Categorie::TYPE_SUPPLIER;
|
||||||
$cat_label = $langs->trans("Supplier").' '.lcfirst($langs->trans("Customer"));
|
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||||
}
|
}
|
||||||
print '<tr><td>'.$cat_label.'</td><td>';
|
print '<tr><td>'.$cat_label.'</td><td>';
|
||||||
print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
||||||
@ -308,11 +308,11 @@ if ($mode == 'customer')
|
|||||||
Commande::STATUS_CLOSED=>$langs->trans("StatusOrderDelivered"),
|
Commande::STATUS_CLOSED=>$langs->trans("StatusOrderDelivered"),
|
||||||
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceled")
|
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceled")
|
||||||
);
|
);
|
||||||
print $form->selectarray('object_status', $liststatus, GETPOST('object_status', 'int'), -4);
|
print $form->selectarray('object_status', $liststatus, GETPOST('object_status', 'intcomma'), -4);
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$formorder->selectSupplierOrderStatus((strstr($object_status, ',') ?-1 : $object_status), 0, 'object_status');
|
$formorder->selectSupplierOrderStatus((strstr($object_status, ',') ? -1 : $object_status), 0, 'object_status');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Year
|
// Year
|
||||||
|
|||||||
@ -246,7 +246,7 @@ if ($action == 'update')
|
|||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
@ -907,7 +907,7 @@ else
|
|||||||
print '<td><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(isset($_POST["account_min_allowed"]) ?GETPOST("account_min_allowed") : $object->min_allowed).'"></td></tr>';
|
print '<td><input size="12" type="text" class="flat" name="account_min_allowed" value="'.(isset($_POST["account_min_allowed"]) ?GETPOST("account_min_allowed") : $object->min_allowed).'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
print '<tr><td>'.$langs->trans("BalanceMinimalDesired").'</td>';
|
||||||
print '<td ><input size="12" type="text" class="flat" name="account_min_desired" value="'.(isset($_POST["account_min_desired"]) ?GETPOST("account_min_desired") : $object->min_desired).'"></td></tr>';
|
print '<td><input size="12" type="text" class="flat" name="account_min_desired" value="'.(isset($_POST["account_min_desired"]) ?GETPOST("account_min_desired") : $object->min_desired).'"></td></tr>';
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
print '<tr><td>'.$langs->trans("Web").'</td>';
|
print '<tr><td>'.$langs->trans("Web").'</td>';
|
||||||
|
|||||||
@ -135,7 +135,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td >".$objp->label."</td>";
|
print "<td>".$objp->label."</td>";
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<a class="editfielda reposition marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?categid='.$objp->rowid.'&action=edit">'.img_edit().'</a>';
|
print '<a class="editfielda reposition marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?categid='.$objp->rowid.'&action=edit">'.img_edit().'</a>';
|
||||||
print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?categid='.$objp->rowid.'&action=delete">'.img_delete().'</a>';
|
print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?categid='.$objp->rowid.'&action=delete">'.img_delete().'</a>';
|
||||||
|
|||||||
@ -581,7 +581,8 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
return $accline->id;
|
return $accline->id;
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $accline->error;
|
||||||
|
$this->errors = $accline->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -2;
|
return -2;
|
||||||
|
|||||||
@ -137,7 +137,7 @@ class PaymentVarious extends CommonObject
|
|||||||
$sql .= " datev='".$this->db->idate($this->datev)."',";
|
$sql .= " datev='".$this->db->idate($this->datev)."',";
|
||||||
$sql .= " sens=".(int) $this->sens.",";
|
$sql .= " sens=".(int) $this->sens.",";
|
||||||
$sql .= " amount=".price2num($this->amount).",";
|
$sql .= " amount=".price2num($this->amount).",";
|
||||||
$sql .= " fk_typepayment=".(int) $this->fk_typepayment.",";
|
$sql .= " fk_typepayment=".(int) $this->type_payment.",";
|
||||||
$sql .= " num_payment='".$this->db->escape($this->num_payment)."',";
|
$sql .= " num_payment='".$this->db->escape($this->num_payment)."',";
|
||||||
$sql .= " label='".$this->db->escape($this->label)."',";
|
$sql .= " label='".$this->db->escape($this->label)."',";
|
||||||
$sql .= " note='".$this->db->escape($this->note)."',";
|
$sql .= " note='".$this->db->escape($this->note)."',";
|
||||||
|
|||||||
@ -392,7 +392,7 @@ if ($action == 'create')
|
|||||||
// Subledger account
|
// Subledger account
|
||||||
if (!empty($conf->accounting->enabled))
|
if (!empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("SubledgerAccount").'aaaa</td>';
|
print '<tr><td>'.$langs->trans("SubledgerAccount").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -53,6 +53,8 @@ $search_accountancy_account = GETPOST("search_accountancy_account");
|
|||||||
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
|
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
|
||||||
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
|
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
|
||||||
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
|
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
|
||||||
|
if (empty($search_date_start)) $search_date_start = GETPOST("search_date_start", 'int');
|
||||||
|
if (empty($search_date_end)) $search_date_end = GETPOST("search_date_end", 'int');
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
@ -159,7 +161,7 @@ if ($result)
|
|||||||
if ($typeid > 0) $param .= '&typeid='.urlencode($typeid);
|
if ($typeid > 0) $param .= '&typeid='.urlencode($typeid);
|
||||||
if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb);
|
if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb);
|
||||||
if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred);
|
if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred);
|
||||||
if ($search_account > 0) $param .= '&search_amount='.urlencode($search_account);
|
if ($search_account > 0) $param .= '&search_account='.urlencode($search_account);
|
||||||
if ($search_accountancy_account > 0) $param .= '&search_accountancy_account='.urlencode($search_accountancy_account);
|
if ($search_accountancy_account > 0) $param .= '&search_accountancy_account='.urlencode($search_accountancy_account);
|
||||||
if ($search_accountancy_subledger > 0) $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger);
|
if ($search_accountancy_subledger > 0) $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger);
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ $sql .= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id =
|
|||||||
$sql .= " AND f.module_source = '".$db->escape($posmodule)."'";
|
$sql .= " AND f.module_source = '".$db->escape($posmodule)."'";
|
||||||
$sql .= " AND f.pos_source = '".$db->escape($terminalid)."'";
|
$sql .= " AND f.pos_source = '".$db->escape($terminalid)."'";
|
||||||
$sql .= " AND f.paye = 1";
|
$sql .= " AND f.paye = 1";
|
||||||
$sql .= " AND p.entity IN (".getEntity('facture').")";
|
$sql .= " AND p.entity = ".$conf->entity; // Never share entities for features related to accountancy
|
||||||
/*if ($key == 'cash') $sql.=" AND cp.code = 'LIQ'";
|
/*if ($key == 'cash') $sql.=" AND cp.code = 'LIQ'";
|
||||||
elseif ($key == 'cheque') $sql.=" AND cp.code = 'CHQ'";
|
elseif ($key == 'cheque') $sql.=" AND cp.code = 'CHQ'";
|
||||||
elseif ($key == 'card') $sql.=" AND cp.code = 'CB'";
|
elseif ($key == 'card') $sql.=" AND cp.code = 'CB'";
|
||||||
|
|||||||
@ -243,6 +243,8 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$result = $object->deleteline(GETPOST('lineid'));
|
$result = $object->deleteline(GETPOST('lineid'));
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
|
// reorder lines
|
||||||
|
$object->line_order(true);
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
@ -318,8 +320,8 @@ if (empty($reshook))
|
|||||||
//var_dump($array_of_total_ht_per_vat_rate);exit;
|
//var_dump($array_of_total_ht_per_vat_rate);exit;
|
||||||
foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue)
|
foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue)
|
||||||
{
|
{
|
||||||
$tmp_total_ht = $array_of_total_ht_per_vat_rate[$vatrate];
|
$tmp_total_ht = price2num($array_of_total_ht_per_vat_rate[$vatrate]);
|
||||||
$tmp_total_ht_devise = $array_of_total_ht_devise_per_vat_rate[$vatrate];
|
$tmp_total_ht_devise = price2num($array_of_total_ht_devise_per_vat_rate[$vatrate]);
|
||||||
|
|
||||||
if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES))
|
if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES))
|
||||||
{
|
{
|
||||||
@ -345,15 +347,6 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif ($action == 'set_thirdparty' && $usercancreate)
|
|
||||||
{
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY');
|
|
||||||
|
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
elseif ($action == 'classin' && $usercancreate)
|
elseif ($action == 'classin' && $usercancreate)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@ -717,6 +710,7 @@ if (empty($reshook))
|
|||||||
$outputlangs->load('products');
|
$outputlangs->load('products');
|
||||||
}
|
}
|
||||||
$model = $object->modelpdf;
|
$model = $object->modelpdf;
|
||||||
|
|
||||||
$ret = $object->fetch($id); // Reload to get new records
|
$ret = $object->fetch($id); // Reload to get new records
|
||||||
|
|
||||||
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
@ -1676,6 +1670,11 @@ if (empty($reshook))
|
|||||||
$discount->tva_tx = $lines[$i]->tva_tx;
|
$discount->tva_tx = $lines[$i]->tva_tx;
|
||||||
$discount->fk_user = $user->id;
|
$discount->fk_user = $user->id;
|
||||||
$discount->description = $desc;
|
$discount->description = $desc;
|
||||||
|
$discount->multicurrency_subprice = abs($lines[$i]->multicurrency_subprice);
|
||||||
|
$discount->multicurrency_amount_ht = abs($lines[$i]->multicurrency_total_ht);
|
||||||
|
$discount->multicurrency_amount_tva = abs($lines[$i]->multicurrency_total_tva);
|
||||||
|
$discount->multicurrency_amount_ttc = abs($lines[$i]->multicurrency_total_ttc);
|
||||||
|
|
||||||
$discountid = $discount->create($user);
|
$discountid = $discount->create($user);
|
||||||
if ($discountid > 0) {
|
if ($discountid > 0) {
|
||||||
$result = $object->insert_discount($discountid); // This include link_to_invoice
|
$result = $object->insert_discount($discountid); // This include link_to_invoice
|
||||||
@ -2542,7 +2541,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$object->fetch($id, '', '', '', true);
|
$object->fetch($id, '', '', '', true);
|
||||||
|
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $object->type == Facture::TYPE_SITUATION
|
&& $object->type == Facture::TYPE_SITUATION
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
@ -2830,6 +2829,7 @@ if (empty($reshook))
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
@ -3571,7 +3571,7 @@ if ($action == 'create')
|
|||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_INVOICE)) {
|
if (!empty($conf->global->THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_INVOICE) && !empty($soc->id)) {
|
||||||
// copy from thirdparty
|
// copy from thirdparty
|
||||||
$tpExtrafields = new Extrafields($db);
|
$tpExtrafields = new Extrafields($db);
|
||||||
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
$tpExtrafieldLabels = $tpExtrafields->fetch_name_optionals_label($soc->table_element);
|
||||||
@ -3757,6 +3757,15 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
elseif ($id > 0 || !empty($ref))
|
elseif ($id > 0 || !empty($ref))
|
||||||
{
|
{
|
||||||
|
if (empty($object->id)) {
|
||||||
|
llxHeader();
|
||||||
|
$langs->load('errors');
|
||||||
|
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound");
|
||||||
|
echo ' <a href="javascript:history.go(-1)">'.$langs->trans('GoBack').'</div>';
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show object in view mode
|
* Show object in view mode
|
||||||
*/
|
*/
|
||||||
@ -3880,7 +3889,7 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
$label = $langs->trans("ConfirmOuting");
|
$label = $langs->trans("ConfirmOuting");
|
||||||
$formquestion = array();
|
$formquestion = array();
|
||||||
// remove situation from cycle
|
// remove situation from cycle
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
&& $object->is_last_in_cycle()
|
&& $object->is_last_in_cycle()
|
||||||
@ -4856,7 +4865,15 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $paymentstatic->getNomUrl(1);
|
print $paymentstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'dayhour').'</td>';
|
print '<td>';
|
||||||
|
$dateofpayment = $db->jdate($objp->dp);
|
||||||
|
$tmparray = dol_getdate($dateofpayment);
|
||||||
|
if ($tmparray['seconds'] == 0 && $tmparray['minutes'] == 0 && ($tmparray['hours'] == 0 || $tmparray['hours'] == 12)) { // We set hours to 0:00 or 12:00 because we don't know it
|
||||||
|
print dol_print_date($dateofpayment, 'day');
|
||||||
|
} else { // Hours was set to real date of payment (special case for POS for example)
|
||||||
|
print dol_print_date($dateofpayment, 'dayhour', 'tzuser');
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
$label = ($langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code)) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_label;
|
$label = ($langs->trans("PaymentType".$objp->payment_code) != ("PaymentType".$objp->payment_code)) ? $langs->trans("PaymentType".$objp->payment_code) : $objp->payment_label;
|
||||||
print '<td>'.$label.' '.$objp->num_payment.'</td>';
|
print '<td>'.$label.' '.$objp->num_payment.'</td>';
|
||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
@ -5206,7 +5223,8 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
// Reopen a standard paid invoice
|
// Reopen a standard paid invoice
|
||||||
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|
||||||
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|
||||||
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))
|
||||||
|
|| ($object->type == Facture::TYPE_SITUATION && empty($discount->id)))
|
||||||
&& ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
|
&& ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
|
||||||
&& ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) // A paid invoice (partially or completely)
|
&& ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) // A paid invoice (partially or completely)
|
||||||
{
|
{
|
||||||
@ -5353,7 +5371,7 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a credit note
|
// Create a credit note
|
||||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) ) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||||
{
|
{
|
||||||
if (!$objectidnext)
|
if (!$objectidnext)
|
||||||
{
|
{
|
||||||
@ -5395,7 +5413,7 @@ elseif ($id > 0 || !empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove situation from cycle
|
// Remove situation from cycle
|
||||||
if ($object->statut > Facture::STATUS_DRAFT
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $object->type == Facture::TYPE_SITUATION
|
&& $object->type == Facture::TYPE_SITUATION
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
/* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -849,7 +849,9 @@ class FactureRec extends CommonInvoice
|
|||||||
$qty = price2num($qty);
|
$qty = price2num($qty);
|
||||||
$pu_ht = price2num($pu_ht);
|
$pu_ht = price2num($pu_ht);
|
||||||
$pu_ttc = price2num($pu_ttc);
|
$pu_ttc = price2num($pu_ttc);
|
||||||
$txtva = price2num($txtva);
|
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||||
|
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
|
}
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
$txlocaltax2 = price2num($txlocaltax2);
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
if (empty($txtva)) $txtva = 0;
|
if (empty($txtva)) $txtva = 0;
|
||||||
@ -1031,8 +1033,10 @@ class FactureRec extends CommonInvoice
|
|||||||
$pu_ht = price2num($pu_ht);
|
$pu_ht = price2num($pu_ht);
|
||||||
$pu_ttc = price2num($pu_ttc);
|
$pu_ttc = price2num($pu_ttc);
|
||||||
$pu_ht_devise = price2num($pu_ht_devise);
|
$pu_ht_devise = price2num($pu_ht_devise);
|
||||||
$txtva = price2num($txtva);
|
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
|
}
|
||||||
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
$txlocaltax2 = price2num($txlocaltax2);
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
if (empty($txlocaltax1)) $txlocaltax1 = 0;
|
if (empty($txlocaltax1)) $txlocaltax1 = 0;
|
||||||
if (empty($txlocaltax2)) $txlocaltax2 = 0;
|
if (empty($txlocaltax2)) $txlocaltax2 = 0;
|
||||||
@ -1059,6 +1063,7 @@ class FactureRec extends CommonInvoice
|
|||||||
|
|
||||||
// Clean vat code
|
// Clean vat code
|
||||||
$vat_src_code = '';
|
$vat_src_code = '';
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
{
|
{
|
||||||
$vat_src_code = $reg[1];
|
$vat_src_code = $reg[1];
|
||||||
|
|||||||
@ -783,6 +783,7 @@ class Facture extends CommonInvoice
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error = $newinvoiceline->error;
|
$this->error = $newinvoiceline->error;
|
||||||
|
$this->errors = $newinvoiceline->errors;
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2523,7 +2524,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ($this->type == self::TYPE_REPLACEMENT) // si facture de remplacement
|
if ($this->type == self::TYPE_REPLACEMENT) // if this is a replacement invoice
|
||||||
{
|
{
|
||||||
// Controle que facture source connue
|
// Controle que facture source connue
|
||||||
if ($this->fk_facture_source <= 0)
|
if ($this->fk_facture_source <= 0)
|
||||||
@ -2533,7 +2534,7 @@ class Facture extends CommonInvoice
|
|||||||
return -10;
|
return -10;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Charge la facture source a remplacer
|
// Load source invoice that has been replaced
|
||||||
$facreplaced = new Facture($this->db);
|
$facreplaced = new Facture($this->db);
|
||||||
$result = $facreplaced->fetch($this->fk_facture_source);
|
$result = $facreplaced->fetch($this->fk_facture_source);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
@ -2543,7 +2544,7 @@ class Facture extends CommonInvoice
|
|||||||
return -11;
|
return -11;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Controle que facture source non deja remplacee par une autre
|
// Check that source invoice not already replaced by another one.
|
||||||
$idreplacement = $facreplaced->getIdReplacingInvoice('validated');
|
$idreplacement = $facreplaced->getIdReplacingInvoice('validated');
|
||||||
if ($idreplacement && $idreplacement != $this->id)
|
if ($idreplacement && $idreplacement != $this->id)
|
||||||
{
|
{
|
||||||
@ -3227,6 +3228,7 @@ class Facture extends CommonInvoice
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error = $this->line->error;
|
$this->error = $this->line->error;
|
||||||
|
$this->errors = $this->line->errors;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -3311,7 +3313,9 @@ class Facture extends CommonInvoice
|
|||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
$pu_ht_devise = price2num($pu_ht_devise);
|
$pu_ht_devise = price2num($pu_ht_devise);
|
||||||
$pa_ht = price2num($pa_ht);
|
$pa_ht = price2num($pa_ht);
|
||||||
$txtva = price2num($txtva);
|
if (!preg_match('/\((.*)\)/', $txtva)) {
|
||||||
|
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||||
|
}
|
||||||
$txlocaltax1 = price2num($txlocaltax1);
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
$txlocaltax2 = price2num($txlocaltax2);
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
|
|
||||||
@ -3326,6 +3330,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Clean vat code
|
// Clean vat code
|
||||||
$vat_src_code = '';
|
$vat_src_code = '';
|
||||||
|
$reg = array();
|
||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
{
|
{
|
||||||
$vat_src_code = $reg[1];
|
$vat_src_code = $reg[1];
|
||||||
@ -4397,15 +4402,14 @@ class Facture extends CommonInvoice
|
|||||||
* @param int $hidedetails Hide details of lines
|
* @param int $hidedetails Hide details of lines
|
||||||
* @param int $hidedesc Hide description
|
* @param int $hidedesc Hide description
|
||||||
* @param int $hideref Hide ref
|
* @param int $hideref Hide ref
|
||||||
* @param null|array $moreparams Array to provide more information
|
* @param null|array $moreparams Array to provide more information
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("bills");
|
$outputlangs->loadLangs(array("bills", "products"));
|
||||||
$outputlangs->load("products");
|
|
||||||
|
|
||||||
if (!dol_strlen($modele))
|
if (!dol_strlen($modele))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,6 +86,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (empty($object->id)) {
|
||||||
|
llxHeader();
|
||||||
|
$langs->load('errors');
|
||||||
|
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
|
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
|
||||||
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
|
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $helpurl);
|
||||||
|
|||||||
@ -43,6 +43,14 @@ $ref = GETPOST("ref", 'alpha');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (empty($object->id)) {
|
||||||
|
llxHeader();
|
||||||
|
$langs->load('errors');
|
||||||
|
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');
|
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');
|
||||||
|
|||||||
@ -274,7 +274,7 @@ if ($search_status != '' && $search_status >= -1)
|
|||||||
if ($search_status == -1) $sql .= ' AND suspended = 1';
|
if ($search_status == -1) $sql .= ' AND suspended = 1';
|
||||||
}
|
}
|
||||||
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
|
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
|
||||||
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day_date_when, $search_month_date_when, $search_year_date_when);
|
$sql .= dolSqlDateFilter('f.date_when', $search_day_date_when, $search_month_date_when, $search_year_date_when);
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -105,12 +105,30 @@ $search_country = GETPOST("search_country", 'int');
|
|||||||
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
||||||
$search_user = GETPOST('search_user', 'int');
|
$search_user = GETPOST('search_user', 'int');
|
||||||
$search_sale = GETPOST('search_sale', 'int');
|
$search_sale = GETPOST('search_sale', 'int');
|
||||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||||
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||||
$search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startmonth', 'int'), GETPOST('search_date_valid_startday', 'int'), GETPOST('search_date_valid_startyear', 'int'));
|
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||||
$search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int'));
|
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||||
$search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int'));
|
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||||
$search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int'));
|
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||||
|
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||||
|
$search_date_valid_startday = GETPOST('search_date_valid_startday', 'int');
|
||||||
|
$search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int');
|
||||||
|
$search_date_valid_startyear = GETPOST('search_date_valid_startyear', 'int');
|
||||||
|
$search_date_valid_endday = GETPOST('search_date_valid_endday', 'int');
|
||||||
|
$search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int');
|
||||||
|
$search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int');
|
||||||
|
$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear);
|
||||||
|
$search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
|
||||||
|
$search_datelimit_startday = GETPOST('search_datelimit_startday', 'int');
|
||||||
|
$search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int');
|
||||||
|
$search_datelimit_startyear = GETPOST('search_datelimit_startyear', 'int');
|
||||||
|
$search_datelimit_endday = GETPOST('search_datelimit_endday', 'int');
|
||||||
|
$search_datelimit_endmonth = GETPOST('search_datelimit_endmonth', 'int');
|
||||||
|
$search_datelimit_endyear = GETPOST('search_datelimit_endyear', 'int');
|
||||||
|
$search_datelimit_start = dol_mktime(0, 0, 0, $search_datelimit_startmonth, $search_datelimit_startday, $search_datelimit_startyear);
|
||||||
|
$search_datelimit_end = dol_mktime(23, 59, 59, $search_datelimit_endmonth, $search_datelimit_endday, $search_datelimit_endyear);
|
||||||
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||||
$search_btn = GETPOST('button_search', 'alpha');
|
$search_btn = GETPOST('button_search', 'alpha');
|
||||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||||
@ -273,10 +291,28 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
|||||||
$search_type = '';
|
$search_type = '';
|
||||||
$search_country = '';
|
$search_country = '';
|
||||||
$search_type_thirdparty = '';
|
$search_type_thirdparty = '';
|
||||||
|
$search_date_startday = '';
|
||||||
|
$search_date_startmonth = '';
|
||||||
|
$search_date_startyear = '';
|
||||||
|
$search_date_endday = '';
|
||||||
|
$search_date_endmonth = '';
|
||||||
|
$search_date_endyear = '';
|
||||||
$search_date_start = '';
|
$search_date_start = '';
|
||||||
$search_date_end = '';
|
$search_date_end = '';
|
||||||
|
$search_date_valid_startday = '';
|
||||||
|
$search_date_valid_startmonth = '';
|
||||||
|
$search_date_valid_startyear = '';
|
||||||
|
$search_date_valid_endday = '';
|
||||||
|
$search_date_valid_endmonth = '';
|
||||||
|
$search_date_valid_endyear = '';
|
||||||
$search_date_valid_start = '';
|
$search_date_valid_start = '';
|
||||||
$search_date_valid_end = '';
|
$search_date_valid_end = '';
|
||||||
|
$search_datelimit_startday = '';
|
||||||
|
$search_datelimit_startmonth = '';
|
||||||
|
$search_datelimit_startyear = '';
|
||||||
|
$search_datelimit_endday = '';
|
||||||
|
$search_datelimit_endmonth = '';
|
||||||
|
$search_datelimit_endyear = '';
|
||||||
$search_datelimit_start = '';
|
$search_datelimit_start = '';
|
||||||
$search_datelimit_end = '';
|
$search_datelimit_end = '';
|
||||||
$option = '';
|
$option = '';
|
||||||
@ -416,7 +452,7 @@ $formcompany = new FormCompany($db);
|
|||||||
$thirdpartystatic = new Societe($db);
|
$thirdpartystatic = new Societe($db);
|
||||||
|
|
||||||
$sql = 'SELECT';
|
$sql = 'SELECT';
|
||||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT';
|
||||||
$sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
$sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,';
|
||||||
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
||||||
$sql .= ' f.fk_user_author,';
|
$sql .= ' f.fk_user_author,';
|
||||||
@ -494,7 +530,6 @@ if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
|
|||||||
if ($search_state) $sql .= natural_search("state.nom", $search_state);
|
if ($search_state) $sql .= natural_search("state.nom", $search_state);
|
||||||
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')';
|
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')';
|
||||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')';
|
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')';
|
||||||
if ($search_company) $sql .= natural_search('s.nom', $search_company);
|
|
||||||
if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1);
|
if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1);
|
||||||
if ($search_montant_vat != '') $sql .= natural_search('f.tva', $search_montant_vat, 1);
|
if ($search_montant_vat != '') $sql .= natural_search('f.tva', $search_montant_vat, 1);
|
||||||
if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
||||||
@ -623,12 +658,24 @@ if ($resql)
|
|||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||||
if ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start);
|
if ($search_date_startday) $param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||||
if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end);
|
if ($search_date_startmonth) $param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||||
if ($search_date_valid_start) $param .= '&search_date_valid_start='.urlencode($search_date_valid_start);
|
if ($search_date_startyear) $param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||||
if ($search_date_valid_end) $param .= '&search_date_valid_end='.urlencode($search_date_valid_end);
|
if ($search_date_endday) $param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||||
if ($search_datelimit_start) $param .= '&search_datelimit_start='.urlencode($search_datelimit_start);
|
if ($search_date_endmonth) $param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||||
if ($search_datelimit_end) $param .= '&search_datelimit_end='.urlencode($search_datelimit_end);
|
if ($search_date_endyear) $param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||||
|
if ($search_date_valid_startday) $param .= '&search_date_valid_startday='.urlencode($search_date_valid_startday);
|
||||||
|
if ($search_date_valid_startmonth) $param .= '&search_date_valid_startmonth='.urlencode($search_date_valid_startmonth);
|
||||||
|
if ($search_date_valid_startyear) $param .= '&search_date_valid_startyear='.urlencode($search_date_valid_startyear);
|
||||||
|
if ($search_date_valid_endday) $param .= '&search_date_valid_endday='.urlencode($search_date_valid_endday);
|
||||||
|
if ($search_date_valid_endmonth) $param .= '&search_date_valid_endmonth='.urlencode($search_date_valid_endmonth);
|
||||||
|
if ($search_date_valid_endyear) $param .= '&search_date_valid_endyear='.urlencode($search_date_valid_endyear);
|
||||||
|
if ($search_datelimit_startday) $param .= '&search_datelimit_startday='.urlencode($search_datelimit_startday);
|
||||||
|
if ($search_datelimit_startmonth) $param .= '&search_datelimit_startmonth='.urlencode($search_datelimit_startmonth);
|
||||||
|
if ($search_datelimit_startyear) $param .= '&search_datelimit_startyear='.urlencode($search_datelimit_startyear);
|
||||||
|
if ($search_datelimit_endday) $param .= '&search_datelimit_endday='.urlencode($search_datelimit_endday);
|
||||||
|
if ($search_datelimit_endmonth) $param .= '&search_datelimit_endmonth='.urlencode($search_datelimit_endmonth);
|
||||||
|
if ($search_datelimit_endyear) $param .= '&search_datelimit_endyear='.urlencode($search_datelimit_endyear);
|
||||||
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
|
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
|
||||||
if ($search_refcustomer) $param .= '&search_refcustomer='.urlencode($search_refcustomer);
|
if ($search_refcustomer) $param .= '&search_refcustomer='.urlencode($search_refcustomer);
|
||||||
if ($search_project_ref) $param .= '&search_project_ref='.urlencode($search_project_ref);
|
if ($search_project_ref) $param .= '&search_project_ref='.urlencode($search_project_ref);
|
||||||
|
|||||||
@ -64,6 +64,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (empty($object->id)) {
|
||||||
|
llxHeader();
|
||||||
|
$langs->load('errors');
|
||||||
|
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
|
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
|
||||||
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
|
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $helpurl);
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $mode = GETPOST("mode") ?GETPOST("mode") : 'customer';
|
|||||||
if ($mode == 'customer' && !$user->rights->facture->lire) accessforbidden();
|
if ($mode == 'customer' && !$user->rights->facture->lire) accessforbidden();
|
||||||
if ($mode == 'supplier' && !$user->rights->fournisseur->facture->lire) accessforbidden();
|
if ($mode == 'supplier' && !$user->rights->fournisseur->facture->lire) accessforbidden();
|
||||||
|
|
||||||
$object_status = GETPOST('object_status');
|
$object_status = GETPOST('object_status', 'intcomma');
|
||||||
$typent_id = GETPOST('typent_id', 'int');
|
$typent_id = GETPOST('typent_id', 'int');
|
||||||
$categ_id = GETPOST('categ_id', 'categ_id');
|
$categ_id = GETPOST('categ_id', 'categ_id');
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ if ($user->socid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$nowyear = strftime("%Y", dol_now());
|
$nowyear = strftime("%Y", dol_now());
|
||||||
$year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear;
|
$year = GETPOST('year') > 0 ? GETPOST('year', 'int') : $nowyear;
|
||||||
if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2;
|
if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2;
|
||||||
else $startyear=$year-1;
|
else $startyear=$year-1;
|
||||||
$endyear = $year;
|
$endyear = $year;
|
||||||
@ -92,17 +92,23 @@ print load_fiche_titre($title, '', $picto);
|
|||||||
dol_mkdir($dir);
|
dol_mkdir($dir);
|
||||||
|
|
||||||
$stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0));
|
$stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0));
|
||||||
if ($mode == 'customer')
|
if ($mode == 'customer') {
|
||||||
{
|
if ($object_status != '' && $object_status >= 0) {
|
||||||
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
$stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
||||||
|
}
|
||||||
if (is_array($custcats) && !empty($custcats)) {
|
if (is_array($custcats) && !empty($custcats)) {
|
||||||
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)';
|
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)';
|
||||||
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
|
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier') {
|
||||||
{
|
if ($object_status != '' && $object_status >= 0) {
|
||||||
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
$stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
|
||||||
|
}
|
||||||
|
if (is_array($custcats) && !empty($custcats)) {
|
||||||
|
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)';
|
||||||
|
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build graphic number of object
|
// Build graphic number of object
|
||||||
@ -283,7 +289,7 @@ if (! empty($conf->category->enabled)) {
|
|||||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||||
}
|
}
|
||||||
print '<tr><td>'.$cat_label.'</td><td>';
|
print '<tr><td>'.$cat_label.'</td><td>';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories($cat_type, null, 'parent', null, null, 1);
|
||||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
||||||
//print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
//print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -85,7 +85,14 @@ foreach ($linkedObjectBlock as $key => $objectlink)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
|
print '<td class="linkedcol-statut right">';
|
||||||
|
if (method_exists($objectlink, 'getSommePaiement')) {
|
||||||
|
print $objectlink->getLibStatut(3, $objectlink->getSommePaiement());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print $objectlink->getLibStatut(3);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print '<td class="linkedcol-action right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
print '<td class="linkedcol-action right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,28 +109,70 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture->
|
|||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
if ($object->valide($user) > 0)
|
if ($object->valide($user) > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
|
||||||
|
|
||||||
// Loop on each invoice linked to this payment to rebuild PDF
|
// Loop on each invoice linked to this payment to rebuild PDF
|
||||||
$factures = array();
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
foreach ($factures as $id)
|
$outputlangs = $langs;
|
||||||
{
|
if (!empty($_REQUEST['lang_id']))
|
||||||
$fac = new Facture($db);
|
{
|
||||||
$fac->fetch($id);
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||||
|
}
|
||||||
|
|
||||||
$outputlangs = $langs;
|
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
|
||||||
if (!empty($_REQUEST['lang_id']))
|
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
|
||||||
{
|
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
$sql = 'SELECT f.rowid as facid';
|
||||||
}
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
$sql .= ' WHERE pf.fk_facture = f.rowid';
|
||||||
$fac->generateDocument($fac->modelpdf, $outputlangs);
|
$sql .= ' AND f.fk_soc = s.rowid';
|
||||||
}
|
$sql .= ' AND f.entity IN ('.getEntity('invoice').')';
|
||||||
|
$sql .= ' AND pf.fk_paiement = '.$object->id;
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$i = 0;
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
if ($num > 0)
|
||||||
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$invoice = new Facture($db);
|
||||||
|
|
||||||
|
if ($invoice->fetch($objp->facid) <= 0) {
|
||||||
|
$errors++;
|
||||||
|
setEventMessage($invoice->error, $invoice->errors, 'errors');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) {
|
||||||
|
$errors++;
|
||||||
|
setEventMessage($invoice->error, $invoice->errors, 'errors');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$errors++;
|
||||||
|
setEventMessage($db->error, $db->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
|
if (! $errors) {
|
||||||
exit;
|
$db->commit();
|
||||||
|
|
||||||
|
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -277,10 +319,8 @@ print '</td></tr>';
|
|||||||
// Bank account
|
// Bank account
|
||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
if ($object->fk_account > 0)
|
if ($object->fk_account > 0) {
|
||||||
{
|
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) {
|
||||||
if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0)
|
|
||||||
{
|
|
||||||
dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php');
|
dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php');
|
||||||
$bordereau = new RemiseCheque($db);
|
$bordereau = new RemiseCheque($db);
|
||||||
$bordereau->fetch($bankline->fk_bordereau);
|
$bordereau->fetch($bankline->fk_bordereau);
|
||||||
@ -297,7 +337,12 @@ if (!empty($conf->banque->enabled))
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
|
if ($object->fk_account > 0) {
|
||||||
|
print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
|
||||||
|
} else {
|
||||||
|
$langs->load("admin");
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("NoRecordFoundIBankcAccount", $langs->transnoentitiesnoconv("Module85Name")).'</span>';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -398,11 +443,13 @@ if ($resql)
|
|||||||
print '<td class="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
|
print '<td class="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
|
|
||||||
{
|
// If at least one invoice is paid, disable delete. INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED Can be use for maintenance purpose. Never use this in production
|
||||||
|
if ($objp->paye == 1 && empty($conf->global->INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED)) {
|
||||||
$disable_delete = 1;
|
$disable_delete = 1;
|
||||||
$title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
|
$title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$total = $total + $objp->amount;
|
$total = $total + $objp->amount;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -426,8 +426,13 @@ class Paiement extends CommonObject
|
|||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
|
||||||
|
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
|
||||||
|
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
|
||||||
|
|
||||||
$ret = $invoice->fetch($facid); // Reload to get new records
|
$ret = $invoice->fetch($facid); // Reload to get new records
|
||||||
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs);
|
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($invoice->error, $invoice->errors, 'errors');
|
setEventMessages($invoice->error, $invoice->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -1201,7 +1206,16 @@ class Paiement extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
$label = '<u>'.$langs->trans("ShowPayment").'</u><br>';
|
$label = '<u>'.$langs->trans("ShowPayment").'</u><br>';
|
||||||
$label .= '<strong>'.$langs->trans("Ref").':</strong> '.$this->ref;
|
$label .= '<strong>'.$langs->trans("Ref").':</strong> '.$this->ref;
|
||||||
if ($this->datepaye ? $this->datepaye : $this->date) $label .= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour');
|
$dateofpayment = ($this->datepaye ? $this->datepaye : $this->date);
|
||||||
|
if ($dateofpayment) {
|
||||||
|
$label .= '<br><strong>'.$langs->trans("Date").':</strong> ';
|
||||||
|
$tmparray = dol_getdate($dateofpayment);
|
||||||
|
if ($tmparray['seconds'] == 0 && $tmparray['minutes'] == 0 && ($tmparray['hours'] == 0 || $tmparray['hours'] == 12)) { // We set hours to 0:00 or 12:00 because we don't know it
|
||||||
|
$label .= dol_print_date($dateofpayment, 'day');
|
||||||
|
} else { // Hours was set to real date of payment (special case for POS for example)
|
||||||
|
$label .= dol_print_date($dateofpayment, 'dayhour', 'tzuser');
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($mode == 'withlistofinvoices')
|
if ($mode == 'withlistofinvoices')
|
||||||
{
|
{
|
||||||
$arraybill = $this->getBillsArray();
|
$arraybill = $this->getBillsArray();
|
||||||
|
|||||||
@ -224,7 +224,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||||
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0;
|
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : '';
|
||||||
print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
|
print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -248,7 +248,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
||||||
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">'.GETPOST('note', 'alphanohtml').'</textarea></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -296,6 +296,7 @@ if ($action == 'create')
|
|||||||
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||||
|
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
|
||||||
if ($sumpaid < $objp->amount)
|
if ($sumpaid < $objp->amount)
|
||||||
{
|
{
|
||||||
$namef = "amount_".$objp->id;
|
$namef = "amount_".$objp->id;
|
||||||
@ -304,7 +305,7 @@ if ($action == 'create')
|
|||||||
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'");
|
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'");
|
||||||
$remaintopay = $objp->amount - $sumpaid;
|
$remaintopay = $objp->amount - $sumpaid;
|
||||||
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||||
print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'">';
|
print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'" value="'.GETPOST('amount_'.$objp->id, 'alpha').'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -95,16 +95,21 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seems to no be used and replaced with $action == 'infocredit'
|
// Seems to no be used and replaced with $action == 'infocredit'
|
||||||
if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
|
if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
|
||||||
{
|
{
|
||||||
$res = $object->set_credite();
|
if ($object->statut == 2) {
|
||||||
if ($res >= 0)
|
$res = -1;
|
||||||
{
|
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
|
||||||
header("Location: card.php?id=".$id);
|
} else {
|
||||||
exit;
|
$res=$object->set_credite();
|
||||||
}
|
}
|
||||||
}
|
if ($res >= 0)
|
||||||
|
{
|
||||||
|
header("Location: card.php?id=".$id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
|
if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
|
||||||
{
|
{
|
||||||
@ -145,12 +150,18 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
$dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||||
|
|
||||||
$error = $object->set_infocredit($user, $dt);
|
if ($object->statut == 2) {
|
||||||
if ($error)
|
$error = 1;
|
||||||
{
|
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
|
||||||
|
} else {
|
||||||
|
$error = $object->set_infocredit($user, $dt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($error)
|
||||||
|
{
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $langs->loadLangs(array('compta', 'bills', 'banks'));
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
$fk_project = (GETPOST('fk_project') ? GETPOST('fk_project', 'int') : 0);
|
||||||
|
|
||||||
$dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear'));
|
$dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear'));
|
||||||
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
|
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
|
||||||
@ -91,7 +91,7 @@ if ($action == 'reopen' && $user->rights->tax->charges->creer) {
|
|||||||
if ($action == 'classin' && $user->rights->tax->charges->creer)
|
if ($action == 'classin' && $user->rights->tax->charges->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->setProject(GETPOST('projectid'));
|
$object->setProject(GETPOST('fk_project'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setlib' && $user->rights->tax->charges->creer)
|
if ($action == 'setlib' && $user->rights->tax->charges->creer)
|
||||||
@ -343,7 +343,7 @@ if ($action == 'create')
|
|||||||
print $langs->trans("Date");
|
print $langs->trans("Date");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1);
|
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -375,21 +375,21 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||||
|
|
||||||
$numproject = $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
|
$numproject = $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, 1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment Mode
|
// Payment Mode
|
||||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
|
||||||
$form->select_types_paiements($mode_reglement_id, 'mode_reglement_id');
|
$form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Bank Account
|
// Bank Account
|
||||||
if (!empty($conf->banque->enabled))
|
if (!empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
$form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ if ($id > 0)
|
|||||||
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
|
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
|
||||||
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
|
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
$morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
$morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'fk_project', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
|
||||||
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
$morehtmlref .= '</form>';
|
$morehtmlref .= '</form>';
|
||||||
} else {
|
} else {
|
||||||
@ -546,11 +546,11 @@ if ($id > 0)
|
|||||||
if ($action == 'edit')
|
if ($action == 'edit')
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("AmountTTC")."</td><td>";
|
print '<tr><td>'.$langs->trans("AmountTTC")."</td><td>";
|
||||||
print '<input type="text" name="amount" size="12" class="flat" value="'.$object->amount.'">';
|
print '<input type="text" name="amount" size="12" class="flat" value="'.price($object->amount).'">';
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode of payment
|
// Mode of payment
|
||||||
|
|||||||
@ -375,7 +375,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
"amount",
|
"amount",
|
||||||
"",
|
"",
|
||||||
$classslink,
|
$paramslink,
|
||||||
'class="right"',
|
'class="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
|
|||||||
@ -236,6 +236,9 @@ if ($socid) $sql .= " AND f.fk_soc = ".$socid;
|
|||||||
$sql .= " GROUP BY u.rowid, u.lastname, u.firstname";
|
$sql .= " GROUP BY u.rowid, u.lastname, u.firstname";
|
||||||
$sql .= " ORDER BY u.rowid";
|
$sql .= " ORDER BY u.rowid";
|
||||||
|
|
||||||
|
$amount = array();
|
||||||
|
|
||||||
|
dol_syslog("cabyuser", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user