Compare commits
3703 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44e5566ee5 | ||
|
|
38be224665 | ||
|
|
29568287ef | ||
|
|
5fae19b4d6 | ||
|
|
c7d0e917fb | ||
|
|
9cafb08759 | ||
|
|
03fd69c3b9 | ||
|
|
a832bbb348 | ||
|
|
5308acdcde | ||
|
|
b2effa7cc8 | ||
|
|
b7f26ea788 | ||
|
|
d2135fd139 | ||
|
|
acd2d0121d | ||
|
|
9fa6bfd1a5 | ||
|
|
359e82fd3e | ||
|
|
dbde97f25f | ||
|
|
f04af6c1b3 | ||
|
|
c194538609 | ||
|
|
883c9dbf99 | ||
|
|
d0ab117488 | ||
|
|
3071796bc3 | ||
|
|
fa1bb9d672 | ||
|
|
a9e4fcfdca | ||
|
|
780e8ce470 | ||
|
|
2e9952439e | ||
|
|
5fef6478a5 | ||
|
|
61798d1af0 | ||
|
|
4cbcf5189a | ||
|
|
38c770ffb3 | ||
|
|
07cd1fb3c2 | ||
|
|
2493c2468d | ||
|
|
306dcf3600 | ||
|
|
c2f84309db | ||
|
|
314c30f489 | ||
|
|
1e4844fd1c | ||
|
|
e1344eb97c | ||
|
|
219e58d0e4 | ||
|
|
356f36c5bf | ||
|
|
9a75cb466a | ||
|
|
dc5127e619 | ||
|
|
a9bfe0f48f | ||
|
|
5d6555b9dd | ||
|
|
3f360601af | ||
|
|
35182066a8 | ||
|
|
a6e4e4ddb0 | ||
|
|
c3c14277e1 | ||
|
|
42b7d80567 | ||
|
|
fde33594a2 | ||
|
|
7f28c9fff6 | ||
|
|
57a6ada2a3 | ||
|
|
5741d4d67d | ||
|
|
4b90510b82 | ||
|
|
924cf871a7 | ||
|
|
77b6ef7396 | ||
|
|
388b90a94c | ||
|
|
f789714f14 | ||
|
|
e195cf0b95 | ||
|
|
a2c80a704f | ||
|
|
b5196b7164 | ||
|
|
1a5bbef266 | ||
|
|
05683bbf61 | ||
|
|
90615a8682 | ||
|
|
36b4d50cff | ||
|
|
d421b90376 | ||
|
|
356525730d | ||
|
|
d29233f553 | ||
|
|
5703c704f9 | ||
|
|
50ed463b9f | ||
|
|
3889941406 | ||
|
|
0d38e154cf | ||
|
|
22a3721dda | ||
|
|
2636c2470b | ||
|
|
1ea6df14d0 | ||
|
|
fe3ce78ae4 | ||
|
|
27ace14fb7 | ||
|
|
6eb2204c2b | ||
|
|
1d9873e1a9 | ||
|
|
bc9b816719 | ||
|
|
825ceeaa8d | ||
|
|
864af9cc3b | ||
|
|
d453961afc | ||
|
|
7d4b43f368 | ||
|
|
d3a0cff30a | ||
|
|
52421406ce | ||
|
|
eb4a5f6570 | ||
|
|
e992e4bea5 | ||
|
|
13667e4850 | ||
|
|
b58df17545 | ||
|
|
a291919cf7 | ||
|
|
03544f783a | ||
|
|
6ea69f421f | ||
|
|
310bf4bde4 | ||
|
|
ec3a07cd52 | ||
|
|
63a363080e | ||
|
|
323a0d7d0d | ||
|
|
b7cf434ebd | ||
|
|
555b37411f | ||
|
|
bd68b94411 | ||
|
|
141df52dd6 | ||
|
|
fb3f1ef667 | ||
|
|
4755197503 | ||
|
|
59df957181 | ||
|
|
192dc43b87 | ||
|
|
91fbb4da41 | ||
|
|
a6879775bb | ||
|
|
01a3787664 | ||
|
|
3db101ffdd | ||
|
|
2b966e630b | ||
|
|
892798bf79 | ||
|
|
007783cf76 | ||
|
|
0de1b878bd | ||
|
|
777d2f7027 | ||
|
|
78645c718f | ||
|
|
0b271cca46 | ||
|
|
985a268477 | ||
|
|
cd5e43483e | ||
|
|
02f47b5a91 | ||
|
|
4feecbeab8 | ||
|
|
0630542e20 | ||
|
|
783efd1a71 | ||
|
|
5313d61847 | ||
|
|
92c33b76dc | ||
|
|
7c1d6251f7 | ||
|
|
9178d80349 | ||
|
|
bc8127d685 | ||
|
|
8e18d5906d | ||
|
|
f02e731c67 | ||
|
|
9bcf01bf3f | ||
|
|
fed0f3d09e | ||
|
|
07b25e457b | ||
|
|
78e3c63ead | ||
|
|
6b7c59635e | ||
|
|
61909d842d | ||
|
|
4c5bb7660c | ||
|
|
bbc13b8ac9 | ||
|
|
71622b9f86 | ||
|
|
82231b77a2 | ||
|
|
67208b111d | ||
|
|
c48721e008 | ||
|
|
0efd118d43 | ||
|
|
d9d4b6e06d | ||
|
|
f4a95f89ac | ||
|
|
a7655b69e8 | ||
|
|
ce6d1d306d | ||
|
|
5f89b4427f | ||
|
|
9427b2f4b1 | ||
|
|
1d0c93c0b6 | ||
|
|
08e83983d0 | ||
|
|
eaafe83ae4 | ||
|
|
58584d8784 | ||
|
|
76aa2df807 | ||
|
|
da93081f47 | ||
|
|
ba434617dc | ||
|
|
97b694b59c | ||
|
|
c258e229c8 | ||
|
|
611f5f638d | ||
|
|
79279caa2e | ||
|
|
745c4625a6 | ||
|
|
be0cd601a9 | ||
|
|
703d4a6aee | ||
|
|
6b0d060289 | ||
|
|
4325363084 | ||
|
|
c387436a68 | ||
|
|
fba3adbc5e | ||
|
|
030cea6a0f | ||
|
|
b70808eca7 | ||
|
|
16c212c9fd | ||
|
|
8ac7dd8e9a | ||
|
|
1afbf75cbc | ||
|
|
da8fe06301 | ||
|
|
cad44ee68a | ||
|
|
8baad70f6c | ||
|
|
735f06fd83 | ||
|
|
75580f253e | ||
|
|
08d5ff4736 | ||
|
|
a1217d61b6 | ||
|
|
fbc3be84e3 | ||
|
|
efaa0b1e2a | ||
|
|
f7556e7ad2 | ||
|
|
5afd2695fb | ||
|
|
d4ade7b935 | ||
|
|
d7113a3602 | ||
|
|
8da7f789d8 | ||
|
|
9c3805c0d5 | ||
|
|
83440f5bbc | ||
|
|
b0c68ddc61 | ||
|
|
cb089987ee | ||
|
|
93d16bf4d7 | ||
|
|
3793ae323a | ||
|
|
7ee64fc0d4 | ||
|
|
3e43e164ae | ||
|
|
74b401b70d | ||
|
|
8626d6279a | ||
|
|
df53870c01 | ||
|
|
4382642099 | ||
|
|
b124c7f16d | ||
|
|
000c1bddb2 | ||
|
|
6b557fd92f | ||
|
|
6ba7fe26a7 | ||
|
|
50cacfee3d | ||
|
|
aa1ff189e1 | ||
|
|
235817c581 | ||
|
|
81e7f45200 | ||
|
|
5998f60764 | ||
|
|
5937fba373 | ||
|
|
626fea3f7a | ||
|
|
b3f17dc614 | ||
|
|
dac99c7745 | ||
|
|
a4b4eab2ae | ||
|
|
bec985a551 | ||
|
|
b491d22c16 | ||
|
|
5a4480bd1d | ||
|
|
807724e0f0 | ||
|
|
11614af2c2 | ||
|
|
5f021990b4 | ||
|
|
5f22afa450 | ||
|
|
647c4036cf | ||
|
|
857b59409c | ||
|
|
c3ada19892 | ||
|
|
558f261b60 | ||
|
|
20d4ba9ddd | ||
|
|
5ab88e629b | ||
|
|
463441c808 | ||
|
|
2fd0ffbfec | ||
|
|
8d3df7ea57 | ||
|
|
1e7676d26f | ||
|
|
cd814d420b | ||
|
|
68ec8ef313 | ||
|
|
e717bfc04b | ||
|
|
538c7579ba | ||
|
|
b4018846e8 | ||
|
|
220b37133b | ||
|
|
cfce9f7171 | ||
|
|
d59d7887bb | ||
|
|
7e999603fc | ||
|
|
f8771c2214 | ||
|
|
1b04c4beb7 | ||
|
|
fa7a277d64 | ||
|
|
f2ad205538 | ||
|
|
6d5c2bf7b2 | ||
|
|
913a5d1df2 | ||
|
|
fd796723f2 | ||
|
|
b213c7ed24 | ||
|
|
2a76cc6f54 | ||
|
|
dce71d6e7d | ||
|
|
19de053054 | ||
|
|
ec9c355791 | ||
|
|
257fe68f13 | ||
|
|
21bb799e7b | ||
|
|
8513ddb9b4 | ||
|
|
8104c97f77 | ||
|
|
7b853d8981 | ||
|
|
d808add499 | ||
|
|
d07ec07896 | ||
|
|
ed467aa74b | ||
|
|
1becbb8805 | ||
|
|
afc1938676 | ||
|
|
5411699256 | ||
|
|
8ce723b4c9 | ||
|
|
19adbaf84b | ||
|
|
337d6d9f08 | ||
|
|
7767f03e9c | ||
|
|
711bbe0afb | ||
|
|
76efc31b00 | ||
|
|
346c17b649 | ||
|
|
56acb2c08c | ||
|
|
69c47aa7d9 | ||
|
|
13cb806436 | ||
|
|
d28188d19d | ||
|
|
37b1b161f9 | ||
|
|
123c9d2315 | ||
|
|
fef6440ff2 | ||
|
|
0b808fa2aa | ||
|
|
c4b3dc40c3 | ||
|
|
888e5ed2c5 | ||
|
|
29a6c7e6ba | ||
|
|
90964d25ce | ||
|
|
26e537e328 | ||
|
|
7c30b3ca5d | ||
|
|
ea5c54ad9c | ||
|
|
ec8db116f8 | ||
|
|
884fc5d249 | ||
|
|
b5bfc3e2c7 | ||
|
|
be84b52d19 | ||
|
|
7c690ae8b8 | ||
|
|
17b286ef59 | ||
|
|
6a05645295 | ||
|
|
4a63e6b6ec | ||
|
|
f510f3062b | ||
|
|
30a9e40f4e | ||
|
|
7ba2dd8397 | ||
|
|
93cf135d5e | ||
|
|
537a551bb5 | ||
|
|
8866683a72 | ||
|
|
7f807986d7 | ||
|
|
c5f30f0d80 | ||
|
|
04f4a81736 | ||
|
|
dc790e62ce | ||
|
|
15c8515d53 | ||
|
|
0dfbc8d72f | ||
|
|
d4488cb040 | ||
|
|
eacb221ffe | ||
|
|
2fe0736b87 | ||
|
|
76f1dbe16b | ||
|
|
49982b36ac | ||
|
|
1002923dea | ||
|
|
7f420f3246 | ||
|
|
59571b1ce1 | ||
|
|
c5287e68b1 | ||
|
|
3cc7f66e90 | ||
|
|
919d29fdf7 | ||
|
|
fe55feb82f | ||
|
|
4c7b39f49e | ||
|
|
d2c23ebc8d | ||
|
|
35ae0e435d | ||
|
|
485b1ba88e | ||
|
|
d3d6fca350 | ||
|
|
cef7b9c92d | ||
|
|
4b92e2a705 | ||
|
|
270aba99fa | ||
|
|
adb3827d1e | ||
|
|
554a640c2b | ||
|
|
3a7aea48d7 | ||
|
|
1bb5408d83 | ||
|
|
73494a23df | ||
|
|
ef61407d95 | ||
|
|
5776a948c4 | ||
|
|
84173f3759 | ||
|
|
2ca5f2e27e | ||
|
|
339d1eb124 | ||
|
|
e1b4788bc2 | ||
|
|
72108c3a4e | ||
|
|
8f19ffd097 | ||
|
|
76c3fe1260 | ||
|
|
cafcbe03e1 | ||
|
|
5240217144 | ||
|
|
d68abf8237 | ||
|
|
03ffbe55ce | ||
|
|
a918fd1cf2 | ||
|
|
21959aec8f | ||
|
|
68c9d08909 | ||
|
|
e61032a313 | ||
|
|
fc5c9ad2f2 | ||
|
|
1daa0204aa | ||
|
|
7706020805 | ||
|
|
77fea1983c | ||
|
|
5e2cc05047 | ||
|
|
052e025537 | ||
|
|
6a0ef4b561 | ||
|
|
f87614e2d3 | ||
|
|
ddeca6cc06 | ||
|
|
cec91ae837 | ||
|
|
13d5471dd0 | ||
|
|
8123562ded | ||
|
|
14e1306b20 | ||
|
|
f4ddce7274 | ||
|
|
cc7aee6c3e | ||
|
|
d5966f944f | ||
|
|
caf4ca7451 | ||
|
|
949eef82f0 | ||
|
|
815d0aff90 | ||
|
|
848bc0779a | ||
|
|
f5bc9c08b1 | ||
|
|
5018bf1baf | ||
|
|
7375afca3e | ||
|
|
978702d04b | ||
|
|
f936b17d68 | ||
|
|
9838199de1 | ||
|
|
70b11f18b5 | ||
|
|
c11ff4a18c | ||
|
|
aba907d1a8 | ||
|
|
0c01c7ceba | ||
|
|
6ac1b6e82e | ||
|
|
0536d6cbed | ||
|
|
278bcfa8da | ||
|
|
52ebdcc27f | ||
|
|
4c97f5514d | ||
|
|
c6f7687bbb | ||
|
|
8536d0f6e9 | ||
|
|
4043141ae3 | ||
|
|
31721165b5 | ||
|
|
5383df5246 | ||
|
|
eaee8ee586 | ||
|
|
f76b675e09 | ||
|
|
99149b5cfe | ||
|
|
196c5c1267 | ||
|
|
2c3428a1bf | ||
|
|
94368accc1 | ||
|
|
ee774f1bf9 | ||
|
|
bb73da4c5e | ||
|
|
39acb46139 | ||
|
|
9e29ea8011 | ||
|
|
97e8974fdf | ||
|
|
279988bd60 | ||
|
|
ff7a17eb96 | ||
|
|
5bb4590348 | ||
|
|
e4767b1a51 | ||
|
|
058b690e25 | ||
|
|
8986640a10 | ||
|
|
5e4b500b5d | ||
|
|
bb6b3db0ac | ||
|
|
087e22ab94 | ||
|
|
48ae76e295 | ||
|
|
7b8699f54c | ||
|
|
59f644a3e2 | ||
|
|
17eec5f9e9 | ||
|
|
45b5819b8d | ||
|
|
97d5c067ac | ||
|
|
9dfd4bb430 | ||
|
|
ff7b542bfa | ||
|
|
8b9b99ac40 | ||
|
|
cce1549f66 | ||
|
|
affaec2a6f | ||
|
|
c52e593ea8 | ||
|
|
5d920be880 | ||
|
|
062152c723 | ||
|
|
84359a0078 | ||
|
|
5d068083e5 | ||
|
|
42399952ea | ||
|
|
4bc8773417 | ||
|
|
9e7108ff60 | ||
|
|
22b2446c05 | ||
|
|
d9947f2374 | ||
|
|
2de76d733b | ||
|
|
2798726dba | ||
|
|
f16d88fd53 | ||
|
|
69f86fc0af | ||
|
|
53c73054f4 | ||
|
|
b80b7bbcb9 | ||
|
|
225d78c767 | ||
|
|
a38bbdcc05 | ||
|
|
047f01888a | ||
|
|
f2d092c815 | ||
|
|
8392158ee3 | ||
|
|
93defa5f59 | ||
|
|
24436b550d | ||
|
|
ed8e08b78a | ||
|
|
f0983353f2 | ||
|
|
dbb50d7b16 | ||
|
|
2d7916f77d | ||
|
|
7d5dc08a0a | ||
|
|
fe1ce5b3ac | ||
|
|
9523bf5fbd | ||
|
|
ed013c1b7e | ||
|
|
aafc108260 | ||
|
|
3b56663e4d | ||
|
|
d7b84bd35f | ||
|
|
4b8862c1ec | ||
|
|
fed3165b53 | ||
|
|
6d40f797d2 | ||
|
|
f2cd96b9c0 | ||
|
|
dc38ec5051 | ||
|
|
38621b622e | ||
|
|
9b22f046f5 | ||
|
|
a5a08006e9 | ||
|
|
e0eef2080e | ||
|
|
60078300b8 | ||
|
|
58b49f9a08 | ||
|
|
3deacaa5c4 | ||
|
|
c44a5ede43 | ||
|
|
e11c7a08ea | ||
|
|
939d33cce7 | ||
|
|
0744b5d91b | ||
|
|
f68d31d7c5 | ||
|
|
6e3174e71a | ||
|
|
d572e1ddad | ||
|
|
30eb03af4c | ||
|
|
f0e0df2660 | ||
|
|
cd888a2149 | ||
|
|
0608778b9c | ||
|
|
e038e1a2f5 | ||
|
|
681c2a67bd | ||
|
|
d5b7b7ec52 | ||
|
|
44405e5415 | ||
|
|
e9bc5b719d | ||
|
|
2fdad0f11d | ||
|
|
6da5a6b82f | ||
|
|
029f1c411f | ||
|
|
206e44431d | ||
|
|
31b5ca17f1 | ||
|
|
5a68d69067 | ||
|
|
19e780c53f | ||
|
|
e9912c020e | ||
|
|
646e8713f2 | ||
|
|
b87ce172c3 | ||
|
|
a300a635d8 | ||
|
|
61a0f04bbe | ||
|
|
214bad26db | ||
|
|
e9e6a8e5ad | ||
|
|
26385fa10d | ||
|
|
d13c4b7b84 | ||
|
|
c315ad7801 | ||
|
|
762b4eb876 | ||
|
|
67e9b65a2e | ||
|
|
a8fdf0b5ea | ||
|
|
7404a6cf98 | ||
|
|
db02c32a9f | ||
|
|
c1c75208ec | ||
|
|
bb53146192 | ||
|
|
23c5b0366f | ||
|
|
310e912a9d | ||
|
|
c498ce3c41 | ||
|
|
8b20c5edab | ||
|
|
a6a142753a | ||
|
|
17da808325 | ||
|
|
03fe9d4e97 | ||
|
|
d4c20a919d | ||
|
|
1a389b6faf | ||
|
|
34f08ce082 | ||
|
|
20ed279489 | ||
|
|
da2f971345 | ||
|
|
835cd43565 | ||
|
|
7dbd0bd355 | ||
|
|
7c743eb7da | ||
|
|
863c575580 | ||
|
|
f92eded0a2 | ||
|
|
a97b87d2cd | ||
|
|
faaebbf5e1 | ||
|
|
6701ad8b73 | ||
|
|
b9af2d6b97 | ||
|
|
3393947dbc | ||
|
|
7648d300b5 | ||
|
|
bde293af22 | ||
|
|
e43b13968e | ||
|
|
b5c30ea679 | ||
|
|
18cbe31a84 | ||
|
|
451adb077f | ||
|
|
4bbd42123e | ||
|
|
17310da0f8 | ||
|
|
33e2179b65 | ||
|
|
032f54dd1a | ||
|
|
9fa85a5831 | ||
|
|
016ed12c11 | ||
|
|
d26b2a694d | ||
|
|
9b35793608 | ||
|
|
9cc344f8cc | ||
|
|
5a75e14a8a | ||
|
|
f5e14c9d70 | ||
|
|
237270a27e | ||
|
|
f5ccd943f1 | ||
|
|
53f5513476 | ||
|
|
e599e47e84 | ||
|
|
4638ebac8a | ||
|
|
52986c5c07 | ||
|
|
d4ff877fdd | ||
|
|
d66fac5662 | ||
|
|
a158f5ab9d | ||
|
|
67b5353861 | ||
|
|
4dd58a94f3 | ||
|
|
1821be87e9 | ||
|
|
1154f871f1 | ||
|
|
c22e8cfc01 | ||
|
|
61ee071f43 | ||
|
|
2c3a696b78 | ||
|
|
03bbb340f8 | ||
|
|
869c8a4ead | ||
|
|
65b6b142bd | ||
|
|
f3b1f89bae | ||
|
|
3126676ffb | ||
|
|
eb9e8c9dfc | ||
|
|
ac7f1035e1 | ||
|
|
3108f5bf0d | ||
|
|
c108f11c01 | ||
|
|
f92129dcdb | ||
|
|
09e9254f35 | ||
|
|
7c722def0f | ||
|
|
227c8a96c8 | ||
|
|
9fe1d8462a | ||
|
|
5ba13a9500 | ||
|
|
d018bd4892 | ||
|
|
0d0b7f8af2 | ||
|
|
4660bc58fc | ||
|
|
223e1b1cd4 | ||
|
|
0fc8a0f840 | ||
|
|
2768878618 | ||
|
|
ffb408f440 | ||
|
|
ac08dec2c3 | ||
|
|
d88a75b666 | ||
|
|
cf49c274a6 | ||
|
|
1a956cce9a | ||
|
|
d9008cd302 | ||
|
|
be63eb8cef | ||
|
|
2ab12f54ff | ||
|
|
6a3d110d3a | ||
|
|
49a29a16e6 | ||
|
|
e71409b7c8 | ||
|
|
0a67ca53d4 | ||
|
|
b65db49868 | ||
|
|
3e4a7ba97c | ||
|
|
2c4e8cbb4a | ||
|
|
a3085cb44a | ||
|
|
5a81073cd8 | ||
|
|
c028771ad0 | ||
|
|
70cbaeb423 | ||
|
|
d5a9d32778 | ||
|
|
bfc5f01e1e | ||
|
|
d3c95e030b | ||
|
|
45136de664 | ||
|
|
4998eb3061 | ||
|
|
991a33f7b6 | ||
|
|
2cf924ab74 | ||
|
|
6c202c5fa1 | ||
|
|
8ca2bbecc6 | ||
|
|
945fb61e59 | ||
|
|
044feab00f | ||
|
|
dabd882056 | ||
|
|
e862ba9daf | ||
|
|
d96a83adac | ||
|
|
7218a9de0e | ||
|
|
8f01db10a6 | ||
|
|
eebaff95cf | ||
|
|
22ca29a51f | ||
|
|
e9cdf85286 | ||
|
|
07f7db1b6d | ||
|
|
1523b2ef80 | ||
|
|
075a138e14 | ||
|
|
73a799b0ce | ||
|
|
3d5edba574 | ||
|
|
21a7fcb01a | ||
|
|
c3152a6343 | ||
|
|
0ce51fcb87 | ||
|
|
570c683b99 | ||
|
|
1f64f9dfcc | ||
|
|
b3642708b3 | ||
|
|
f6604f6578 | ||
|
|
c382ca22b8 | ||
|
|
52a2073152 | ||
|
|
54afb2f1af | ||
|
|
80af01c20f | ||
|
|
526ccc870b | ||
|
|
1ce1899a46 | ||
|
|
896c8b4a78 | ||
|
|
d800d10766 | ||
|
|
7916a2a648 | ||
|
|
ba3581354a | ||
|
|
5cc02ac97f | ||
|
|
08da8ef09d | ||
|
|
4052e15565 | ||
|
|
c8f323b706 | ||
|
|
c91f70cbf4 | ||
|
|
a01bb27d7e | ||
|
|
3f806f83e3 | ||
|
|
4445c34af0 | ||
|
|
782b85ba13 | ||
|
|
91644d2145 | ||
|
|
3e7ed752ea | ||
|
|
98f5fbab5d | ||
|
|
da34ea6b11 | ||
|
|
533881e620 | ||
|
|
d8ead2693f | ||
|
|
7d9a18a63d | ||
|
|
fbac1cfe1e | ||
|
|
9684c8b4bc | ||
|
|
ef31c47c15 | ||
|
|
2416c387f5 | ||
|
|
326d3df63f | ||
|
|
982fca541d | ||
|
|
ad39c30c21 | ||
|
|
7da1b215f3 | ||
|
|
ab37794f61 | ||
|
|
ccb5344d32 | ||
|
|
9079d2890c | ||
|
|
bf1f60b31e | ||
|
|
1b1d1a8d0b | ||
|
|
947acfffe2 | ||
|
|
6b5b10fc94 | ||
|
|
f3ef6448d7 | ||
|
|
52a8692a85 | ||
|
|
29e656ec7e | ||
|
|
4da49dfc2d | ||
|
|
cabe7c696c | ||
|
|
e3370b6a98 | ||
|
|
e25a428118 | ||
|
|
2492b9968a | ||
|
|
6dda2f3670 | ||
|
|
aae24c26a3 | ||
|
|
97dbb40ad6 | ||
|
|
18ca96e285 | ||
|
|
206d46cbb7 | ||
|
|
41ce4886fd | ||
|
|
256f6e410c | ||
|
|
d5d337c631 | ||
|
|
71818da6a5 | ||
|
|
c53aef9955 | ||
|
|
a18995d3dc | ||
|
|
a17e4434be | ||
|
|
d2955cb32f | ||
|
|
5b0e6297bb | ||
|
|
749355abc2 | ||
|
|
7c3640a4c3 | ||
|
|
ca3b3b9843 | ||
|
|
9be342bd25 | ||
|
|
4a310f36d8 | ||
|
|
e647b5562b | ||
|
|
9ffcd9e922 | ||
|
|
599f6426a5 | ||
|
|
e8a2680e31 | ||
|
|
f5993a2507 | ||
|
|
9782937138 | ||
|
|
7aff424d1c | ||
|
|
d7be62b7da | ||
|
|
84d584f607 | ||
|
|
68c31c55c5 | ||
|
|
5a0641a30e | ||
|
|
ac3a270e17 | ||
|
|
aeba02fb22 | ||
|
|
1101a1094f | ||
|
|
64aed24539 | ||
|
|
b77fe285dc | ||
|
|
874d61bb6d | ||
|
|
c793e847bc | ||
|
|
112a6f7b44 | ||
|
|
398733ff9a | ||
|
|
744f0ab198 | ||
|
|
f2d5bcbbdd | ||
|
|
323a6e34b5 | ||
|
|
3330f040ba | ||
|
|
4d26dffa7d | ||
|
|
9d4d85ca9d | ||
|
|
d37d1a033a | ||
|
|
dcd1a089b1 | ||
|
|
9ad2a9ac85 | ||
|
|
5c53081007 | ||
|
|
f375c41950 | ||
|
|
2a59dbbc89 | ||
|
|
d5d92c6290 | ||
|
|
e96eadb5e7 | ||
|
|
593d06e91e | ||
|
|
ca3cdfabec | ||
|
|
bfa8630feb | ||
|
|
0bf4ac6fb3 | ||
|
|
a7c1ff402a | ||
|
|
0960473c9b | ||
|
|
fd38a55f51 | ||
|
|
76bee57553 | ||
|
|
d791476708 | ||
|
|
975fd0a6d3 | ||
|
|
2be75420ca | ||
|
|
c2a89ae58e | ||
|
|
1c157c7c3d | ||
|
|
a3b5caaae0 | ||
|
|
e039f7cc22 | ||
|
|
06e35149f7 | ||
|
|
7c840b8348 | ||
|
|
5e305a0c9d | ||
|
|
a7dda865c9 | ||
|
|
51a3946519 | ||
|
|
a3beceade2 | ||
|
|
d345b9503a | ||
|
|
c72bed6290 | ||
|
|
e62bb89d95 | ||
|
|
f8d6eb0d40 | ||
|
|
7d9b9f96f0 | ||
|
|
3017e2b3a0 | ||
|
|
26896910ee | ||
|
|
86e4207145 | ||
|
|
56426ad3d9 | ||
|
|
4cb2a0bce2 | ||
|
|
156915a502 | ||
|
|
8a71b9e95e | ||
|
|
da831d2c8e | ||
|
|
3a098ca047 | ||
|
|
bc8b02a990 | ||
|
|
d1398887e6 | ||
|
|
ddd60d1cd2 | ||
|
|
68b19462c3 | ||
|
|
a8e2f95c39 | ||
|
|
c38d59a4b6 | ||
|
|
47ac770d93 | ||
|
|
52d39d9d5a | ||
|
|
cc78a666a0 | ||
|
|
32eb2aba43 | ||
|
|
c8b79214cd | ||
|
|
025ecd4ecc | ||
|
|
2a92ee6008 | ||
|
|
56e6794151 | ||
|
|
01e1457a09 | ||
|
|
5b1f5b0f20 | ||
|
|
f130a29739 | ||
|
|
33d6903d3f | ||
|
|
09c271b7c5 | ||
|
|
71d49f1c6f | ||
|
|
747719b3e8 | ||
|
|
f9dc628f0b | ||
|
|
19ba90f577 | ||
|
|
03b3f54c2c | ||
|
|
adbb41799c | ||
|
|
ddee802324 | ||
|
|
e41543c22e | ||
|
|
3c34add0d6 | ||
|
|
9629a50853 | ||
|
|
efd24cc1a2 | ||
|
|
ae444b5781 | ||
|
|
7d6d4adcdb | ||
|
|
9cf6c43f8a | ||
|
|
7ba5cf5958 | ||
|
|
97e694f4d9 | ||
|
|
2f9f9ac80d | ||
|
|
53add04a2e | ||
|
|
ecb4eebfac | ||
|
|
13cbd597ad | ||
|
|
612ab65b72 | ||
|
|
2f68d446ef | ||
|
|
800aa4d5b6 | ||
|
|
52875c08ff | ||
|
|
cfebbe3cc4 | ||
|
|
7a69df08c5 | ||
|
|
651bf525b0 | ||
|
|
067e5d81d9 | ||
|
|
4f0b35874d | ||
|
|
b0adc9cca4 | ||
|
|
d8121c133e | ||
|
|
beaa5279ac | ||
|
|
cd6a3afc77 | ||
|
|
eb27f8cfe8 | ||
|
|
1897e3cbad | ||
|
|
bb8d458468 | ||
|
|
837afa0e65 | ||
|
|
2a36166839 | ||
|
|
cae21d3937 | ||
|
|
8b82fc3c70 | ||
|
|
af63dc76c1 | ||
|
|
5e17c2efb9 | ||
|
|
25c5ed8f72 | ||
|
|
ef3c002144 | ||
|
|
55a2e63c32 | ||
|
|
bfb904557f | ||
|
|
f9442c1092 | ||
|
|
60493d0a47 | ||
|
|
f5718106a6 | ||
|
|
e1dd85d261 | ||
|
|
bdfb0b7561 | ||
|
|
7e0a165131 | ||
|
|
c6480af217 | ||
|
|
7b34859bc8 | ||
|
|
09a1118036 | ||
|
|
29a4900d0b | ||
|
|
8451ba1f14 | ||
|
|
f3ceedfe38 | ||
|
|
04b6c30b6d | ||
|
|
b932ce6246 | ||
|
|
ab72fbffc6 | ||
|
|
abb346651e | ||
|
|
c386a02889 | ||
|
|
8b793a261f | ||
|
|
d81fcd5f66 | ||
|
|
b7c4f1f086 | ||
|
|
6902960d07 | ||
|
|
a52adcad4a | ||
|
|
eaab34ee6c | ||
|
|
6a3add6e57 | ||
|
|
d6d454edc8 | ||
|
|
0d5cd5d970 | ||
|
|
a7c96416ba | ||
|
|
cfe445ab14 | ||
|
|
91d274b51e | ||
|
|
3ec2d6014b | ||
|
|
cba898e2b9 | ||
|
|
fdcc067c23 | ||
|
|
9043249740 | ||
|
|
aa9b4ce1f3 | ||
|
|
aff61fad7d | ||
|
|
307b8ef4f6 | ||
|
|
e571616d52 | ||
|
|
bbb4047909 | ||
|
|
b50236da4c | ||
|
|
4ae60284fb | ||
|
|
41c6d9cbfb | ||
|
|
ddbf841514 | ||
|
|
8303cee676 | ||
|
|
566bc555eb | ||
|
|
dcb79e66cc | ||
|
|
88968aae22 | ||
|
|
48800bc268 | ||
|
|
9043cf759b | ||
|
|
25b107defb | ||
|
|
d5d95c31a6 | ||
|
|
585dde6cf5 | ||
|
|
0aed9ecd7c | ||
|
|
c9c375f3b8 | ||
|
|
0963a649b7 | ||
|
|
7904e994a7 | ||
|
|
583452114b | ||
|
|
2a133f4a3f | ||
|
|
9e6666e511 | ||
|
|
6470b62f56 | ||
|
|
340203cc18 | ||
|
|
44023606c6 | ||
|
|
1f5a71f2c9 | ||
|
|
4803f2d29a | ||
|
|
e0f0769405 | ||
|
|
a0d9890c99 | ||
|
|
e36911360b | ||
|
|
5207b84e8b | ||
|
|
ba43c41ac0 | ||
|
|
7562412554 | ||
|
|
f64a9968a9 | ||
|
|
2e63393bf2 | ||
|
|
1fcc2c4918 | ||
|
|
83341cc3ed | ||
|
|
6830fe4f91 | ||
|
|
5318e513c1 | ||
|
|
fa3ed50f3a | ||
|
|
3b8f60f90e | ||
|
|
f438097ecb | ||
|
|
84f621fde3 | ||
|
|
74db61ce15 | ||
|
|
4cab48a000 | ||
|
|
1c5148bb1e | ||
|
|
6e77dab832 | ||
|
|
7e1d282b1b | ||
|
|
e41b98b5d4 | ||
|
|
b215940277 | ||
|
|
98cb1b7af1 | ||
|
|
f6060b976d | ||
|
|
7ac5054df8 | ||
|
|
594f08cc6f | ||
|
|
ba2dcb9221 | ||
|
|
c59059ad9d | ||
|
|
4b0638dd40 | ||
|
|
9ea30c427e | ||
|
|
5e1dbdc608 | ||
|
|
0179160f6c | ||
|
|
e19167dffa | ||
|
|
cfbd47bd78 | ||
|
|
5f32c3d34a | ||
|
|
97fe41d603 | ||
|
|
f876833b9a | ||
|
|
ce534491fd | ||
|
|
d35dbdea92 | ||
|
|
2a50a78497 | ||
|
|
76eac7ce6a | ||
|
|
e5ec0a785d | ||
|
|
4582b54e91 | ||
|
|
1ef70b387d | ||
|
|
b075f7a459 | ||
|
|
0cf38f7197 | ||
|
|
843172ccc8 | ||
|
|
ccbeb162cf | ||
|
|
4fa04247a9 | ||
|
|
d832bfc056 | ||
|
|
885fc3c5b7 | ||
|
|
330f3af74d | ||
|
|
4c84c97bb6 | ||
|
|
caaeac35b6 | ||
|
|
4d9ae5bb44 | ||
|
|
816db0e856 | ||
|
|
7b2a71802b | ||
|
|
6f1c679d20 | ||
|
|
2c5bdaf4ad | ||
|
|
84d76f26f2 | ||
|
|
e5513cff91 | ||
|
|
4e45c7fdba | ||
|
|
3cd21ee659 | ||
|
|
bab963ec07 | ||
|
|
d671421b8b | ||
|
|
fa00373e56 | ||
|
|
644486b4a0 | ||
|
|
a20bf05c64 | ||
|
|
f9b9a9972e | ||
|
|
c6dcccba18 | ||
|
|
03d9cbb170 | ||
|
|
248717ccac | ||
|
|
1735a649e9 | ||
|
|
0763d15b4c | ||
|
|
2166b3d467 | ||
|
|
ab6646d16b | ||
|
|
4055ac82ab | ||
|
|
cb87b314be | ||
|
|
24ecd48b22 | ||
|
|
de66971d93 | ||
|
|
e551c0a665 | ||
|
|
1ad7210506 | ||
|
|
ccd20d979f | ||
|
|
15cf15f47f | ||
|
|
f106ff7e76 | ||
|
|
312b153005 | ||
|
|
652d715fdc | ||
|
|
3db7bd7624 | ||
|
|
2b77c9b5c7 | ||
|
|
f1c23f25f0 | ||
|
|
be8e15a777 | ||
|
|
7eb4562432 | ||
|
|
43f6eab2ea | ||
|
|
c434f72d31 | ||
|
|
ae7797ebf2 | ||
|
|
85d9a2f790 | ||
|
|
4ee70e496e | ||
|
|
74e29a3fdb | ||
|
|
bea3ced763 | ||
|
|
9ca12c9d11 | ||
|
|
6023e686a4 | ||
|
|
58ce8eaf46 | ||
|
|
13cee53384 | ||
|
|
10337b4914 | ||
|
|
cbef85ddef | ||
|
|
cd3d18cb4d | ||
|
|
f5995cadef | ||
|
|
743de4e586 | ||
|
|
2141cfb282 | ||
|
|
028f1f5133 | ||
|
|
fb0298ff1c | ||
|
|
0b4a1d9b65 | ||
|
|
9127892c71 | ||
|
|
bb828f5c9c | ||
|
|
3fd505d98f | ||
|
|
3fae3a9eda | ||
|
|
2870798d07 | ||
|
|
23fbef3dae | ||
|
|
4b4dcf2e01 | ||
|
|
0d4d4516c8 | ||
|
|
838958a888 | ||
|
|
44b6b8cc65 | ||
|
|
a487492a7a | ||
|
|
816283d1e5 | ||
|
|
67664331e3 | ||
|
|
44a44ab0a2 | ||
|
|
d63e15f0c6 | ||
|
|
33ceb22b8b | ||
|
|
379a5b9e16 | ||
|
|
40b3ae2a15 | ||
|
|
9430952561 | ||
|
|
11cc1f04c4 | ||
|
|
b016b1ca5f | ||
|
|
f745c87394 | ||
|
|
ceeb9d7f1b | ||
|
|
017b654acd | ||
|
|
cbde99b419 | ||
|
|
e1d9dfc862 | ||
|
|
c85bf18f0e | ||
|
|
90dcd3d30d | ||
|
|
c75db29ff2 | ||
|
|
794d638ded | ||
|
|
be09c911ce | ||
|
|
8c287c02ca | ||
|
|
bdb12678d0 | ||
|
|
fc76383718 | ||
|
|
9ec19958bf | ||
|
|
1617deeb81 | ||
|
|
715280b03a | ||
|
|
baf6533ea4 | ||
|
|
1ab3e0c3fa | ||
|
|
f85fcbd216 | ||
|
|
bb2dc59c56 | ||
|
|
64a5be3e00 | ||
|
|
244574f8e6 | ||
|
|
253f7e252d | ||
|
|
fd89535037 | ||
|
|
a92effa622 | ||
|
|
3c576dcf21 | ||
|
|
10cb7b2524 | ||
|
|
e3943155f3 | ||
|
|
aa66676b7d | ||
|
|
9fc17d8988 | ||
|
|
f166c96ed5 | ||
|
|
13d6664ab4 | ||
|
|
ba283377b9 | ||
|
|
b61f7c0179 | ||
|
|
65ea0fc2b4 | ||
|
|
9d0cb07ff9 | ||
|
|
7b6e60077a | ||
|
|
45d8fbb19e | ||
|
|
d223283359 | ||
|
|
a562e5a919 | ||
|
|
8a9c38114f | ||
|
|
00e1fab1af | ||
|
|
f32b27e8bd | ||
|
|
f40afcf023 | ||
|
|
4290be7ee6 | ||
|
|
ba3b6b6aa5 | ||
|
|
cf6745b1ae | ||
|
|
8db4e91888 | ||
|
|
4f75b6d656 | ||
|
|
9f486716c1 | ||
|
|
49689fc56f | ||
|
|
2ea7f38d38 | ||
|
|
a9468ad84a | ||
|
|
e1ba69eee0 | ||
|
|
fbca244212 | ||
|
|
eff4282cc2 | ||
|
|
5ad6d70397 | ||
|
|
4bae65bedc | ||
|
|
efd292e8f5 | ||
|
|
1d35c87c18 | ||
|
|
34d0c79e32 | ||
|
|
02aa4f7e0c | ||
|
|
749e5eb7f4 | ||
|
|
0d8f382ca4 | ||
|
|
5046852caa | ||
|
|
bd0dba6439 | ||
|
|
b461d24f52 | ||
|
|
249bfa3412 | ||
|
|
441c4b9b71 | ||
|
|
3270d141b0 | ||
|
|
5eaf49a265 | ||
|
|
2dd9cb61a6 | ||
|
|
51a9c4fad5 | ||
|
|
d880c943ae | ||
|
|
0fc6f6920e | ||
|
|
9d1d0bd1f1 | ||
|
|
bcbd2a8a91 | ||
|
|
0d575b4cdf | ||
|
|
71d360b4a0 | ||
|
|
0eb6a25342 | ||
|
|
608e9e1c82 | ||
|
|
552031799d | ||
|
|
de24e93cca | ||
|
|
b7af0cca63 | ||
|
|
aa4ff464d6 | ||
|
|
a026e1d701 | ||
|
|
c459d3aa7a | ||
|
|
4b11921cb6 | ||
|
|
0a7a092080 | ||
|
|
fd5f992be4 | ||
|
|
c66f67ee80 | ||
|
|
be493b78ba | ||
|
|
4c1b485d47 | ||
|
|
12a41d7dd2 | ||
|
|
c6fc7313b1 | ||
|
|
d58682c574 | ||
|
|
47c6a324ac | ||
|
|
451508ba20 | ||
|
|
b0359b4659 | ||
|
|
eef027acb4 | ||
|
|
640f66f017 | ||
|
|
1c647e2898 | ||
|
|
252d8da8fc | ||
|
|
4c0fcb2b9a | ||
|
|
8abec461a6 | ||
|
|
f8ad108da6 | ||
|
|
a6f1e08c19 | ||
|
|
024c6d2c08 | ||
|
|
2be9f402c6 | ||
|
|
de1a7042d4 | ||
|
|
9baeee893f | ||
|
|
2aaf8b22f2 | ||
|
|
0797323664 | ||
|
|
d5d2b3a2fc | ||
|
|
0c5febfb4d | ||
|
|
6effcb0829 | ||
|
|
857e45baf3 | ||
|
|
a072b23a5e | ||
|
|
09e9255ff1 | ||
|
|
3d18c71201 | ||
|
|
1a71e9b4a0 | ||
|
|
31b94c1d3f | ||
|
|
c5442c3553 | ||
|
|
a4b1c28696 | ||
|
|
1816b2249e | ||
|
|
a2e2149eb2 | ||
|
|
437b2a7290 | ||
|
|
e7e4252244 | ||
|
|
e199864fce | ||
|
|
5b154946a8 | ||
|
|
9f50882d6d | ||
|
|
ea8a49aea3 | ||
|
|
451e8fc024 | ||
|
|
3f6778889b | ||
|
|
c1e747fa39 | ||
|
|
b43c8157bd | ||
|
|
3892da7606 | ||
|
|
77f5952318 | ||
|
|
95cf36c43b | ||
|
|
e1ae97e661 | ||
|
|
0ee93fb00c | ||
|
|
42183877e8 | ||
|
|
d9d9b748ad | ||
|
|
7f869b4840 | ||
|
|
c8d039508f | ||
|
|
cb1c461b69 | ||
|
|
7f6479643f | ||
|
|
8b91f4fb5e | ||
|
|
9e26e6b0a3 | ||
|
|
db1d97c9ac | ||
|
|
8a96260892 | ||
|
|
d57fe35efc | ||
|
|
aa1351d483 | ||
|
|
efecb32ec9 | ||
|
|
565de9bc8d | ||
|
|
b95dea3b50 | ||
|
|
c56ea50251 | ||
|
|
4f72bd35db | ||
|
|
53708c138a | ||
|
|
a5cfd7c2e2 | ||
|
|
c5aed0c333 | ||
|
|
9a2e945b91 | ||
|
|
7ae52d843c | ||
|
|
8dda0afc07 | ||
|
|
b186fa8759 | ||
|
|
658fe93d8c | ||
|
|
b7218c1bcd | ||
|
|
31fe8ebcee | ||
|
|
2b0b2096f6 | ||
|
|
727085f3ec | ||
|
|
b308cfef1d | ||
|
|
78283b6a0b | ||
|
|
180467ba56 | ||
|
|
32729adfae | ||
|
|
d55213286e | ||
|
|
f978b0795a | ||
|
|
2c795da664 | ||
|
|
11cd4e1164 | ||
|
|
ea504a0516 | ||
|
|
989084e4de | ||
|
|
574590a598 | ||
|
|
d0599cd952 | ||
|
|
7d4a093d9e | ||
|
|
ca6ce2ba8b | ||
|
|
f79b72f724 | ||
|
|
62f8aa8b40 | ||
|
|
7dc4eeddf0 | ||
|
|
7556a604e3 | ||
|
|
f7ba3ddc07 | ||
|
|
6e8c83b2a9 | ||
|
|
e8b33e3dba | ||
|
|
4c1c361a15 | ||
|
|
2f8c0bb555 | ||
|
|
58328d36b3 | ||
|
|
9da9dff3c3 | ||
|
|
a695fa9c6e | ||
|
|
ab0a730d4a | ||
|
|
e9f9b5bdf4 | ||
|
|
6983e2ff12 | ||
|
|
724392a557 | ||
|
|
b17937ce0d | ||
|
|
05318bb4ec | ||
|
|
4283b1ee30 | ||
|
|
b6002bd1f8 | ||
|
|
0955b355e9 | ||
|
|
ef5e38b0d3 | ||
|
|
97da70e583 | ||
|
|
8182f5fb2a | ||
|
|
97902bdee7 | ||
|
|
cef5c0b375 | ||
|
|
98208b9963 | ||
|
|
3664956b8c | ||
|
|
22fabe5a3a | ||
|
|
7e6e0ee3a4 | ||
|
|
f899408fc9 | ||
|
|
2f9cc1c919 | ||
|
|
d186aed96c | ||
|
|
5dd8d1c4ef | ||
|
|
9c64ba6ad6 | ||
|
|
aa2ea621c3 | ||
|
|
adf281c4f3 | ||
|
|
ba30f80a03 | ||
|
|
5f00fb5df8 | ||
|
|
ae6b097573 | ||
|
|
6f82837b0f | ||
|
|
c213624c14 | ||
|
|
1a860c42ee | ||
|
|
50bf1bb21f | ||
|
|
65b9b70ff8 | ||
|
|
77ba5a8c24 | ||
|
|
cb0e7b200e | ||
|
|
1fafa4017d | ||
|
|
32ff09123d | ||
|
|
8eba418715 | ||
|
|
8146049b4d | ||
|
|
a8d7764146 | ||
|
|
99c7867522 | ||
|
|
2f4749a7a2 | ||
|
|
3b7667292b | ||
|
|
618334ac42 | ||
|
|
2e64db2556 | ||
|
|
10eda66735 | ||
|
|
92287ab18d | ||
|
|
08af9bf365 | ||
|
|
267170b8d2 | ||
|
|
34f3552dc7 | ||
|
|
3fdfebf7ef | ||
|
|
e3f7402e07 | ||
|
|
13e5c8ff7a | ||
|
|
9b951c5d1b | ||
|
|
93477c102f | ||
|
|
75006f9970 | ||
|
|
cb93770d6b | ||
|
|
3a6314b1a0 | ||
|
|
2be848025f | ||
|
|
4a21457b8a | ||
|
|
85ce1f3332 | ||
|
|
0b7c768f29 | ||
|
|
63dcdc3a03 | ||
|
|
025db4ac97 | ||
|
|
8bfda8d4ee | ||
|
|
e97a4d953d | ||
|
|
059e361bd8 | ||
|
|
78ebffe4f1 | ||
|
|
1b3544e794 | ||
|
|
480587c826 | ||
|
|
6298436a1b | ||
|
|
778e581aca | ||
|
|
e6e8a014a3 | ||
|
|
ab9be29356 | ||
|
|
03cb850442 | ||
|
|
bd4f91d7eb | ||
|
|
fed5999a6c | ||
|
|
0f5dc90bae | ||
|
|
30e881b03a | ||
|
|
534ec0d44a | ||
|
|
e79f3715b4 | ||
|
|
b0c5616ff0 | ||
|
|
1eee7297dc | ||
|
|
509aad9bce | ||
|
|
3b2eb97d72 | ||
|
|
59bd4749a8 | ||
|
|
ee8924e101 | ||
|
|
ba82bc39c8 | ||
|
|
81a473d547 | ||
|
|
d2fd4d6978 | ||
|
|
247803f894 | ||
|
|
1211e0d7ab | ||
|
|
693b2fe3b4 | ||
|
|
45004493e0 | ||
|
|
a05bbd651c | ||
|
|
ecae2fc6b6 | ||
|
|
3a400c46ad | ||
|
|
c89e2eb7ea | ||
|
|
5ed8340d0e | ||
|
|
1b96bb4221 | ||
|
|
0fd1308f93 | ||
|
|
474a2692fa | ||
|
|
c7a6a67e20 | ||
|
|
64eef9f89c | ||
|
|
06c7cb5d8c | ||
|
|
459fac4753 | ||
|
|
a6f3eabf4d | ||
|
|
014cb4b004 | ||
|
|
4102403482 | ||
|
|
9ec7929753 | ||
|
|
ce8a024d44 | ||
|
|
ea616114a9 | ||
|
|
460179a01c | ||
|
|
ec9bbe2b52 | ||
|
|
3873bc7433 | ||
|
|
6d87209533 | ||
|
|
302e086f99 | ||
|
|
f1701469e0 | ||
|
|
efe5d79a86 | ||
|
|
4dda771079 | ||
|
|
3ec0e6f7ef | ||
|
|
08a86fa03d | ||
|
|
f2a2cfd8c8 | ||
|
|
a7fb411a42 | ||
|
|
d572bd4f34 | ||
|
|
6d42922839 | ||
|
|
d8b0199ba2 | ||
|
|
095155a58b | ||
|
|
166b5da560 | ||
|
|
07a2938b83 | ||
|
|
3002c28557 | ||
|
|
c381c213a5 | ||
|
|
74c509eac8 | ||
|
|
658ba50aa8 | ||
|
|
8d23ffd6d2 | ||
|
|
fcdc7b1a0d | ||
|
|
d78d5d60c4 | ||
|
|
ef4a527ff0 | ||
|
|
dbeb31cad3 | ||
|
|
fd197c5780 | ||
|
|
1f83bef1b5 | ||
|
|
eef5df583e | ||
|
|
3717a01641 | ||
|
|
8dffc38cd5 | ||
|
|
95573e8608 | ||
|
|
068460540c | ||
|
|
504d376f84 | ||
|
|
de423e531c | ||
|
|
2695cc416e | ||
|
|
24f7128742 | ||
|
|
8064659398 | ||
|
|
64d8b97afe | ||
|
|
099ef585b2 | ||
|
|
1745d06bb7 | ||
|
|
12d7b92556 | ||
|
|
22ef8557b8 | ||
|
|
bdeddd3617 | ||
|
|
6fb0fc7b71 | ||
|
|
f694939fc7 | ||
|
|
eaaee59f92 | ||
|
|
41d82b0ffa | ||
|
|
3c73b426d7 | ||
|
|
ba87549124 | ||
|
|
0071632a06 | ||
|
|
ec890ff816 | ||
|
|
5bb717e319 | ||
|
|
758d8cef23 | ||
|
|
c4546b6da6 | ||
|
|
6fe96b322a | ||
|
|
6fdc279fd3 | ||
|
|
8f6e756249 | ||
|
|
3d247abe79 | ||
|
|
c775e2530a | ||
|
|
8595cbc16d | ||
|
|
43b97f02c3 | ||
|
|
c8b4ab87cb | ||
|
|
241ec01adf | ||
|
|
cffb368bbd | ||
|
|
bb2d27280b | ||
|
|
287e727e71 | ||
|
|
a2ca6d5ef9 | ||
|
|
03eadcebf1 | ||
|
|
85efe6ef74 | ||
|
|
5f187f851f | ||
|
|
d2371946ba | ||
|
|
f0df9b8d23 | ||
|
|
4ba6dc86cc | ||
|
|
4c55700157 | ||
|
|
71641c5743 | ||
|
|
ebc18cd2d4 | ||
|
|
d0d9de37f4 | ||
|
|
1bfdc7438a | ||
|
|
9352ecca1f | ||
|
|
caf48f32c4 | ||
|
|
43f25b49a1 | ||
|
|
5cd5986211 | ||
|
|
39419bb411 | ||
|
|
774c624687 | ||
|
|
b331176bf7 | ||
|
|
52eeeebac9 | ||
|
|
5439390461 | ||
|
|
6fc4dacd42 | ||
|
|
8d84277e8c | ||
|
|
a1f08be479 | ||
|
|
e9b6afd2aa | ||
|
|
996ec4926b | ||
|
|
a4de12dd8d | ||
|
|
317ab64d7c | ||
|
|
f3a5975cf8 | ||
|
|
8debefa8ad | ||
|
|
0ef507ae7f | ||
|
|
819656bd89 | ||
|
|
86a6a83647 | ||
|
|
abe736c6a6 | ||
|
|
cde0da6e12 | ||
|
|
787d6946b2 | ||
|
|
862b12abfd | ||
|
|
69b26dcb4e | ||
|
|
a6b4b15e07 | ||
|
|
fd9c30fd11 | ||
|
|
88df5b6857 | ||
|
|
c01bd37a82 | ||
|
|
285b5563d6 | ||
|
|
9a04208150 | ||
|
|
0482137620 | ||
|
|
b73228899a | ||
|
|
af3e505587 | ||
|
|
60b278ac39 | ||
|
|
fcdf68db6a | ||
|
|
db17363267 | ||
|
|
12cab2dfe0 | ||
|
|
48866f0732 | ||
|
|
240e9637fa | ||
|
|
d1b003f3c4 | ||
|
|
8a1de52f3c | ||
|
|
a4f34539ea | ||
|
|
7c41c9a3e4 | ||
|
|
bebe7baa80 | ||
|
|
49e8af7cc9 | ||
|
|
f0bc72cda4 | ||
|
|
17247c64f0 | ||
|
|
e98bc90489 | ||
|
|
5b7a8e9c90 | ||
|
|
5320ebc051 | ||
|
|
b240f536b5 | ||
|
|
1d91ce90d3 | ||
|
|
f0e234eef2 | ||
|
|
b228fe6a2a | ||
|
|
81f1a34112 | ||
|
|
549bb2c55f | ||
|
|
e813fd2dfa | ||
|
|
5a477bdd6d | ||
|
|
492ee135ba | ||
|
|
7777bcc587 | ||
|
|
1c8daf9700 | ||
|
|
26e80045a6 | ||
|
|
c2901ae8cd | ||
|
|
c656856ec2 | ||
|
|
f424f96589 | ||
|
|
b416b22bcc | ||
|
|
b1945daf6c | ||
|
|
07b676792a | ||
|
|
343e8d8498 | ||
|
|
ac708a8ee9 | ||
|
|
8149bf62a8 | ||
|
|
9410466d72 | ||
|
|
8b7ca1f280 | ||
|
|
78d5520741 | ||
|
|
f39fb5187a | ||
|
|
097be322a6 | ||
|
|
4009b1837c | ||
|
|
3333049341 | ||
|
|
71c0be20b9 | ||
|
|
73977639ac | ||
|
|
8eb3f3bc06 | ||
|
|
0b6d7a5b57 | ||
|
|
ce9e1dfb98 | ||
|
|
faabdd3f99 | ||
|
|
1b56e4a01c | ||
|
|
00bf4bba13 | ||
|
|
b8dd7fb958 | ||
|
|
2d571bf097 | ||
|
|
b889db997a | ||
|
|
848f70e026 | ||
|
|
0e867229db | ||
|
|
7939daa225 | ||
|
|
83a5b8e078 | ||
|
|
d2db5f60a8 | ||
|
|
50aa40da3b | ||
|
|
a88bafe198 | ||
|
|
fc5dfcda65 | ||
|
|
c088ccea32 | ||
|
|
fd2ab6371d | ||
|
|
70c7bcc85f | ||
|
|
ef0907d89e | ||
|
|
c8856182a6 | ||
|
|
7b8a35630c | ||
|
|
9e5af63c2c | ||
|
|
9f3e35ef85 | ||
|
|
1519d0eb95 | ||
|
|
9b979e3cb7 | ||
|
|
c0f46834cb | ||
|
|
f2961b8652 | ||
|
|
c8172d2b49 | ||
|
|
e4c7f584e3 | ||
|
|
4c0b0ef4c2 | ||
|
|
5def2d2600 | ||
|
|
225c17d047 | ||
|
|
ffdee40eb9 | ||
|
|
b67a14c7d6 | ||
|
|
4c424bb760 | ||
|
|
f780af305a | ||
|
|
3f064769ac | ||
|
|
ba3a74576c | ||
|
|
4402c7fb89 | ||
|
|
dbccef8ef5 | ||
|
|
ecf29332f3 | ||
|
|
71afaaa360 | ||
|
|
64a6ff9687 | ||
|
|
b52971d0a2 | ||
|
|
5d9a84dedb | ||
|
|
2916444f6c | ||
|
|
279e6ab304 | ||
|
|
d7cbb598c1 | ||
|
|
bf41056c68 | ||
|
|
8f383e3fa1 | ||
|
|
ec24f223b5 | ||
|
|
cd08690646 | ||
|
|
8f7371cdf0 | ||
|
|
0207f86aa5 | ||
|
|
98708acf57 | ||
|
|
6d130351a0 | ||
|
|
0312d2479d | ||
|
|
277dde5d61 | ||
|
|
b80ee49032 | ||
|
|
58c4144123 | ||
|
|
ca324346e4 | ||
|
|
248c5acff2 | ||
|
|
5471170a97 | ||
|
|
5157981751 | ||
|
|
e99d57802b | ||
|
|
946e72f269 | ||
|
|
a96362e2f9 | ||
|
|
965e3e5140 | ||
|
|
57f99ba7a1 | ||
|
|
bb091c3b8b | ||
|
|
961594afad | ||
|
|
e93cefbbf0 | ||
|
|
4274d9910c | ||
|
|
074c43920a | ||
|
|
0eab5768f7 | ||
|
|
43eb080242 | ||
|
|
b19e0e3cae | ||
|
|
11d2a5538b | ||
|
|
3f9c7db4c1 | ||
|
|
542a72c684 | ||
|
|
a74d008ff2 | ||
|
|
4683ef41be | ||
|
|
acfaec684d | ||
|
|
36b18f0300 | ||
|
|
9c482b9f2a | ||
|
|
d037515e37 | ||
|
|
b62da4bb7a | ||
|
|
890ac81e4d | ||
|
|
75452e6d19 | ||
|
|
ce470b8dd5 | ||
|
|
039130c694 | ||
|
|
20f1bb76cb | ||
|
|
6b4e22ec3c | ||
|
|
b6af1f7e6e | ||
|
|
0d24df9ffc | ||
|
|
6ab47a845e | ||
|
|
a8e16910c0 | ||
|
|
5dfb988cb1 | ||
|
|
7c0de18ac1 | ||
|
|
3cae54c296 | ||
|
|
4fd24f6d8c | ||
|
|
63b3010c2e | ||
|
|
3d5899edf3 | ||
|
|
4cf862f033 | ||
|
|
660faac0f3 | ||
|
|
2a6c21bd03 | ||
|
|
9e33baf0d6 | ||
|
|
87c8659e72 | ||
|
|
6ec038d005 | ||
|
|
9a30e8edc6 | ||
|
|
605dbd61f2 | ||
|
|
c2b171dd73 | ||
|
|
def6403828 | ||
|
|
4b4b2ad1b7 | ||
|
|
58a407d9f1 | ||
|
|
884c6c674d | ||
|
|
0458b7d38f | ||
|
|
3347316d3c | ||
|
|
c1f3a168cd | ||
|
|
0f80ee757f | ||
|
|
9341d5f448 | ||
|
|
def784a5fe | ||
|
|
cc37a7d848 | ||
|
|
55120d5e6d | ||
|
|
24eebfeb61 | ||
|
|
1af74b4c42 | ||
|
|
985a9ed8d3 | ||
|
|
1935de03c7 | ||
|
|
41586b76c0 | ||
|
|
62933e9a26 | ||
|
|
92b7914ef3 | ||
|
|
ec5b304634 | ||
|
|
02781b41ca | ||
|
|
b92980c6ff | ||
|
|
bec6ad9fb3 | ||
|
|
929946ad47 | ||
|
|
d6ba16d357 | ||
|
|
d326f161ef | ||
|
|
a63050bf46 | ||
|
|
811b0d9af4 | ||
|
|
75624376a5 | ||
|
|
9b3b2e600f | ||
|
|
b441c62e1d | ||
|
|
b1f93ccb0c | ||
|
|
e027528545 | ||
|
|
543630e487 | ||
|
|
3e51d2f537 | ||
|
|
e19de25297 | ||
|
|
a1144e1f66 | ||
|
|
9c4a2594b1 | ||
|
|
57f3d0910e | ||
|
|
ee8bc24348 | ||
|
|
20fb12bc7d | ||
|
|
832e288814 | ||
|
|
50769f2f41 | ||
|
|
7587a3d592 | ||
|
|
cfe9d02bc3 | ||
|
|
97f9d8a87e | ||
|
|
8e4fe53968 | ||
|
|
3827903afb | ||
|
|
5e3a2e06d4 | ||
|
|
b183c6e7ac | ||
|
|
2b36135641 | ||
|
|
1820649175 | ||
|
|
a0295821ba | ||
|
|
3427413255 | ||
|
|
0805c693ae | ||
|
|
9b74a632e1 | ||
|
|
a96049d0e6 | ||
|
|
c041fe2165 | ||
|
|
bfd6116e5b | ||
|
|
bb37c2f980 | ||
|
|
707a9e40c0 | ||
|
|
07caf6aeba | ||
|
|
6a82d9e656 | ||
|
|
4bda7fcafc | ||
|
|
0486a18972 | ||
|
|
7b0e0858ca | ||
|
|
03df365eea | ||
|
|
63920930bf | ||
|
|
eb45333685 | ||
|
|
4b6bd2b6eb | ||
|
|
7ed0643b52 | ||
|
|
02b5d9e6f7 | ||
|
|
2f59525967 | ||
|
|
c50006c91b | ||
|
|
79a0b959d1 | ||
|
|
2510ec7015 | ||
|
|
36a72de080 | ||
|
|
b66da3d148 | ||
|
|
ca5fd6ac4c | ||
|
|
6e83e899e2 | ||
|
|
22efbabfa6 | ||
|
|
e547aa8aee | ||
|
|
2281850abf | ||
|
|
806d25ae41 | ||
|
|
a0b4f8b004 | ||
|
|
6787d717f9 | ||
|
|
74710827b2 | ||
|
|
a25facef7c | ||
|
|
0eadef9a7a | ||
|
|
2df33d1df3 | ||
|
|
ef9275d031 | ||
|
|
90c1a38486 | ||
|
|
344263f53c | ||
|
|
504ea85334 | ||
|
|
7f18dfee0d | ||
|
|
3555bd2bd7 | ||
|
|
d9794f942d | ||
|
|
37a261587e | ||
|
|
75a01cbe7e | ||
|
|
6f5103a772 | ||
|
|
af01e544d5 | ||
|
|
4e397107e1 | ||
|
|
832e9ed15a | ||
|
|
f0ff2b3085 | ||
|
|
98586f3b2d | ||
|
|
1f451bf240 | ||
|
|
7e4bce67ba | ||
|
|
af584bc9c0 | ||
|
|
58f315e8d1 | ||
|
|
04349d2e12 | ||
|
|
b789246e8d | ||
|
|
e1b19b831a | ||
|
|
111087dfdc | ||
|
|
66420d0e80 | ||
|
|
70a188c042 | ||
|
|
5e29817910 | ||
|
|
9e629bdb02 | ||
|
|
bfa50b8d1d | ||
|
|
1761df2bc2 | ||
|
|
b0f2db7aaa | ||
|
|
447db1b324 | ||
|
|
c59d216cf5 | ||
|
|
64cd1e0923 | ||
|
|
df883a601b | ||
|
|
bebf2b33ea | ||
|
|
5c58ed8ca7 | ||
|
|
976c8e0752 | ||
|
|
b4f1df03de | ||
|
|
dd2d9f533a | ||
|
|
76e1438fe6 | ||
|
|
31aa8bdf05 | ||
|
|
9b4c929d79 | ||
|
|
fb252706f9 | ||
|
|
f4cdb6b254 | ||
|
|
7ad92c3a4d | ||
|
|
5f6c63948e | ||
|
|
733d1caac6 | ||
|
|
bb5a49eca4 | ||
|
|
07a6bb5664 | ||
|
|
77df19009d | ||
|
|
0b5adc7795 | ||
|
|
0e175ba373 | ||
|
|
40dd6fc61c | ||
|
|
fa3cd267f4 | ||
|
|
ab99c178e1 | ||
|
|
9d83746935 | ||
|
|
417f71a8be | ||
|
|
c70beaa56b | ||
|
|
dc9d9b47b4 | ||
|
|
40334dbe14 | ||
|
|
a49174313f | ||
|
|
98ddb38c00 | ||
|
|
6837312041 | ||
|
|
6c7179d281 | ||
|
|
d5f83d6bbe | ||
|
|
d55cc58b8b | ||
|
|
d70c14a411 | ||
|
|
d7d8e51ab1 | ||
|
|
f829ccc11b | ||
|
|
7c29e286f8 | ||
|
|
82ddf293b6 | ||
|
|
7139a2dd9d | ||
|
|
c9a09adf79 | ||
|
|
e41541ab79 | ||
|
|
b2779e2c08 | ||
|
|
10ac53077e | ||
|
|
145cb628cd | ||
|
|
292571688b | ||
|
|
21183f91a3 | ||
|
|
c39ca4cff8 | ||
|
|
48a6e9e038 | ||
|
|
5d115bcf69 | ||
|
|
aa780ea33b | ||
|
|
5c5663c5ae | ||
|
|
510b1aedcf | ||
|
|
200f4010d8 | ||
|
|
6b7c4cbbe1 | ||
|
|
c66695bd56 | ||
|
|
2f6fe2c65e | ||
|
|
10975112ee | ||
|
|
a0de94ae09 | ||
|
|
fa6bc03765 | ||
|
|
d9cdad6a77 | ||
|
|
11f58c7bda | ||
|
|
bd891ea56a | ||
|
|
ef83a0c15e | ||
|
|
8edce66c08 | ||
|
|
eea6461369 | ||
|
|
a057cfec91 | ||
|
|
f21ec76bc0 | ||
|
|
df729d8889 | ||
|
|
d56cd44ebc | ||
|
|
f1e24bc3e5 | ||
|
|
dfed5bf2c7 | ||
|
|
f563746310 | ||
|
|
ad656e6d35 | ||
|
|
59ab9a4421 | ||
|
|
400b3320aa | ||
|
|
c71488e58b | ||
|
|
ae6c58fb57 | ||
|
|
d8c5ec2aef | ||
|
|
96b8339d21 | ||
|
|
d2813eabbc | ||
|
|
19b8918caf | ||
|
|
4824942369 | ||
|
|
85e0ded573 | ||
|
|
c26e072694 | ||
|
|
7066ec7dab | ||
|
|
6f723490c2 | ||
|
|
3bd3387664 | ||
|
|
b74a0dd5fd | ||
|
|
3bf38d663f | ||
|
|
3402718425 | ||
|
|
f3cf06a219 | ||
|
|
478349174c | ||
|
|
d7cecef0f2 | ||
|
|
cce05a4070 | ||
|
|
ab5545d02d | ||
|
|
395d361d66 | ||
|
|
30bc8b9a32 | ||
|
|
18799c3a7f | ||
|
|
85c3880479 | ||
|
|
0c5bf21f3a | ||
|
|
f363845cbe | ||
|
|
3f5cf0ee18 | ||
|
|
452579150d | ||
|
|
e667d72547 | ||
|
|
4c382f94e1 | ||
|
|
05a537dfb6 | ||
|
|
38b97c5a3c | ||
|
|
e4a2e42caf | ||
|
|
6ac08c3bee | ||
|
|
ea13e18f9e | ||
|
|
16456cf19f | ||
|
|
d0e1b30670 | ||
|
|
b22817c237 | ||
|
|
425192ef84 | ||
|
|
f265e7d86a | ||
|
|
dc246fa44c | ||
|
|
1da648402d | ||
|
|
4a330af4bf | ||
|
|
aa0a369f06 | ||
|
|
d526fcc091 | ||
|
|
5ff85a6586 | ||
|
|
de1db57a9d | ||
|
|
b7b2184fb6 | ||
|
|
d19a8929df | ||
|
|
4474fc8014 | ||
|
|
70636cc59f | ||
|
|
0d3c5bcfa8 | ||
|
|
dad1abd55b | ||
|
|
84a3cbb97a | ||
|
|
d0f01085d8 | ||
|
|
d03d179fa3 | ||
|
|
b0f2e95c7b | ||
|
|
095545e8d9 | ||
|
|
c4f09b8894 | ||
|
|
48477e00fd | ||
|
|
c651f1da45 | ||
|
|
570f9aaa9e | ||
|
|
783cec0d6d | ||
|
|
1711107420 | ||
|
|
db9e068500 | ||
|
|
ee2019ae37 | ||
|
|
f8fead4b90 | ||
|
|
e4f7f2a0b2 | ||
|
|
95b2b1bd17 | ||
|
|
7a1480d362 | ||
|
|
1f3a8b507e | ||
|
|
ca08f814c1 | ||
|
|
9dfc8a9dc8 | ||
|
|
74e9b9bf0a | ||
|
|
954670731d | ||
|
|
18886849eb | ||
|
|
b0bac770e5 | ||
|
|
db6d7d9e21 | ||
|
|
e89c4e9f41 | ||
|
|
e4f5d45c45 | ||
|
|
1f079fac9d | ||
|
|
fea60e2675 | ||
|
|
a086b82f84 | ||
|
|
ba7e754174 | ||
|
|
e5fe629a0e | ||
|
|
3782bc4458 | ||
|
|
659436f1ed | ||
|
|
339d9dbfdf | ||
|
|
55121c5e05 | ||
|
|
160eb194ea | ||
|
|
f011197e00 | ||
|
|
aef9ef2d75 | ||
|
|
6eeb82ec70 | ||
|
|
6d4c5e4b4a | ||
|
|
a3d8da0a73 | ||
|
|
3898cfe02f | ||
|
|
c98f0ba457 | ||
|
|
67b3e3da99 | ||
|
|
cea98ce5cb | ||
|
|
80ce8da7a3 | ||
|
|
3e37185b74 | ||
|
|
5ebe711665 | ||
|
|
71bd69a804 | ||
|
|
8781a19e0e | ||
|
|
2da50f1eca | ||
|
|
0cd030d856 | ||
|
|
2b9f654b8c | ||
|
|
1a8884bbbe | ||
|
|
82560b9126 | ||
|
|
f5e29d6c86 | ||
|
|
8301e24261 | ||
|
|
f72ac3cf45 | ||
|
|
9bc60b8aa5 | ||
|
|
7520a55498 | ||
|
|
dd5976066a | ||
|
|
a3eef35ce6 | ||
|
|
ecce1c2037 | ||
|
|
ef9cf6ef52 | ||
|
|
090a7028d7 | ||
|
|
246fa9748b | ||
|
|
6052d2d8ed | ||
|
|
e85f31f456 | ||
|
|
4a085a8cc0 | ||
|
|
3e381aa5a2 | ||
|
|
ff35229be5 | ||
|
|
6e31de731b | ||
|
|
965e23b711 | ||
|
|
5cb38ece19 | ||
|
|
6aa6ef1f9f | ||
|
|
d834cbf7ba | ||
|
|
52b5a8ece7 | ||
|
|
5992175b68 | ||
|
|
b3dc73e611 | ||
|
|
86cbf7e35f | ||
|
|
2a9c6d9387 | ||
|
|
2dd2ab1003 | ||
|
|
a53fb25cfa | ||
|
|
7e25cc0475 | ||
|
|
0e6ab01a79 | ||
|
|
eb5bab36ca | ||
|
|
80cbc28385 | ||
|
|
2021758403 | ||
|
|
864dc0d989 | ||
|
|
e340a53f7c | ||
|
|
54f9990467 | ||
|
|
876257c312 | ||
|
|
66f6224321 | ||
|
|
1fe17a6918 | ||
|
|
ef3dc8cd61 | ||
|
|
9355f28d6c | ||
|
|
601f3ea75e | ||
|
|
df05980c3a | ||
|
|
1da0959a3a | ||
|
|
4ff9607011 | ||
|
|
035cae656f | ||
|
|
06b37d0e82 | ||
|
|
ba5fb700ba | ||
|
|
e4ec5aa9a9 | ||
|
|
807c77f754 | ||
|
|
bb2a9f9d0e | ||
|
|
c30dcf78cb | ||
|
|
d1c4439a0f | ||
|
|
330b9e7038 | ||
|
|
b35b40e2bf | ||
|
|
f65b29c135 | ||
|
|
2a0a0f12f3 | ||
|
|
470165615f | ||
|
|
30cedd154e | ||
|
|
4e7353f8a0 | ||
|
|
aec4cef5de | ||
|
|
2382a0a4ee | ||
|
|
a2764bc4c2 | ||
|
|
7b784a1dcb | ||
|
|
ff2a268831 | ||
|
|
a28f8c84e4 | ||
|
|
e43e37a14f | ||
|
|
88fc7dbc3e | ||
|
|
353b7a4792 | ||
|
|
c18c401960 | ||
|
|
ef575166c0 | ||
|
|
932d3aab9d | ||
|
|
59517a1fa0 | ||
|
|
51fa6cfb19 | ||
|
|
0b0dbd9649 | ||
|
|
2f72edca6c | ||
|
|
d4fd222251 | ||
|
|
f75e43dcda | ||
|
|
6fd0eef89d | ||
|
|
92d7b907be | ||
|
|
7dbe3b1da9 | ||
|
|
82cac745e3 | ||
|
|
5a79d11389 | ||
|
|
dff7d00d2b | ||
|
|
eaa4b650f8 | ||
|
|
4a46480ef5 | ||
|
|
a36a9fab2f | ||
|
|
0b52c43e05 | ||
|
|
1a1b27d68c | ||
|
|
240371b59d | ||
|
|
ec25869ec6 | ||
|
|
fbb3406c5d | ||
|
|
682f6f838e | ||
|
|
545e41b858 | ||
|
|
94ca528860 | ||
|
|
368fb314fe | ||
|
|
2bf1f848d6 | ||
|
|
ff5d682d49 | ||
|
|
58f789659d | ||
|
|
f3838ee8f2 | ||
|
|
169859b708 | ||
|
|
c224e2b4f6 | ||
|
|
1d6b4cb28a | ||
|
|
a8afa547f0 | ||
|
|
56989ae5af | ||
|
|
e2a7b0943f | ||
|
|
1f1d92d858 | ||
|
|
d86b42b024 | ||
|
|
1a98886aa3 | ||
|
|
7931c548c7 | ||
|
|
b29f325fcf | ||
|
|
b0f0285137 | ||
|
|
3890c67210 | ||
|
|
d110292a1b | ||
|
|
9870cafea3 | ||
|
|
194ed505f4 | ||
|
|
68e333879f | ||
|
|
99cc67d123 | ||
|
|
cc16bb0bef | ||
|
|
c9738aa7ea | ||
|
|
cc95e046e5 | ||
|
|
ab444ce730 | ||
|
|
ce84990414 | ||
|
|
bdb2f85103 | ||
|
|
3da7b9543d | ||
|
|
f10b77f190 | ||
|
|
789fbb6dc3 | ||
|
|
f2aa0ea488 | ||
|
|
b3245fb455 | ||
|
|
d120a391f9 | ||
|
|
4d9016c49f | ||
|
|
becd023032 | ||
|
|
b29d0385e6 | ||
|
|
4dc7d5cd8d | ||
|
|
93554b7e30 | ||
|
|
cedf5fb0ed | ||
|
|
caae7e4171 | ||
|
|
998254d9c6 | ||
|
|
8e68aa86ac | ||
|
|
9b550ae178 | ||
|
|
143c019905 | ||
|
|
9e4e72baee | ||
|
|
169e63d49a | ||
|
|
0ed4b607b2 | ||
|
|
8dcec30d89 | ||
|
|
955c9f4217 | ||
|
|
1d0e9b0a59 | ||
|
|
3c87399fac | ||
|
|
57ba598b15 | ||
|
|
5729bdb2c9 | ||
|
|
592bd6857b | ||
|
|
b568877f22 | ||
|
|
4221bdcc97 | ||
|
|
dec602a27b | ||
|
|
4343f93c00 | ||
|
|
e0abba5cf2 | ||
|
|
553f5b990c | ||
|
|
70b73c73f7 | ||
|
|
1e825e9f1e | ||
|
|
71833f5987 | ||
|
|
b5b97816c8 | ||
|
|
54088f38fb | ||
|
|
6f9e67b1fb | ||
|
|
f7e042d7b8 | ||
|
|
f8403d5020 | ||
|
|
f6dcb2860a | ||
|
|
8fc285c8b3 | ||
|
|
1a016524e0 | ||
|
|
fa290c34fa | ||
|
|
a534f79668 | ||
|
|
0d11fce834 | ||
|
|
88e7d54915 | ||
|
|
b81de35703 | ||
|
|
419c15ee8e | ||
|
|
5581e5da72 | ||
|
|
245ef7a188 | ||
|
|
80b0d91154 | ||
|
|
74af1223de | ||
|
|
bccfa3dbed | ||
|
|
849fe880cd | ||
|
|
b09300ab61 | ||
|
|
b092b6861a | ||
|
|
d3917b6065 | ||
|
|
eb4cfc11cb | ||
|
|
0e4a209dd8 | ||
|
|
17f37cc9e1 | ||
|
|
26df028efe | ||
|
|
be6be3e533 | ||
|
|
449869c37b | ||
|
|
f231864b3f | ||
|
|
c2f76522eb | ||
|
|
8ae05a9651 | ||
|
|
cd72c50356 | ||
|
|
30cf3f2bda | ||
|
|
922fa088b4 | ||
|
|
ef5fd503cd | ||
|
|
b2e9d4cc21 | ||
|
|
2da0a129d1 | ||
|
|
d7b142beb7 | ||
|
|
d19d733f95 | ||
|
|
0734b99d3a | ||
|
|
94353deb75 | ||
|
|
164f3954ee | ||
|
|
2b64cf0ebe | ||
|
|
ab019cac8d | ||
|
|
d855f4b202 | ||
|
|
2ad4dbdae2 | ||
|
|
61a4382bd8 | ||
|
|
cf361e1ed2 | ||
|
|
7ab151dc0d | ||
|
|
2199c525bc | ||
|
|
1c7d9b9d9a | ||
|
|
23af50ad2a | ||
|
|
7ff35f57b4 | ||
|
|
ec4e416a6c | ||
|
|
33e93e9294 | ||
|
|
d410a320d7 | ||
|
|
5a96ae54b9 | ||
|
|
823e5b48e3 | ||
|
|
52de60c49b | ||
|
|
d570df5089 | ||
|
|
002bebd837 | ||
|
|
e48ba06730 | ||
|
|
fe8d34c73b | ||
|
|
b7b16dc632 | ||
|
|
bba8f972a1 | ||
|
|
70de54e97d | ||
|
|
984531411d | ||
|
|
8781f6bcf2 | ||
|
|
199b4dfeb5 | ||
|
|
ec03d1705b | ||
|
|
0156e99894 | ||
|
|
5a31d2c95a | ||
|
|
5e54567558 | ||
|
|
578eb98b33 | ||
|
|
9b4b096e86 | ||
|
|
fe053c8603 | ||
|
|
8e25155fc9 | ||
|
|
3e0fcf5ec2 | ||
|
|
383dfc0c96 | ||
|
|
c4722e3694 | ||
|
|
5c33c1773f | ||
|
|
09f6fe5a52 | ||
|
|
0ea69e2e94 | ||
|
|
267e66abfa | ||
|
|
ecf3b6ab33 | ||
|
|
e5c898e0d6 | ||
|
|
2fc64b8e11 | ||
|
|
b157398da4 | ||
|
|
ae57395562 | ||
|
|
b8b91db007 | ||
|
|
39b4549813 | ||
|
|
6d01bd712d | ||
|
|
667e3c2876 | ||
|
|
0b97ee42cf | ||
|
|
1748f1d451 | ||
|
|
fb561bae1b | ||
|
|
c88656edb4 | ||
|
|
8272408b6e | ||
|
|
651ea92657 | ||
|
|
6cac627117 | ||
|
|
dbcb60433b | ||
|
|
2b7dcfa56d | ||
|
|
081d0e7ec2 | ||
|
|
cf04e5a6e0 | ||
|
|
63259295c6 | ||
|
|
9fe28c9b2c | ||
|
|
05d6c2cd75 | ||
|
|
c26d24e97d | ||
|
|
1371af5f66 | ||
|
|
dd71fdc82f | ||
|
|
d7d212bbe1 | ||
|
|
fd6518182b | ||
|
|
b05d2c50e8 | ||
|
|
16a41242d3 | ||
|
|
a3602ff6b4 | ||
|
|
dd97bbdc82 | ||
|
|
8c75fc0e52 | ||
|
|
46ff62fc87 | ||
|
|
f4447f9c87 | ||
|
|
910a925167 | ||
|
|
d948447600 | ||
|
|
ab8dcbd366 | ||
|
|
880e2d0f72 | ||
|
|
c4475ca946 | ||
|
|
a9bb2eb24c | ||
|
|
a7e9dc1ce4 | ||
|
|
44bdf91715 | ||
|
|
fe50dabf42 | ||
|
|
55feea5d98 | ||
|
|
7c4b47f20d | ||
|
|
8113e6c2f2 | ||
|
|
68aaef2f66 | ||
|
|
a4defb8102 | ||
|
|
e8c60642e6 | ||
|
|
9b90e7aa09 | ||
|
|
56140ae572 | ||
|
|
cea835744c | ||
|
|
5e6b2897ad | ||
|
|
0fbf27895a | ||
|
|
e28dff19ee | ||
|
|
d53654e64f | ||
|
|
d93552c8c5 | ||
|
|
fb58dfa898 | ||
|
|
2e5c32eb62 | ||
|
|
d7e10085b8 | ||
|
|
806157ae40 | ||
|
|
57e540af53 | ||
|
|
15d20497c8 | ||
|
|
a8292ce990 | ||
|
|
4b42a5fd86 | ||
|
|
dc9cbed866 | ||
|
|
fc5f4007a1 | ||
|
|
885a636351 | ||
|
|
11b1a2adac | ||
|
|
b7f7683e5a | ||
|
|
91c505c9c9 | ||
|
|
dfa81bc806 | ||
|
|
eb2124bfc8 | ||
|
|
2120b9af85 | ||
|
|
e830ea6714 | ||
|
|
8a37eeea74 | ||
|
|
919d5b2ef3 | ||
|
|
a1ac3b470b | ||
|
|
d60e98a797 | ||
|
|
0bffac6dc4 | ||
|
|
90542d119a | ||
|
|
884b261df5 | ||
|
|
38a4845c0e | ||
|
|
de356a3185 | ||
|
|
e6ad3ea7d4 | ||
|
|
65e03ca3ba | ||
|
|
68b63927e0 | ||
|
|
043a26eeb5 | ||
|
|
0a1ec514d2 | ||
|
|
8f5fa1d810 | ||
|
|
5f507dd6ed | ||
|
|
938d33941d | ||
|
|
9785e9b298 | ||
|
|
9f9bceb208 | ||
|
|
ef0d395a1a | ||
|
|
4b8cda2070 | ||
|
|
bd8e4cf6aa | ||
|
|
db8c4a5ac4 | ||
|
|
382fcb53fa | ||
|
|
fecf5efa5b | ||
|
|
f069ef9844 | ||
|
|
f32d19fb73 | ||
|
|
a1e9246794 | ||
|
|
24a2fb57ea | ||
|
|
b5b79bc36b | ||
|
|
ffe4e48304 | ||
|
|
0c9f268f99 | ||
|
|
089b882033 | ||
|
|
aa8aa5672b | ||
|
|
82c8cee1ff | ||
|
|
626c0d6d5e | ||
|
|
768df56c07 | ||
|
|
39d9a0f979 | ||
|
|
bf616cbe05 | ||
|
|
2de335e2dc | ||
|
|
ce05c74e47 | ||
|
|
ea58fb0b50 | ||
|
|
b8d63ae6c0 | ||
|
|
9958fcaa6f | ||
|
|
944cd40ef4 | ||
|
|
01188e4bc0 | ||
|
|
c196e79bf4 | ||
|
|
4c2f3aeeac | ||
|
|
a19268c0a3 | ||
|
|
0c76db7973 | ||
|
|
7d5b5cf86a | ||
|
|
88917afa08 | ||
|
|
c7d736376f | ||
|
|
1a6c118a5d | ||
|
|
e096974b2c | ||
|
|
7ec46b3bd6 | ||
|
|
f543461e9b | ||
|
|
8318ebc109 | ||
|
|
270c3db32e | ||
|
|
81d696300c | ||
|
|
8009370f04 | ||
|
|
1096177cce | ||
|
|
ee039c69a8 | ||
|
|
322cca8032 | ||
|
|
6fb8876e5a | ||
|
|
3871da0324 | ||
|
|
4adfe6de70 | ||
|
|
f70ee73747 | ||
|
|
694efca32a | ||
|
|
85bf4b742b | ||
|
|
76f2cc3f1e | ||
|
|
29bede28f0 | ||
|
|
909b489d1f | ||
|
|
421843e693 | ||
|
|
b93df2d6b5 | ||
|
|
f63f28c7fe | ||
|
|
98b2e83bfb | ||
|
|
da4d179d36 | ||
|
|
d1a443f0f0 | ||
|
|
428e16341c | ||
|
|
3917bdfc79 | ||
|
|
a115d4877b | ||
|
|
b8f5e93ab0 | ||
|
|
0bc46facd7 | ||
|
|
c673d283e0 | ||
|
|
12e91f1c1b | ||
|
|
6138d197e4 | ||
|
|
ad095d7fb2 | ||
|
|
7ae405a254 | ||
|
|
6e7fddee7d | ||
|
|
166f2d262d | ||
|
|
31d99bbfe6 | ||
|
|
9641a240ea | ||
|
|
4dc409fc8b | ||
|
|
fa4bb4e80a | ||
|
|
e1e2481e37 | ||
|
|
102deccba7 | ||
|
|
94b69844f2 | ||
|
|
e58d2f428b | ||
|
|
8730add15f | ||
|
|
6e1f825190 | ||
|
|
5af5c23a98 | ||
|
|
d658a833c9 | ||
|
|
cbd0598611 | ||
|
|
6afd0d642a | ||
|
|
1dd462d947 | ||
|
|
e11254a9bf | ||
|
|
1e3384a842 | ||
|
|
072eb740c7 | ||
|
|
58e2b49b1c | ||
|
|
7c2b3b8df0 | ||
|
|
fed1b152d9 | ||
|
|
a9eeb823bd | ||
|
|
60951cf307 | ||
|
|
865c8140d1 | ||
|
|
b57bf6460b | ||
|
|
4993a43025 | ||
|
|
92b5f8d85e | ||
|
|
f5bdfc426f | ||
|
|
fd72977505 | ||
|
|
bb47c69283 | ||
|
|
a8c775dcbd | ||
|
|
50d65e3a9f | ||
|
|
ff0f40ab37 | ||
|
|
cc8e66d079 | ||
|
|
04c05efafe | ||
|
|
afc5ab0242 | ||
|
|
c9bfb6e945 | ||
|
|
04b1535b12 | ||
|
|
983c72c918 | ||
|
|
8ec44615cd | ||
|
|
faddcb28ac | ||
|
|
ce62736e6b | ||
|
|
d73374cc5b | ||
|
|
586ea54bfc | ||
|
|
47089a4d55 | ||
|
|
05fe0d7fcd | ||
|
|
2e6d865c7d | ||
|
|
058b43f342 | ||
|
|
8219ff84c8 | ||
|
|
88515c306f | ||
|
|
676ff84a4e | ||
|
|
defce63a24 | ||
|
|
c722286bcb | ||
|
|
0ba6433a61 | ||
|
|
18981ab0c9 | ||
|
|
853c8a8e07 | ||
|
|
b87eb07b08 | ||
|
|
cfde27820e | ||
|
|
5e856e6923 | ||
|
|
4c5e78a2ce | ||
|
|
2f23b36ca1 | ||
|
|
1758b83604 | ||
|
|
9c2ce0202d | ||
|
|
1a98c4a3ff | ||
|
|
e97fae0c43 | ||
|
|
23e2cbb7f9 | ||
|
|
d390acc888 | ||
|
|
95788c9699 | ||
|
|
508109d5b1 | ||
|
|
c69a1205c0 | ||
|
|
56e749df9f | ||
|
|
1c20bbb287 | ||
|
|
aa4b967e17 | ||
|
|
4ab5674ffb | ||
|
|
84e774ff32 | ||
|
|
e2dbcb2b5a | ||
|
|
113d4d1665 | ||
|
|
0c7cfdb037 | ||
|
|
d9cdaeb851 | ||
|
|
8f97177dae | ||
|
|
a2287fd183 | ||
|
|
587f5a76e6 | ||
|
|
cd099bf3b1 | ||
|
|
86338d1781 | ||
|
|
10e2b128d1 | ||
|
|
65fec95458 | ||
|
|
af56c85057 | ||
|
|
ec59f08e41 | ||
|
|
0080821dc5 | ||
|
|
215ef30abe | ||
|
|
fbdfbed02c | ||
|
|
3b626b75c4 | ||
|
|
c3fe1c963a | ||
|
|
54256773c5 | ||
|
|
1792ff2d3b | ||
|
|
635894cf10 | ||
|
|
b7f1e74f6f | ||
|
|
78a886c206 | ||
|
|
a19627956b | ||
|
|
4e2f4fd48b | ||
|
|
2e4e3737e8 | ||
|
|
236afacfed | ||
|
|
213e0d2870 | ||
|
|
10541e0c53 | ||
|
|
88f771a7f1 | ||
|
|
a88d6425d7 | ||
|
|
c18e7e8816 | ||
|
|
529ae1fa92 | ||
|
|
cfc31e91e8 | ||
|
|
50210d0dd6 | ||
|
|
d89a89f8ea | ||
|
|
8bb7f858d9 | ||
|
|
433b9e6fe1 | ||
|
|
4efb1ba23a | ||
|
|
a52db08cd6 | ||
|
|
04e119d7a6 | ||
|
|
d0e27f67e7 | ||
|
|
3da0aea168 | ||
|
|
9456f7091e | ||
|
|
82f9555c6b | ||
|
|
0994622bf8 | ||
|
|
fed6d71d8a | ||
|
|
e97e202deb | ||
|
|
1fd359d52d | ||
|
|
9bbfeed1bc | ||
|
|
e1ea6e2b53 | ||
|
|
cbfd18be24 | ||
|
|
e23a44bcdf | ||
|
|
3a8608db19 | ||
|
|
c8b0921c51 | ||
|
|
3308775c06 | ||
|
|
f000ca23c3 | ||
|
|
f059ab0042 | ||
|
|
2413c728a8 | ||
|
|
2fb96c8817 | ||
|
|
00390bc8e4 | ||
|
|
006ad4cef8 | ||
|
|
4c056d68d8 | ||
|
|
ac884ec463 | ||
|
|
d2173c1fa4 | ||
|
|
7fe66581f1 | ||
|
|
72ff353e9f | ||
|
|
2e759d5156 | ||
|
|
086fa4385f | ||
|
|
f68c408dbc | ||
|
|
4490477cfb | ||
|
|
7354cb148a | ||
|
|
d99de641e8 | ||
|
|
1e4dd5d095 | ||
|
|
b0442aa56a | ||
|
|
cbc6684ea7 | ||
|
|
e2c31b5f23 | ||
|
|
436f60a784 | ||
|
|
8c07f514c8 | ||
|
|
db73eeba5c | ||
|
|
12ca11e2fa | ||
|
|
402924f6d7 | ||
|
|
6c5b329dd1 | ||
|
|
c7160ad2b9 | ||
|
|
62394abb8b | ||
|
|
aef3592698 | ||
|
|
5931bc4068 | ||
|
|
846204bdb4 | ||
|
|
c52f4644e1 | ||
|
|
aabfc2f0db | ||
|
|
4818b1ba44 | ||
|
|
e6e9b65594 | ||
|
|
2496286374 | ||
|
|
e6b20840a3 | ||
|
|
4e021c123b | ||
|
|
39ebaec064 | ||
|
|
a73d72f243 | ||
|
|
8b0c123aca | ||
|
|
196156a21e | ||
|
|
1d546462dd | ||
|
|
6c069e9a1a | ||
|
|
db23a5222b | ||
|
|
5e4697b62d | ||
|
|
1cffa8c9fc | ||
|
|
3e9ccc186a | ||
|
|
e67ae3665e | ||
|
|
deb309ab7e | ||
|
|
edaa3ae672 | ||
|
|
6f4ce8dc2f | ||
|
|
a6b05bb4da | ||
|
|
d74baea1d3 | ||
|
|
77dfb05647 | ||
|
|
d78f3923ee | ||
|
|
26a9999fbf | ||
|
|
396ea54894 | ||
|
|
b0f2d2310b | ||
|
|
4eaa1d4f46 | ||
|
|
8e33c8090d | ||
|
|
423ffefbf3 | ||
|
|
551d79f1e2 | ||
|
|
c3387cb4e6 | ||
|
|
06c91cdaf2 | ||
|
|
4d31759ff9 | ||
|
|
8a373b25ba | ||
|
|
2446cb5431 | ||
|
|
2af3f010bf | ||
|
|
30d58f77db | ||
|
|
e68ad408af | ||
|
|
0417eb3862 | ||
|
|
17da4f64a7 | ||
|
|
4d72165288 | ||
|
|
a7ccb175e5 | ||
|
|
5ae1b5457b | ||
|
|
fc735eaa4f | ||
|
|
eb4236011b | ||
|
|
50dbe39cda | ||
|
|
cd90dcb1e1 | ||
|
|
e08b92d913 | ||
|
|
550687e084 | ||
|
|
b2b1dcc574 | ||
|
|
81020cea77 | ||
|
|
d4de81ed6d | ||
|
|
9447b2a38b | ||
|
|
5cbad450f3 | ||
|
|
3907c30ee3 | ||
|
|
e357aed3e1 | ||
|
|
abf87a6946 | ||
|
|
f5f062936e | ||
|
|
a6b7c812f2 | ||
|
|
6aa56ce0fa | ||
|
|
0de77fa460 | ||
|
|
3749a7a1d1 | ||
|
|
759315aef5 | ||
|
|
37939e7cbd | ||
|
|
d15792bdf4 | ||
|
|
9b45776941 | ||
|
|
20202871eb | ||
|
|
06f9c1989b | ||
|
|
f1ae0eb7c6 | ||
|
|
f427c8441a | ||
|
|
e335b757fd | ||
|
|
199067e4b8 | ||
|
|
c82ee862af | ||
|
|
f460d2e705 | ||
|
|
996b5e9f87 | ||
|
|
12df7b6ab9 | ||
|
|
59fa5c2fe6 | ||
|
|
2057613ad9 | ||
|
|
2d83efc7e3 | ||
|
|
b054ca8267 | ||
|
|
da0af36086 | ||
|
|
0a47245ba5 | ||
|
|
411d276ed2 | ||
|
|
a8da077613 | ||
|
|
74f0ae5bbb | ||
|
|
ddd101757e | ||
|
|
52c86cb3f5 | ||
|
|
e4ed626912 | ||
|
|
a0a9c8fa0c | ||
|
|
54780ff205 | ||
|
|
feebd4252a | ||
|
|
ff75077b34 | ||
|
|
bb7c164752 | ||
|
|
76af83ce06 | ||
|
|
56a4b7a1fd | ||
|
|
7f7ba6279a | ||
|
|
31f580ad93 | ||
|
|
669a04e304 | ||
|
|
a0e75d0af0 | ||
|
|
1ab3086fca | ||
|
|
be439f6252 | ||
|
|
e76a00845d | ||
|
|
a1c1aa054f | ||
|
|
3715fcdd5f | ||
|
|
d892a89f45 | ||
|
|
8154521a22 | ||
|
|
60a54041c2 | ||
|
|
d3719a01a2 | ||
|
|
aa47575b13 | ||
|
|
919633b2be | ||
|
|
a6ec22d7fe | ||
|
|
5ab8704aee | ||
|
|
ea44e14b60 | ||
|
|
7668702806 | ||
|
|
248150dd41 | ||
|
|
12375be14a | ||
|
|
216bce608d | ||
|
|
915a74a85f | ||
|
|
a99a4be9e0 | ||
|
|
07bbf1a32b | ||
|
|
87368908f6 | ||
|
|
a61543dedc | ||
|
|
f598bf8bef | ||
|
|
8363bee234 | ||
|
|
fe4f71296f | ||
|
|
e2ea5945dd | ||
|
|
5d099d24ee | ||
|
|
8cb28b7bfa | ||
|
|
44302f1aea | ||
|
|
6b2d8a3c34 | ||
|
|
18fc5bec9b | ||
|
|
337eac30c1 | ||
|
|
ca72e5e19f | ||
|
|
dae0828543 | ||
|
|
ae2e40e5e7 | ||
|
|
dc14268ac6 | ||
|
|
e2b96abd0b | ||
|
|
22503da8b4 | ||
|
|
ac7b95df31 | ||
|
|
736800dd66 | ||
|
|
1dc2cae3a5 | ||
|
|
a6c60e4a9a | ||
|
|
7c868888a5 | ||
|
|
13333ffd73 | ||
|
|
ef7a334414 | ||
|
|
4f292d1247 | ||
|
|
01d69e4b58 | ||
|
|
c4d4856997 | ||
|
|
89716a86a5 | ||
|
|
9df4bac202 | ||
|
|
422bdd1ef6 | ||
|
|
761ece3125 | ||
|
|
5b5380659e | ||
|
|
17bd393965 | ||
|
|
e8767122b0 | ||
|
|
d99b0461c7 | ||
|
|
13587fa13e | ||
|
|
6a69f9349b | ||
|
|
9678c2128e | ||
|
|
a5a0995313 | ||
|
|
da3fdbc9f0 | ||
|
|
00d485b2c5 | ||
|
|
a2da0dab7d | ||
|
|
4902df7e3f | ||
|
|
4d7b059eb3 | ||
|
|
ed89852807 | ||
|
|
17a1874e36 | ||
|
|
d975e7f442 | ||
|
|
f942ba543e | ||
|
|
e221c48997 | ||
|
|
65be3107c3 | ||
|
|
00a1fc7996 | ||
|
|
7254b54a04 | ||
|
|
d49d264bec | ||
|
|
2164d93f36 | ||
|
|
67cf3a1e67 | ||
|
|
7b0c6ea940 | ||
|
|
93687997c9 | ||
|
|
0bf6356d9c | ||
|
|
7056edf509 | ||
|
|
6e0918dded | ||
|
|
93b5801592 | ||
|
|
911d5832c6 | ||
|
|
b44143d24d | ||
|
|
b970596310 | ||
|
|
88017f5707 | ||
|
|
b6a8507f57 | ||
|
|
2903518fb1 | ||
|
|
6d81f29835 | ||
|
|
9d193924bd | ||
|
|
ee86b7bcef | ||
|
|
43e59772e4 | ||
|
|
cab944a1a1 | ||
|
|
536afb44c7 | ||
|
|
b642a8fe51 | ||
|
|
7bcd4d74ef | ||
|
|
01a74a8d23 | ||
|
|
d01ba54cb5 | ||
|
|
979bcd3a9b | ||
|
|
da1427ef54 | ||
|
|
18e1e5b780 | ||
|
|
8e70c4a0b7 | ||
|
|
cd5b074a48 | ||
|
|
2448b9ee55 | ||
|
|
6bd112db5e | ||
|
|
aca1c1944d | ||
|
|
141ef91dea | ||
|
|
ce7368d10e | ||
|
|
f01815519a | ||
|
|
78cc976e9f | ||
|
|
1489847a74 | ||
|
|
4df8dcf980 | ||
|
|
2dc721c538 | ||
|
|
a76ddc8b3f | ||
|
|
f194ba6e09 | ||
|
|
fbca800246 | ||
|
|
1d6e760fc8 | ||
|
|
527fa27fb7 | ||
|
|
e3d3d32b4a | ||
|
|
54b03a3552 | ||
|
|
4fa5448aab | ||
|
|
06c2f04927 | ||
|
|
ad3b54b93a | ||
|
|
3d1ae236e1 | ||
|
|
c84e20abaf | ||
|
|
e416ea275e | ||
|
|
e8e7732820 | ||
|
|
fe1b1ede0f | ||
|
|
c3e8a5be62 | ||
|
|
466b6518b2 | ||
|
|
31bde1ae74 | ||
|
|
5decbde79b | ||
|
|
df170769c9 | ||
|
|
80715ec61b | ||
|
|
70743e1f68 | ||
|
|
a663c248f0 | ||
|
|
2f439fed85 | ||
|
|
997bc35d5f | ||
|
|
6bf61c677f | ||
|
|
41063e7cf2 | ||
|
|
75a86cd8e5 | ||
|
|
b5b0eba470 | ||
|
|
d788dc3aee | ||
|
|
90a90e1a3c | ||
|
|
ede23aacc9 | ||
|
|
3740137e31 | ||
|
|
4354820689 | ||
|
|
fc2b9a858b | ||
|
|
219bcb0d54 | ||
|
|
aa924bf010 | ||
|
|
6ee1c79f6f | ||
|
|
17e5279907 | ||
|
|
262d1d5f8c | ||
|
|
0838953ef7 | ||
|
|
f843f8a93d | ||
|
|
3148841ecf | ||
|
|
ed27b44f62 | ||
|
|
ae2ab3276d | ||
|
|
9f0328ab7f | ||
|
|
95fbe0147d | ||
|
|
09e1583798 | ||
|
|
0987f19707 | ||
|
|
8f915bc593 | ||
|
|
3bde8a575e | ||
|
|
e38ad37ce3 | ||
|
|
6e133e5bf6 | ||
|
|
ca3a39b71e | ||
|
|
8d6819c664 | ||
|
|
afefb47598 | ||
|
|
f4a7217f20 | ||
|
|
68656dd29c | ||
|
|
ce58ba5c2f | ||
|
|
ba59c27754 | ||
|
|
9a85e5ef00 | ||
|
|
dfb24a13d9 | ||
|
|
09f645fc9f | ||
|
|
5b97736bb0 | ||
|
|
edf28b59d6 | ||
|
|
0f883b44c0 | ||
|
|
8c2b70c4a7 | ||
|
|
acfdc96121 | ||
|
|
76b95aeec0 | ||
|
|
21e30e43d9 | ||
|
|
4197254209 | ||
|
|
aa5ff36a04 | ||
|
|
2fc74b4962 | ||
|
|
4012aeff90 | ||
|
|
cb576e6c99 | ||
|
|
fce8e08b51 | ||
|
|
e3afa06cf3 | ||
|
|
ae33e40dc8 | ||
|
|
3c9d336148 | ||
|
|
8a1ab35b87 | ||
|
|
447607ecd9 | ||
|
|
1cc8671433 | ||
|
|
7dd2a3b130 | ||
|
|
3c2e0b267f | ||
|
|
ec3402a04b | ||
|
|
656875acb5 | ||
|
|
a1db02cc08 | ||
|
|
269645dfc7 | ||
|
|
cf68039c36 | ||
|
|
2e6ab393df | ||
|
|
10b7712965 | ||
|
|
106d19a8af | ||
|
|
2f4a4f493e | ||
|
|
df59a595de | ||
|
|
aa9d991923 | ||
|
|
de832d90a9 | ||
|
|
292bcae592 | ||
|
|
720a820ee4 | ||
|
|
db76a05d0c | ||
|
|
6b33a755ba | ||
|
|
3aff053828 | ||
|
|
94a1fc19fa | ||
|
|
278bbf184c | ||
|
|
df17de9d48 | ||
|
|
023ef0b0f4 | ||
|
|
6f3231745e | ||
|
|
b420b288ca | ||
|
|
00b96d909c | ||
|
|
71378028f4 | ||
|
|
f05dfdbc81 | ||
|
|
2b1c29316f | ||
|
|
d1a988a0be | ||
|
|
edc2d39702 | ||
|
|
cdb1de7596 | ||
|
|
f8ae4325a0 | ||
|
|
80f78e66bb | ||
|
|
e75dea4f8d | ||
|
|
ef0caa71e2 | ||
|
|
35da94bbc2 | ||
|
|
6116145d8a | ||
|
|
38660418b4 | ||
|
|
664380d304 | ||
|
|
22b4d0c276 | ||
|
|
cb0eb26faa | ||
|
|
f241bfefd0 | ||
|
|
b189e3e394 | ||
|
|
be0d5bee78 | ||
|
|
2062047dea | ||
|
|
32f05aa89f | ||
|
|
eb145faffd | ||
|
|
d1c29bf698 | ||
|
|
3cc312d485 | ||
|
|
4bc2864a6f | ||
|
|
6ab94ddbe7 | ||
|
|
c4b6378751 | ||
|
|
53a04703d6 | ||
|
|
22247271f6 | ||
|
|
e72f0076ed | ||
|
|
3adb43c6e5 | ||
|
|
7df9c25e60 | ||
|
|
a790ef9f7c | ||
|
|
0730f84cf6 | ||
|
|
fec3a89aa5 | ||
|
|
996cb9d3f1 | ||
|
|
0a35d17207 | ||
|
|
9b42177bd5 | ||
|
|
917ef1e01e | ||
|
|
8199ac9f89 | ||
|
|
6cecab4c92 | ||
|
|
7999cb9a46 | ||
|
|
ee8112dde7 | ||
|
|
61031f1633 | ||
|
|
acdfd6ab9e | ||
|
|
0775f7bae0 | ||
|
|
9a13dc92ab | ||
|
|
e6637422d5 | ||
|
|
559232a4d7 | ||
|
|
b0a75da2ac | ||
|
|
e7a45a7f6a | ||
|
|
e7e51d9e4f | ||
|
|
43e70830ed | ||
|
|
1e63b98731 | ||
|
|
a0fe79a113 | ||
|
|
b5e646daa0 | ||
|
|
a5c11dc840 | ||
|
|
4457bc33cd | ||
|
|
e2e76b40da | ||
|
|
36630b9404 | ||
|
|
68257283e4 | ||
|
|
95da2f5d54 | ||
|
|
aa71710a74 | ||
|
|
0e997c973f | ||
|
|
5b4bb56012 | ||
|
|
9abe0940e7 | ||
|
|
5231fbf1e3 | ||
|
|
75da1bac69 | ||
|
|
d9abe553cf | ||
|
|
2bc7f10cd6 | ||
|
|
ea6daeb58b | ||
|
|
1b0b4c9609 | ||
|
|
b9a9997688 | ||
|
|
80f7bce8d8 | ||
|
|
47e325cc66 | ||
|
|
db35db127c | ||
|
|
6d5578a876 | ||
|
|
ac19aba07e | ||
|
|
b7442a0c1a | ||
|
|
e85206dee5 | ||
|
|
b09398a68e | ||
|
|
75d73b188c | ||
|
|
b169f93abc | ||
|
|
4831fb4dcb | ||
|
|
36f279837f | ||
|
|
e07f934185 | ||
|
|
504e1e1ec8 | ||
|
|
0e910616b6 | ||
|
|
967f3f579d | ||
|
|
49624c7b68 | ||
|
|
b9d6122c53 | ||
|
|
5871d59db9 | ||
|
|
a05ebb6c65 | ||
|
|
f7e71d1de2 | ||
|
|
f0dddae6d1 | ||
|
|
597fb11d08 | ||
|
|
8328c04624 | ||
|
|
16b12b33fc | ||
|
|
4d6b20b785 | ||
|
|
1e3c287eee | ||
|
|
9e545e9628 | ||
|
|
42898cd4cc | ||
|
|
ee23e8b3d1 | ||
|
|
7662ddc2fc | ||
|
|
8c65c47b1f | ||
|
|
5c028b30d5 | ||
|
|
f255b94e99 | ||
|
|
f03bdb91a4 | ||
|
|
9e944e4525 | ||
|
|
dfc1ed7d72 | ||
|
|
7dd0f14563 | ||
|
|
68d3a93027 | ||
|
|
35b79818b7 | ||
|
|
dba6d99686 | ||
|
|
0d6a99b35a | ||
|
|
68e50d0c79 | ||
|
|
c1b21db407 | ||
|
|
f9c2bb0410 | ||
|
|
4e1799b2be | ||
|
|
deb91ad7c1 | ||
|
|
6f25d6de24 | ||
|
|
4c0ff38020 | ||
|
|
e6d8b3c4db | ||
|
|
888675016d | ||
|
|
0721e6af42 | ||
|
|
688073dc18 | ||
|
|
dc83dd45fe | ||
|
|
39c8f9a15a | ||
|
|
76db6c9f18 | ||
|
|
7f8c4d7d0f | ||
|
|
ccbcd2b339 | ||
|
|
6c392fad9f | ||
|
|
ec7d48931e | ||
|
|
78c3a1a3a1 | ||
|
|
fc5d96b84b | ||
|
|
75a7122667 | ||
|
|
9827887643 | ||
|
|
60a9268ff5 | ||
|
|
ebe552ead5 | ||
|
|
d951114c18 | ||
|
|
70db9400ad | ||
|
|
214350a8f5 | ||
|
|
a70ccea654 | ||
|
|
53abc326b6 | ||
|
|
9e7230e63a | ||
|
|
67189fa683 | ||
|
|
5c8ead4b62 | ||
|
|
e0449cf17f | ||
|
|
3ab7bac511 | ||
|
|
192a825de8 | ||
|
|
14ed67499e | ||
|
|
15d0e6abc5 | ||
|
|
cd349ab6cc | ||
|
|
017d73792c | ||
|
|
38ccf7ffdd | ||
|
|
a40142460d | ||
|
|
6aeae12775 | ||
|
|
ca80c58853 | ||
|
|
3affcd7f52 | ||
|
|
d3e1a01273 | ||
|
|
17eee4e141 | ||
|
|
b8b32ae2e3 | ||
|
|
520bdac510 | ||
|
|
e8a1f0ba46 | ||
|
|
e9d5b44009 | ||
|
|
c6c07bf9f4 | ||
|
|
f15c6da887 | ||
|
|
e9c7b02049 | ||
|
|
a39dccad19 | ||
|
|
7103d7921e | ||
|
|
696100b9e7 | ||
|
|
f06126c463 | ||
|
|
d1fe6a408c | ||
|
|
910859145f | ||
|
|
4e6ee4d12c | ||
|
|
53238c2b0d | ||
|
|
4ca634b41c | ||
|
|
9d63697d2a | ||
|
|
9cbc5387ef | ||
|
|
aa0db5783a | ||
|
|
0ff4f7e694 | ||
|
|
c7713a8839 | ||
|
|
4bf0e31299 | ||
|
|
47dd53abbe | ||
|
|
30c2ac37d5 | ||
|
|
4737c62394 | ||
|
|
67300f2a4e | ||
|
|
2054ce0aab | ||
|
|
21189048e7 | ||
|
|
106d74184c | ||
|
|
5033c6ea99 | ||
|
|
c0b3219c72 | ||
|
|
29c66b43a3 | ||
|
|
209bd0b3e4 | ||
|
|
b6bdd98599 | ||
|
|
2a3d3b4b50 | ||
|
|
a9b39f3028 | ||
|
|
618c27d63c | ||
|
|
57c2971175 | ||
|
|
8f338a155a | ||
|
|
c3179963ca | ||
|
|
c72e7c1057 | ||
|
|
e7ad91d5a3 | ||
|
|
135358780c | ||
|
|
277fa7dbe1 | ||
|
|
fbbcec2ba3 | ||
|
|
f7b387513f | ||
|
|
e6f294d18d | ||
|
|
86d8fe1285 | ||
|
|
1a57d1864a | ||
|
|
3f69b1fdf5 | ||
|
|
1610926ccd | ||
|
|
427f656bac | ||
|
|
de2558c907 | ||
|
|
50044ed21e | ||
|
|
a4b6388ba1 | ||
|
|
fd3837e1d5 | ||
|
|
6977daf76a | ||
|
|
66d30344f9 | ||
|
|
fbb80b54df | ||
|
|
23d99030bf | ||
|
|
bf34543085 | ||
|
|
a796a321cc | ||
|
|
e5fc1583c7 | ||
|
|
6484fb2a38 | ||
|
|
4b63834868 | ||
|
|
cbd0444cd0 | ||
|
|
fda84995e8 | ||
|
|
1d31603ad2 | ||
|
|
3dce431da2 | ||
|
|
46eedeafe8 | ||
|
|
80702e4c0a | ||
|
|
441042b182 | ||
|
|
6cd53cb471 | ||
|
|
567639397e | ||
|
|
b3d27521cb | ||
|
|
8389db18bf | ||
|
|
9b10c9f6d1 | ||
|
|
e44234a47f | ||
|
|
c962daabac | ||
|
|
d241adc201 | ||
|
|
b520c0ab6b | ||
|
|
4a7e3fb387 | ||
|
|
76e55fcdb1 | ||
|
|
184d52525a | ||
|
|
fd0a46c5cf | ||
|
|
6ce8aa7d6f | ||
|
|
8ac1aab45a | ||
|
|
72606a6fa6 | ||
|
|
9eb3975803 | ||
|
|
277f9d3925 | ||
|
|
b192b6cd50 | ||
|
|
6e0589ce2c | ||
|
|
bf8d510541 | ||
|
|
b378279440 | ||
|
|
fc63008485 | ||
|
|
d38818ff11 | ||
|
|
c260325863 | ||
|
|
f291e1c470 | ||
|
|
46c329848b | ||
|
|
bc7f4f3031 | ||
|
|
4e4045d18a | ||
|
|
5f79b2d0c6 | ||
|
|
6e2aaf7408 | ||
|
|
ee25a412dd | ||
|
|
f2c7b7da7e | ||
|
|
198cf18a78 | ||
|
|
f410ffb0b5 | ||
|
|
52a4863ed8 | ||
|
|
2a1060c0fc | ||
|
|
a95e41644c | ||
|
|
3ff456d8ef | ||
|
|
840408c1d2 | ||
|
|
f67c967d0b | ||
|
|
74ba7b4b51 | ||
|
|
5fa6592d6e | ||
|
|
832c91417a | ||
|
|
a5019e1619 | ||
|
|
c2298c2e6b | ||
|
|
bbd32b9294 | ||
|
|
5d18aad15f | ||
|
|
8f6118a360 | ||
|
|
00758e515a | ||
|
|
4cd82fc2c2 | ||
|
|
379e0083ab | ||
|
|
6c91cb4f90 | ||
|
|
c3d4df2b72 | ||
|
|
29953b46cd | ||
|
|
0b69d0143b | ||
|
|
8ad9a9c9c8 | ||
|
|
6ee286f5f7 | ||
|
|
bef5f2c236 | ||
|
|
28ad50e059 | ||
|
|
be86664e43 | ||
|
|
34e5e5f721 | ||
|
|
ea08c929c0 | ||
|
|
85518c6a54 | ||
|
|
08eaff729f | ||
|
|
0a0797e797 | ||
|
|
afc0cb93b3 | ||
|
|
8cd0956b30 | ||
|
|
07c828d38f | ||
|
|
807eb56807 | ||
|
|
4929ba16c4 | ||
|
|
e1f459d67a | ||
|
|
cff9fa0e6b | ||
|
|
29cb5dd545 | ||
|
|
19ce0b0d89 | ||
|
|
e6846f5c01 | ||
|
|
abeba95de9 | ||
|
|
227daee2de | ||
|
|
5842d1ee41 | ||
|
|
57b532cdd0 | ||
|
|
29618890f4 | ||
|
|
07d121a7a0 | ||
|
|
f306b21d80 | ||
|
|
da72bab33d | ||
|
|
8ccc57e70f | ||
|
|
d3a80795ce | ||
|
|
0dd8db9073 | ||
|
|
d67d83515a | ||
|
|
1562df8f93 | ||
|
|
02d9a41e77 | ||
|
|
83622c62be | ||
|
|
d202003e29 | ||
|
|
a371b27564 | ||
|
|
e54e1fd1e2 | ||
|
|
706dd838c9 | ||
|
|
8487f0fc96 | ||
|
|
3de288ef45 | ||
|
|
9ce50b7bbf | ||
|
|
0bc41f50f5 | ||
|
|
3c54cb5ba9 | ||
|
|
0f11a42fe4 | ||
|
|
c2c69620eb | ||
|
|
c228b04f32 | ||
|
|
5c2ed0f19f | ||
|
|
58229907d4 | ||
|
|
9cd807af1a | ||
|
|
940b56ee3e | ||
|
|
372cb40cf9 | ||
|
|
9648f20a2e | ||
|
|
a9a83a56cd | ||
|
|
59d2943d8d | ||
|
|
40b412728f | ||
|
|
43a6366f1b | ||
|
|
d936898308 | ||
|
|
9928f943a7 | ||
|
|
a71541e6de | ||
|
|
79c9745442 | ||
|
|
0f22beb774 | ||
|
|
05e50e1027 | ||
|
|
b88d66ec71 | ||
|
|
e83122be41 | ||
|
|
821324868a | ||
|
|
9a9887f482 | ||
|
|
d5dc88d66b | ||
|
|
f579fc6b2d | ||
|
|
1f693ca586 | ||
|
|
1be389fd3e | ||
|
|
4572a78618 | ||
|
|
c210b2349d | ||
|
|
0d07ad8c69 | ||
|
|
d9ba06e224 | ||
|
|
10838983b5 | ||
|
|
024cecec29 | ||
|
|
0f8a8869cb | ||
|
|
cff284b2f3 | ||
|
|
9ecc56ad4d | ||
|
|
7951d1a0ed | ||
|
|
3b85a41991 | ||
|
|
d12caab69a | ||
|
|
74e8fb9c19 | ||
|
|
43f3e46aac | ||
|
|
04044df36a | ||
|
|
4f24613de0 | ||
|
|
170ad1a265 | ||
|
|
b7d715f03f | ||
|
|
3aaf9dae11 | ||
|
|
320da17c78 | ||
|
|
e559834379 | ||
|
|
08915d88d0 | ||
|
|
bf591f5f91 | ||
|
|
63bee0c2d0 | ||
|
|
29578a38bd | ||
|
|
7ee6dc7fa6 | ||
|
|
7559437d8b | ||
|
|
bc41b6dfe2 | ||
|
|
d0ee8c0e2d | ||
|
|
1ef899dacc | ||
|
|
4804cc47bd | ||
|
|
47ea9b57e8 | ||
|
|
559478048c | ||
|
|
f75af2af37 | ||
|
|
baa1f3ed2b | ||
|
|
a2611e31fe | ||
|
|
fb88eaf2a4 | ||
|
|
7673aff3ba | ||
|
|
0ada82baa0 | ||
|
|
49d0deea39 | ||
|
|
fbecb1b2d8 | ||
|
|
d7e1a6e4f0 | ||
|
|
1e45e64a9a | ||
|
|
b66ba6c57c | ||
|
|
64721d73b6 | ||
|
|
bab4f5c185 | ||
|
|
92d9eb3c5d | ||
|
|
55070ab907 | ||
|
|
299551f851 | ||
|
|
24c2675705 | ||
|
|
485bbe3336 | ||
|
|
a0fb53d5b1 | ||
|
|
3f3b82ed64 | ||
|
|
942b58efaf | ||
|
|
86c399db70 | ||
|
|
d5bb208957 | ||
|
|
1681445427 | ||
|
|
c8de648924 | ||
|
|
19e60f03b9 | ||
|
|
7ab600781d | ||
|
|
992f292a05 | ||
|
|
eef3824f8c | ||
|
|
1401e9267b | ||
|
|
4a97864d23 | ||
|
|
07d6bbf835 | ||
|
|
842859c394 | ||
|
|
26b8112d4e | ||
|
|
2dbae7b808 | ||
|
|
fd111cb1c6 | ||
|
|
951ea51285 | ||
|
|
4ec664029d | ||
|
|
fc0abe659a | ||
|
|
49afc83a7f | ||
|
|
1f156c1716 | ||
|
|
f7e1927b43 | ||
|
|
4521a5d7e0 | ||
|
|
4836fa8f76 | ||
|
|
87cbbadeed | ||
|
|
8d03f86f45 | ||
|
|
10ccb91515 | ||
|
|
e4ede5aef3 | ||
|
|
b94312162e | ||
|
|
90770a1f23 | ||
|
|
0e5cd3c257 | ||
|
|
24d2e22ceb | ||
|
|
0bc73cfb3f | ||
|
|
498473715e | ||
|
|
ec962f13fa | ||
|
|
afa5ef2913 | ||
|
|
c3d78bf1b4 | ||
|
|
a1ba4aa941 | ||
|
|
c06aedc54d | ||
|
|
3803330701 | ||
|
|
a98e5b7290 | ||
|
|
5ec01b3175 | ||
|
|
a26081d352 | ||
|
|
e61da5d833 | ||
|
|
692dd0b5db | ||
|
|
a12a094172 | ||
|
|
eb70d6eea1 | ||
|
|
977c18513d | ||
|
|
5de0d81dff | ||
|
|
89c80a45c2 | ||
|
|
4a19c14034 | ||
|
|
7ba87d39fb | ||
|
|
868f2e5473 | ||
|
|
cda301f6b7 | ||
|
|
d4fd9bd71e | ||
|
|
290caba160 | ||
|
|
1dca3471db | ||
|
|
b11f71386d | ||
|
|
658330b971 | ||
|
|
38ab06984f | ||
|
|
953f737134 | ||
|
|
a8c5ba2983 | ||
|
|
2801c6e009 | ||
|
|
5233b8c87f | ||
|
|
05c9f57fd4 | ||
|
|
f34e0b1bdb | ||
|
|
3fa19f84e3 | ||
|
|
4723eac227 | ||
|
|
f5569ee890 | ||
|
|
d72e5a3646 | ||
|
|
4230b075c2 | ||
|
|
97eebe164c | ||
|
|
44ab6ad9b7 | ||
|
|
4fb4bc6f6c | ||
|
|
2184eabe2f | ||
|
|
579d350599 | ||
|
|
c01988ba43 | ||
|
|
7dddba3e39 | ||
|
|
fa527ff4eb | ||
|
|
488d68113d | ||
|
|
6f3f0a826f | ||
|
|
56d7fe1bf6 | ||
|
|
767e842c68 | ||
|
|
fbe0b13706 | ||
|
|
febe95cd2e | ||
|
|
f8a6d60fe5 | ||
|
|
2418754d71 | ||
|
|
a8c5661cb7 | ||
|
|
e053308c6f | ||
|
|
5a7c20e897 | ||
|
|
8d00297509 | ||
|
|
5d94c8ddac | ||
|
|
8ba544fba5 | ||
|
|
ad361d6d45 | ||
|
|
4d16540207 | ||
|
|
88e2ee8492 | ||
|
|
439bda053d | ||
|
|
a042c30b28 | ||
|
|
22b85b3aba | ||
|
|
596c092ec8 | ||
|
|
f4e64685e8 | ||
|
|
072fa9987b | ||
|
|
6fef6ac2fb | ||
|
|
c45b40075d | ||
|
|
d5b10a18b7 | ||
|
|
ae3ace7e94 | ||
|
|
e1a6e6e4ab | ||
|
|
b24f244f67 | ||
|
|
b611c5ca53 | ||
|
|
b250485efd | ||
|
|
31c3398b7f | ||
|
|
775cd8ca7d | ||
|
|
c4b95e6509 | ||
|
|
49e6192e62 | ||
|
|
7fcf598c78 | ||
|
|
4126dcff03 | ||
|
|
e4fc52497e | ||
|
|
9a141f8556 | ||
|
|
6b20bad847 | ||
|
|
0f421dc2b4 | ||
|
|
e58743ea5b | ||
|
|
aa573b6dba | ||
|
|
ce067f9130 | ||
|
|
fcbc12ce31 | ||
|
|
aa1c14e508 | ||
|
|
b3e6b95714 | ||
|
|
8f52a34e71 | ||
|
|
a4bbcd866b | ||
|
|
d230883638 | ||
|
|
74992ee53f | ||
|
|
9220a638b5 | ||
|
|
a673afe601 | ||
|
|
f9c510f4fb | ||
|
|
6450154553 | ||
|
|
f75bd1ac44 | ||
|
|
62a0c5be73 | ||
|
|
2dfced366e | ||
|
|
a94a951a89 | ||
|
|
d03f804025 | ||
|
|
7f6ab748c5 | ||
|
|
6d3e43ddaf | ||
|
|
10353d1e1a | ||
|
|
3a649590f1 | ||
|
|
ffedf1fd57 | ||
|
|
1dd62c7daf | ||
|
|
e232a5a444 | ||
|
|
bda915c63a | ||
|
|
a0251a262a | ||
|
|
bd812a0bef | ||
|
|
bc43a052f4 | ||
|
|
3f236b1ebf | ||
|
|
53661e1e4f | ||
|
|
9d3c774163 | ||
|
|
3dea950c24 | ||
|
|
dccddf5c7e | ||
|
|
bdca134e99 | ||
|
|
a42ad74a37 | ||
|
|
b4c97e2279 | ||
|
|
f815d1bed3 | ||
|
|
ac20a1a874 | ||
|
|
d06fb423c0 | ||
|
|
f2fdee0ed2 | ||
|
|
64da0e77d5 | ||
|
|
cd6f5fb8cb | ||
|
|
13f37b2cb9 | ||
|
|
672e81d466 | ||
|
|
9d797f59a1 | ||
|
|
4e43a815d1 | ||
|
|
f15295d4bc | ||
|
|
c3fb559d3b | ||
|
|
d945a0de92 | ||
|
|
2ce4ba99fe | ||
|
|
772d862766 | ||
|
|
d84e50d15c | ||
|
|
373f918543 | ||
|
|
218e49298a | ||
|
|
aea6a8f9ec | ||
|
|
4cec071af5 | ||
|
|
e73c60b526 | ||
|
|
399aea179f | ||
|
|
e1e2c49d93 | ||
|
|
8e9a9637a0 | ||
|
|
a8ffc2fd9a | ||
|
|
58d77a14af | ||
|
|
ccad6d6dde | ||
|
|
56d75c552d | ||
|
|
055a00a338 | ||
|
|
cb6209de31 | ||
|
|
10bacda820 | ||
|
|
fcfea4e6d1 | ||
|
|
68711184b3 | ||
|
|
8d9639cd09 | ||
|
|
87a74e78b6 | ||
|
|
f919f70096 | ||
|
|
c48400331f | ||
|
|
119d0c3938 | ||
|
|
29df2c9115 | ||
|
|
70091eceed | ||
|
|
9f1959ffc8 | ||
|
|
105a53b333 | ||
|
|
14c31b451c | ||
|
|
3c86507ce6 | ||
|
|
3321d865d7 | ||
|
|
b3901e059d | ||
|
|
053afe21dd | ||
|
|
c39fcce9f1 | ||
|
|
e73a132ed9 | ||
|
|
77cb9032a5 | ||
|
|
32441d9ee3 | ||
|
|
13917cebdc | ||
|
|
06d9f99d05 | ||
|
|
dbae39b7b9 | ||
|
|
94b42021bd | ||
|
|
d076ffe73b | ||
|
|
f591e2b1b1 | ||
|
|
6011c98515 | ||
|
|
39a92df647 | ||
|
|
1878647d26 | ||
|
|
d714a52f95 | ||
|
|
7622d3b2fb | ||
|
|
00ead9d262 | ||
|
|
7d7f1bf9ed | ||
|
|
daf40ed573 | ||
|
|
5fd8b1efcb | ||
|
|
39151d7a74 | ||
|
|
8b116259f9 | ||
|
|
5362d10c0d | ||
|
|
3ab4782d93 | ||
|
|
4abbbd963e | ||
|
|
9a5670787f | ||
|
|
809e3ce4d5 | ||
|
|
b602e04fc8 | ||
|
|
ea97491a8f | ||
|
|
02c4c21c0a | ||
|
|
06abcbd4e9 | ||
|
|
bf0b5c0666 | ||
|
|
a250ba5f56 | ||
|
|
d7edcdd03c | ||
|
|
2374aa351e | ||
|
|
e66aabea85 | ||
|
|
5b8ff63981 | ||
|
|
6780b20968 | ||
|
|
94249b7926 | ||
|
|
412be59f78 | ||
|
|
ddbd6c371d | ||
|
|
4d8df737f3 | ||
|
|
9270b2c54c | ||
|
|
32653c1b94 | ||
|
|
227b616ca3 | ||
|
|
ed98227303 | ||
|
|
562bdbc9f5 | ||
|
|
f2d361d29b | ||
|
|
acb2c57f47 | ||
|
|
47c37855b1 | ||
|
|
d4413d370e | ||
|
|
2566df8252 | ||
|
|
9be75ed019 | ||
|
|
c6bd1a7d7d | ||
|
|
49fc8129ac | ||
|
|
73852beb4e | ||
|
|
160f8c3085 | ||
|
|
caba4836b3 | ||
|
|
819dc44533 | ||
|
|
22a815a1b4 | ||
|
|
8225b06018 | ||
|
|
0f6cb52376 | ||
|
|
e0cbcadd98 | ||
|
|
6dbb3efc89 | ||
|
|
2525a6e3a4 | ||
|
|
c0a8752ef4 | ||
|
|
e701ea0b2f | ||
|
|
9674bdef54 | ||
|
|
e232c1c408 | ||
|
|
da64d4d398 | ||
|
|
fafe71ec52 | ||
|
|
1b1bab94ca | ||
|
|
81d76f8600 | ||
|
|
41f6d70eaf | ||
|
|
f43b3ebda4 | ||
|
|
6a79a80320 | ||
|
|
6bfd534a36 | ||
|
|
9d72f1df62 | ||
|
|
94a180a775 | ||
|
|
9c1895a03a | ||
|
|
846e827e09 | ||
|
|
0bac99028e | ||
|
|
d95ac3bbdd | ||
|
|
4ecd657f34 | ||
|
|
7bccaff28a | ||
|
|
58c25a68a8 | ||
|
|
79714f7ede | ||
|
|
d5120ae7cc | ||
|
|
d09a3628c5 | ||
|
|
d18c8e3a14 | ||
|
|
3a40d5a4f1 | ||
|
|
6cc3ef0c99 | ||
|
|
6014314610 | ||
|
|
c3e5e0dd3f | ||
|
|
751aa2a2aa | ||
|
|
972a31ebe9 | ||
|
|
4349eac7ea | ||
|
|
9671810d13 | ||
|
|
2c6672d17a | ||
|
|
b28ba7a5ff | ||
|
|
32a3f74ea1 | ||
|
|
4d134a4a4e | ||
|
|
25dcb10c1d | ||
|
|
0548e9cc4e | ||
|
|
64b932f78c | ||
|
|
97f71d33ce | ||
|
|
29a8c8105e | ||
|
|
14fb01da11 | ||
|
|
9154843c1b | ||
|
|
dcae6e644d | ||
|
|
0f89fa2b11 | ||
|
|
5c233a41b3 | ||
|
|
93ab224614 | ||
|
|
c4ff1f983c | ||
|
|
232cacab80 | ||
|
|
635abe58be | ||
|
|
65b956b011 | ||
|
|
8b4a43ec77 | ||
|
|
c9cce66d98 | ||
|
|
52666ea971 | ||
|
|
fd008f88b1 | ||
|
|
2248429eda | ||
|
|
3e77fed815 | ||
|
|
8e615a83e5 | ||
|
|
785b2d46b3 | ||
|
|
163ee094ec | ||
|
|
5446ff667a | ||
|
|
df9121d6fa | ||
|
|
1b3af1df07 | ||
|
|
f00f3101d9 | ||
|
|
51b9802de4 | ||
|
|
4c4aeba855 | ||
|
|
d23aa8ef3c | ||
|
|
e9853f3cd7 | ||
|
|
1d291ee0e8 | ||
|
|
b813144edb | ||
|
|
c8c78dc9cf | ||
|
|
c4f0433805 | ||
|
|
e57f834434 | ||
|
|
370be70e46 | ||
|
|
4907f9581f | ||
|
|
27c056d377 | ||
|
|
febd23fe41 | ||
|
|
728dd3f7b3 | ||
|
|
7aad6683fa | ||
|
|
c27a1c1705 | ||
|
|
598e559563 | ||
|
|
afe5c6b296 | ||
|
|
c04c62e62c | ||
|
|
f023d6485f | ||
|
|
67c513a9c1 | ||
|
|
522fb4cf7a | ||
|
|
d3176ec0ed | ||
|
|
1f2f03c287 | ||
|
|
70f70c884c | ||
|
|
088a948e5a | ||
|
|
2c4e8926f8 | ||
|
|
f46ce68d08 | ||
|
|
f1961b0207 | ||
|
|
154425e2bc | ||
|
|
47a444b2ab | ||
|
|
4705a87548 | ||
|
|
8a24f2fc91 | ||
|
|
c21300f0fa | ||
|
|
e11db44b6d | ||
|
|
1338237d7c | ||
|
|
b5c815367c | ||
|
|
5669f734b8 | ||
|
|
e71f216f16 | ||
|
|
191f69ec79 | ||
|
|
76999cf41e | ||
|
|
3557e4eb37 | ||
|
|
337897e0a1 | ||
|
|
ed5ac9c617 | ||
|
|
ac92e23b59 | ||
|
|
cfde9e2ec5 | ||
|
|
ba7ca3da6e | ||
|
|
6544175cf2 | ||
|
|
26098082d0 | ||
|
|
ed0ffd6f5a | ||
|
|
08449a2d4f | ||
|
|
6653e2dbe7 | ||
|
|
a736f3782c | ||
|
|
78bf209119 | ||
|
|
f0ea610401 | ||
|
|
41ddaf5d9b | ||
|
|
79867a85d0 | ||
|
|
4d375bcf95 | ||
|
|
e91c2c6e77 | ||
|
|
e65ae08e5c | ||
|
|
b7a6a71dff | ||
|
|
1596760d21 | ||
|
|
7a6fcc744a | ||
|
|
9f6f874655 | ||
|
|
81b01cd055 | ||
|
|
703b8708e3 | ||
|
|
a463759ba3 | ||
|
|
565bcf2332 | ||
|
|
a636d27ccb | ||
|
|
a99ac7fb6b | ||
|
|
2f138c0c37 | ||
|
|
efc22a4cd8 | ||
|
|
baf1acb4fd | ||
|
|
902169cb66 | ||
|
|
e1a5a90f0a | ||
|
|
dfb9ae234c | ||
|
|
cdfbed5d08 | ||
|
|
51eb3726dc | ||
|
|
bfb628dab6 | ||
|
|
b8284447fd | ||
|
|
e26cb0f238 | ||
|
|
a7813c37a1 | ||
|
|
1db907e2af | ||
|
|
f5bffeb535 | ||
|
|
b7af046147 | ||
|
|
300c91fd7f | ||
|
|
7c7626e445 | ||
|
|
ba8deb29c9 | ||
|
|
cbfb7df05e | ||
|
|
ef721bebc6 | ||
|
|
a797c45e3b | ||
|
|
101afeeb73 | ||
|
|
1e39805945 | ||
|
|
e48d65120d | ||
|
|
3396dfc7f6 | ||
|
|
d86503cb66 | ||
|
|
7ab7149e64 | ||
|
|
c1652169f2 | ||
|
|
d8aa572ad7 | ||
|
|
34a123759f | ||
|
|
9a1309256d | ||
|
|
3f6f1ac86f | ||
|
|
91be05932e | ||
|
|
cf0ee36150 | ||
|
|
792e12e6c5 | ||
|
|
c433829d27 | ||
|
|
480b08bd0b | ||
|
|
1ca40c0d9d | ||
|
|
b631db1d60 | ||
|
|
66693c5268 | ||
|
|
9bb60e8d2c | ||
|
|
5a8b844c49 | ||
|
|
d5fe7b8b9c | ||
|
|
6ebafe1a87 | ||
|
|
9f28795159 | ||
|
|
5c46095fa3 | ||
|
|
636fbb476c | ||
|
|
f96fd895e3 | ||
|
|
86d195fa81 | ||
|
|
056b76a831 | ||
|
|
71cff4032c | ||
|
|
44aa601848 | ||
|
|
ff734bb5d9 | ||
|
|
afd17feffe | ||
|
|
a251f0df51 | ||
|
|
f97bab6fb8 | ||
|
|
081be37787 | ||
|
|
1c15cfa722 | ||
|
|
286095f5cd | ||
|
|
05728075d6 | ||
|
|
8ceb494569 | ||
|
|
b1c552ee9d | ||
|
|
c082505021 | ||
|
|
d9a1be48cf | ||
|
|
cfaf4902f2 | ||
|
|
64d4a08dc6 | ||
|
|
43897d913e | ||
|
|
3ffbb800d2 | ||
|
|
8353e1d462 | ||
|
|
2999d0b37a | ||
|
|
0fe39d4e4b | ||
|
|
134f13c63f | ||
|
|
1dfb0cac4e |
2
.github/CONTRIBUTING.md
vendored
@@ -6,7 +6,7 @@ Bug reports and feature requests
|
||||
|
||||
<a name="not-a-support-forum"></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
|
||||
107
.travis.yml
@@ -2,10 +2,34 @@
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||
|
||||
# We use dist: precise to have php 5.3 available
|
||||
dist: precise
|
||||
sudo: required
|
||||
|
||||
language: php
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
postgresql: '9.3'
|
||||
apt:
|
||||
sources:
|
||||
# To use the last version of pgloader, we add repo of postgresql
|
||||
- postgresql
|
||||
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
|
||||
- key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
- apache2
|
||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
||||
- libapache2-mod-fastcgi
|
||||
# We need pgloader for import mysql database into pgsql
|
||||
- pgloader
|
||||
|
||||
php:
|
||||
- '5.3'
|
||||
- '5.4'
|
||||
@@ -13,24 +37,9 @@ php:
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
#- hhvm only with dist: trusty
|
||||
- nightly
|
||||
|
||||
addons:
|
||||
mariadb: '10.0'
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#postgresql: '9.3'
|
||||
apt:
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
- apache2
|
||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
||||
- libapache2-mod-fastcgi
|
||||
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
|
||||
env:
|
||||
global:
|
||||
# Set to true for very verbose output
|
||||
@@ -39,8 +48,7 @@ env:
|
||||
# MariaDB overrides MySQL installation so it's not possible to test both yet
|
||||
#- DB=mysql
|
||||
- DB=mariadb
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#- DB=postgresql
|
||||
- DB=postgresql
|
||||
# TODO
|
||||
#- DB=sqlite
|
||||
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
|
||||
@@ -51,12 +59,22 @@ env:
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: 7.1
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
# FIXME
|
||||
#- env: DB=postgresql
|
||||
# TODO
|
||||
#- env: DB=sqlite
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.4'
|
||||
env: DB=postgresql
|
||||
- php: '5.5'
|
||||
env: DB=postgresql
|
||||
- php: '5.6'
|
||||
env: DB=postgresql
|
||||
- php: '7.0'
|
||||
env: DB=postgresql
|
||||
- php: hhvm
|
||||
env: DB=postgresql
|
||||
- php: nightly
|
||||
env: DB=postgresql
|
||||
|
||||
notifications:
|
||||
email:
|
||||
@@ -77,6 +95,13 @@ before_install:
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
echo
|
||||
fi
|
||||
|
||||
install:
|
||||
- |
|
||||
echo "Updating Composer"
|
||||
@@ -132,10 +157,10 @@ before_script:
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
echo
|
||||
echo "Enabling APC for PHP <= 5.4"
|
||||
#echo
|
||||
#echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly!
|
||||
@@ -164,16 +189,19 @@ before_script:
|
||||
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
# FIXME: find a way to import a MySQL dump into PostgreSQL
|
||||
#if [ "$DB" = 'postgresql' ]; then
|
||||
# pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo
|
||||
|
||||
@@ -190,10 +218,9 @@ before_script:
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
fi
|
||||
# FIXME
|
||||
#if [ "$DB" = 'postgresql' ]; then
|
||||
# echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
#fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
fi
|
||||
# TODO: SQLite
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
@@ -252,8 +279,6 @@ script:
|
||||
set +e
|
||||
echo
|
||||
|
||||
# TODO: dev/* checks
|
||||
|
||||
- |
|
||||
echo "Checking coding style"
|
||||
# Ensure we catch errors
|
||||
@@ -267,8 +292,6 @@ script:
|
||||
|
||||
# TODO: Check CSS (csslint?)
|
||||
|
||||
# TODO: check SQL syntax (pgsanity?)
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors
|
||||
@@ -292,6 +315,12 @@ script:
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
|
||||
30
.tx/config
@@ -224,6 +224,18 @@ source_file = htdocs/langs/en_US/members.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.modulebuilder]
|
||||
file_filter = htdocs/langs/<lang>/modulebuilder.lang
|
||||
source_file = htdocs/langs/en_US/modulebuilder.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.multicurrency]
|
||||
file_filter = htdocs/langs/<lang>/multicurrency.lang
|
||||
source_file = htdocs/langs/en_US/multicurrency.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.oauth]
|
||||
file_filter = htdocs/langs/<lang>/oauth.lang
|
||||
source_file = htdocs/langs/en_US/oauth.lang
|
||||
@@ -326,6 +338,12 @@ source_file = htdocs/langs/en_US/stocks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.stripe]
|
||||
file_filter = htdocs/langs/<lang>/stripe.lang
|
||||
source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
@@ -350,18 +368,18 @@ source_file = htdocs/langs/en_US/users.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.withdrawals]
|
||||
file_filter = htdocs/langs/<lang>/withdrawals.lang
|
||||
source_file = htdocs/langs/en_US/withdrawals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.website]
|
||||
file_filter = htdocs/langs/<lang>/website.lang
|
||||
source_file = htdocs/langs/en_US/website.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.withdrawals]
|
||||
file_filter = htdocs/langs/<lang>/withdrawals.lang
|
||||
source_file = htdocs/langs/en_US/withdrawals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.workflow]
|
||||
file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
|
||||
148
COPYRIGHT
@@ -14,23 +14,24 @@ Component Version License GPL Compatible
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.5.8 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services
|
||||
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
TCPDF 6.2.12 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP
|
||||
Stripe 4.7.0 MIT licence Yes Library for Stripe module
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.11.3 MIT License Yes JS library
|
||||
@@ -44,147 +45,20 @@ jQuery JCrop 0.9.8 GPL and MIT License Yes
|
||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||
jQuery jNotify 1.1.00 Apache Software License 2.0 Yes JS library plugin jNotify (to use ajax popups)
|
||||
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for color picker with not defined list of colors
|
||||
jQuery Layout 1.4.3 GPL and MIT License Yes JS library plugin Layout
|
||||
jQuery Mobile 1.3.0 GPL and MIT License Yes JS library for smartphone (not used)
|
||||
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for filetree
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
||||
jsGanttImproved 1.7.5.2 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
|
||||
For licenses compatibility informations:
|
||||
http://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Copyright
|
||||
---------
|
||||
|
||||
Copyright (C) 2016
|
||||
|
||||
Copyright (C) 2015
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
|
||||
Copyright (C) 2014
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
- Jean-François Ferry <jfefe@aternatik.fr>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Florian Henry <florian.henry@open-concept.pro>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
|
||||
Copyright (C) 2013
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Jean-François Ferry <jfefe@aternatik.fr>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Florian Henry <florian.henry@open-concept.pro>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Adolfo Segura <adolfo.segura@gmail.com>
|
||||
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
|
||||
Copyright (C) 2012
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Jean-François Ferry <jfefe@aternatik.fr>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Jean Heimburger <jean@tiaris.info>
|
||||
- Florian Henry <florian.henry@open-concept.pro>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Nicolas Péré <nicolas@amarok2.net>
|
||||
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
|
||||
Copyright (C) 2011
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Philippe Grand <philippe.grand@atoo-net.com>
|
||||
- Jean Heimburger <jean@tiaris.info>
|
||||
|
||||
Copyright (C) 2010
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- r2gnl
|
||||
- meos
|
||||
|
||||
Copyright (C) 2009
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
|
||||
Copyright (C) 2008
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
|
||||
Copyright (C) 2007
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Auguria SARL <info@auguria.org>
|
||||
- Jean Heimburger <jean@tiaris.info>
|
||||
- Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
|
||||
Copyright (C) 2006
|
||||
- Auguria SARL <info@auguria.org>
|
||||
- Marc Barilley/Ocebo <marc@ocebo.com>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
- Andre Cianfarani <acianfa@free.fr>
|
||||
- Yannick Warnier <ywarnier@beeznest.org>
|
||||
- Jean Heimburger <jean@tiaris.info>
|
||||
|
||||
Copyright (C) 2005
|
||||
- Brice Davoleau <brice.davoleau@gmail.com>
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Benoit Mortier <benoit.mortier@opensides.be>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Eric Seigne <erics@rycks.com>
|
||||
- Matthieu Valleton <mv@seeschloss.org>
|
||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||
|
||||
Copyright (C) 2004
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Eric Seigne <erics@rycks.com>
|
||||
- Benoit Mortier <benoit.mortier@opensides.be>
|
||||
- Christophe Combelles <ccomb@free.fr>
|
||||
- Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
|
||||
Copyright (C) 2003
|
||||
- Jean-Louis Bergamo <jlb@j1b.org>
|
||||
- Xavier Dutoit <doli@sydesy.com>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
- Emmanuel Raviart <eraviart@entrouvert.com>
|
||||
- Eric Seigne <erics@rycks.com>
|
||||
|
||||
Copyright (C) 2002
|
||||
- Jean-Louis Bergamo <jlb@j1b.org>
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
|
||||
Copyright (C) 2001
|
||||
- Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
|
||||
|
||||
|
||||
|
||||
Copyright / Authors
|
||||
-------------------
|
||||
|
||||
See page https://github.com/Dolibarr/dolibarr/graphs/contributors
|
||||
|
||||
490
ChangeLog
@@ -2,8 +2,436 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 6.0.4 compared to 6.0.3 *****
|
||||
FIX: #7737
|
||||
FIX: #7751
|
||||
FIX: #7756 Add better error message
|
||||
FIX: #7786
|
||||
FIX: #7806
|
||||
FIX: #7824
|
||||
FIX: add line bad price and ref
|
||||
FIX: A lot of several fix on local taxes and NPR tax
|
||||
FIX: createfromorder
|
||||
FIX: CSS for IE10
|
||||
FIX: external user cannot be set as internal
|
||||
FIX: Filter type on actioncomm with multiselect doesn't work
|
||||
FIX: list of donation not filtered on multicompany
|
||||
FIX: list of module not complete when module mb_strlen not available
|
||||
FIX: Locatax were not propagated when cloning order or proposal
|
||||
FIX: Searching translation should not be case sensitive
|
||||
FIX: Search into language is ok for file into external modules two.
|
||||
FIX: test for filter fk_status
|
||||
FIX: too much users on holiday list
|
||||
FIX: Wrong alias sql
|
||||
|
||||
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
|
||||
FIX: #7211 Update qty dispatched on qty change
|
||||
FIX: #7458
|
||||
FIX: #7593
|
||||
FIX: #7616
|
||||
FIX: #7619
|
||||
FIX: #7626
|
||||
FIX: #7648
|
||||
FIX: #7675
|
||||
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
|
||||
FIX: API to get object does not return data of linked objects
|
||||
FIX: Bad localtax apply
|
||||
FIX: Bad ressource list in popup in gantt view
|
||||
FIX: bankentries search conciliated if val 0
|
||||
FIX: hook formObjectOptions() must use $expe and not $object
|
||||
FIX: make of link to other object during creation
|
||||
FIX: Missing function getLinesArray
|
||||
FIX: old batch not shown in multi shipping
|
||||
FIX: paid supplier invoices are shown as abandoned
|
||||
FIX: selection of thirdparty was lost on stats page of invoices
|
||||
FIX: sql syntax error because of old field accountancy_journal
|
||||
FIX: Stats on invoices show nothing
|
||||
FIX: substitution in ODT of thirdparties documents
|
||||
FIX: wrong key in selectarray
|
||||
FIX: wrong personnal project time spent
|
||||
|
||||
***** ChangeLog for 6.0.2 compared to 6.0.1 *****
|
||||
FIX: #7148
|
||||
FIX: #7288
|
||||
FIX: #7366 renaming table with pgsql
|
||||
FIX: #7435 Can't add payment term
|
||||
FIX: #7461
|
||||
FIX: #7464
|
||||
FIX: #7471
|
||||
FIX: #7473 Mass update of vat rates and other bugs on localtax
|
||||
FIX: #7475
|
||||
FIX: #7486 Empty value for multicurrency rate must be forbidden
|
||||
FIX: #7490
|
||||
FIX: #7505
|
||||
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
|
||||
FIX: #7514
|
||||
FIX: #7531 #7537
|
||||
FIX: #7541
|
||||
FIX: #7546
|
||||
FIX: #7550
|
||||
FIX: #7554
|
||||
FIX: #7567
|
||||
FIX: Accountancy export model for Agiris Isacompta
|
||||
FIX: Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled
|
||||
FIX: Bad preview on scroping when special file names
|
||||
FIX: Generation of invoice from bulk action "Bill Orders"
|
||||
FIX: Implementation of a Luracast recommandation for the REST api server (#7370)
|
||||
FIX: Missing space in request
|
||||
FIX: Only modified values must be modified
|
||||
FIX: replenish if line test GETPOST on line 0
|
||||
FIX: Stripe not working on live mode
|
||||
FIX: wrong basePath in the swagger view
|
||||
FIX: Implementation of a Luracast recommandation for the REST api server
|
||||
|
||||
***** ChangeLog for 6.0.1 compared to 6.0.* *****
|
||||
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
|
||||
FIX: #7325 Default VAT rate when editing template invoices is 0%
|
||||
FIX: #7330
|
||||
FIX: #7359
|
||||
FIX: #7367
|
||||
FIX: #7368
|
||||
FIX: #7391
|
||||
FIX: #7420
|
||||
FIX: Add some missing attributes in Adherent:makeSubstitution (type, phone…
|
||||
FIX: Bad const name
|
||||
FIX: Bad link to unpayed suppliers invoices
|
||||
FIX: Better protection to no send email when we change limit
|
||||
FIX: Calculation in the activity box
|
||||
FIX: Clean bad parameters when inserting line of template invoice
|
||||
FIX: dateSelector was not taken into account
|
||||
FIX: hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
|
||||
FIX: journalization for bank journal should not rely on a label.
|
||||
FIX: menu enty when url is external link
|
||||
FIX: missing supplier qty and supplier discount in available fields for product export.
|
||||
FIX: multicompany better accuracy in rounding and with revenue stamp.
|
||||
FIX: Must use pdf format page as default for merging PDF.
|
||||
FIX: PDF output was sharing 2 different currencies in same total
|
||||
FIX: Position of signature on strato template
|
||||
FIX: Protection to avoid to apply credit note discount > remain to pay
|
||||
FIX: Remove warning when using log into syslog
|
||||
FIX: Responsive
|
||||
FIX: Security fixes (filter onload js, less verbose error message in
|
||||
FIX: SEPA recording payment must save one payment in bank per customer
|
||||
FIX: Several problem with the last event box on project/tasks
|
||||
FIX: Sign of amount in origin currency on credit note created from lines
|
||||
FIX: Some page of admin were not responsive
|
||||
FIX: SQL injection
|
||||
FIX: time.php crashed without project id in param
|
||||
FIX: transfer of line extrafields from order to invoice
|
||||
FIX: Upgrade missing on field
|
||||
FIX: View of timespent for another user
|
||||
FIX: ODT generation
|
||||
FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-14241,
|
||||
CVE-2017-14242
|
||||
|
||||
***** ChangeLog for 6.0.0 compared to 5.0.* *****
|
||||
NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
|
||||
NEW: Add a payment module for Stripe.
|
||||
NEW: Add module "Product variant" (like red, blue for the product shoes)
|
||||
NEW: Accountancy - Activate multi-journal & Add journal_label to database (FEC)
|
||||
NEW: Add a tracking id into mass emailing.
|
||||
NEW: Tax system more compatible with the new tax rollout in India (IGST / CGST / SGST).
|
||||
NEW: Add calculation function for Loan schedule
|
||||
NEW: Add "depends on" and "required by" into module informations
|
||||
NEW: Add hidden option THIRDPARTY_INCLUDE_PARENT_IN_LINKTO
|
||||
NEW: Add key __USERID__ and __ENTITYID__ as key for dynamic filters.
|
||||
NEW: Add last activation author and ip of modules
|
||||
NEW: Add mass actions (pdf merge and delete) for interventions
|
||||
NEW: Add module resources import/export
|
||||
NEW: Add option PROJECT_THIRDPARTY_REQUIRED
|
||||
NEW: Add page statistics for project tasks
|
||||
NEW: add property to show warnings when activating modules
|
||||
NEW: add rapport file for supplier paiement
|
||||
NEW: Add statistics on supplier tab.
|
||||
NEW: Add tooltip help on shipment weight and volume calculation
|
||||
NEW: An external module can hook and add mass actions.
|
||||
NEW: Better reponsive design
|
||||
NEW: Bookmarks are into a combo list.
|
||||
NEW: Bulk actions available on supplier orders
|
||||
NEW: Can add a background image on login page
|
||||
NEW: Can change customer from POS
|
||||
NEW: Can clone expense report on another user
|
||||
NEW: Can control constants values into file integrity checker
|
||||
NEW: Can define default values for create forms.
|
||||
NEW: Can define default filters for list pages.
|
||||
NEW: Can define default sort order for list pages.
|
||||
NEW: Can deploy an external module from the module setup area.
|
||||
NEW: Can disable all overwrote translations in one click.
|
||||
NEW: Can edit background color for odd and even lines in tables
|
||||
NEW: Can filter on code in dictionnaries
|
||||
NEW: Can filter on year and product tags on the product statistic page
|
||||
NEW: Can import users
|
||||
NEW: Can read time spent of others (hierarchy only or all if granted)
|
||||
NEW: Can send an email to a user from its card.
|
||||
NEW: Can send email to multiple destinaries from the mailform combo list.
|
||||
NEW: Can set margins of PDFs
|
||||
NEW: Can set number of dump to keep with job "local database backup"
|
||||
NEW: Can sort customer balance summary on date.
|
||||
NEW: Can sort thumbs visible on product card.
|
||||
NEW: Can use a credit note into a "down payment/deposit".
|
||||
NEW: Can use dol_fiche_end without showing bottom border.
|
||||
NEW: Can use translations into all substitutions (watermark, freetext...)
|
||||
NEW: Change to allow a specific numbering rule for invoice with POS module.
|
||||
NEW: convert exceiss received to reduc
|
||||
NEW: custom dir is enabled dy default on first install.
|
||||
NEW: Description of feature of a module visible into a dedicated popup.
|
||||
NEW: Direct open of card after a search if one record only found.
|
||||
NEW: download button
|
||||
NEW: Enable bulk actions delete on supplier invoices.
|
||||
NEW: Extrafields support formulas to be computed using PHP expressions.
|
||||
NEW: Feature to crop/resize images available on user and expense reports.
|
||||
NEW: Filechecker can include custom dir and report added files.
|
||||
NEW: fix listview class and add a demo for product list
|
||||
NEW: [FP17] Accountancy - Add select field in list of accounts
|
||||
NEW: get amount base on hourly rate for ficheinter
|
||||
NEW: hidden Easter egg to display commitstrip strip on login page
|
||||
NEW: Include an hourglass icon when we click on online payment button
|
||||
NEW: Index upload files into database.
|
||||
NEW: Introduce mass action on product list ('delete' for the moment)
|
||||
NEW: Introduce mass actions on contacts
|
||||
NEW: Introduce option MAIN_HTTP_CONTENT_SECURITY_POLICY
|
||||
NEW: It's easier to switch between sandbox and live for paypal
|
||||
NEW: Mass action delete available on project and tasks
|
||||
NEW: Move login information on home page into a widget
|
||||
NEW: new demo entry page
|
||||
NEW: No external check of version without explicit click in about page.
|
||||
NEW: ODT docs for USER USERGROUP CONTRACT and PRODUCT class
|
||||
NEW: odt usergroup
|
||||
NEW: On invoices generated by template, we save if invoice come from a source template.
|
||||
NEW: option to copy into attachement files of events, files send by mail (with auto event creation)
|
||||
NEW: PDF with numbertoword
|
||||
NEW: Permit multiple file upload in linked documents
|
||||
NEW: PHP 7.1 compatibility
|
||||
NEW: Reduce memory usage by removing deprecated constant loading.
|
||||
NEW: Report page and menu for suppliers paiements
|
||||
NEW: Show by default README.md file found into root dir of ext module.
|
||||
NEW: Show company into combo list of projects
|
||||
NEW: show files in the bank statement + download
|
||||
NEW: Show local taxes in facture list
|
||||
NEW: Show local taxes in supplier facture list
|
||||
NEW: Small PDF template for products
|
||||
NEW: Option SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT
|
||||
NEW: The substitution keys available for emailing edition are now visible into a popup.
|
||||
NEW: Uniformize behaviour: Action to make order is an action button.
|
||||
NEW: Use autocompletion on the "Add widget list".
|
||||
NEW: Use html5 type "number" on select field for year and duration.
|
||||
NEW: Can use pdktk to concat mass pdf because tcpdf generate avoid to split large file into multiple smaller file (all have same size) encounter issue with mailer provider virtual delivery service
|
||||
NEW: Default theme of v6 is cleaner.
|
||||
NEW: When down payment is entered, discount to reuse into final invoice is automatically created. This save one click into invoice workflow.
|
||||
NEW: Add UI to configure MEMBER_NEWFORM_FORCETYPE
|
||||
NEW: #2763 Go to document block after clicking in Generate document button
|
||||
NEW: #6280: Generate PDF after creating an invoice from a customer order
|
||||
NEW: #6915 Simplest change.
|
||||
NEW: Uniformize the look and feel with v6 new look.
|
||||
|
||||
For developers:
|
||||
NEW: Add a lot of API REST: dictionaryevents, memberstypes, ...
|
||||
NEW: Big refactorization of multicompany transverse mode.
|
||||
NEW: getEntity function use true $shared value by default.
|
||||
NEW: Add font-awesome css.
|
||||
NEW: Add function ajax_autoselect
|
||||
NEW: Add function dolMd2Html
|
||||
NEW: Add hook doUpgrade2
|
||||
NEW: Add hook "formatNotificationMessage"
|
||||
NEW: Add index and constraints keys on supplier proposal detail table
|
||||
NEW: Add phpunit to check the engine is defined into sql create files.
|
||||
NEW: Add project and Hook to Loan
|
||||
NEW: Add REST API to push a file.
|
||||
NEW: Allow extrafields list select to be dependands on other standard list and not only other extrafields list
|
||||
NEW: Architecture to manage search criteria persistance (using save_lastsearch_values=1 on exit links and restore_lastsearch_values=1 in entry links)
|
||||
NEW: data files are now also parsed by phpunit for sql syntax
|
||||
NEW: Hook to allow inserting custom product head #6001
|
||||
NEW: Introduce fields that can be computed during export in export profiles.
|
||||
NEW: Introduce function dol_compress_dir
|
||||
NEW: Removed commande_pdf_create, contract_pdf_create,expedition_pdf_create, facture_pdf_create, delivery_order_pdf_create, task_pdf_create, project_pdf_create, propale_pdf_create, supplier_invoice_pdf_create, supplier_order_pdf_create, supplier_proposal_pdf_create deprecated functions
|
||||
NEW: tooltip can be on hover or on click with textwithpicto function.
|
||||
NEW: Upgrade jquery to 3.3.1 and jquery-ui to 1.12
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regression for some external modules, but were necessary to make Dolibarr better:
|
||||
* The hook getNodeList has been replaced by a normalized 'addreplace' hook getDirList.
|
||||
* The trigger USER_SETINGROUP and USER_REMOVEFROMGROUP has been replaced with trigger USER_MODIFY.
|
||||
* The page societe/soc.php was renamed into societe/card.php to match page naming conventions.
|
||||
* The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions.
|
||||
* The signature of method ->delete() of class Product and PriceExpression was changed from
|
||||
->delete(id, notrigger) to ->delete(User, notrigger) to match standard dev rules.
|
||||
* The signature of method ->delete() of class Adherent was changed from
|
||||
->delete(id) to ->delete(id, User, notrigger) to match standard dev rules.
|
||||
* Removed CommonObject::displayMarginInfos (was deprecated in 3.8). Use same method into
|
||||
html.formmargin.class.php
|
||||
* Removed Societe::set_commnucation_level (was deprecated in 4.0). Was not used.
|
||||
* Removed the trigger file of PAYPAL module that stored data that was not used by Dolibarr. The trigger event still
|
||||
exists, but if an external module need action on it, it must provides itself its trigger file.
|
||||
* Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode. So, if you set var
|
||||
$multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into
|
||||
the Home - setup - other admin page.
|
||||
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
|
||||
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
|
||||
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
|
||||
* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output
|
||||
content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow
|
||||
hook specifications so you must return output into "resprint".
|
||||
|
||||
|
||||
***** ChangeLog for 5.0.7 compared to 5.0.6 *****
|
||||
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
|
||||
FIX: #7148
|
||||
FIX: #7325 Default VAT rate when editing template invoices is 0%
|
||||
FIX: #7366 renaming table with pgsql
|
||||
FIX: #7391
|
||||
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
|
||||
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
|
||||
FIX: Bad link to unpayed suppliers invoices
|
||||
FIX: bankentries search conciliated if val 0
|
||||
FIX: multicompany better accuracy in rounding and with revenue stamp.
|
||||
FIX: PDF output was sharing 2 different currencies in same total
|
||||
FIX: Upgrade missing on field
|
||||
FIX: wrong key in selectarray
|
||||
FIX: wrong personnal project time spent
|
||||
|
||||
***** ChangeLog for 5.0.6 compared to 5.0.5 *****
|
||||
FIX: Removed a bad symbolic link into custom directory.
|
||||
FIX: Renaming a resource ref rename also the directory of attached files.
|
||||
|
||||
***** ChangeLog for 5.0.5 compared to 5.0.4 *****
|
||||
FIX: #7075 : bad path for document
|
||||
FIX: #7156
|
||||
FIX: #7173
|
||||
FIX: #7224
|
||||
FIX: #7226
|
||||
FIX: #7239
|
||||
FIX: add supplierproposaldet without price (new product)
|
||||
FIX: amount overlap other amount when a pagebreak is done due to an image at the bottom of page.
|
||||
FIX: Bad tax calculation with expense report
|
||||
FIX: Best buy price calculation
|
||||
FIX: Buying prices must always be in positive value.
|
||||
FIX: calculate correct remain to pay for planned bank transactions
|
||||
FIX: delete linked element on facture rec
|
||||
FIX: edit sociale was emptying label
|
||||
FIX: Error when updating thirdparty not returned
|
||||
FIX: holidays with postgresql like on rowid integer
|
||||
FIX: id of user not saved when making a payment of expense report
|
||||
FIX: invoice page list
|
||||
FIX: invoice situation VAT total rounding into PDF crabe
|
||||
FIX: PgSQL compatibility.
|
||||
FIX: remove order rights on invoice page
|
||||
FIX: status were wrong on product referent list
|
||||
FIX: supplier id was not passed to hooks
|
||||
FIX: Support of vat code when using price per customer
|
||||
FIX: User id correction on holiday request
|
||||
FIX: value of user id filled to 0 in llx_bank_url when recording an expense report.
|
||||
FIX: we have to check if contact doesn't already exist on add_contact() function
|
||||
FIX: We should be able to insert data with value '0' into const
|
||||
FIX: install process with DoliWamp
|
||||
|
||||
***** ChangeLog for 5.0.4 compared to 5.0.3 *****
|
||||
FIX: #5640 Prices of a predefined product/service were incorrect under certain circumstances
|
||||
FIX: #6541 since 4.0.4 to 5.0.0 autofill zip/town not working
|
||||
FIX: #6880 #6925
|
||||
FIX: #6885
|
||||
FIX: #6926
|
||||
FIX: #7003
|
||||
FIX: #7012
|
||||
FIX: #7040
|
||||
FIX: #7048 #6075
|
||||
FIX: Can set supplier invoice to billed.
|
||||
FIX: Can't create invoice if PO disapproved
|
||||
FIX: contratligne update
|
||||
FIX: CVE-2017-7886
|
||||
FIX: default param
|
||||
FIX: Line of invoices not inserted when using POS module and VAT NPR.
|
||||
FIX: origin & originid on supplierproposal
|
||||
FIX: Redirect to payment page from member subscription page failed if a unique security key was defined.
|
||||
FIX: REST api to get project when user has permission to read all.
|
||||
FIX: situation_progress param default value must be 100 and not 0
|
||||
FIX: SQL injection on user/index.php parameter search_statut.
|
||||
FIX: vat code not saved during product creation.
|
||||
FIX: Warnings
|
||||
|
||||
***** ChangeLog for 5.0.3 compared to 5.0.2 *****
|
||||
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
|
||||
FIX: #6813
|
||||
FIX: 6863
|
||||
FIX: #6877
|
||||
FIX: #6881
|
||||
FIX: Better sanitizing of search all parameter.
|
||||
FIX: Correction with author and validator user on orders
|
||||
FIX: dialog window with md theme must not be hidden by left menu part.
|
||||
FIX: doactions hook missing in invoice model page
|
||||
FIX: Fullname when member is a moral entity with no name.
|
||||
FIX: Link to files on bank account tab broken with multicompany FIX: Link to preview on thirdparty broken with multicompany
|
||||
FIX: New vat code not correctly implemented if "1 price per customer".
|
||||
FIX: Pagination of invoices
|
||||
FIX: pagination on resources
|
||||
FIX: REST API not possible to add agendaevents
|
||||
FIX: situation invoice broken due to the all percent application form inside addline form
|
||||
FIX: SQL injection on user/index.php parameter search_statut.
|
||||
FIX: XSS
|
||||
|
||||
***** ChangeLog for 5.0.2 compared to 5.0.1 *****
|
||||
FIX: #6468 + Fix missing translation
|
||||
FIX: #6517 #6525 Autocompletion of thirdparty after n chars not implemented
|
||||
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
|
||||
FIX: #6614
|
||||
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
|
||||
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
|
||||
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
|
||||
FIX: #6636 Complete fix
|
||||
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
|
||||
FIX: #6671 Cannot remove thirdparty type with "#" in its name
|
||||
FIX: #6673 Missing "nature" table header in thirdparty list
|
||||
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
|
||||
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
|
||||
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
|
||||
FIX: #6718 Bug: Discount amount is not locally formatted in CommonObject View
|
||||
FIX: #6767 serious critical error, no login possible with postgresql and ipv6.
|
||||
FIX: #6795 #6796
|
||||
FIX: Add option MAIN_MAIL_USE_MULTI_PART to include text content into HTML email and add option MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS to restore the inline images feature.
|
||||
FIX: ajax autocomplete on clone
|
||||
FIX: A non admin user can not download files attached to user.
|
||||
FIX: Can't download delivery receipts (function dol_check_secure_access_document)
|
||||
FIX: complete hourly rate when not defined into table of time spent
|
||||
FIX: dont get empty "Incoterms : - " string if no incoterm
|
||||
FIX: dont lose supplier ref if no supplier price in database
|
||||
FIX: Enter a direct bank transaction
|
||||
FIX: extrafield css for boolean type
|
||||
FIX: forgotten parameter for right multicompany use
|
||||
FIX: Found duplicate line when it is not.
|
||||
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
|
||||
FIX: Journal code of bank must be visible of accountaing module on.
|
||||
FIX: length_accounta return variable name
|
||||
FIX: limit+1 dosn't show Total line
|
||||
FIX: No filter on company when showing the link to elements.
|
||||
FIX: overwrapping of weight/volume on rouget template
|
||||
FIX: Several bugs in accounting module.
|
||||
FIX: shared bank account with multicompany not visible in invoice setup
|
||||
FIX: spaces not allowed into vat code
|
||||
FIX: supplier default condition not retrieved on create
|
||||
FIX: supplier order line were always created with rang = 0
|
||||
|
||||
***** ChangeLog for 5.0.1 compared to 5.0.0 *****
|
||||
FIX: #6503: SQL error in "Last pending payment invoices"
|
||||
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
|
||||
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
|
||||
FIX: #6533 #6590
|
||||
FIX: #6535
|
||||
FIX: bank account not visible on payment card
|
||||
FIX: colspan
|
||||
FIX: Data lost during merge of thirdparties
|
||||
FIX: Detection of color brightness
|
||||
FIX: Filter on date lost after submit on time spent page
|
||||
FIX: forgottent fk_unit field on llx_supplier_propaldet
|
||||
FIX: list of projects
|
||||
FIX: LOG_ERROR does not exists. Use LOG_ERR.
|
||||
FIX: Missing total on project overview.
|
||||
FIX: multicurrency management on supplier order/invoice
|
||||
FIX: Notification sending was broken.
|
||||
FIX: origin & origin id on supplier order line
|
||||
FIX: param php doc
|
||||
FIX: Picto of project on dol_banner and box
|
||||
FIX: Some errors when downloading files.
|
||||
|
||||
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
||||
For users:
|
||||
NEW: Add module mulicurrency.
|
||||
@@ -153,9 +581,67 @@ Dolibarr better:
|
||||
- Method commande->set_availability(user, availability_id) removed from commande class, use method commande->availability(availability_id, notrigger).
|
||||
|
||||
Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
|
||||
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
|
||||
feedback to confirm whole application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
|
||||
|
||||
|
||||
***** ChangeLog for 4.0.6 to 4.0.5 *****
|
||||
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
|
||||
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
|
||||
FIX: #6636 Complete fix
|
||||
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
|
||||
FIX: #6671 Cannot remove thirdparty type with "#" in its name
|
||||
FIX: #6673 Missing "nature" table header in thirdparty list
|
||||
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
|
||||
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
|
||||
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
|
||||
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
|
||||
FIX: #6813
|
||||
FIX: Correction with author and validator user on orders
|
||||
FIX: doactions hook missing in invoice model page
|
||||
FIX: dont get empty "Incoterms : - " string if no incoterm
|
||||
FIX: dont lose supplier ref if no supplier price in database
|
||||
FIX: forgotten parameter for right multicompany use
|
||||
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
|
||||
FIX: limit+1 dosn't show Total line
|
||||
FIX: supplier order line were always created with rang = 0
|
||||
|
||||
|
||||
***** ChangeLog for 4.0.5 to 4.0.4 *****
|
||||
FIX: #6234
|
||||
FIX: #6259
|
||||
FIX: #6330
|
||||
FIX: #6360
|
||||
FIX: #6411
|
||||
FIX: #6443
|
||||
FIX: #6444
|
||||
FIX: #6453
|
||||
FIX: #6503: SQL error in "Last pending payment invoices"
|
||||
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
|
||||
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
|
||||
FIX: #6533 #6590
|
||||
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
|
||||
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
|
||||
FIX: add entity param to document link
|
||||
FIX: Can use quote into supplier ref on order line add
|
||||
FIX: Change the customer code only if error on duplicate
|
||||
FIX: Creation of credit note on invoice with deposit stole the discount.
|
||||
FIX: delete bank class lines when we delete bank_categ
|
||||
FIX: deletion of bank tag
|
||||
FIX: detail of deposit and credit not was not visible into final invoice
|
||||
FIX: Error management during bank account creation
|
||||
FIX: error management in bank account deletion.
|
||||
FIX: event status is not modified when assign an user
|
||||
FIX: forgotten fk_facture_fourn attribute on supplierinvoice line object
|
||||
FIX: If bank module on, field must be required to register payment of expense report.
|
||||
FIX: load multicurrency informations on supplier order and bill lines fetch
|
||||
FIX: Missing total on project overview.
|
||||
FIX: multicurrency_subprice
|
||||
FIX: param billed when we change page
|
||||
FIX: protection against infinite loop on hierarchy
|
||||
FIX: Supplier Order list filter by project
|
||||
FIX: the dolCopyDir fails if target dir does not exists.
|
||||
FIX: use param for http links
|
||||
|
||||
***** ChangeLog for 4.0.4 to 4.0.3 *****
|
||||
FIX: #6227 Document models table header "Unit" is shown in 2 lines in Spanish
|
||||
FIX: #6230
|
||||
@@ -343,7 +829,7 @@ NEW: Disabled users are striked.
|
||||
NEW: Enhance navigation of project module
|
||||
NEW: fichinter lines ordered by rang AND DATE
|
||||
NEW: hidden conf to use input file multiple from mail form
|
||||
NEW: hidden feature: SUPPLIERORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
||||
NEW: hidden feature: SUPPLIER_ORDER_WITH_NOPRICEDEFINED allow supplier order even if no supplier price defined
|
||||
NEW: Hidden option MAIN_LANDING_PAGE to choose the first page to show after login works as a "global" option (llx_const) and as a "per user" option (llx_user_param).
|
||||
NEW: Holiday is a now a RH module. All RH module provides by default visilibity on users of its hierarchy.
|
||||
NEW: If error is reported during migration process, you can ignore it to avoid to be locked.
|
||||
|
||||
50
README-FR.md
@@ -98,34 +98,58 @@ Voir fichier ChangeLog.
|
||||
- Rapports
|
||||
- Imports/Exports des données
|
||||
- Connectivité LDAP
|
||||
- De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...)
|
||||
- Intégratn de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégation Skype
|
||||
- Intégration de système de paiements (Paypal, Strip, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers:
|
||||
|
||||
- Application multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multi-devise.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Peux-être multi-devise par ajout du module externe multi-devise.
|
||||
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
|
||||
- Application simple à utiliser.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Code simple et facilement personnalisable.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- …
|
||||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
|
||||
- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie).
|
||||
- Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise).
|
||||
- Dolibarr ne contient pas de module de Gestion de la paie.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle.
|
||||
- Dolibarr ne contient pas de Webmail.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Les documentations utilisateur, développeur et traducteur sont disponible sous forme de ressources de la communautés via la site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
Voir le fichier [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
|
||||
|
||||
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
|
||||
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
53
README.md
@@ -12,6 +12,7 @@ You can use it as a standalone application or as a web application to be able to
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
@@ -20,12 +21,23 @@ See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) fil
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
|
||||
|
||||
|
||||
## INSTALLING
|
||||
|
||||
### Download
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Install from composer
|
||||
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
|
||||
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
mv composer.phar /usr/local/bin/composer
|
||||
|
||||
On Windows, you'll download and run https://getcomposer.org/Composer-Setup.exe
|
||||
|
||||
composer create-project dolibarr/dolibarr erp
|
||||
|
||||
### Simple setup
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
|
||||
@@ -57,6 +69,7 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
|
||||
## UPGRADING
|
||||
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
@@ -65,13 +78,15 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
|
||||
|
||||
*Note: migration process can safely be done multiple times by calling the page /install/index.php*
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main modules (all optional)
|
||||
### Main application/modules (all optional)
|
||||
|
||||
- Customers, Prospects and/or Suppliers directory
|
||||
- Products and/or Services catalog
|
||||
@@ -81,14 +96,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Standing orders management (European SEPA)
|
||||
- Bank accounts management
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
|
||||
- Opportunities and/or project management
|
||||
- Projects management
|
||||
- Contracts management
|
||||
- Stock management
|
||||
- Shipping management
|
||||
- Interventions management
|
||||
- Employee's leave requests management
|
||||
- Expense report management
|
||||
- Expense reports
|
||||
- Timesheets
|
||||
- Electronic Document Management (EDM)
|
||||
- Foundations members management
|
||||
- Mass emailing
|
||||
@@ -96,7 +112,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Point of Sale
|
||||
- …
|
||||
|
||||
### Other modules
|
||||
### Other application/modules
|
||||
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
@@ -109,56 +125,63 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- ClickToDial integration
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Payment platforms integration (PayBox, PayPal)
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Other general features
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Localization in most major languages
|
||||
- Can manage several companies by adding external module multi-company.
|
||||
- Can manage several currencies by adding external module multi-currency.
|
||||
- Very user friendly and easy to use
|
||||
|
||||
- Localization in most major languages.
|
||||
- Multi-Users and groups with finely grained rights.
|
||||
- Multi-currency.
|
||||
- Multi-company by adding of an external module.
|
||||
- Very user friendly and easy to use.
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
|
||||
- APIs.
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support for country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- …
|
||||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## FUTURE
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Double-entry bookkeeping yet (only bank and treasury management)
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Webmail
|
||||
- No native embedded Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
See file [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine libraries.
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
|
||||
@@ -152,7 +152,7 @@ tag 729538 -moreinfo
|
||||
|
||||
|
||||
|
||||
##### Testing a package into unstable env
|
||||
##### Testing a package into a chroot environment
|
||||
|
||||
Check you have a mysql server available from another interface than "localhost".
|
||||
Set line in /etc/mysql/my.cnf if required and restart mysql
|
||||
@@ -160,9 +160,11 @@ Set line in /etc/mysql/my.cnf if required and restart mysql
|
||||
[mysqld]
|
||||
bind-address = *
|
||||
|
||||
Create a chroot called "unstable-amd64-sbuild".
|
||||
Create a chroot called "jessie" or "unstable".
|
||||
Chroot env is stored into /srv/chroot directory.
|
||||
> sudo sbuild-createchroot --keyring=unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
|
||||
or
|
||||
> sudo sbuild-createchroot jessie /srv/chroot/jessie http://ftp.uk.debian.org/debian
|
||||
|
||||
Pour lister les env chroot
|
||||
> schroot -l
|
||||
@@ -170,8 +172,9 @@ or
|
||||
> ls /srv/chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot
|
||||
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> apt-get install vim dialog
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
> apt-get update
|
||||
> apt-get upgrade
|
||||
@@ -320,8 +323,8 @@ x.y.z+dfsgw
|
||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||
|
||||
* Update/fix debian/* files used to build package.
|
||||
At least, add an entry into debian/changelog
|
||||
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
|
||||
At least, add an entry into debian/changelog with command
|
||||
> dch -v x.y.z+dfsgw-1 "My comment"
|
||||
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
|
||||
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
Then check/modify also the user/date signature:
|
||||
@@ -332,23 +335,27 @@ Then check/modify also the user/date signature:
|
||||
To update dolibarr debian package when only files into debian has changed:
|
||||
|
||||
* Change files and commit.
|
||||
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
|
||||
* Add a line into changelog for version debian/x.y.z+dfsgw-v (increase the last v into 2, 3...)
|
||||
> dch -v x.y.z+dfsgw-v "My comment"
|
||||
* git tag will be added when package is pushed.
|
||||
|
||||
|
||||
To update dolibarr debian package when only files not into debian has changed:
|
||||
|
||||
* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* Update the debian/changelog to add entry of change.
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
|
||||
* Try to build package
|
||||
> rm -fr ../build-area;
|
||||
> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
|
||||
> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
@@ -381,13 +388,14 @@ http://packages.qa.debian.org
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
##### Send an unblock request
|
||||
|
||||
##### Send an unblock request to make a full update of a stable package
|
||||
|
||||
Use this to move from unstable to testing.
|
||||
|
||||
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
|
||||
Choose package "release.debian.org"
|
||||
Then "unblock"
|
||||
Then usertag "unblock"
|
||||
Then name of package "dolibarr"
|
||||
Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
@@ -397,11 +405,11 @@ so it is a better solution to validate this maintenance release than applying a
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
|
||||
Use this to request an update of a stable package
|
||||
Use this to request an full update of a stable package
|
||||
|
||||
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
|
||||
Choose package "release.debian.org"
|
||||
Then "unblock"
|
||||
Then usertag "unblock"
|
||||
Then name of package "dolibarr"
|
||||
Fill message, for example:
|
||||
"
|
||||
@@ -413,11 +421,27 @@ Pro are:
|
||||
- It fixes also stability bugs
|
||||
- Patches were already tested because deployed and used by several thousands of users.
|
||||
- It is easier for package maintener to include this official set of fixes than applying one patch after one patch for each debian report or backported each patch into a dedicated version.
|
||||
- Debian maintenance version matches with official project maintenance version (better when all fixes are not related to the way the software is packaged)
|
||||
- Debian maintenance version is inline with official project maintenance version (better when all fixes are not related to the way the software is packaged)
|
||||
Cons are:
|
||||
- The patch include more than the only one security reported fxes
|
||||
- The patch include more than the only one security reported fixes
|
||||
|
||||
So I just need to know if it's ok to push such a version 3.5.7 (fixes for 3.5.* branch) instead of only one fix for only the few (the only) reported debian bugs,
|
||||
since it provides more stability and is for me a more secured process.
|
||||
"
|
||||
|
||||
##### Send an request to ask a simple fix of a stable package
|
||||
|
||||
Use this to ask to apply patches on a stable version.
|
||||
|
||||
reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls
|
||||
Choose package "release.debian.org"
|
||||
Then usertag "jessie-pu" (if tags is not available in list, choose another one, and change it later into email content text)
|
||||
Then name of package "dolibarr"
|
||||
Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
A security error CVE-2015-3935 was reported and is fixed into package 3.5.7.
|
||||
Note that package 3.5.7 contains not only fixed for bugs reported to debian. It includes other fixes, but they are all related to stability or security,
|
||||
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
Note: If there is a response to ask more information, don't forget to remove the tag during answer.
|
||||
|
||||
@@ -10,12 +10,13 @@ Build-Depends: debhelper (>= 9), po-debconf
|
||||
|
||||
Package: dolibarr
|
||||
Architecture: all
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-cli,
|
||||
# For debian 7 or 8 or 9
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5 | libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php,
|
||||
php5-cli | php-cli,
|
||||
# Required PHP extensions
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
|
||||
php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf,
|
||||
# libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
@@ -30,7 +31,9 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: apache2 | lighttpd | httpd,
|
||||
mariadb-server | virtual-mysql-server
|
||||
mariadb-server | virtual-mysql-server,
|
||||
# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8
|
||||
php-xml, php-mbstring
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
|
||||
@@ -61,7 +61,7 @@ apache_install() {
|
||||
# Enable dolibarr conf
|
||||
if which a2enconf >/dev/null 2>&1 ;then
|
||||
# a2enconf exists for ubuntu only
|
||||
echo "Enable link for Apache config file with a3enconf"
|
||||
echo "Enable link for Apache config file with a2enconf"
|
||||
a2enconf dolibarr
|
||||
else
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
$force_install_packager='deb';
|
||||
$force_install_noedit=2;
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
#$force_install_main_data_root='/usr/share/dolibarr/documents';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
|
||||
@@ -4,7 +4,14 @@ dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
|
||||
# Those are false positives, the files are their own sources since
|
||||
# they are not minified
|
||||
source-is-missing htdocs/includes/jsgantt/jsgantt.js *
|
||||
source-is-missing htdocs/includes/jquery/plugins/colorpicker/jquery.colorpicker.js *
|
||||
source-is-missing htdocs/includes/jquery/plugins/select2/select2.js *
|
||||
source-is-missing htdocs/includes/jquery/plugins/select2/select2_locale_ar.js *
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/specialchar/dialogs/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/lang/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/dialogs/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/*/filter/*.js
|
||||
source-is-missing htdocs/includes/ckeditor/ckeditor/plugins/templates/templates/default.js
|
||||
source-is-missing htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/*.js
|
||||
# Those are false positives, the files are their own sources since
|
||||
# they are data files
|
||||
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
||||
|
||||
|
||||
@@ -353,10 +353,12 @@ begin
|
||||
begin
|
||||
// TODO Copy file or ask to install package ?
|
||||
//CustomMessage('YouWillInstallDoliWamp')+#13#13
|
||||
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://ccc">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
|
||||
MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the DoliWAMP installation/upgrade.',mbInformation,MB_OK);
|
||||
end;
|
||||
|
||||
|
||||
// Pb seems similar with msvcp110.dll
|
||||
//vcredist_x64.exe
|
||||
|
||||
|
||||
// If we have a new database version, we should only copy old my.ini file into new directory
|
||||
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
|
||||
// Install of service and stop/start scripts are already rebuild by installer.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// during install process to be used.
|
||||
//
|
||||
//
|
||||
$force_install_noedit=2;
|
||||
$force_install_noedit=2; // 1=To block vars specific to distrib, 2 to block all technical parameters
|
||||
$force_install_message='KeepDefaultValuesWamp';
|
||||
$force_install_main_data_root='WAMPROOT/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -40,55 +40,119 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
* Main
|
||||
*/
|
||||
|
||||
if (empty($argv[1]))
|
||||
$includecustom=0;
|
||||
$includeconstants=array();
|
||||
|
||||
if (empty($argv[1]))
|
||||
{
|
||||
print "Usage: ".$script_file." release=x.y.z\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
parse_str($argv[1]);
|
||||
|
||||
if ($release != DOL_VERSION)
|
||||
$i=0;
|
||||
while ($i < $argc)
|
||||
{
|
||||
print 'Error: release is not version declared into filefunc.in.php.'."\n";
|
||||
exit -1;
|
||||
if (! empty($argv[$i])) parse_str($argv[$i]);
|
||||
if (preg_match('/includeconstant=/',$argv[$i]))
|
||||
{
|
||||
$tmp=explode(':', $includeconstant, 3);
|
||||
if (count($tmp) != 3)
|
||||
{
|
||||
print "Error: Bad parameter includeconstant ".$includeconstant."\n";
|
||||
exit -1;
|
||||
}
|
||||
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (empty($includecustom))
|
||||
{
|
||||
if (DOL_VERSION != $release)
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
|
||||
print "Release : ".$release."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
foreach ($includeconstants as $countrycode => $tmp)
|
||||
{
|
||||
foreach($tmp as $constname => $constvalue)
|
||||
{
|
||||
print $constname.'='.$constvalue." ";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir=dirname(__FILE__).'/../htdocs/install';
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
|
||||
|
||||
$checksumconcat=array();
|
||||
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile,'w');
|
||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
||||
fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now(), 'dayhourrfc').'" generator="'.$script_file.'">'."\n");
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir>'."\n");
|
||||
foreach ($includeconstants as $countrycode => $tmp)
|
||||
{
|
||||
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
|
||||
foreach($tmp as $constname => $constvalue)
|
||||
{
|
||||
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
|
||||
$checksumconcat[]=$valueforchecksum;
|
||||
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");
|
||||
}
|
||||
fputs($fp, '</dolibarr_constants>'."\n");
|
||||
}
|
||||
|
||||
$checksumconcat=array();
|
||||
fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\n");
|
||||
|
||||
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
/*$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
|
||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
@@ -102,28 +166,36 @@ $checksumconcat=array();
|
||||
|
||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
||||
|
||||
$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
|
||||
// TODO Replace RecursiveDirectoryIterator with dol_dir_list
|
||||
/*$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
|
||||
$iterator2 = new RecursiveIteratorIterator($dir_iterator2);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
// Need to ignore document custom etc. Note: this also ignore natively symbolic links.
|
||||
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
*/
|
||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||
$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs
|
||||
$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
foreach ($files as $filetmp) {
|
||||
$file = $filetmp['fullname'];
|
||||
//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, ' <dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
$md5=md5_file($file);
|
||||
$checksumconcat[]=$md5;
|
||||
fputs($fp, '<md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
fputs($fp, '</dolibarr_script_dir>'."\n");
|
||||
|
||||
asort($checksumconcat); // Sort list of checksum
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
|
||||
use Term::ANSIColor;
|
||||
|
||||
# Change this to defined target for option 98 and 99
|
||||
$PROJECT="dolibarr";
|
||||
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
|
||||
$PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
$PUBLISHBETARC="ldestailleur\@vmprod.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
|
||||
|
||||
|
||||
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
|
||||
@@ -313,20 +313,6 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
|
||||
print "\n";
|
||||
|
||||
# Build xml check file
|
||||
#-----------------------
|
||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
}
|
||||
|
||||
|
||||
#print join(',',sort keys %CHOOSEDTARGET)."\n";
|
||||
|
||||
@@ -335,7 +321,10 @@ if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
$nboftargetok=0;
|
||||
$nboftargetneedbuildroot=0;
|
||||
$nbofpublishneedtag=0;
|
||||
$nbofpublishneedchangelog=0;
|
||||
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target eq '-CHKSUM') { $nbofpublishneedchangelog++; }
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
|
||||
{
|
||||
@@ -345,13 +334,70 @@ foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
}
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH) {
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedtag++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedtag++; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedchangelog++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedchangelog++; $nbofpublishneedtag++; }
|
||||
$nboftargetok++;
|
||||
}
|
||||
|
||||
|
||||
if ($nboftargetok) {
|
||||
|
||||
# Check Changelog
|
||||
#----------------
|
||||
if ($nbofpublishneedchangelog)
|
||||
{
|
||||
# Test that the ChangeLog is ok
|
||||
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-beta\d*//;
|
||||
print "\nCheck if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
||||
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
|
||||
if (! $ret)
|
||||
{
|
||||
print color("yellow"), "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n", color('reset');
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n";
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
else # For a maintenance release
|
||||
{
|
||||
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
|
||||
}
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
{
|
||||
print "\nPress F to force and continue anyway (or other key to stop)... ";
|
||||
my $WAITKEY=<STDIN>;
|
||||
chomp($WAITKEY);
|
||||
if ($WAITKEY ne 'F')
|
||||
{
|
||||
print "Canceled.\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Build xml check file
|
||||
#-----------------------
|
||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
}
|
||||
|
||||
# Update GIT tag if required
|
||||
#---------------------------
|
||||
if ($nbofpublishneedtag)
|
||||
@@ -360,34 +406,6 @@ if ($nboftargetok) {
|
||||
$olddir=getcwd();
|
||||
chdir("$SOURCE");
|
||||
|
||||
# Test that the ChangeLog is ok
|
||||
$TMPBUILDTOCHECKCHANGELOG=$BUILD;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-rc\d*//;
|
||||
$TMPBUILDTOCHECKCHANGELOG =~ s/\-beta\d*//;
|
||||
print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n";
|
||||
$ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`;
|
||||
if (! $ret)
|
||||
{
|
||||
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with commande:'\n";
|
||||
}
|
||||
if (! $BUILD || $BUILD eq '0-rc') # For a major version
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
else # For a maintenance release
|
||||
{
|
||||
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
|
||||
}
|
||||
print "\n";
|
||||
if (! $ret)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||
if ($ret =~ /(already exists|existe déjà)/)
|
||||
@@ -509,7 +527,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
|
||||
@@ -518,6 +535,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
@@ -532,8 +550,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
@@ -547,15 +563,15 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf`; # Source of this flash is not available
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
|
||||
@@ -564,16 +580,26 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
|
||||
|
||||
|
||||
print "Remove subdir of custom dir\n";
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs but not files
|
||||
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\;\n";
|
||||
$ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@@ -892,9 +918,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-20120503/COPYING`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_2.0/COPYING`;
|
||||
# Removed files we don't need
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
|
||||
|
||||
@@ -957,13 +980,14 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_api_class.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_card.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_list.php`;
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_script.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_myobject.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_card.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/myobject_list.php`;
|
||||
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/scripts/myobject.php`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.sh' -type f -exec chmod 755 {} \\; ";
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# \file build/makepack-dolibarrmodule.pl
|
||||
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
||||
# \author (c)2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \contributor (c)2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
use Cwd;
|
||||
@@ -134,7 +135,15 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
print "Version detected for module ".$PROJECT.": ";
|
||||
$result=open(IN,"<".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
|
||||
if (! $result) { die "Error: Can't open descriptor file ".$SOURCE."/htdocs/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n"; }
|
||||
$custom=false;
|
||||
if (! $result) {
|
||||
$result=open(IN,"<".$SOURCE."/htdocs/custom/".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php");
|
||||
if (! $result) {
|
||||
die "Error: Can't open descriptor file ".$SOURCE."/htdocs/(or /htdocs/custom/)".$PROJECTLC."/core/modules/mod".$PROJECT.".class.php for reading.\n";
|
||||
}else{
|
||||
$custom = true;
|
||||
}
|
||||
}
|
||||
while(<IN>)
|
||||
{
|
||||
if ($_ =~ /this->version\s*=\s*'([\d\.]+)'/) { $PROJVERSION=$1; break; }
|
||||
@@ -294,8 +303,11 @@ foreach my $PROJECT (@PROJECTLIST) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/conf/conf*sav*`;
|
||||
if($custom){
|
||||
$ret=`cp -r $BUILDROOT/$PROJECTLC/htdocs/custom/* $BUILDROOT/$PROJECTLC/htdocs/.`;
|
||||
}
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/Thumbs.db $BUILDROOT/$PROJECTLC/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/Thumbs.db $BUILDROOT/$PROJECTLC/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECTLC/CVS* $BUILDROOT/$PROJECTLC/*/CVS* $BUILDROOT/$PROJECTLC/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/CVS* $BUILDROOT/$PROJECTLC/*/*/*/*/*/CVS*`;
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
</MASTER_PAD_VERSION_INFO>
|
||||
<Company_Info>
|
||||
<Company_Name>Dolibarr team</Company_Name>
|
||||
<Address_1>11 rue raymond Queneau</Address_1>
|
||||
<Address_1>20 rue camponac</Address_1>
|
||||
<Address_2 />
|
||||
<City_Town>Rueil Malmaison</City_Town>
|
||||
<City_Town>Pessac</City_Town>
|
||||
<State_Province />
|
||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||
<Zip_Postal_Code>33600</Zip_Postal_Code>
|
||||
<Country>FRANCE</Country>
|
||||
<Company_WebSite_URL>http://www.dolibarr.org</Company_WebSite_URL>
|
||||
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
|
||||
<Contact_Info>
|
||||
<Author_First_Name>Dolibarr team</Author_First_Name>
|
||||
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
||||
<Author_Email>dolibarr-dev@nongnu.org</Author_Email>
|
||||
<Author_Email>contact@dolibarr.org</Author_Email>
|
||||
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
||||
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
||||
<Contact_Email>dolibarr-dev@nongnu.org</Contact_Email>
|
||||
<Contact_Email>contact@dolibarr.org</Contact_Email>
|
||||
</Contact_Info>
|
||||
<Support_Info>
|
||||
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>Dolibarr</Program_Name>
|
||||
<Program_Version>3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Version>5.0</Program_Version>
|
||||
<Program_Release_Month>02</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Release_Year>2017</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
@@ -71,8 +71,8 @@
|
||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
<Char_Desc_450>Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, Odoo, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
@@ -101,14 +101,14 @@ Dolibarr intègre en effet sa propre architecture (design patterns) permettant
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
<Application_URLs>
|
||||
<Application_Info_URL>http://www.dolibarr.org</Application_Info_URL>
|
||||
<Application_Order_URL>http://www.dolibarr.org</Application_Order_URL>
|
||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||
<Application_Info_URL>https://www.dolibarr.org</Application_Info_URL>
|
||||
<Application_Order_URL>https://www.dolibarr.org</Application_Order_URL>
|
||||
<Application_Screenshot_URL>https://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>https://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||
</Application_URLs>
|
||||
<Download_URLs>
|
||||
<Primary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||
<Primary_Download_URL>https://www.dolibarr.org/files/dolibarr.tgz</Primary_Download_URL>
|
||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.tgz</Secondary_Download_URL>
|
||||
<Additional_Download_URL_1 />
|
||||
<Additional_Download_URL_2 />
|
||||
|
||||
232
build/pad/pad_dolibarr_nos.xml
Normal file
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XML_DIZ_INFO>
|
||||
<MASTER_PAD_VERSION_INFO>
|
||||
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
||||
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||
</MASTER_PAD_VERSION_INFO>
|
||||
<Company_Info>
|
||||
<Company_Name>Dolibarr team</Company_Name>
|
||||
<Address_1>20 rue camponac</Address_1>
|
||||
<Address_2 />
|
||||
<City_Town>Pessac</City_Town>
|
||||
<State_Province />
|
||||
<Zip_Postal_Code>33600</Zip_Postal_Code>
|
||||
<Country>FRANCE</Country>
|
||||
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
|
||||
<Contact_Info>
|
||||
<Author_First_Name>Dolibarr team</Author_First_Name>
|
||||
<Author_Last_Name>Dolibarr team</Author_Last_Name>
|
||||
<Author_Email>contact@dolibarr.org</Author_Email>
|
||||
<Contact_First_Name>Dolibarr team</Contact_First_Name>
|
||||
<Contact_Last_Name>Dolibarr team</Contact_Last_Name>
|
||||
<Contact_Email>contact@dolibarr.org</Contact_Email>
|
||||
</Contact_Info>
|
||||
<Support_Info>
|
||||
<Sales_Email>dolibarr-dev@nongnu.org</Sales_Email>
|
||||
<Support_Email>dolibarr-dev@nongnu.org</Support_Email>
|
||||
<General_Email>dolibarr-dev@nongnu.org</General_Email>
|
||||
<Sales_Phone />
|
||||
<Support_Phone />
|
||||
<General_Phone />
|
||||
<Fax_Phone />
|
||||
</Support_Info>
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>Dolibarr</Program_Name>
|
||||
<Program_Version>5.0</Program_Version>
|
||||
<Program_Release_Month>02</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2017</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
<Program_Type>Freeware</Program_Type>
|
||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||
<Program_Install_Support>No Install Support</Program_Install_Support>
|
||||
<Program_OS_Support>Linux,Mac OS X,Mac Other,Unix,Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||
<Program_Language>English,Arabic,Catalan,Chinese,Danish,Dutch,Finnish,French,German,Greek,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||
<Program_System_Requirements>None</Program_System_Requirements>
|
||||
<File_Info>
|
||||
<File_Size_Bytes>18037439</File_Size_Bytes>
|
||||
<File_Size_K>18037</File_Size_K>
|
||||
<File_Size_MB>18.03</File_Size_MB>
|
||||
</File_Info>
|
||||
<Expire_Info>
|
||||
<Has_Expire_Info>N</Has_Expire_Info>
|
||||
<Expire_Count />
|
||||
<Expire_Based_On>Days</Expire_Based_On>
|
||||
<Expire_Other_Info />
|
||||
<Expire_Month />
|
||||
<Expire_Day />
|
||||
<Expire_Year />
|
||||
</Expire_Info>
|
||||
</Program_Info>
|
||||
<Program_Descriptions>
|
||||
<English>
|
||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, the easy to use open source software to manage your activity</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
|
||||
Simple to install
|
||||
Simple to use
|
||||
Simple to develop
|
||||
Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian).</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
|
||||
<Char_Desc_45>Dolibarr ERP & CRM</Char_Desc_45>
|
||||
<Char_Desc_80>Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
|
||||
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
|
||||
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
|
||||
Simple pour le développement (pas de frameworks lourds).
|
||||
Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. </Char_Desc_2000>
|
||||
</French>
|
||||
<Italian>
|
||||
<Keywords>erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||
<Char_Desc_45>Gestionale open source e gratuito</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
<Application_URLs>
|
||||
<Application_Info_URL>https://www.dolibarr.org</Application_Info_URL>
|
||||
<Application_Order_URL>https://www.dolibarr.org</Application_Order_URL>
|
||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_dolibarr.xml</Application_XML_File_URL>
|
||||
</Application_URLs>
|
||||
<Download_URLs>
|
||||
<Primary_Download_URL>https://www.dolibarr.org/files/dolibarr.zip</Primary_Download_URL>
|
||||
<Secondary_Download_URL>http://www.dolibarr.org/files/dolibarr.zip</Secondary_Download_URL>
|
||||
<Additional_Download_URL_1 />
|
||||
<Additional_Download_URL_2 />
|
||||
</Download_URLs>
|
||||
</Web_Info>
|
||||
<Permissions>
|
||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||
<EULA>GNU GPL</EULA>
|
||||
</Permissions>
|
||||
<Affiliates>
|
||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||
<Affiliates_Information_Page />
|
||||
<Affiliates_Avangate_Order_Page />
|
||||
<Affiliates_Avangate_Vendor_ID />
|
||||
<Affiliates_Avangate_Product_ID />
|
||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||
<Affiliates_BMTMicro_Order_Page />
|
||||
<Affiliates_BMTMicro_Vendor_ID />
|
||||
<Affiliates_BMTMicro_Product_ID />
|
||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||
<Affiliates_Cleverbridge_Order_Page />
|
||||
<Affiliates_Cleverbridge_Vendor_ID />
|
||||
<Affiliates_Cleverbridge_Product_ID />
|
||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||
<Affiliates_clixGalore_Order_Page />
|
||||
<Affiliates_clixGalore_Vendor_ID />
|
||||
<Affiliates_clixGalore_Product_ID />
|
||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||
<Affiliates_CommissionJunction_Order_Page />
|
||||
<Affiliates_CommissionJunction_Vendor_ID />
|
||||
<Affiliates_CommissionJunction_Product_ID />
|
||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||
<Affiliates_DigiBuy_Order_Page />
|
||||
<Affiliates_DigiBuy_Vendor_ID />
|
||||
<Affiliates_DigiBuy_Product_ID />
|
||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||
<Affiliates_DigitalCandle_Order_Page />
|
||||
<Affiliates_DigitalCandle_Vendor_ID />
|
||||
<Affiliates_DigitalCandle_Product_ID />
|
||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||
<Affiliates_Emetrix_Order_Page />
|
||||
<Affiliates_Emetrix_Vendor_ID />
|
||||
<Affiliates_Emetrix_Product_ID />
|
||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||
<Affiliates_eSellerate_Order_Page />
|
||||
<Affiliates_eSellerate_Vendor_ID />
|
||||
<Affiliates_eSellerate_Product_ID />
|
||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||
<Affiliates_Kagi_Order_Page />
|
||||
<Affiliates_Kagi_Vendor_ID />
|
||||
<Affiliates_Kagi_Product_ID />
|
||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||
<Affiliates_LinkShare_Order_Page />
|
||||
<Affiliates_LinkShare_Vendor_ID />
|
||||
<Affiliates_LinkShare_Product_ID />
|
||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||
<Affiliates_NorthStarSol_Order_Page />
|
||||
<Affiliates_NorthStarSol_Vendor_ID />
|
||||
<Affiliates_NorthStarSol_Product_ID />
|
||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||
<Affiliates_OneNetworkDirect_Order_Page />
|
||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||
<Affiliates_OneNetworkDirect_Product_ID />
|
||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||
<Affiliates_Order1_Order_Page />
|
||||
<Affiliates_Order1_Vendor_ID />
|
||||
<Affiliates_Order1_Product_ID />
|
||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||
<Affiliates_Osolis_Order_Page />
|
||||
<Affiliates_Osolis_Vendor_ID />
|
||||
<Affiliates_Osolis_Product_ID />
|
||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||
<Affiliates_Plimus_Order_Page />
|
||||
<Affiliates_Plimus_Vendor_ID />
|
||||
<Affiliates_Plimus_Product_ID />
|
||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||
<Affiliates_Regnet_Order_Page />
|
||||
<Affiliates_Regnet_Vendor_ID />
|
||||
<Affiliates_Regnet_Product_ID />
|
||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||
<Affiliates_Regnow_Order_Page />
|
||||
<Affiliates_Regnow_Vendor_ID />
|
||||
<Affiliates_Regnow_Product_ID />
|
||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||
<Affiliates_Regsoft_Order_Page />
|
||||
<Affiliates_Regsoft_Vendor_ID />
|
||||
<Affiliates_Regsoft_Product_ID />
|
||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||
<Affiliates_ShareIt_Order_Page />
|
||||
<Affiliates_ShareIt_Vendor_ID />
|
||||
<Affiliates_ShareIt_Product_ID />
|
||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||
<Affiliates_Shareasale_Order_Page />
|
||||
<Affiliates_Shareasale_Vendor_ID />
|
||||
<Affiliates_Shareasale_Product_ID />
|
||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||
<Affiliates_SWReg_Order_Page />
|
||||
<Affiliates_SWReg_Vendor_ID />
|
||||
<Affiliates_SWReg_Product_ID />
|
||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||
<Affiliates_V-Share_Order_Page />
|
||||
<Affiliates_V-Share_Vendor_ID />
|
||||
<Affiliates_V-Share_Product_ID />
|
||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||
<Affiliates_VFree_Order_Page />
|
||||
<Affiliates_VFree_Vendor_ID />
|
||||
<Affiliates_VFree_Product_ID />
|
||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||
<Affiliates_Yaskifo_Order_Page />
|
||||
<Affiliates_Yaskifo_Vendor_ID />
|
||||
<Affiliates_Yaskifo_Product_ID />
|
||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||
</Affiliates>
|
||||
<ASP>
|
||||
<ASP_FORM>Y</ASP_FORM>
|
||||
<ASP_Member>N</ASP_Member>
|
||||
<ASP_Member_Number />
|
||||
</ASP>
|
||||
</XML_DIZ_INFO>
|
||||
@@ -7,13 +7,13 @@
|
||||
</MASTER_PAD_VERSION_INFO>
|
||||
<Company_Info>
|
||||
<Company_Name>NLTechno</Company_Name>
|
||||
<Address_1>11 Rue raymond Queneau</Address_1>
|
||||
<Address_1>20 Rue Camponac</Address_1>
|
||||
<Address_2 />
|
||||
<City_Town>Rueil Malmaison</City_Town>
|
||||
<City_Town>Pessac</City_Town>
|
||||
<State_Province />
|
||||
<Zip_Postal_Code>92500</Zip_Postal_Code>
|
||||
<Zip_Postal_Code>33600</Zip_Postal_Code>
|
||||
<Country>FRANCE</Country>
|
||||
<Company_WebSite_URL>http://www.nltechno.com</Company_WebSite_URL>
|
||||
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
|
||||
<Contact_Info>
|
||||
<Author_First_Name>NLTechno</Author_First_Name>
|
||||
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||
@@ -34,10 +34,10 @@
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>DoliWamp</Program_Name>
|
||||
<Program_Version>3.5</Program_Version>
|
||||
<Program_Release_Month>01</Program_Release_Month>
|
||||
<Program_Version>5.0</Program_Version>
|
||||
<Program_Release_Month>02</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2014</Program_Release_Year>
|
||||
<Program_Release_Year>2017</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
@@ -53,7 +53,7 @@
|
||||
<File_Info>
|
||||
<File_Size_Bytes>26048004</File_Size_Bytes>
|
||||
<File_Size_K>25437</File_Size_K>
|
||||
<File_Size_MB>24.84</File_Size_MB>
|
||||
<File_Size_MB>45.84</File_Size_MB>
|
||||
</File_Info>
|
||||
<Expire_Info>
|
||||
<Has_Expire_Info>N</Has_Expire_Info>
|
||||
@@ -72,7 +72,7 @@
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
@@ -96,12 +96,12 @@ DoliWamp is the auto-installer for Windows users with no technical knowledge to
|
||||
<Application_URLs>
|
||||
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
||||
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>http://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
||||
<Application_Screenshot_URL>https://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>https://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
||||
</Application_URLs>
|
||||
<Download_URLs>
|
||||
<Primary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
||||
<Primary_Download_URL>https://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
||||
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
||||
<Additional_Download_URL_1 />
|
||||
<Additional_Download_URL_2 />
|
||||
|
||||
225
build/pad/pad_doliwamp_nos.xml
Normal file
@@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XML_DIZ_INFO>
|
||||
<MASTER_PAD_VERSION_INFO>
|
||||
<MASTER_PAD_VERSION>3.11</MASTER_PAD_VERSION>
|
||||
<MASTER_PAD_EDITOR>PADGen 3.1.1.47 http://www.padgen.org</MASTER_PAD_EDITOR>
|
||||
<MASTER_PAD_INFO>Portable Application Description, or PAD for short, is a data set that is used by shareware authors to disseminate information to anyone interested in their software products. To find out more go to http://pad.asp-software.org</MASTER_PAD_INFO>
|
||||
</MASTER_PAD_VERSION_INFO>
|
||||
<Company_Info>
|
||||
<Company_Name>NLTechno</Company_Name>
|
||||
<Address_1>20 Rue Camponac</Address_1>
|
||||
<Address_2 />
|
||||
<City_Town>Pessac</City_Town>
|
||||
<State_Province />
|
||||
<Zip_Postal_Code>33600</Zip_Postal_Code>
|
||||
<Country>FRANCE</Country>
|
||||
<Company_WebSite_URL>https://www.dolibarr.org</Company_WebSite_URL>
|
||||
<Contact_Info>
|
||||
<Author_First_Name>NLTechno</Author_First_Name>
|
||||
<Author_Last_Name>NLTechno</Author_Last_Name>
|
||||
<Author_Email>contact@nltechno.com</Author_Email>
|
||||
<Contact_First_Name>NLTechno</Contact_First_Name>
|
||||
<Contact_Last_Name>NLTechno</Contact_Last_Name>
|
||||
<Contact_Email>contact@nltechno.com</Contact_Email>
|
||||
</Contact_Info>
|
||||
<Support_Info>
|
||||
<Sales_Email>support@nltechno.com</Sales_Email>
|
||||
<Support_Email>support@nltechno.com</Support_Email>
|
||||
<General_Email>support@nltechno.com</General_Email>
|
||||
<Sales_Phone />
|
||||
<Support_Phone />
|
||||
<General_Phone />
|
||||
<Fax_Phone />
|
||||
</Support_Info>
|
||||
</Company_Info>
|
||||
<Program_Info>
|
||||
<Program_Name>DoliWamp</Program_Name>
|
||||
<Program_Version>5.0</Program_Version>
|
||||
<Program_Release_Month>02</Program_Release_Month>
|
||||
<Program_Release_Day>01</Program_Release_Day>
|
||||
<Program_Release_Year>2017</Program_Release_Year>
|
||||
<Program_Cost_Dollars />
|
||||
<Program_Cost_Other_Code />
|
||||
<Program_Cost_Other />
|
||||
<Program_Type>Freeware</Program_Type>
|
||||
<Program_Release_Status>Major Update</Program_Release_Status>
|
||||
<Program_Install_Support>Install and Uninstall</Program_Install_Support>
|
||||
<Program_OS_Support>Win2000,Win7 x32,Win7 x64,Win98,WinOther,WinServer,WinVista,WinVista x64,WinXP,Other</Program_OS_Support>
|
||||
<Program_Language>English,Arabic,Catalan,Chinese,Dutch,Finnish,French,German,Icelandic,Italian,Norwegian,Polish,Portuguese,Romanian,Russian,Slovenian,Spanish,Swedish,Turkish</Program_Language>
|
||||
<Program_Change_Info>Increase performances, Setup process is easier, Reduce number of clicks required to use software</Program_Change_Info>
|
||||
<Program_Specific_Category>Business</Program_Specific_Category>
|
||||
<Program_Category_Class>Business::Accounting & Finance</Program_Category_Class>
|
||||
<Program_System_Requirements>None</Program_System_Requirements>
|
||||
<File_Info>
|
||||
<File_Size_Bytes>26048004</File_Size_Bytes>
|
||||
<File_Size_K>25437</File_Size_K>
|
||||
<File_Size_MB>45.84</File_Size_MB>
|
||||
</File_Info>
|
||||
<Expire_Info>
|
||||
<Has_Expire_Info>N</Has_Expire_Info>
|
||||
<Expire_Count />
|
||||
<Expire_Based_On>Days</Expire_Based_On>
|
||||
<Expire_Other_Info />
|
||||
<Expire_Month />
|
||||
<Expire_Day />
|
||||
<Expire_Year />
|
||||
</Expire_Info>
|
||||
</Program_Info>
|
||||
<Program_Descriptions>
|
||||
<English>
|
||||
<Keywords>doliwamp, dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management</Keywords>
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
<French>
|
||||
<Keywords>doliwamp, dolibarr, erp, crm, factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations, entreprises, PME, TPE</Keywords>
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM pour Windows</Char_Desc_45>
|
||||
<Char_Desc_80>DoliWamp, la distribution de Dolibarr pour gérer votre entreprise ou association</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp est la version spécialisée pour Windows de Dolibarr ERP-CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_2000>
|
||||
</French>
|
||||
<Italian>
|
||||
<Keywords>doliwamp, dolibarr, erp, crm, gestionale, medie imprese, fondazioni</Keywords>
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM per Windows</Char_Desc_45>
|
||||
<Char_Desc_80>Gestionale open source e gratuito per piccole e medie imprese, fondazioni</Char_Desc_80>
|
||||
<Char_Desc_250>Dolibarr è un a gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività.</Char_Desc_250>
|
||||
<Char_Desc_450>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_450>
|
||||
<Char_Desc_2000>Dolibarr è un programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti. Include varie funzionalità per Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori attività. Dolibar è progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare. Dolibar è completamente web-based, progettato per poter fornire solo ciò di cui hai bisogno ed essere facile da usare.</Char_Desc_2000>
|
||||
</Italian>
|
||||
</Program_Descriptions>
|
||||
<Web_Info>
|
||||
<Application_URLs>
|
||||
<Application_Info_URL>http://www.nltechno.com/doliwamp/</Application_Info_URL>
|
||||
<Application_Order_URL>http://www.nltechno.com/doliwamp/</Application_Order_URL>
|
||||
<Application_Screenshot_URL>http://www.dolibarr.org/images/dolibarr_screenshot1.png</Application_Screenshot_URL>
|
||||
<Application_Icon_URL>http://www.dolibarr.org/images/dolibarr.gif</Application_Icon_URL>
|
||||
<Application_XML_File_URL>https://www.dolibarr.org/files/pad_doliwamp.xml</Application_XML_File_URL>
|
||||
</Application_URLs>
|
||||
<Download_URLs>
|
||||
<Primary_Download_URL>https://www.dolibarr.org/files/doliwamp.exe</Primary_Download_URL>
|
||||
<Secondary_Download_URL>http://www.dolibarr.org/files/doliwamp.exe</Secondary_Download_URL>
|
||||
<Additional_Download_URL_1 />
|
||||
<Additional_Download_URL_2 />
|
||||
</Download_URLs>
|
||||
</Web_Info>
|
||||
<Permissions>
|
||||
<Distribution_Permissions>GNU GPL</Distribution_Permissions>
|
||||
<EULA>GNU GPL</EULA>
|
||||
</Permissions>
|
||||
<Affiliates>
|
||||
<Affiliates_FORM>Y</Affiliates_FORM>
|
||||
<Affiliates_VERSION>1.4</Affiliates_VERSION>
|
||||
<Affiliates_URL>http://pad.asp-software.org/extensions/Affiliates.htm</Affiliates_URL>
|
||||
<Affiliates_Information_Page />
|
||||
<Affiliates_Avangate_Order_Page />
|
||||
<Affiliates_Avangate_Vendor_ID />
|
||||
<Affiliates_Avangate_Product_ID />
|
||||
<Affiliates_Avangate_Maximum_Commission_Rate />
|
||||
<Affiliates_BMTMicro_Order_Page />
|
||||
<Affiliates_BMTMicro_Vendor_ID />
|
||||
<Affiliates_BMTMicro_Product_ID />
|
||||
<Affiliates_BMTMicro_Maximum_Commission_Rate />
|
||||
<Affiliates_Cleverbridge_Order_Page />
|
||||
<Affiliates_Cleverbridge_Vendor_ID />
|
||||
<Affiliates_Cleverbridge_Product_ID />
|
||||
<Affiliates_Cleverbridge_Maximum_Commission_Rate />
|
||||
<Affiliates_clixGalore_Order_Page />
|
||||
<Affiliates_clixGalore_Vendor_ID />
|
||||
<Affiliates_clixGalore_Product_ID />
|
||||
<Affiliates_clixGalore_Maximum_Commission_Rate />
|
||||
<Affiliates_CommissionJunction_Order_Page />
|
||||
<Affiliates_CommissionJunction_Vendor_ID />
|
||||
<Affiliates_CommissionJunction_Product_ID />
|
||||
<Affiliates_CommissionJunction_Maximum_Commission_Rate />
|
||||
<Affiliates_DigiBuy_Order_Page />
|
||||
<Affiliates_DigiBuy_Vendor_ID />
|
||||
<Affiliates_DigiBuy_Product_ID />
|
||||
<Affiliates_DigiBuy_Maximum_Commission_Rate />
|
||||
<Affiliates_DigitalCandle_Order_Page />
|
||||
<Affiliates_DigitalCandle_Vendor_ID />
|
||||
<Affiliates_DigitalCandle_Product_ID />
|
||||
<Affiliates_DigitalCandle_Maximum_Commission_Rate />
|
||||
<Affiliates_Emetrix_Order_Page />
|
||||
<Affiliates_Emetrix_Vendor_ID />
|
||||
<Affiliates_Emetrix_Product_ID />
|
||||
<Affiliates_Emetrix_Maximum_Commission_Rate />
|
||||
<Affiliates_eSellerate_Order_Page />
|
||||
<Affiliates_eSellerate_Vendor_ID />
|
||||
<Affiliates_eSellerate_Product_ID />
|
||||
<Affiliates_eSellerate_Maximum_Commission_Rate />
|
||||
<Affiliates_Kagi_Order_Page />
|
||||
<Affiliates_Kagi_Vendor_ID />
|
||||
<Affiliates_Kagi_Product_ID />
|
||||
<Affiliates_Kagi_Maximum_Commission_Rate />
|
||||
<Affiliates_LinkShare_Order_Page />
|
||||
<Affiliates_LinkShare_Vendor_ID />
|
||||
<Affiliates_LinkShare_Product_ID />
|
||||
<Affiliates_LinkShare_Maximum_Commission_Rate />
|
||||
<Affiliates_NorthStarSol_Order_Page />
|
||||
<Affiliates_NorthStarSol_Vendor_ID />
|
||||
<Affiliates_NorthStarSol_Product_ID />
|
||||
<Affiliates_NorthStarSol_Maximum_Commission_Rate />
|
||||
<Affiliates_OneNetworkDirect_Order_Page />
|
||||
<Affiliates_OneNetworkDirect_Vendor_ID />
|
||||
<Affiliates_OneNetworkDirect_Product_ID />
|
||||
<Affiliates_OneNetworkDirect_Maximum_Commission_Rate />
|
||||
<Affiliates_Order1_Order_Page />
|
||||
<Affiliates_Order1_Vendor_ID />
|
||||
<Affiliates_Order1_Product_ID />
|
||||
<Affiliates_Order1_Maximum_Commission_Rate />
|
||||
<Affiliates_Osolis_Order_Page />
|
||||
<Affiliates_Osolis_Vendor_ID />
|
||||
<Affiliates_Osolis_Product_ID />
|
||||
<Affiliates_Osolis_Maximum_Commission_Rate />
|
||||
<Affiliates_Plimus_Order_Page />
|
||||
<Affiliates_Plimus_Vendor_ID />
|
||||
<Affiliates_Plimus_Product_ID />
|
||||
<Affiliates_Plimus_Maximum_Commission_Rate />
|
||||
<Affiliates_Regnet_Order_Page />
|
||||
<Affiliates_Regnet_Vendor_ID />
|
||||
<Affiliates_Regnet_Product_ID />
|
||||
<Affiliates_Regnet_Maximum_Commission_Rate />
|
||||
<Affiliates_Regnow_Order_Page />
|
||||
<Affiliates_Regnow_Vendor_ID />
|
||||
<Affiliates_Regnow_Product_ID />
|
||||
<Affiliates_Regnow_Maximum_Commission_Rate />
|
||||
<Affiliates_Regsoft_Order_Page />
|
||||
<Affiliates_Regsoft_Vendor_ID />
|
||||
<Affiliates_Regsoft_Product_ID />
|
||||
<Affiliates_Regsoft_Maximum_Commission_Rate />
|
||||
<Affiliates_ShareIt_Order_Page />
|
||||
<Affiliates_ShareIt_Vendor_ID />
|
||||
<Affiliates_ShareIt_Product_ID />
|
||||
<Affiliates_ShareIt_Maximum_Commission_Rate />
|
||||
<Affiliates_Shareasale_Order_Page />
|
||||
<Affiliates_Shareasale_Vendor_ID />
|
||||
<Affiliates_Shareasale_Product_ID />
|
||||
<Affiliates_Shareasale_Maximum_Commission_Rate />
|
||||
<Affiliates_SWReg_Order_Page />
|
||||
<Affiliates_SWReg_Vendor_ID />
|
||||
<Affiliates_SWReg_Product_ID />
|
||||
<Affiliates_SWReg_Maximum_Commission_Rate />
|
||||
<Affiliates_V-Share_Order_Page />
|
||||
<Affiliates_V-Share_Vendor_ID />
|
||||
<Affiliates_V-Share_Product_ID />
|
||||
<Affiliates_V-Share_Maximum_Commission_Rate />
|
||||
<Affiliates_VFree_Order_Page />
|
||||
<Affiliates_VFree_Vendor_ID />
|
||||
<Affiliates_VFree_Product_ID />
|
||||
<Affiliates_VFree_Maximum_Commission_Rate />
|
||||
<Affiliates_Yaskifo_Order_Page />
|
||||
<Affiliates_Yaskifo_Vendor_ID />
|
||||
<Affiliates_Yaskifo_Product_ID />
|
||||
<Affiliates_Yaskifo_Maximum_Commission_Rate />
|
||||
</Affiliates>
|
||||
<ASP>
|
||||
<ASP_FORM>Y</ASP_FORM>
|
||||
<ASP_Member>N</ASP_Member>
|
||||
<ASP_Member_Number />
|
||||
</ASP>
|
||||
</XML_DIZ_INFO>
|
||||
@@ -1,8 +1,10 @@
|
||||
README (English)
|
||||
##################################################
|
||||
Install script for Virtualmin Pro
|
||||
Install script for Virtualmin Professional / GPL
|
||||
##################################################
|
||||
|
||||
This script will install automatically Dolibarr from Virtualmin Pro
|
||||
http://www.virtualmin.com
|
||||
This script will install automatically Dolibarr from Virtualmin.
|
||||
(Included in the professional version and can be added in the GPL version)
|
||||
|
||||
https://www.virtualmin.com
|
||||
http://www.webmin.com/virtualmin.html
|
||||
@@ -1,7 +1,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file dolibarr.pl
|
||||
# \brief Dolibarr script install for Virtualmin Pro
|
||||
# \author (c)2009-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
# \author (c)2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ return "Regis Houssin";
|
||||
# script_dolibarr_versions()
|
||||
sub script_dolibarr_versions
|
||||
{
|
||||
return ( "3.8.1", "3.7.1", "3.6.4", "3.5.7" );
|
||||
return ( "5.0.4", "4.0.6", "3.9.4" );
|
||||
}
|
||||
|
||||
sub script_dolibarr_release
|
||||
{
|
||||
return 2; # for mysqli fix
|
||||
}
|
||||
|
||||
sub script_dolibarr_category
|
||||
@@ -177,9 +182,9 @@ if ($opts->{'newdb'} && !$upgrade) {
|
||||
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
|
||||
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
|
||||
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
|
||||
local $dbphptype = $dbtype eq "mysql" && $version >= 3.6 ? "mysql" :
|
||||
local $dbphptype = $dbtype eq "mysql" && $version < 3.6 ? "mysql" :
|
||||
$dbtype eq "mysql" ? "mysqli" : "pgsql";
|
||||
local $dbhost = &get_database_host($dbtype);
|
||||
local $dbhost = &get_database_host($dbtype, $d);
|
||||
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
|
||||
return (0, "Database connection failed : $dberr") if ($dberr);
|
||||
|
||||
@@ -206,9 +211,6 @@ $pgcharset = $tmpl->{'postgres_encoding'};
|
||||
$charset = $dbtype eq "mysql" ? $mycharset : $pgcharset;
|
||||
$collate = $dbtype eq "mysql" ? $mycollate : "C";
|
||||
|
||||
# Install filename
|
||||
local $step = $version >= 3.8 ? "step" : "etape";
|
||||
|
||||
$path = &script_path_url($d, $opts);
|
||||
if ($path =~ /^https:/ || $d->{'ssl'}) {
|
||||
$url = "https://$d->{'dom'}";
|
||||
@@ -222,15 +224,11 @@ if ($opts->{'path'} =~ /\w/) {
|
||||
|
||||
if (!$upgrade) {
|
||||
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
|
||||
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
|
||||
©_source_dest_as_domain_user($d, $cdef, $cfile);
|
||||
&set_permissions_as_domain_user($d, 0777, $cfiledir);
|
||||
&set_permissions_as_domain_user($d, 0666, $cfile);
|
||||
©_source_dest_as_domain_user($d, $cfile);
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
||||
&set_permissions_as_domain_user($d, 0777, $docdir);
|
||||
if (!$version >= 3.7.2) {
|
||||
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
|
||||
&set_permissions_as_domain_user($d, 0777, $altdir);
|
||||
}
|
||||
}
|
||||
else {
|
||||
# Preserve old config file, documents and custom directory
|
||||
@@ -266,7 +264,8 @@ if ($upgrade) {
|
||||
[ "versionfrom", $upgrade->{'version'} ],
|
||||
[ "versionto", $ver ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory.
|
||||
@@ -289,15 +288,17 @@ else {
|
||||
[ "main_force_https", $opts->{'forcehttps'} ],
|
||||
[ "dolibarr_main_db_character_set", $charset ],
|
||||
[ "dolibarr_main_db_collation", $collate ],
|
||||
[ "main_use_alt_dir", "1" ],
|
||||
[ "usealternaterootdir", "1" ],
|
||||
[ "main_alt_dir_name", "custom" ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."1", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step1" : "etape1";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Second page (Populate database)
|
||||
local @params = ( [ "action", "set" ] );
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."2", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step2" : "etape2";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Third page (Add administrator account)
|
||||
@@ -306,7 +307,8 @@ else {
|
||||
[ "pass", $dompass ],
|
||||
[ "pass_verif", $dompass ],
|
||||
);
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts);
|
||||
local $p = $ver >= 3.8 ? "step5" : "etape5";
|
||||
local $err = &call_dolibarr_wizard_page(\@params, $p, $d, $opts);
|
||||
return (-1, "Dolibarr wizard failed : $err") if ($err);
|
||||
|
||||
# Remove the installation directory and protect config file.
|
||||
@@ -384,7 +386,10 @@ sub script_dolibarr_check_latest
|
||||
{
|
||||
local ($ver) = @_;
|
||||
local @vers = &osdn_package_versions("dolibarr",
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 5.0 ? "dolibarr\\-(5\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 4.0 ? "dolibarr\\-(4\\.0\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.9 ? "dolibarr\\-(3\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.8 ? "dolibarr\\-(3\\.8\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" :
|
||||
$ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" :
|
||||
|
||||
@@ -18,8 +18,8 @@ License: GPLv3+
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
|
||||
URL: https://www.dolibarr.org
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@@ -162,9 +162,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
%_datadir/dolibarr/htdocs/commande
|
||||
%_datadir/dolibarr/htdocs/compta
|
||||
@@ -173,6 +175,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
@@ -192,6 +195,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@@ -202,10 +206,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/websites
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
|
||||
@@ -26,17 +26,17 @@ License: GPL-3.0+
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
URL: https://www.dolibarr.org
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_redhat-fedora/%{name}-%{version}.tgz
|
||||
%else
|
||||
%if 0%{?mdkversion}
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
|
||||
%else
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_generic/%{name}-%{version}.tgz
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_generic/%{name}-%{version}.tgz
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
@@ -242,9 +242,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
%_datadir/dolibarr/htdocs/commande
|
||||
%_datadir/dolibarr/htdocs/compta
|
||||
@@ -253,6 +255,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
@@ -272,6 +275,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@@ -282,10 +286,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/websites
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
|
||||
@@ -18,8 +18,8 @@ License: GPL-3.0+
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
|
||||
URL: https://www.dolibarr.org
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_mandriva/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@@ -159,9 +159,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
%_datadir/dolibarr/htdocs/commande
|
||||
%_datadir/dolibarr/htdocs/compta
|
||||
@@ -170,6 +172,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
@@ -189,6 +192,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@@ -199,10 +203,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/websites
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
|
||||
@@ -18,8 +18,8 @@ License: GPL-3.0+
|
||||
#Packager: Laurent Destailleur (Eldy) <eldy@users.sourceforge.net>
|
||||
Vendor: Dolibarr dev team
|
||||
|
||||
URL: http://www.dolibarr.org
|
||||
Source0: http://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
|
||||
URL: https://www.dolibarr.org
|
||||
Source0: https://www.dolibarr.org/files/lastbuild/package_rpm_opensuse/%{name}-%{version}.tgz
|
||||
Patch0: %{name}-forrpm.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@@ -170,9 +170,11 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/blockedlog
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
%_datadir/dolibarr/htdocs/cashdesk
|
||||
%_datadir/dolibarr/htdocs/categories
|
||||
%_datadir/dolibarr/htdocs/collab
|
||||
%_datadir/dolibarr/htdocs/comm
|
||||
%_datadir/dolibarr/htdocs/commande
|
||||
%_datadir/dolibarr/htdocs/compta
|
||||
@@ -181,6 +183,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/custom
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
@@ -200,6 +203,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/modulebuilder
|
||||
%_datadir/dolibarr/htdocs/multicurrency
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
@@ -210,10 +214,12 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
%_datadir/dolibarr/htdocs/resource
|
||||
%_datadir/dolibarr/htdocs/societe
|
||||
%_datadir/dolibarr/htdocs/stripe
|
||||
%_datadir/dolibarr/htdocs/supplier_proposal
|
||||
%_datadir/dolibarr/htdocs/support
|
||||
%_datadir/dolibarr/htdocs/theme
|
||||
%_datadir/dolibarr/htdocs/user
|
||||
%_datadir/dolibarr/htdocs/variants
|
||||
%_datadir/dolibarr/htdocs/webservices
|
||||
%_datadir/dolibarr/htdocs/websites
|
||||
%_datadir/dolibarr/htdocs/*.ico
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$force_install_packager='rpmfedora';
|
||||
$force_install_noedit=1; # 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_noedit=1; // 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$force_install_packager='rpmgeneric';
|
||||
$force_install_noedit=1; # 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_noedit=1; // 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$force_install_packager='rpmmandriva';
|
||||
$force_install_noedit=1; # 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_noedit=1; // 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$force_install_packager='rpmopensuse';
|
||||
$force_install_noedit=1; # 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_noedit=1; // 1 to block var specific to distrib, 2 to block every technical parameters
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
|
||||
@@ -3,20 +3,18 @@ This file describe changes made on external library after beeing included
|
||||
in Dolibarr root.
|
||||
|
||||
|
||||
|
||||
ALL:
|
||||
----
|
||||
Replace "& new" by "new"
|
||||
Check "@CHANGE"
|
||||
|
||||
|
||||
|
||||
CKEDITOR:
|
||||
---------
|
||||
CKEDITOR (4.6.2):
|
||||
-----------------
|
||||
* In ckeditor/ckeditor/contents.css
|
||||
Replace:
|
||||
margin: 20px;
|
||||
body { ... margin: 20px;
|
||||
With
|
||||
margin: 5px;
|
||||
body { ... margin: 5px;
|
||||
|
||||
|
||||
|
||||
@@ -33,21 +31,6 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
|
||||
|
||||
FPDI:
|
||||
-----
|
||||
Replace:
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
with:
|
||||
try {
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
print $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
@@ -56,7 +39,7 @@ define('QR_FIND_FROM_RANDOM', 2);
|
||||
with
|
||||
define('QR_FIND_FROM_RANDOM', false);
|
||||
|
||||
* Removed useless directories (examples, tools)
|
||||
* Removed useless directories ("examples", "tools")
|
||||
|
||||
* Fix
|
||||
// initialize subsetchars
|
||||
@@ -116,7 +99,7 @@ JQUERYFILETREE:
|
||||
RESTLER:
|
||||
--------
|
||||
|
||||
* Add 2 lines into function
|
||||
* Add 2 lines into file AutoLoader.php to complete function
|
||||
private function alias($className, $currentClass)
|
||||
{
|
||||
...
|
||||
@@ -127,4 +110,17 @@ to get
|
||||
if ($className == 'Luracast\Restler\string') return;
|
||||
if ($className == 'Luracast\Restler\mixed') return;
|
||||
...
|
||||
|
||||
|
||||
|
||||
PARSEDOWN
|
||||
---------
|
||||
|
||||
* Fix to avoid fatal error when mb_strlen not available:
|
||||
|
||||
// @CHANGE LDR Fix when mb_strlen is not available
|
||||
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||
else $len = strlen($line);
|
||||
$shortage = 4 - $len % 4;
|
||||
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
#
|
||||
# ldapsearch -h hostname -x
|
||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
||||
|
||||
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -155,7 +155,7 @@ fi
|
||||
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
||||
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
#echo "drop old table"
|
||||
echo "drop table llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
|
||||
echo "drop table if exists llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
|
||||
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
||||
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
export res=$?
|
||||
|
||||
@@ -528,7 +528,7 @@ CREATE TABLE `llx_bank` (
|
||||
|
||||
LOCK TABLES `llx_bank` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */;
|
||||
INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','0000-00-00 00:00:00','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','0000-00-00 00:00:00','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(4,'2010-07-10 14:59:41','0000-00-00 00:00:00','2010-07-10','2010-07-10',0.02000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,'Client salon invidivdu',NULL),(5,'2011-07-18 20:50:24','0000-00-00 00:00:00','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','0000-00-00 00:00:00','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','0000-00-00 00:00:00','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','0000-00-00 00:00:00','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL);
|
||||
INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2010-07-09 00:00:24','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2010-07-10 13:33:42','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(4,'2010-07-10 14:59:41','2010-07-10 14:59:41','2010-07-10','2010-07-10',0.02000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,'Client salon invidivdu',NULL),(5,'2011-07-18 20:50:24','2011-07-18 20:50:24','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2011-07-18 20:50:47','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2011-08-06 20:33:54','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2011-08-08 02:53:40','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL);
|
||||
/*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -4844,7 +4844,7 @@ CREATE TABLE `llx_opensurvey_sondage` (
|
||||
|
||||
LOCK TABLES `llx_opensurvey_sondage` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_opensurvey_sondage` DISABLE KEYS */;
|
||||
INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds','fdffds','2013-03-06 23:00:00','D+','1',1,'dolibarr','0000-00-00 00:00:00');
|
||||
INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds','fdffds','2013-03-06 23:00:00','D+','1',1,'dolibarr','2000-01-01 00:00:00');
|
||||
/*!40000 ALTER TABLE `llx_opensurvey_sondage` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
9423
dev/initdemo/mysqldump_dolibarr_6.0.0.sql
Normal file
@@ -187,11 +187,13 @@ export list="
|
||||
--ignore-table=$base.llx_bt_webseedfiles
|
||||
--ignore-table=$base.llx_c_civilite
|
||||
--ignore-table=$base.llx_c_dolicloud_plans
|
||||
--ignore-table=$base.llx_c_pays
|
||||
--ignore-table=$base.llx_c_source
|
||||
--ignore-table=$base.llx_cabinetmed_c_banques
|
||||
--ignore-table=$base.llx_cabinetmed_c_ccam
|
||||
--ignore-table=$base.llx_cabinetmed_c_examconclusion
|
||||
--ignore-table=$base.llx_cabinetmed_cons
|
||||
--ignore-table=$base.llx_cabinetmed_cons_extrafields
|
||||
--ignore-table=$base.llx_cabinetmed_diaglec
|
||||
--ignore-table=$base.llx_cabinetmed_examaut
|
||||
--ignore-table=$base.llx_cabinetmed_exambio
|
||||
@@ -207,7 +209,18 @@ export list="
|
||||
--ignore-table=$base.llx_dolicloud_customers
|
||||
--ignore-table=$base.llx_dolicloud_stats
|
||||
--ignore-table=$base.llx_dolicloud_emailstemplates
|
||||
--ignore-table=$base.llx_dolireport_column
|
||||
--ignore-table=$base.llx_dolireport_criteria
|
||||
--ignore-table=$base.llx_dolireport_graph
|
||||
--ignore-table=$base.llx_dolireport_plot
|
||||
--ignore-table=$base.llx_dolireport_report
|
||||
--ignore-table=$base.llx_domain
|
||||
--ignore-table=$base.llx_ecommerce_commande
|
||||
--ignore-table=$base.llx_ecommerce_facture
|
||||
--ignore-table=$base.llx_ecommerce_product
|
||||
--ignore-table=$base.llx_ecommerce_site
|
||||
--ignore-table=$base.llx_ecommerce_societe
|
||||
--ignore-table=$base.llx_ecommerce_socpeople
|
||||
--ignore-table=$base.llx_element_rang
|
||||
--ignore-table=$base.llx_entity
|
||||
--ignore-table=$base.llx_filemanager_roots
|
||||
@@ -215,6 +228,8 @@ export list="
|
||||
--ignore-table=$base.llx_google_maps
|
||||
--ignore-table=$base.llx_milestone
|
||||
--ignore-table=$base.llx_monitoring_probes
|
||||
--ignore-table=$base.llx_m
|
||||
--ignore-table=$base.llx_m_extrafields
|
||||
--ignore-table=$base.llx_notes
|
||||
--ignore-table=$base.llx_pos_cash
|
||||
--ignore-table=$base.llx_pos_control_cash
|
||||
|
||||
13
dev/resources/iso-normes/sample_FEC_file.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
JOURNALCODE JOURNALLIB ECRITURENUM ECRITUREDATE COMPTENUM COMPTELIB COMPAUXNUM COMPAUXLIB PIECEREF PIECEDATE ECRITURELIB DEBIT CREDIT ECRITURELET DATELET VALIDDATE MONTANTDEVISE IDEVISE
|
||||
Banque Banque 17293 20170109 401PPRO PUBLI-PROV L08 20170109 PPRO domiciliation 1TR 187,20 0,00 20170109
|
||||
Banque Banque 17293 20170109 5121CRA CR AGRICOLE L08 20170109 PPRO domiciliation 1TR 0,00 187,20 20170109
|
||||
Banque Banque 17295 20170109 401ORPA ORANGE PARIS Report 20170109 ORPA adsl par 12 96,00 0,00 20170109
|
||||
Banque Banque 17295 20170109 5121CRA CR AGRICOLE Report 20170109 ORPA adsl par 12 0,00 96,00 20170109
|
||||
Banque Banque 17302 20170105 401ORVI ORANGE VEBRON INTERNET Report 20170105 ORVI adsl veb 12 26,00 0,00 20170109
|
||||
Banque Banque 17302 20170105 5121CRA CR AGRICOLE Report 20170105 ORVI adsl veb 12 0,00 26,00 20170109
|
||||
Fournisseurs Fournisseurs 17305 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170119
|
||||
Fournisseurs Fournisseurs 17305 20170119 622200 Courtages s/ ventes A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170119
|
||||
Banque Banque 17306 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170119
|
||||
Banque Banque 17306 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170119
|
||||
Banque Banque 17307 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170131
|
||||
Banque Banque 17307 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170131
|
||||
@@ -1 +1,4 @@
|
||||
http://www.taxrates.cc/index.html
|
||||
http://www.taxrates.cc/index.html
|
||||
|
||||
For India: VAT=IGST/CGST=Localtax1/SGST=Localtax2: https://cleartax.in/s/what-is-sgst-cgst-igst
|
||||
|
||||
|
||||
2
dev/skeletons/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
out.*
|
||||
socpeople*
|
||||
@@ -1,34 +0,0 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
This directory contains PHP script samples that can be used to start a development on Dolibarr.
|
||||
|
||||
|
||||
*** build_class_from_table.php:
|
||||
|
||||
This is the script to use to generate PHP code of a PHP POJO class
|
||||
object, a PHP script that use this POJO. This script use the files
|
||||
skeleton_*.php to build its generated code.
|
||||
|
||||
|
||||
*** modMyModule.class.php:
|
||||
|
||||
Is a sample of module descriptor that you can use if you want to build a new module/plugin for
|
||||
Dolibarr.
|
||||
|
||||
|
||||
*** skeleton_script.php:
|
||||
|
||||
Is a sample you can use as an example if you need to build a script to run on command line
|
||||
|
||||
|
||||
*** skeleton_page.php:
|
||||
|
||||
Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI.
|
||||
|
||||
|
||||
*** skeleton_class.class.php:
|
||||
|
||||
Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development.
|
||||
However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file.
|
||||
After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code.
|
||||
No more coding is needed to get access to table with this script because the file is completely generated once.
|
||||
1
dev/skeletons/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Files and tools were moved into htdocs/modulebuilder/template
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/build_api_class.php
|
||||
* \ingroup core
|
||||
* \brief Create a complete API class file from existant class file
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
// After this $db is a defined handler to database.
|
||||
|
||||
// Main
|
||||
$version='1';
|
||||
@set_time_limit(0);
|
||||
$error=0;
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
|
||||
print "***** $script_file ($version) *****\n";
|
||||
|
||||
|
||||
// -------------------- START OF BUILD_API_FROM_CLASS --------------------
|
||||
|
||||
// Check parameters
|
||||
if (! isset($argv[1]) && ! isset($argv[2]))
|
||||
{
|
||||
print "Usage: $script_file phpClassFile phpClassName\n";
|
||||
exit;
|
||||
}
|
||||
// Show parameters
|
||||
print 'Classfile='.$argv[1]."\n";
|
||||
print 'Classname='.$argv[2]."\n";
|
||||
|
||||
$classfile=$argv[1];
|
||||
$classname=$argv[2];
|
||||
$classmin=strtolower($classname);
|
||||
$classnameApi = $classname.'Api';
|
||||
$property=array();
|
||||
$targetcontent='';
|
||||
|
||||
// Load the class and read properties
|
||||
require_once($classfile);
|
||||
|
||||
$property=array();
|
||||
$class = new $classname($db);
|
||||
$values=get_class_vars($classname);
|
||||
|
||||
unset($values['db']);
|
||||
unset($values['error']);
|
||||
unset($values['errors']);
|
||||
unset($values['element']);
|
||||
unset($values['table_element']);
|
||||
unset($values['table_element_line']);
|
||||
unset($values['fk_element']);
|
||||
unset($values['ismultientitymanaged']);
|
||||
|
||||
// Read skeleton_api_class.class.php file
|
||||
$skeletonfile=$path.'skeleton_api_class.class.php';
|
||||
$sourcecontent=file_get_contents($skeletonfile);
|
||||
if (! $sourcecontent)
|
||||
{
|
||||
print "\n";
|
||||
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
|
||||
print "Try to run script from skeletons directory.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define output variables
|
||||
$outfile='out.api_'.$classmin.'.class.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_api_class\.class\.php/', 'api_'.$classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
//$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/SkeletonApi/', $classnameApi, $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton/', $classname, $targetcontent);
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $targetcontent);
|
||||
fclose($fp);
|
||||
print "\n";
|
||||
print "File '".$outfile."' has been built in current directory.\n";
|
||||
}
|
||||
else $error++;
|
||||
|
||||
|
||||
|
||||
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /module/class.\n";
|
||||
return $error;
|
||||
@@ -1,676 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/build_class_from_table.php
|
||||
* \ingroup core
|
||||
* \brief Create a complete class file from a table in database
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
// After this $db is a defined handler to database.
|
||||
|
||||
// Main
|
||||
$version='3.2';
|
||||
@set_time_limit(0);
|
||||
$error=0;
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
|
||||
print "***** $script_file ($version) *****\n";
|
||||
|
||||
|
||||
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
// Check parameters
|
||||
if (! isset($argv[1]) || ! isset($argv[2]) || (isset($argv[3]) && ! isset($argv[7])))
|
||||
{
|
||||
print "Usage: $script_file tablename modulename [server port databasename user pass]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($argv[3]) && isset($argv[4]) && isset($argv[5]) && isset($argv[6]) && isset($argv[7]))
|
||||
{
|
||||
print 'Use specific database ids'."\n";
|
||||
$db=getDoliDBInstance('mysqli',$argv[3],$argv[6],$argv[7],$argv[5],$argv[4]);
|
||||
}
|
||||
|
||||
if ($db->type != 'mysql' && $db->type != 'mysqli')
|
||||
{
|
||||
print "Error: This script works with mysql or mysqli driver only\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$table=$argv[1];
|
||||
$module=$argv[2];
|
||||
|
||||
// Show parameters
|
||||
print 'Tablename: '.$table."\n";
|
||||
print 'Modulename: '.$module."\n";
|
||||
print "Current dir: ".getcwd()."\n";
|
||||
print "Database name: ".$db->database_name."\n";
|
||||
|
||||
|
||||
// Define array with list of properties
|
||||
$property=array();
|
||||
$foundprimary=0;
|
||||
$resql=$db->DDLDescTable($table);
|
||||
if ($resql)
|
||||
{
|
||||
$i=0;
|
||||
while($obj=$db->fetch_object($resql))
|
||||
{
|
||||
//var_dump($obj);
|
||||
$i++;
|
||||
$property[$i]['field']=$obj->Field;
|
||||
if ($obj->Key == 'PRI')
|
||||
{
|
||||
$property[$i]['primary']=1;
|
||||
$foundprimary=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$property[$i]['primary']=1;
|
||||
}
|
||||
$property[$i]['type'] =$obj->Type;
|
||||
$property[$i]['null'] =$obj->Null;
|
||||
$property[$i]['extra']=$obj->Extra;
|
||||
if ($property[$i]['type'] == 'date'
|
||||
|| $property[$i]['type'] == 'datetime'
|
||||
|| $property[$i]['type'] == 'timestamp')
|
||||
{
|
||||
$property[$i]['istime']=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$property[$i]['istime']=false;
|
||||
}
|
||||
if (preg_match('/varchar/i',$property[$i]['type'])
|
||||
|| preg_match('/text/i',$property[$i]['type']))
|
||||
{
|
||||
$property[$i]['ischar']=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$property[$i]['ischar']=false;
|
||||
}
|
||||
if (preg_match('/int/i',$property[$i]['type']))
|
||||
{
|
||||
$property[$i]['isint']=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$property[$i]['isint']=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Error: Failed to get description for table '".$table."'.\n";
|
||||
return false;
|
||||
}
|
||||
//var_dump($property);
|
||||
|
||||
// Define substitute fetch/select parameters
|
||||
$varpropselect="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
$i++;
|
||||
if ($prop['field'] != 'rowid')
|
||||
{
|
||||
$varpropselect.="\t\t\$sql .= \" ";
|
||||
$varpropselect.="t.".$prop['field'];
|
||||
if ($i < count($property)) $varpropselect.=",";
|
||||
$varpropselect.="\";";
|
||||
$varpropselect.="\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------------------
|
||||
// Build skeleton_class.class.php
|
||||
//--------------------------------
|
||||
|
||||
// Define working variables
|
||||
$table=strtolower($table);
|
||||
$tablenoprefix=preg_replace('/'.preg_quote(MAIN_DB_PREFIX,'/').'/i','',$table);
|
||||
$classname=preg_replace('/_/','',ucfirst($tablenoprefix));
|
||||
$classmin=preg_replace('/_/','',strtolower($classname));
|
||||
|
||||
|
||||
// Read skeleton_class.class.php file
|
||||
$skeletonfile=$path.'skeleton_class.class.php';
|
||||
$sourcecontent=file_get_contents($skeletonfile);
|
||||
if (! $sourcecontent)
|
||||
{
|
||||
print "\n";
|
||||
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
|
||||
print "Try to run script from skeletons directory.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define output variables
|
||||
$outfile=$classmin.'.class.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute module name
|
||||
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element = \''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element = \''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
|
||||
$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent);
|
||||
|
||||
// Substitute table name
|
||||
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
||||
|
||||
// Substitute declaration parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||
{
|
||||
$varprop.="\tpublic \$".$prop['field'];
|
||||
if ($prop['istime']) $varprop.=" = ''";
|
||||
$varprop.=";";
|
||||
if ($prop['comment']) $varprop.="\t// ".$prop['extra'];
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('public $prop1;','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('public $prop2;','/').'/', '', $targetcontent);
|
||||
|
||||
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 1((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 2((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||
|
||||
// Substitute clean parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="\t\tif (isset(\$this->".$prop['field'].")) {\n\t\t\t \$this->".$prop['field']." = trim(\$this->".$prop['field'].");\n\t\t}";
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/if \(isset\(\$this->prop1\)\) {((\n|\r|\t)*)\$this->prop1 = trim\(\$this->prop1\);((\n|\r|\t)*)}/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/if \(isset\(\$this->prop2\)\) {((\n|\r|\t)*)\$this->prop2 = trim\(\$this->prop2\);((\n|\r|\t)*)}/', '', $targetcontent);
|
||||
|
||||
|
||||
$no_output_field=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] == 'tms') $no_output_field++; // This is a field of type timestamp edited automatically
|
||||
if ($prop['extra'] == 'auto_increment') $no_output_field++;
|
||||
}
|
||||
// Substitute insert into parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
$i++;
|
||||
$addfield=1;
|
||||
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
|
||||
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
||||
|
||||
if ($addfield)
|
||||
{
|
||||
$varprop.="\t\t\$sql.= '".$prop['field'];
|
||||
if ($i < (count($property)-$no_output_field)) $varprop.=",";
|
||||
$varprop.="';";
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);
|
||||
|
||||
// Substitute insert values parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
|
||||
//Count nb field to output to manage commat at end SQL instruction
|
||||
|
||||
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
|
||||
$addfield=1;
|
||||
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
|
||||
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
||||
|
||||
if ($addfield)
|
||||
{
|
||||
$i++;
|
||||
|
||||
$varprop.="\t\t\$sql .= ' ";
|
||||
if ($prop['field']=='datec')
|
||||
{
|
||||
$varprop.='\'."\'".$this->db->idate(dol_now())."\'"';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.=").\"'\")";
|
||||
}
|
||||
elseif ($prop['ischar'])
|
||||
{
|
||||
$varprop.="'.(! isset(\$this->".$prop['field'].")?'NULL':\"'\".";
|
||||
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
|
||||
$varprop.=".\"'\")";
|
||||
}
|
||||
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
||||
{
|
||||
$varprop.="'.\$user->id";
|
||||
}
|
||||
elseif ($prop['isint'])
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':';
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.=')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.='."\'")';
|
||||
}
|
||||
|
||||
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||
$varprop.=';';
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
|
||||
$patern1='/\$sql \.= \' (.*)\' \. \$this->prop1 \. \'(.*),\';/';
|
||||
$patern2='/\$sql \.= \' (.*)\' \. \$this->prop2 \. \'(.*)\';/';
|
||||
$targetcontent=preg_replace($patern1, $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace($patern2, '', $targetcontent);
|
||||
|
||||
// Substitute update values parameters
|
||||
|
||||
//Count nb field to output to manage commat at end SQL instruction
|
||||
$no_output_field=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['extra'] == 'auto_increment') $no_output_field++;
|
||||
}
|
||||
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
|
||||
$addfield=1;
|
||||
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
||||
|
||||
if ($addfield)
|
||||
{
|
||||
$i++;
|
||||
|
||||
$varprop.="\t\t\$sql .= ' ";
|
||||
$varprop.=$prop['field'].' = ';
|
||||
if ($prop['field']=='tms') {
|
||||
$varprop.='\'.(dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
|
||||
$varprop.='$this->'.$prop['field'];
|
||||
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'")';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
|
||||
$varprop.='$this->'.$prop['field'];
|
||||
$varprop.=')."\'" : \'null\')';
|
||||
}
|
||||
|
||||
elseif ($prop['field']=='fk_user_mod') {
|
||||
$varprop.="'.\$user->id";
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.="'.";
|
||||
if ($prop['ischar']) $varprop.='(isset($this->'.$prop['field'].')?"\'".$this->db->escape($this->'.$prop['field'].')."\'":"null")';
|
||||
elseif ($prop['isint']) $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
|
||||
else $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
|
||||
}
|
||||
|
||||
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||
$varprop.=';';
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$sql \.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql \.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/', '', $targetcontent);
|
||||
|
||||
// Substitute fetch/select parameters
|
||||
$targetcontent=preg_replace('/\$sql \.= \' t\.field1,\';/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql \.= \' t\.field2\';/', '', $targetcontent);
|
||||
|
||||
// Substitute select set parameters
|
||||
$varprop="\n";
|
||||
$varpropline="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
$i++;
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||
{
|
||||
$varprop.="\t\t\t\t\$this->".$prop['field']." = ";
|
||||
if ($prop['istime']) $varprop.='$this->db->jdate(';
|
||||
$varprop.='$obj->'.$prop['field'];
|
||||
if ($prop['istime']) $varprop.=')';
|
||||
$varprop.=";";
|
||||
$varprop.="\n";
|
||||
|
||||
$varpropline.="\t\t\t\t\$line->".$prop['field']." = ";
|
||||
if ($prop['istime']) $varpropline.='$this->db->jdate(';
|
||||
$varpropline.='$obj->'.$prop['field'];
|
||||
if ($prop['istime']) $varpropline.=')';
|
||||
$varpropline.=";";
|
||||
$varpropline.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$this->prop1 = \$obj->field1;/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$this->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
//Substirute fetchAll
|
||||
$targetcontent=preg_replace('/\$line->prop1 = \$obj->field1;/', $varpropline, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$line->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
|
||||
// Substitute initasspecimen parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||
{
|
||||
$varprop.="\t\t\$this->".$prop['field']." = '';";
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$this->prop1 = \'prop1\';/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$this->prop2 = \'prop2\';/', '', $targetcontent);
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $targetcontent);
|
||||
fclose($fp);
|
||||
print "\n";
|
||||
print "File '".$outfile."' has been built in current directory.\n";
|
||||
}
|
||||
else $error++;
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Build skeleton_script.php, skeleton_list.php and skeleton_card.php
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
$skeletonfiles=array(
|
||||
$path.'skeleton_script.php' => $classmin.'_script.php',
|
||||
$path.'skeleton_list.php' => $classmin.'_list.php',
|
||||
$path.'skeleton_card.php' => $classmin.'_card.php'
|
||||
);
|
||||
|
||||
foreach ($skeletonfiles as $skeletonfile => $outfile)
|
||||
{
|
||||
$sourcecontent=file_get_contents($skeletonfile);
|
||||
if (! $sourcecontent)
|
||||
{
|
||||
print "\n";
|
||||
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
|
||||
print "Try to run script from skeletons directory.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define output variables
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute module name
|
||||
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
|
||||
$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent);
|
||||
|
||||
// Substitute table name
|
||||
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
||||
|
||||
// Substitute GETPOST search_fieldx
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
if ($prop['isint']) $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','int');\n";
|
||||
else $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','alpha');\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field1=GETPOST("search_field1");','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field2=GETPOST("search_field2");','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute GETPOST fieldx
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
if ($prop['isint']) $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','int');\n";
|
||||
else $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','alpha');\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('$object->prop1=GETPOST("field1");','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('$object->prop2=GETPOST("field2");','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute reset search_field = '';
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.='$search_'.$prop['field']."='';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field1=\'\';','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field2=\'\';','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute fetch/select parameters
|
||||
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
// Substitute where for search
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.='if ($search_'.$prop['field'].') $sql.= natural_search("'.$prop['field'].'",$search_'.$prop['field'].');'."\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('if ($search_field1) $sql.= natural_search("field1",$search_field1);','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('if ($search_field2) $sql.= natural_search("field2",$search_field2);','/').'/', '', $targetcontent);
|
||||
|
||||
// substitute $params.=
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="if (\$search_".$prop['field']." != '') \$params.= '&search_".$prop['field']."='.urlencode(\$search_".$prop['field'].");\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote("if (\$search_field1 != '') \$params.= '&search_field1='.urlencode(\$search_field1);",'/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote("if (\$search_field2 != '') \$params.= '&search_field2='.urlencode(\$search_field2);",'/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute arrayfields
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="'t.".$prop['field']."'=>array('label'=>\$langs->trans(\"Field".$prop['field']."\"), 'checked'=>1),\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote("'t.field1'=>array('label'=>\$langs->trans(\"Field1\"), 'checked'=>1),",'/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote("'t.field2'=>array('label'=>\$langs->trans(\"Field2\"), 'checked'=>1),",'/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute print_liste_field_titre
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$params,'',\$sortfield,\$sortorder);\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_FIELDS/', $varprop, $targetcontent);
|
||||
|
||||
// Substitute fields title search
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '<td class=\"liste_titre\"><input type=\"text\" class=\"flat\" name=\"search_".$prop['field']."\" value=\"'.\$search_".$prop['field'].".'\" size=\"10\"></td>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/LIST_OF_TD_TITLE_SEARCH/', $varprop, $targetcontent);
|
||||
|
||||
// Substitute where for <td>.fieldx.</td>
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '<td>'.\$obj->".$prop['field'].".'</td>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print '<td>'.\$obj->field1.'</td>';",'/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print '<td>'.\$obj->field2.'</td>';",'/').'/', '', $targetcontent);
|
||||
|
||||
// LIST_OF_TD_LABEL_FIELDS_CREATE - List of td for card view
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td><input class=\"flat\" type=\"text\" name=\"".$prop['field']."\" value=\"'.GETPOST('".$prop['field']."').'\"></td></tr>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_CREATE/', $varprop, $targetcontent);
|
||||
|
||||
// LIST_OF_TD_LABEL_FIELDS_EDIT - List of td for card view
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td><input class=\"flat\" type=\"text\" name=\"".$prop['field']."\" value=\"'.\$object->".$prop['field'].".'\"></td></tr>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent);
|
||||
|
||||
// LIST_OF_TD_LABEL_FIELDS_VIEW - List of td for card view
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td>\$object->".$prop['field']."</td></tr>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent);
|
||||
|
||||
|
||||
// LIST_OF_TD_FIELDS_LIST
|
||||
|
||||
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $targetcontent);
|
||||
fclose($fp);
|
||||
print "File '".$outfile."' has been built in current directory.\n";
|
||||
}
|
||||
else $error++;
|
||||
}
|
||||
|
||||
|
||||
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
print "You can now move generated files to store them into directory /yourmodule/class (for .class.php file) or /yourmodule.\n";
|
||||
return $error;
|
||||
@@ -1,179 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/build_webservice_from_class.php
|
||||
* \ingroup core
|
||||
* \brief Create a complete webservice file from CRUD functions of a PHP class
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Include Dolibarr environment
|
||||
require_once($path."../../htdocs/master.inc.php");
|
||||
// After this $db is a defined handler to database.
|
||||
|
||||
// Main
|
||||
$version='1.8';
|
||||
@set_time_limit(0);
|
||||
$error=0;
|
||||
|
||||
$langs->load("main");
|
||||
|
||||
|
||||
print "***** $script_file ($version) *****\n";
|
||||
|
||||
|
||||
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
// Check parameters
|
||||
if (! isset($argv[1]) && ! isset($argv[2]))
|
||||
{
|
||||
print "Usage: $script_file phpClassFile phpClassName\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Show parameters
|
||||
print 'Classfile='.$argv[1]."\n";
|
||||
print 'Classname='.$argv[2]."\n";
|
||||
|
||||
$classfile=$argv[1];
|
||||
$classname=$argv[2];
|
||||
$classmin=strtolower($classname);
|
||||
$property=array();
|
||||
$targetcontent='';
|
||||
|
||||
// Load the class and read properties
|
||||
require_once($classfile);
|
||||
|
||||
$property=array();
|
||||
$class = new $classname($db);
|
||||
$values=get_class_vars($classname);
|
||||
|
||||
unset($values['db']);
|
||||
unset($values['error']);
|
||||
unset($values['errors']);
|
||||
unset($values['element']);
|
||||
unset($values['table_element']);
|
||||
unset($values['table_element_line']);
|
||||
unset($values['fk_element']);
|
||||
unset($values['ismultientitymanaged']);
|
||||
|
||||
$properties=array_keys($values);
|
||||
|
||||
// Read skeleton_class.class.php file
|
||||
$skeletonfile='skeleton_webservice_server.php';
|
||||
$sourcecontent=file_get_contents($skeletonfile);
|
||||
if (! $sourcecontent)
|
||||
{
|
||||
print "\n";
|
||||
print "Error: Failed to read skeleton sample '".$skeletonfile."'\n";
|
||||
print "Try to run script from skeletons directory.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define output variables
|
||||
$outfile='out.server_'.$classmin.'.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/Skeleton/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute declaration parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
|
||||
while($i<count($properties))
|
||||
{
|
||||
$varprop.="'".$properties[$i]."' => array('name'=>'".$properties[$i]."','type'=>'xsd:string')";
|
||||
$i++;
|
||||
|
||||
if ($i == count($properties))
|
||||
$varprop.="\n";
|
||||
else
|
||||
$varprop.=",\n";
|
||||
}
|
||||
|
||||
$targetcontent=preg_replace('/\'prop1\'=>\'xxx\',/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\'prop2\'=>\'xxx\',/', '', $targetcontent);
|
||||
// Substitute get method parameters
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
|
||||
while($i<count($properties))
|
||||
{
|
||||
$varprop.="'".$properties[$i]."' => $".$classmin."->".$properties[$i];
|
||||
|
||||
$i++;
|
||||
if ($i == count($properties))
|
||||
$varprop.="\n";
|
||||
else
|
||||
$varprop.=",\n";
|
||||
}
|
||||
|
||||
$targetcontent=preg_replace('/\'prop1\'=>\$'.$classmin.'->prop1,/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\'prop2\'=>\$'.$classmin.'->prop2,/', '', $targetcontent);
|
||||
|
||||
// Substitute get method parameters
|
||||
$varprop="\n\t\t";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
|
||||
while($i<count($properties))
|
||||
{
|
||||
|
||||
$varprop.='$newobject->'.$properties[$i].'=$'.$classmin.'->'.$properties[$i].';';
|
||||
|
||||
$i++;
|
||||
if ($i == count($properties))
|
||||
$varprop.="\n";
|
||||
else
|
||||
$varprop.="\n\t\t";
|
||||
}
|
||||
$targetcontent=preg_replace('/\$newobject->prop1=\$'.$classmin.'->prop1;/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$newobject->prop2=\$'.$classmin.'->prop2;/', '', $targetcontent);
|
||||
|
||||
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
if ($fp)
|
||||
{
|
||||
fputs($fp, $targetcontent);
|
||||
fclose($fp);
|
||||
print "File '".$outfile."' has been built in current directory.\n";
|
||||
}
|
||||
else $error++;
|
||||
|
||||
// -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
print "You must rename files by removing the 'out.' prefix in their name.\n";
|
||||
return $error;
|
||||
@@ -1,291 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mymodule Module MyModule
|
||||
* \brief Example of a module descriptor.
|
||||
* Such a file must be copied into htdocs/mymodule/core/modules directory.
|
||||
* \file htdocs/mymodule/core/modules/modMyModule.class.php
|
||||
* \ingroup mymodule
|
||||
* \brief Description and activation file for module MyModule
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Description and activation class for module MyModule
|
||||
*/
|
||||
class modMyModule extends DolibarrModules
|
||||
{
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// Id for module (must be unique).
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 500000; // TODO Go on page http://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'mymodule';
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','interface','other'
|
||||
// It is used to group modules by family in module setup page
|
||||
$this->family = "other";
|
||||
// Module position in the family
|
||||
$this->module_position = 500;
|
||||
// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
|
||||
//$this->familyinfo = array('myownfamily' => array('position' => '001', 'label' => $langs->trans("MyOwnFamily")));
|
||||
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Description of module MyModule";
|
||||
$this->descriptionlong = "A very long description. Can be a full HTML content";
|
||||
$this->editor_name = 'Editor name';
|
||||
$this->editor_url = 'https://www.dolibarr.org';
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = '1.0';
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Name of image file used for this module.
|
||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||
$this->picto='generic';
|
||||
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /mymodule/core/modules/barcode)
|
||||
// for specific css file (eg: /mymodule/css/mymodule.css.php)
|
||||
//$this->module_parts = array(
|
||||
// 'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
|
||||
// 'login' => 0, // Set this to 1 if module has its own login method directory (core/login)
|
||||
// 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (core/substitutions)
|
||||
// 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
|
||||
// 'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
|
||||
// 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
|
||||
// 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
|
||||
// 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
// 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
|
||||
// 'js' => array('/mymodule/js/mymodule.js'), // Set this to relative path of js file if module must load a js on all pages
|
||||
// 'hooks' => array('hookcontext1','hookcontext2',...) // Set here all hooks context managed by module. You can also set hook context 'all'
|
||||
// 'dir' => array('output' => 'othermodulename'), // To force the default directories names
|
||||
// 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule')) // Set here all workflow context managed by module
|
||||
// );
|
||||
$this->module_parts = array();
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
// Example: this->dirs = array("/mymodule/temp");
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module.
|
||||
$this->config_page_url = array("mysetuppage.php@mymodule");
|
||||
|
||||
// Dependencies
|
||||
$this->hidden = false; // A condition to hide module
|
||||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("mylangfile@mymodule");
|
||||
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array();
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
||||
// 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||
// 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
|
||||
// where objecttype can be
|
||||
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||
// 'contact' to add a tab in contact view
|
||||
// 'contract' to add a tab in contract view
|
||||
// 'group' to add a tab in group view
|
||||
// 'intervention' to add a tab in intervention view
|
||||
// 'invoice' to add a tab in customer invoice view
|
||||
// 'invoice_supplier' to add a tab in supplier invoice view
|
||||
// 'member' to add a tab in fundation member view
|
||||
// 'opensurveypoll' to add a tab in opensurvey poll view
|
||||
// 'order' to add a tab in customer order view
|
||||
// 'order_supplier' to add a tab in supplier order view
|
||||
// 'payment' to add a tab in payment view
|
||||
// 'payment_supplier' to add a tab in supplier payment view
|
||||
// 'product' to add a tab in product view
|
||||
// 'propal' to add a tab in propal view
|
||||
// 'project' to add a tab in project view
|
||||
// 'stock' to add a tab in stock view
|
||||
// 'thirdparty' to add a tab in third party view
|
||||
// 'user' to add a tab in user view
|
||||
$this->tabs = array();
|
||||
|
||||
if (! isset($conf->mymodule) || ! isset($conf->mymodule->enabled))
|
||||
{
|
||||
$conf->mymodule=new stdClass();
|
||||
$conf->mymodule->enabled=0;
|
||||
}
|
||||
|
||||
// Dictionaries
|
||||
$this->dictionaries=array();
|
||||
/* Example:
|
||||
$this->dictionaries=array(
|
||||
'langs'=>'mylangfile@mymodule',
|
||||
'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor
|
||||
'tablib'=>array("Table1","Table2","Table3"), // Label of tables
|
||||
'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields
|
||||
'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order
|
||||
'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary)
|
||||
'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record)
|
||||
'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert)
|
||||
'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid')
|
||||
'tabcond'=>array($conf->mymodule->enabled,$conf->mymodule->enabled,$conf->mymodule->enabled) // Condition to show each dictionary
|
||||
);
|
||||
*/
|
||||
|
||||
// Boxes
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
$this->boxes = array(); // List of boxes
|
||||
// Example:
|
||||
//$this->boxes=array(
|
||||
// 0=>array('file'=>'myboxa.php@mymodule','note'=>'','enabledbydefaulton'=>'Home'),
|
||||
// 1=>array('file'=>'myboxb.php@mymodule','note'=>''),
|
||||
// 2=>array('file'=>'myboxc.php@mymodule','note'=>'')
|
||||
//);
|
||||
|
||||
// Cronjobs
|
||||
$this->cronjobs = array(); // List of cron jobs entries to add
|
||||
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'test'=>true),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'test'=>true)
|
||||
// );
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$r=0;
|
||||
|
||||
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
||||
// Example:
|
||||
// $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
|
||||
// $this->rights[$r][1] = 'Permision label'; // Permission label
|
||||
// $this->rights[$r][3] = 1; // Permission by default for new user (0/1)
|
||||
// $this->rights[$r][4] = 'level1'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
// $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
// $r++;
|
||||
|
||||
// Main menu entries
|
||||
$this->menu = array(); // List of menus to add
|
||||
$r=0;
|
||||
|
||||
// Add here entries to declare new menus
|
||||
//
|
||||
// Example to declare a new Top Menu entry and its Left menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
// 'type'=>'top', // This is a Top menu entry
|
||||
// 'titre'=>'MyModule top menu',
|
||||
// 'mainmenu'=>'mymodule',
|
||||
// 'leftmenu'=>'mymodule',
|
||||
// 'url'=>'/mymodule/pagetop.php',
|
||||
// 'langs'=>'mylangfile@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>100,
|
||||
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
//
|
||||
// Example to declare a Left Menu entry into an existing Top menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// 'titre'=>'MyModule left menu',
|
||||
// 'mainmenu'=>'xxx',
|
||||
// 'leftmenu'=>'mymodule',
|
||||
// 'url'=>'/mymodule/pagelevel2.php',
|
||||
// 'langs'=>'mylangfile@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>100,
|
||||
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
|
||||
|
||||
// Exports
|
||||
$r=1;
|
||||
|
||||
// Example:
|
||||
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
// $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
|
||||
// $this->export_icon[$r]='generic:MyModule'; // Put here code of icon then string for translation key of module name
|
||||
// $this->export_permission[$r]=array(array("mymodule","level1","level2"));
|
||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||
// $this->export_TypeFields_array[$r]=array('t.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
|
||||
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
||||
// $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// $this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||
// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
|
||||
// $this->export_sql_order[$r] .=' ORDER BY s.nom';
|
||||
// $r++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options='')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
//$this->_load_tables('/mymodule/sql/');
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function remove($options = '')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql, $options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/skeleton_card.php
|
||||
* \ingroup mymodule othermodule1 othermodule2
|
||||
* \brief This file is an example of a php page
|
||||
* Put here some comments
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test
|
||||
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
|
||||
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
|
||||
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
|
||||
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
|
||||
// Change this following line to use the correct relative path (../, ../../, etc)
|
||||
$res=0;
|
||||
if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
|
||||
if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
|
||||
if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
|
||||
if (! $res) die("Include of main fails");
|
||||
// Change this following line to use the correct relative path from htdocs
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
dol_include_once('/mymodule/class/skeleton_class.class.php');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->load("mymodule");
|
||||
$langs->load("other");
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id','int');
|
||||
$action = GETPOST('action','alpha');
|
||||
$cancel = GETPOST('cancel');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$myparam = GETPOST('myparam','alpha');
|
||||
|
||||
$search_field1=GETPOST("search_field1");
|
||||
$search_field2=GETPOST("search_field2");
|
||||
|
||||
if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
//accessforbidden();
|
||||
}
|
||||
//$result = restrictedArea($user, 'mymodule', $id);
|
||||
|
||||
|
||||
$object = new Skeleton_Class($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('skeleton'));
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ACTIONS
|
||||
*
|
||||
* Put here all code to do according to value of "action" parameter
|
||||
********************************************************************/
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if ($cancel)
|
||||
{
|
||||
if ($action != 'addlink')
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
if ($id > 0 || ! empty($ref)) $ret = $object->fetch($id,$ref);
|
||||
$action='';
|
||||
}
|
||||
|
||||
// Action to add record
|
||||
if ($action == 'add')
|
||||
{
|
||||
if (GETPOST('cancel'))
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
|
||||
$error=0;
|
||||
|
||||
/* object_prop_getpost_prop */
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Creation OK
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='create';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$action='create';
|
||||
}
|
||||
}
|
||||
|
||||
// Action to update record
|
||||
if ($action == 'update')
|
||||
{
|
||||
$error=0;
|
||||
|
||||
$object->prop1=GETPOST("field1");
|
||||
$object->prop2=GETPOST("field2");
|
||||
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$action='view';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Creation KO
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$action='edit';
|
||||
}
|
||||
}
|
||||
|
||||
// Action to delete
|
||||
if ($action == 'confirm_delete')
|
||||
{
|
||||
$result=$object->delete($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Delete OK
|
||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
||||
header("Location: ".dol_buildpath('/mymodule/list.php',1));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
|
||||
else setEventMessages($object->error, null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************
|
||||
* VIEW
|
||||
*
|
||||
* Put here all code to build page
|
||||
****************************************************/
|
||||
|
||||
llxHeader('','MyPageName','');
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
// Put here content of your page
|
||||
|
||||
// Example : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_myfunc()
|
||||
{
|
||||
jQuery("#myid").removeAttr(\'disabled\');
|
||||
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
||||
}
|
||||
init_myfunc();
|
||||
jQuery("#mybutton").click(function() {
|
||||
init_myfunc();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewMyModule"));
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
|
||||
// LIST_OF_TD_LABEL_FIELDS_CREATE
|
||||
print '</table>'."\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Part to edit record
|
||||
if (($id || $ref) && $action == 'edit')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("MyModule"));
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
|
||||
// LIST_OF_TD_LABEL_FIELDS_EDIT
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Part to show record
|
||||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create')))
|
||||
{
|
||||
$res = $object->fetch_optionals($object->id, $extralabels);
|
||||
|
||||
$head = commande_prepare_head($object);
|
||||
dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order');
|
||||
|
||||
print load_fiche_titre($langs->trans("MyModule"));
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
print '<table class="border centpercent">'."\n";
|
||||
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
|
||||
// LIST_OF_TD_LABEL_FIELDS_VIEW
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Buttons
|
||||
print '<div class="tabsAction">'."\n";
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if ($user->rights->mymodule->write)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a></div>'."\n";
|
||||
}
|
||||
|
||||
if ($user->rights->mymodule->delete)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a></div>'."\n";
|
||||
}
|
||||
}
|
||||
print '</div>'."\n";
|
||||
|
||||
|
||||
// Example 2 : Adding links to objects
|
||||
// Show links to link elements
|
||||
//$linktoelem = $form->showLinkToObjectBlock($object, null, array('skeleton'));
|
||||
//$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@@ -1,569 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/skeletons/skeleton_list.php
|
||||
* \ingroup mymodule othermodule1 othermodule2
|
||||
* \brief This file is an example of a php page
|
||||
* Put here some comments
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test
|
||||
//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
|
||||
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
|
||||
//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
|
||||
//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
|
||||
// Change this following line to use the correct relative path (../, ../../, etc)
|
||||
$res=0;
|
||||
if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
|
||||
if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
|
||||
if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
|
||||
if (! $res) die("Include of main fails");
|
||||
// Change this following line to use the correct relative path from htdocs
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
dol_include_once('/mymodule/class/skeleton_class.class.php');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->load("mymodule");
|
||||
$langs->load("other");
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
$show_files=GETPOST('show_files','int');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$myparam = GETPOST('myparam','alpha');
|
||||
|
||||
$search_all=trim(GETPOST("sall"));
|
||||
$search_field1=GETPOST("search_field1");
|
||||
$search_field2=GETPOST("search_field2");
|
||||
$search_myfield=GETPOST('search_myfield');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield="t.rowid"; // Set here default search field
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
// Protection if external user
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
//accessforbidden();
|
||||
}
|
||||
|
||||
// Initialize technical object to manage context to save list fields
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'mymodulelist';
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('mymodulelist'));
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('mymodule');
|
||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||
|
||||
// List of fields to search into when doing a "search in all"
|
||||
$fieldstosearchall = array(
|
||||
't.ref'=>'Ref',
|
||||
't.note_public'=>'NotePublic',
|
||||
);
|
||||
if (empty($user->socid)) $fieldstosearchall["t.note_private"]="NotePrivate";
|
||||
|
||||
// Definition of fields for list
|
||||
$arrayfields=array(
|
||||
't.field1'=>array('label'=>$langs->trans("Field1"), 'checked'=>1),
|
||||
't.field2'=>array('label'=>$langs->trans("Field2"), 'checked'=>1),
|
||||
//'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))),
|
||||
't.datec'=>array('label'=>$langs->trans("DateCreationShort"), 'checked'=>0, 'position'=>500),
|
||||
't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
//'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||
);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load object if id or ref is provided as parameter
|
||||
$object=new Skeleton_Class($db);
|
||||
if (($id > 0 || ! empty($ref)) && $action != 'add')
|
||||
{
|
||||
$result=$object->fetch($id,$ref);
|
||||
if ($result < 0) dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* ACTIONS
|
||||
*
|
||||
* Put here all code to do according to value of "action" parameter
|
||||
********************************************************************/
|
||||
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Selection of new fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_field1='';
|
||||
$search_field2='';
|
||||
$search_date_creation='';
|
||||
$search_date_update='';
|
||||
$toselect='';
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass='Skeleton';
|
||||
$objectlabel='Skeleton';
|
||||
$permtoread = $user->rights->skeleton->read;
|
||||
$permtodelete = $user->rights->skeleton->delete;
|
||||
$uploaddir = $conf->skeleton->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************
|
||||
* VIEW
|
||||
*
|
||||
* Put here all code to build page
|
||||
****************************************************/
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||
$help_url='';
|
||||
$title = $langs->trans('MyModuleListTitle');
|
||||
|
||||
// Put here content of your page
|
||||
|
||||
// Example : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
function init_myfunc()
|
||||
{
|
||||
jQuery("#myid").removeAttr(\'disabled\');
|
||||
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
||||
}
|
||||
init_myfunc();
|
||||
jQuery("#mybutton").click(function() {
|
||||
init_myfunc();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql.= " WHERE 1 = 1";
|
||||
//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")";
|
||||
if ($search_field1) $sql.= natural_search("field1",$search_field1);
|
||||
if ($search_field2) $sql.= natural_search("field2",$search_field2);
|
||||
if ($sall) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
// Add where from extra fields
|
||||
foreach ($search_array_options as $key => $val)
|
||||
{
|
||||
$crit=$val;
|
||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||
$typ=$extrafields->attribute_type[$tmpkey];
|
||||
$mode=0;
|
||||
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
|
||||
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
|
||||
{
|
||||
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
|
||||
}
|
||||
}
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
//$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
dol_syslog($script_file, LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
// Direct jump if only one record found
|
||||
if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->rowid;
|
||||
header("Location: ".DOL_URL_ROOT.'/skeleton/card.php?id='.$id);
|
||||
exit;
|
||||
}
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_field1 != '') $param.= '&search_field1='.urlencode($search_field1);
|
||||
if ($search_field2 != '') $param.= '&search_field2='.urlencode($search_field2);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
// Add $param from extra fields
|
||||
foreach ($search_array_options as $key => $val)
|
||||
{
|
||||
$crit=$val;
|
||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||
}
|
||||
|
||||
$arrayofmassactions = array(
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
|
||||
if ($massaction == 'presend') $arrayofmassactions=array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||
}
|
||||
|
||||
$moreforfilter = '';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||
$moreforfilter.= '</div>';
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||
else $moreforfilter = $hookmanager->resPrint;
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
// LIST_OF_TD_TITLE_FIELDS
|
||||
//if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||
//if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($arrayfields['t.datec']['label'],$_SERVER["PHP_SELF"],"t.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'],$_SERVER["PHP_SELF"],"t.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
//if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fields title search
|
||||
print '<tr class="liste_titre">';
|
||||
// LIST_OF_TD_TITLE_SEARCH
|
||||
//if (! empty($arrayfields['t.field1']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
|
||||
//if (! empty($arrayfields['t.field2']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
$typeofextrafield=$extrafields->attribute_type[$key];
|
||||
print '<td class="liste_titre'.($align?' '.$align:'').'">';
|
||||
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
|
||||
{
|
||||
$crit=$val;
|
||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||
$searchclass='';
|
||||
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
|
||||
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
|
||||
print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fields from hook
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['t.datec']['checked']))
|
||||
{
|
||||
// Date creation
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['t.tms']['checked']))
|
||||
{
|
||||
// Date modification
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
/*if (! empty($arrayfields['u.statut']['checked']))
|
||||
{
|
||||
// Status
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
|
||||
print '</td>';
|
||||
}*/
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
$i=0;
|
||||
$var=true;
|
||||
$totalarray=array();
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
// Show here line of result
|
||||
print '<tr '.$bc[$var].'>';
|
||||
// LIST_OF_TD_FIELDS_LIST
|
||||
/*
|
||||
if (! empty($arrayfields['t.field1']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->field1.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
if (! empty($arrayfields['t.field2']['checked']))
|
||||
{
|
||||
print '<td>'.$obj->field2.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}*/
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key => $val)
|
||||
{
|
||||
if (! empty($arrayfields["ef.".$key]['checked']))
|
||||
{
|
||||
print '<td';
|
||||
$align=$extrafields->getAlignFlag($key);
|
||||
if ($align) print ' align="'.$align.'"';
|
||||
print '>';
|
||||
$tmpkey='options_'.$key;
|
||||
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fields from hook
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
if (! empty($arrayfields['t.datec']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Date modification
|
||||
if (! empty($arrayfields['t.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Status
|
||||
/*
|
||||
if (! empty($arrayfields['u.statut']['checked']))
|
||||
{
|
||||
$userstatic->statut=$obj->statut;
|
||||
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
|
||||
}*/
|
||||
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
if (in_array($obj->rowid, $arrayofselected)) $selected=1;
|
||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Show total line
|
||||
if (isset($totalarray['totalhtfield']))
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
$i=0;
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if ($i == 1)
|
||||
{
|
||||
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
|
||||
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
|
||||
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
||||
{
|
||||
// Show list of available documents
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||
$urlsource.=str_replace('&','&',$param);
|
||||
|
||||
$filedir=$diroutputmassaction;
|
||||
$genallowed=$user->rights->facture->lire;
|
||||
$delallowed=$user->rights->facture->lire;
|
||||
|
||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
||||
}
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@@ -1,272 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/webservices/server_skeleton.php
|
||||
* \brief File that is entry point to call Dolibarr WebServices
|
||||
* \version $Id: server_skeleton.php,v 1.7 2010/12/19 11:49:37 eldy Exp $
|
||||
*/
|
||||
|
||||
// This is to make Dolibarr working with Plesk
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
|
||||
require_once("../master.inc.php");
|
||||
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/ws.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/skeleton/class/skeleton.class.php");
|
||||
|
||||
|
||||
dol_syslog("Call Skeleton webservices interfaces");
|
||||
|
||||
// Enable and test if module web services is enabled
|
||||
if (empty($conf->global->MAIN_MODULE_WEBSERVICES))
|
||||
{
|
||||
$langs->load("admin");
|
||||
dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled");
|
||||
print $langs->trans("WarningModuleNotActive",'WebServices').'.<br><br>';
|
||||
print $langs->trans("ToActivateModule");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Create the soap Object
|
||||
$server = new nusoap_server();
|
||||
$server->soap_defencoding='UTF-8';
|
||||
$server->decode_utf8=false;
|
||||
$ns='http://www.dolibarr.org/ns/';
|
||||
$server->configureWSDL('WebServicesDolibarrSkeleton',$ns);
|
||||
$server->wsdl->schemaTargetNamespace=$ns;
|
||||
|
||||
|
||||
// Define WSDL Authentication object
|
||||
$server->wsdl->addComplexType(
|
||||
'authentication',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
array(
|
||||
'dolibarrkey' => array('name'=>'dolibarrkey','type'=>'xsd:string'),
|
||||
'sourceapplication' => array('name'=>'sourceapplication','type'=>'xsd:string'),
|
||||
'login' => array('name'=>'login','type'=>'xsd:string'),
|
||||
'password' => array('name'=>'password','type'=>'xsd:string'),
|
||||
'entity' => array('name'=>'entity','type'=>'xsd:string'),
|
||||
)
|
||||
);
|
||||
|
||||
// Define WSDL Return object
|
||||
$server->wsdl->addComplexType(
|
||||
'result',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
array(
|
||||
'result_code' => array('name'=>'result_code','type'=>'xsd:string'),
|
||||
'result_label' => array('name'=>'result_label','type'=>'xsd:string'),
|
||||
)
|
||||
);
|
||||
|
||||
// Define other specific objects
|
||||
$server->wsdl->addComplexType(
|
||||
'skeleton',
|
||||
'complexType',
|
||||
'struct',
|
||||
'all',
|
||||
'',
|
||||
array(
|
||||
'prop1'=>'xxx',
|
||||
'prop2'=>'xxx',
|
||||
//...
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
// 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped
|
||||
// Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model.
|
||||
// http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
|
||||
$styledoc='rpc'; // rpc/document (document is an extend into SOAP 1.0 to support unstructured messages)
|
||||
$styleuse='encoded'; // encoded/literal/literal wrapped
|
||||
// Better choice is document/literal wrapped but literal wrapped not supported by nusoap.
|
||||
|
||||
|
||||
// Register WSDL
|
||||
$server->register(
|
||||
'getSkeleton',
|
||||
// Entry values
|
||||
array('authentication'=>'tns:authentication','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'),
|
||||
// Exit values
|
||||
array('result'=>'tns:result','skeleton'=>'tns:skeleton'),
|
||||
$ns,
|
||||
$ns.'#getSkeleton',
|
||||
$styledoc,
|
||||
$styleuse,
|
||||
'WS to get skeleton'
|
||||
);
|
||||
|
||||
// Register WSDL
|
||||
$server->register(
|
||||
'createSkeleton',
|
||||
// Entry values
|
||||
array('authentication'=>'tns:authentication','skeleton'=>'tns:skeleton'),
|
||||
// Exit values
|
||||
array('result'=>'tns:result','id'=>'xsd:string'),
|
||||
$ns,
|
||||
$ns.'#createSkeleton',
|
||||
$styledoc,
|
||||
$styleuse,
|
||||
'WS to create a skeleton'
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get Skeleton
|
||||
*
|
||||
* @param array $authentication Array of authentication information
|
||||
* @param int $id Id of object
|
||||
* @param string $ref Ref of object
|
||||
* @param string $ref_ext Ref external of object
|
||||
* @return mixed
|
||||
*/
|
||||
function getSkeleton($authentication,$id,$ref='',$ref_ext='')
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
dol_syslog("Function: getSkeleton login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext);
|
||||
|
||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||
|
||||
// Init and check authentication
|
||||
$objectresp=array();
|
||||
$errorcode='';$errorlabel='';
|
||||
$error=0;
|
||||
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
|
||||
// Check parameters
|
||||
if (! $error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext)))
|
||||
{
|
||||
$error++;
|
||||
$errorcode='BAD_PARAMETERS'; $errorlabel="Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both.";
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$fuser->getrights();
|
||||
|
||||
if ($fuser->rights->skeleton->read)
|
||||
{
|
||||
$skeleton=new Skeleton($db);
|
||||
$result=$skeleton->fetch($id,$ref,$ref_ext);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Create
|
||||
$objectresp = array(
|
||||
'result'=>array('result_code'=>'OK', 'result_label'=>''),
|
||||
'skeleton'=>array(
|
||||
'prop1'=>$skeleton->prop1,
|
||||
'prop2'=>$skeleton->prop2,
|
||||
//...
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorcode='NOT_FOUND'; $errorlabel='Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorcode='PERMISSION_DENIED'; $errorlabel='User does not have permission for this request';
|
||||
}
|
||||
}
|
||||
|
||||
if ($error)
|
||||
{
|
||||
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
||||
}
|
||||
|
||||
return $objectresp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create Skeleton
|
||||
*
|
||||
* @param array $authentication Array of authentication information
|
||||
* @param Skeleton $skeleton $skeleton
|
||||
* @return array Array result
|
||||
*/
|
||||
function createSkeleton($authentication,$skeleton)
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
dol_syslog("Function: createSkeleton login=".$authentication['login']);
|
||||
|
||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||
|
||||
// Init and check authentication
|
||||
$objectresp=array();
|
||||
$errorcode='';$errorlabel='';
|
||||
$error=0;
|
||||
$fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
|
||||
// Check parameters
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$newobject=new Skeleton($db);
|
||||
$newobject->prop1=$skeleton->prop1;
|
||||
$newobject->prop2=$skeleton->prop2;
|
||||
//...
|
||||
|
||||
$db->begin();
|
||||
|
||||
$result=$newobject->create($fuser);
|
||||
if ($result <= 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
$error++;
|
||||
$errorcode='KO';
|
||||
$errorlabel=$newobject->error;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error)
|
||||
{
|
||||
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
||||
}
|
||||
|
||||
return $objectresp;
|
||||
}
|
||||
|
||||
// Return the results.
|
||||
$server->service(file_get_contents("php://input"));
|
||||
8
dev/tools/github_authors_peryear.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
FROM=2016-01-01
|
||||
TO=2016-12-31
|
||||
|
||||
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
|
||||
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
|
||||
|
||||
15
dev/tools/github_commits_perversion.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#/bin/bash
|
||||
Releases=("3.8" "3.9" "4.0" "5.0", "develop")
|
||||
Dates=("2010-01-01", "2011-01-01", "2012-01-01", "2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01")
|
||||
let "counter = 1"
|
||||
|
||||
for i in "${Releases[@]}"
|
||||
do
|
||||
git shortlog -s -n --after=${Dates[counter-1]} --before=${Dates[counter]}
|
||||
echo -n "Total $i: "
|
||||
git log --pretty=oneline --after=${Dates[counter-1]} --before=${Dates[counter]} | wc -l
|
||||
echo "======================="
|
||||
echo
|
||||
let "counter +=1"
|
||||
done
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
# vim:ft=sh:ts=3:sts=3:sw=3:et:
|
||||
|
||||
###
|
||||
# Strips the closing php tag `?>` and any following blank lines from the
|
||||
# end of any PHP file in the current working directory and sub-directories. Files
|
||||
# with non-whitespace characters following the closing tag will not be affected.
|
||||
#
|
||||
# Author: Bryan C. Geraghty <bryan@ravensight.org>
|
||||
# Date: 2009-10-28
|
||||
# Source: http://bryan.ravensight.org/2010/07/remove-php-closing-tag/
|
||||
##
|
||||
|
||||
FILES=$(pcregrep -rnM --include='^.*\.php$' '^\?\>(?=([\s\n]+)?$(?!\n))' .);
|
||||
|
||||
for MATCH in $FILES;
|
||||
do
|
||||
FILE=`echo $MATCH | awk -F ':' '{print $1}'`;
|
||||
TARGET=`echo $MATCH | awk -F ':' '{print $2}'`;
|
||||
LINE_COUNT=`wc -l $FILE | awk -F " " '{print $1}'`;
|
||||
echo "Removing lines ${TARGET} through ${LINE_COUNT} from file $FILE...";
|
||||
sed -i "${TARGET},${LINE_COUNT}d" $FILE;
|
||||
done;
|
||||
17
dev/translation/erp_comparison_translation.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
Term Dolibarr SAP Odoo ...
|
||||
----------------------------------------------------------------------------
|
||||
Thirdparty Contact partner Partner/Contact (company)
|
||||
Contact/address Contact person Partner/Contact (individual)
|
||||
|
||||
Financial ?? Invoicing
|
||||
|
||||
Income / Expense ?? Profit / Loss
|
||||
Balance ?? Net profit
|
||||
Subledger account Subledger account ??
|
||||
|
||||
|
||||
Proposal ?? Quotation Proposal is ok but proposition looks better (proposal is for a detailed proposition). We can say also "business proposition or business proposal".
|
||||
Indian are using "Quotation".
|
||||
|
||||
@@ -25,7 +25,7 @@ $path=dirname(__FILE__).'/';
|
||||
$web=0;
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi')
|
||||
if (substr($sapi_type, 0, 3) == 'cgi')
|
||||
{
|
||||
$web=1;
|
||||
}
|
||||
@@ -35,9 +35,9 @@ if ($web)
|
||||
{
|
||||
echo "<html>";
|
||||
echo "<head>";
|
||||
|
||||
|
||||
echo "<STYLE type=\"text/css\">
|
||||
|
||||
|
||||
table {
|
||||
background: #f5f5f5;
|
||||
border-collapse: separate;
|
||||
@@ -48,7 +48,7 @@ if ($web)
|
||||
text-align: left;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
|
||||
th {
|
||||
background-color: #777;
|
||||
border-left: 1px solid #555;
|
||||
@@ -61,7 +61,7 @@ if ($web)
|
||||
position: relative;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
}
|
||||
|
||||
|
||||
td {
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
@@ -70,19 +70,19 @@ if ($web)
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
tr {
|
||||
background-color: #f1f1f1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
tr:nth-child(odd) td {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
|
||||
</STYLE>";
|
||||
|
||||
|
||||
echo "<body>";
|
||||
}
|
||||
|
||||
@@ -142,9 +142,9 @@ foreach ($files AS $file) {
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($langstrings_3d AS $filename => $file)
|
||||
foreach ($langstrings_3d AS $filename => $file)
|
||||
{
|
||||
foreach ($file AS $linenum => $value)
|
||||
foreach ($file AS $linenum => $value)
|
||||
{
|
||||
$keys = array_keys($langstrings_full, $value);
|
||||
if (count($keys)>1)
|
||||
@@ -173,11 +173,11 @@ $sininstallandadmin='';
|
||||
$sother='';
|
||||
|
||||
$count = 0;
|
||||
foreach ($dups as $string => $pages)
|
||||
foreach ($dups as $string => $pages)
|
||||
{
|
||||
$count++;
|
||||
$s='';
|
||||
|
||||
|
||||
// Keyword $string
|
||||
if ($web) $s.="<tr>";
|
||||
if ($web) $s.="<td align=\"center\">";
|
||||
@@ -188,32 +188,32 @@ foreach ($dups as $string => $pages)
|
||||
if ($web) $s.="</td>";
|
||||
if ($web) $s.="<td>";
|
||||
if (! $web) $s.= ' : ';
|
||||
|
||||
|
||||
// Loop on each files keyword was found
|
||||
$duplicateinsamefile=0;
|
||||
$inmain=0;
|
||||
$inadmin=0;
|
||||
foreach ($pages AS $file => $lines)
|
||||
foreach ($pages AS $file => $lines)
|
||||
{
|
||||
if ($file == 'main.lang') { $inmain=1; $inadmin=0; }
|
||||
if ($file == 'admin.lang' && ! $inmain) { $inadmin=1; }
|
||||
|
||||
|
||||
$s.=$file." ";
|
||||
|
||||
|
||||
// Loop on each line keword was found into file.
|
||||
$listoffilesforthisentry=array();
|
||||
foreach ($lines as $line => $translatedvalue)
|
||||
foreach ($lines as $line => $translatedvalue)
|
||||
{
|
||||
if (! empty($listoffilesforthisentry[$file])) $duplicateinsamefile=1;
|
||||
$listoffilesforthisentry[$file]=1;
|
||||
|
||||
|
||||
$s.= "(".$line." - ".htmlentities($translatedvalue).") ";
|
||||
}
|
||||
if ($web) $s.="<br>";
|
||||
}
|
||||
if ($web) $s.="</td></tr>";
|
||||
$s.="\n";
|
||||
|
||||
|
||||
if ($duplicateinsamefile) $sduplicateinsamefile .= $s;
|
||||
else if ($inmain) $sinmainandother .= $s;
|
||||
else if ($inadmin) $sininstallandadmin .= $s;
|
||||
@@ -252,7 +252,7 @@ if ($web)
|
||||
if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true'))
|
||||
{
|
||||
print "***** Strings in en_US that are never used:\n";
|
||||
|
||||
|
||||
$unused=array();
|
||||
foreach ($langstrings_dist AS $value => $line)
|
||||
{
|
||||
@@ -288,7 +288,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/^JuridicalStatus/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^CalcMode/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^newLT/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^LT\d/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^LT[0-9]/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^TypeContact_contrat_/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^ErrorPriceExpression/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^Language_/', $value)) $qualifiedforclean=0;
|
||||
@@ -300,6 +300,8 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
||||
// install.lang
|
||||
if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0;
|
||||
// mail.lang
|
||||
if (preg_match('/MailingModuleDesc/i', $value)) $qualifiedforclean=0;
|
||||
// main.lang
|
||||
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
||||
@@ -308,10 +310,12 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/^.*Bytes$/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^NoteSomeFeaturesAreDisabled/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) $qualifiedforclean=0;
|
||||
// modulebuilder
|
||||
if (preg_match('/^ModuleBuilderDesc/', $value)) $qualifiedforclean=0;
|
||||
// orders
|
||||
if (preg_match('/^OrderSource/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^TypeContact_/', $value)) $qualifiedforclean=0;
|
||||
// other.lang
|
||||
// other.lang
|
||||
if (preg_match('/^Notify_/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^PredefinedMail/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/^DemoCompany/', $value)) $qualifiedforclean=0;
|
||||
@@ -332,17 +336,17 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
if (preg_match('/OppStatus/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/AvailabilityType/', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/CardProduct/', $value)) $qualifiedforclean=0;
|
||||
|
||||
|
||||
if (preg_match('/sms/i', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/TF_/i', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/WithBankUsing/i', $value)) $qualifiedforclean=0;
|
||||
if (preg_match('/descWORKFLOW_/i', $value)) $qualifiedforclean=0;
|
||||
|
||||
|
||||
if (! $qualifiedforclean)
|
||||
{
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
//$search = '\'trans("'.$value.'")\'';
|
||||
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
|
||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
||||
@@ -352,7 +356,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
$unused[$value] = $line;
|
||||
echo $line; // $trad contains the \n
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
unset($output);
|
||||
//print 'X'.$output.'Y';
|
||||
@@ -360,7 +364,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
||||
}
|
||||
|
||||
if (empty($unused)) print "No string not used found.\n";
|
||||
else
|
||||
else
|
||||
{
|
||||
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
|
||||
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
|
||||
|
||||
@@ -303,6 +303,8 @@ foreach($filesToProcess as $fileToProcess)
|
||||
|
||||
// ----- Process output now -----
|
||||
|
||||
//print "Found primary key = ".$key."\n";
|
||||
|
||||
// Key not in other file
|
||||
if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key))
|
||||
{
|
||||
@@ -321,7 +323,7 @@ foreach($filesToProcess as $fileToProcess)
|
||||
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/',$key) || preg_match('/^FormatHour/',$key)
|
||||
)
|
||||
{
|
||||
//print "Key $key differs so we add it into new secondary language (line: $cnt).\n";
|
||||
//print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n";
|
||||
fwrite($oh, $key."=".(empty($aSecondary[$key])?$aPrimary[$key]:$aSecondary[$key])."\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
README (English)
|
||||
# README (English)
|
||||
--------------------------------
|
||||
|
||||
* Most screen captures and icons are Dolibarr contributions, however,
|
||||
some icons are from http://led24.de/iconset/. This is original README file for this source:
|
||||
|
||||
* Screen captures and icons are Dolibarr contributions
|
||||
|
||||
|
||||
* Most logos were created by Dolibarr developers. You may find sources of them on:
|
||||
|
||||
https://github.com/Dolibarr/foundation
|
||||
|
||||
|
||||
* Few icons are from http://led24.de/iconset/. This is original README file for this source:
|
||||
-------------------------------------------------------
|
||||
You can do whatever you want with these icons (use on web or in desktop applications) as long as you don’t pass them off as your own and remove this readme file. A credit statement and a link back to
|
||||
http://led24.de/iconset/ or http://led24.de/ would be appreciated.
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 23 KiB |
BIN
doc/images/dolibarr_logo.png
Normal file → Executable file
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 29 KiB |
BIN
doc/images/dolibarr_screenshot11_1280x800.png
Normal file
|
After Width: | Height: | Size: 208 KiB |
1
htdocs/.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
/dolimed*
|
||||
/ecommerce*
|
||||
/extensions*
|
||||
/forceproject*
|
||||
/google*
|
||||
/lead
|
||||
/multicompany*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -27,7 +27,6 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
@@ -37,10 +36,11 @@ $langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cancel = GETPOST('cancel');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
|
||||
$search_account = GETPOST("search_account");
|
||||
$search_label = GETPOST("search_label");
|
||||
$search_accountparent = GETPOST("search_accountparent");
|
||||
@@ -52,10 +52,9 @@ if ($user->societe_id > 0) accessforbidden();
|
||||
if (! $user->rights->accounting->chartofaccount) accessforbidden();
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'sortorder');
|
||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$page = GETPOST("page", 'int');
|
||||
if ($page == - 1) {
|
||||
$page = 0;
|
||||
@@ -63,13 +62,23 @@ if ($page == - 1) {
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield)
|
||||
$sortfield = "aa.account_number";
|
||||
if (! $sortorder)
|
||||
$sortorder = "ASC";
|
||||
if (! $sortfield) $sortfield = "aa.account_number";
|
||||
if (! $sortorder) $sortorder = "ASC";
|
||||
|
||||
$arrayfields=array(
|
||||
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
|
||||
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>0),
|
||||
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>0),
|
||||
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0),
|
||||
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
|
||||
);
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
// Initialize technical object to manage context to save list fields
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accountingaccountlist';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -88,13 +97,14 @@ if (empty($reshook))
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_account = "";
|
||||
$search_label = "";
|
||||
$search_accountparent = "";
|
||||
$search_pcgtype = "";
|
||||
$search_pcgsubtype = "";
|
||||
$search_array_options=array();
|
||||
}
|
||||
|
||||
if (GETPOST('change_chart'))
|
||||
@@ -136,6 +146,8 @@ if (empty($reshook))
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans("ListAccounts"));
|
||||
|
||||
if ($action == 'delete') {
|
||||
@@ -145,30 +157,20 @@ if ($action == 'delete') {
|
||||
|
||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active, ";
|
||||
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON aa.account_parent = a2.rowid";
|
||||
// Dirty hack wainting that foreign key account_parent is an integer to be compared correctly with rowid
|
||||
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS INTEGER)";
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED)";
|
||||
$sql .= " WHERE asy.rowid = " . $pcgver;
|
||||
|
||||
if (strlen(trim($search_account))) {
|
||||
$sql .= natural_search("aa.account_number", $search_account);
|
||||
}
|
||||
if (strlen(trim($search_label))) {
|
||||
$sql .= natural_search("aa.label", $search_label);
|
||||
}
|
||||
if (strlen(trim($search_accountparent))) {
|
||||
$sql .= natural_search("aa.account_parent", $search_accountparent);
|
||||
}
|
||||
if (strlen(trim($search_pcgtype))) {
|
||||
$sql .= natural_search("aa.pcg_type", $search_pcgtype);
|
||||
}
|
||||
if (strlen(trim($search_pcgsubtype))) {
|
||||
$sql .= natural_search("aa.pcg_subtype", $search_pcgsubtype);
|
||||
}
|
||||
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
|
||||
if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label);
|
||||
if (strlen(trim($search_accountparent))) $sql .= natural_search("aa.account_parent", $search_accountparent);
|
||||
if (strlen(trim($search_pcgtype))) $sql .= natural_search("aa.pcg_type", $search_pcgtype);
|
||||
if (strlen(trim($search_pcgsubtype))) $sql .= natural_search("aa.pcg_subtype", $search_pcgsubtype);
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
// Count total nb of records
|
||||
@@ -184,37 +186,46 @@ $sql .= $db->plimit($limit + 1, $offset);
|
||||
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql) {
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
$params='';
|
||||
if ($search_account != "") $params.= '&search_account='.urlencode($search_account);
|
||||
if ($search_label != "") $params.= '&search_label='.urlencode($search_label);
|
||||
if ($search_accountparent != "") $params.= '&search_accountparent='.urlencode($search_accountparent);
|
||||
if ($search_pcgtype != "") $params.= '&search_pcgtype='.urlencode($search_pcgtype);
|
||||
if ($search_pcgsubtype != "") $params.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($search_account) $params.= '&search_account='.urlencode($search_account);
|
||||
if ($search_label) $params.= '&search_label='.urlencode($search_label);
|
||||
if ($search_accountparent) $params.= '&search_accountparent='.urlencode($search_accountparent);
|
||||
if ($search_pcgtype) $params.= '&search_pcgtype='.urlencode($search_pcgtype);
|
||||
if ($search_pcgsubtype) $params.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy');
|
||||
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
|
||||
|
||||
print '<form method="GET" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd);
|
||||
|
||||
// Box to select active chart of account
|
||||
$var = ! $var;
|
||||
print $langs->trans("Selectchartofaccounts") . " : ";
|
||||
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
||||
$sql = "SELECT rowid, pcg_version, label, active";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
||||
$sql .= " WHERE active = 1";
|
||||
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
||||
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
|
||||
$resqlchart = $db->query($sql);
|
||||
$var = true;
|
||||
if ($resqlchart) {
|
||||
$numbis = $db->num_rows($resqlchart);
|
||||
$i = 0;
|
||||
while ( $i < $numbis ) {
|
||||
$var = ! $var;
|
||||
$row = $db->fetch_row($resqlchart);
|
||||
|
||||
print '<option value="' . $row[0] . '"';
|
||||
@@ -227,45 +238,43 @@ if ($resql) {
|
||||
print "</select>";
|
||||
print '<input type="submit" class="button" name="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
print '<br>';
|
||||
print "<br>\n";
|
||||
print '<br>';
|
||||
|
||||
print '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
|
||||
print '<a class="butAction" href="./categories.php">' . $langs->trans("ApplyMassCategories") . '</a>';
|
||||
// print '<a class="butAction" href="./importaccounts.php">' . $langs->trans("ImportAccount") . '</a>';
|
||||
// print '<a class="butAction" href="./productaccount.php">' . $langs->trans("CheckProductAccountancyCode") . '</a>';
|
||||
print '<br><br>';
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("AccountNumber"), $_SERVER["PHP_SELF"], "aa.account_number", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "aa.label", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Accountparent"), $_SERVER["PHP_SELF"], "aa.account_parent", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Pcgtype"), $_SERVER["PHP_SELF"], "aa.pcg_type", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Pcgsubtype"), $_SERVER["PHP_SELF"], "aa.pcg_subtype", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Activated"), $_SERVER["PHP_SELF"], "aa.active", "", $params, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $params, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_accountparent" value="' . $search_accountparent . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
// Line for search fields
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['aa.account_number']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||
if (! empty($arrayfields['aa.label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
|
||||
if (! empty($arrayfields['aa.account_parent']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_accountparent" value="' . $search_accountparent . '"></td>';
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="' . $search_pcgtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgsubtype" value="' . $search_pcgsubtype . '"></td>';
|
||||
if (! empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre"> </td>';
|
||||
print '<td align="right" colspan="2" class="liste_titre">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpitco;
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var = false;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['aa.account_number']['checked'])) print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"],"aa.account_number","",$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['aa.label']['checked'])) print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"],"aa.label","",$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"],"aa.account_parent", "", $param,'align="left"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'],$_SERVER["PHP_SELF"],'aa.pcg_type','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_subtype']['label'],$_SERVER["PHP_SELF"],'aa.pcg_subtype','',$param,'',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'],$_SERVER["PHP_SELF"],'aa.active','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$accountstatic = new AccountingAccount($db);
|
||||
$accountparent = new AccountingAccount($db);
|
||||
|
||||
$i = 0;
|
||||
while ( $i < min($num, $limit) )
|
||||
|
||||
$i=0;
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@@ -273,55 +282,102 @@ if ($resql) {
|
||||
$accountstatic->label = $obj->label;
|
||||
$accountstatic->account_number = $obj->account_number;
|
||||
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<td>' . $accountstatic->getNomUrl(1) . '</td>';
|
||||
print '<td>' . $obj->label . '</td>';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (! empty($obj->account_parent))
|
||||
{
|
||||
$accountparent->id = $obj->rowid2;
|
||||
$accountparent->label = $obj->label2;
|
||||
$accountparent->account_number = $obj->account_number2;
|
||||
|
||||
print '<td>' . $accountparent->getNomUrl(1) . '</td>';
|
||||
}
|
||||
else
|
||||
// Account number
|
||||
if (! empty($arrayfields['aa.account_number']['checked']))
|
||||
{
|
||||
print '<td> </td>';
|
||||
print "<td>";
|
||||
print $accountstatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
print '<td>' . $obj->pcg_type . '</td>';
|
||||
print '<td>' . $obj->pcg_subtype . '</td>';
|
||||
print '<td>';
|
||||
if (empty($obj->active)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
|
||||
// Account label
|
||||
if (! empty($arrayfields['aa.label']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $obj->label;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Account parent
|
||||
if (! empty($arrayfields['aa.account_parent']['checked']))
|
||||
{
|
||||
if (! empty($obj->account_parent))
|
||||
{
|
||||
$accountparent->id = $obj->rowid2;
|
||||
$accountparent->label = $obj->label2;
|
||||
$accountparent->account_number = $obj->account_number2;
|
||||
|
||||
print "<td>";
|
||||
print $accountparent->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Chart of accounts type
|
||||
if (! empty($arrayfields['aa.pcg_type']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $obj->pcg_type;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Chart of accounts subtype
|
||||
if (! empty($arrayfields['aa.pcg_subtype']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print $obj->pcg_subtype;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Activated or not
|
||||
if (! empty($arrayfields['aa.active']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
if (empty($obj->active)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $obj->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action
|
||||
print '<td align="center">';
|
||||
if ($user->admin) {
|
||||
print '<a href="./card.php?action=update&id=' . $obj->rowid . '">';
|
||||
if ($user->rights->accounting->chartofaccount) {
|
||||
print '<a href="./card.php?action=update&id=' . $obj->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
print ' ';
|
||||
print '<a href="./card.php?action=delete&id=' . $obj->rowid . '">';
|
||||
print '<a href="./card.php?action=delete&id=' . $obj->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id). '">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>' . "\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
print "</tr>\n";
|
||||
$var = ! $var;
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
print '</form>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
@@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$langs->load("errors");
|
||||
$langs->load("admin");
|
||||
@@ -54,6 +54,7 @@ $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
$code=GETPOST('code','alpha');
|
||||
|
||||
$acts[0] = "activate";
|
||||
$acts[1] = "disable";
|
||||
@@ -67,7 +68,7 @@ $active = 1;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
if ($page == -1 || $page == null) { $page = 0 ; }
|
||||
$offset = $listlimit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@@ -80,7 +81,7 @@ if ($user->societe_id > 0) accessforbidden();
|
||||
if (! $user->rights->accounting->chartofaccount) accessforbidden();
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('admin'));
|
||||
|
||||
// This page is a generic page to edit dictionaries
|
||||
@@ -217,21 +218,6 @@ if ($id == 25)
|
||||
}
|
||||
}
|
||||
|
||||
// Define localtax_typeList (used for dictionary "llx_c_tva")
|
||||
$localtax_typeList = array();
|
||||
if ($id == 10)
|
||||
{
|
||||
$localtax_typeList = array(
|
||||
"0" => $langs->trans("No"),
|
||||
"1" => $langs->trans("Yes").' ('.$langs->trans("Type")." 1)", //$langs->trans("%ageOnAllWithoutVAT"),
|
||||
"2" => $langs->trans("Yes").' ('.$langs->trans("Type")." 2)", //$langs->trans("%ageOnAllBeforeVAT"),
|
||||
"3" => $langs->trans("Yes").' ('.$langs->trans("Type")." 3)", //$langs->trans("%ageOnProductsWithoutVAT"),
|
||||
"4" => $langs->trans("Yes").' ('.$langs->trans("Type")." 4)", //$langs->trans("%ageOnProductsBeforeVAT"),
|
||||
"5" => $langs->trans("Yes").' ('.$langs->trans("Type")." 5)", //$langs->trans("%ageOnServiceWithoutVAT"),
|
||||
"6" => $langs->trans("Yes").' ('.$langs->trans("Type")." 6)" //$langs->trans("%ageOnServiceBeforeVAT"),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -240,7 +226,7 @@ if ($id == 10)
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
@@ -474,8 +460,8 @@ if ($action == $acts[0])
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -494,8 +480,8 @@ if ($action == $acts[1])
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -514,8 +500,8 @@ if ($action == 'activate_favorite')
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -534,8 +520,8 @@ if ($action == 'disable_favorite')
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -571,7 +557,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
@@ -589,7 +575,7 @@ if ($id)
|
||||
else $sql.=" WHERE ";
|
||||
$sql.= " c.rowid = ".$search_country_id;
|
||||
}
|
||||
|
||||
|
||||
if ($sortfield)
|
||||
{
|
||||
// If sort order is "country", we use country_code instead
|
||||
@@ -615,7 +601,7 @@ if ($id)
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Form to add a new line
|
||||
@@ -736,11 +722,11 @@ if ($id)
|
||||
{
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'hide');
|
||||
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
||||
fieldListAccountModel($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -757,8 +743,7 @@ if ($id)
|
||||
{
|
||||
print '<tr><td colspan="8">* '.$langs->trans("AvailableVariables").": ";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail=new FormMail($db);
|
||||
$tmp=$formmail->getAvailableSubstitKey('form');
|
||||
$tmp=FormMail::getAvailableSubstitKey('formemail');
|
||||
print implode(', ', $tmp);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@@ -789,7 +774,7 @@ if ($id)
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
|
||||
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
|
||||
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
{
|
||||
@@ -881,9 +866,9 @@ if ($id)
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
$showfield=1; // By defaut
|
||||
|
||||
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
|
||||
|
||||
if ($showfield)
|
||||
{
|
||||
if ($value == 'country')
|
||||
@@ -901,21 +886,19 @@ if ($id)
|
||||
if ($id == 4) print '<td></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" colspan="2" align="right">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if ($num)
|
||||
{
|
||||
// Lines with values
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
//print_r($obj);
|
||||
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
|
||||
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
|
||||
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
|
||||
{
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
@@ -928,7 +911,7 @@ if ($id)
|
||||
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
||||
if (empty($reshook)) fieldListAccountModel($fieldlist,$obj,$tabname[$id],'edit');
|
||||
|
||||
print '<td colspan="3" align="right"><a name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"> </a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print ' <input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
@@ -945,7 +928,7 @@ if ($id)
|
||||
{
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
|
||||
|
||||
$showfield=1;
|
||||
$align="left";
|
||||
$valuetoshow=$obj->{$fieldlist[$field]};
|
||||
@@ -1078,21 +1061,6 @@ if ($id)
|
||||
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
|
||||
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
|
||||
else if ($fieldlist[$field]=='localtax1_type') {
|
||||
if ($obj->localtax1 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="right";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax2_type') {
|
||||
if ($obj->localtax2 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="right";
|
||||
}
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
$align="right";
|
||||
@@ -1180,7 +1148,6 @@ else
|
||||
* Show list of dictionary to show
|
||||
*/
|
||||
|
||||
$var=true;
|
||||
$lastlineisempty=false;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@@ -1198,14 +1165,13 @@ else
|
||||
{
|
||||
if ($showemptyline)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="30%"> </td><td> </td><td> </td></tr>';
|
||||
print '<tr class="oddeven"><td width="30%"> </td><td> </td><td> </td></tr>';
|
||||
$showemptyline=0;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
|
||||
$value=$tabname[$i];
|
||||
print '<tr '.$bc[$var].'><td width="50%">';
|
||||
print '<tr class="oddeven"><td width="50%">';
|
||||
if (! empty($tabcond[$i]))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$i.'">'.$langs->trans($tablib[$i]).'</a>';
|
||||
@@ -1252,18 +1218,18 @@ $db->close();
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
*/
|
||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
global $form;
|
||||
global $region_id;
|
||||
global $elementList,$sourceList,$localtax_typeList;
|
||||
global $elementList,$sourceList;
|
||||
global $bc;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$formaccountancy = new FormVentilation($db);
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
if ($fieldlist[$field] == 'country')
|
||||
@@ -1380,31 +1346,13 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
|
||||
print '<td><input type="text" class="flat" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
|
||||
}
|
||||
elseif ($fieldlist[$field]=='unit') {
|
||||
print '<td>';
|
||||
$units = array(
|
||||
'mm' => $langs->trans('SizeUnitmm'),
|
||||
'cm' => $langs->trans('SizeUnitcm'),
|
||||
'point' => $langs->trans('SizeUnitpoint'),
|
||||
'inch' => $langs->trans('SizeUnitinch')
|
||||
);
|
||||
print $form->selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0);
|
||||
print '</td>';
|
||||
}
|
||||
// Le type de taxe locale
|
||||
elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type')
|
||||
{
|
||||
print '<td align="center">';
|
||||
print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy')
|
||||
{
|
||||
print '<td>';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
|
||||
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Card of accounting account
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancysystem.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
@@ -36,7 +36,7 @@ $langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
@@ -58,7 +58,7 @@ if (GETPOST('cancel'))
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
{
|
||||
if (! $cancel) {
|
||||
@@ -85,7 +85,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
} else {
|
||||
$account_parent = GETPOST('account_parent','int');
|
||||
}
|
||||
|
||||
|
||||
$object->fk_pcg_version = $obj->pcg_version;
|
||||
$object->pcg_type = GETPOST('pcg_type');
|
||||
$object->pcg_subtype = GETPOST('pcg_subtype');
|
||||
@@ -94,7 +94,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
$object->account_category = GETPOST('account_category');
|
||||
$object->label = GETPOST('label', 'alpha');
|
||||
$object->active = 1;
|
||||
|
||||
|
||||
$res = $object->create($user);
|
||||
if ($res == - 3) {
|
||||
$error = 1;
|
||||
@@ -123,9 +123,9 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
|
||||
if (! $cancel) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
|
||||
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
|
||||
$result2 = $db->query($sql);
|
||||
$obj = $db->fetch_object($result2);
|
||||
@@ -155,17 +155,19 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
$object->account_parent = $account_parent;
|
||||
$object->account_category = GETPOST('account_category');
|
||||
$object->label = GETPOST('label', 'alpha');
|
||||
|
||||
|
||||
$result = $object->update($user);
|
||||
|
||||
|
||||
if ($result > 0) {
|
||||
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||
$urltogo=$backtopage?$backtopage:($_SERVER["PHP_SELF"]."?id=".$id);
|
||||
header("Location: " . $urltogo);
|
||||
exit();
|
||||
} else {
|
||||
$mesg = $object->error;
|
||||
}
|
||||
} else {
|
||||
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||
$urltogo=$backtopage?$backtopage:($_SERVER["PHP_SELF"]."?id=".$id);
|
||||
header("Location: " . $urltogo);
|
||||
exit();
|
||||
}
|
||||
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
||||
@@ -193,136 +195,144 @@ $helpurl = '';
|
||||
llxheader('', $title, $helpurl);
|
||||
|
||||
$form = new Form($db);
|
||||
$htmlacc = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$accountsystem = new AccountancySystem($db);
|
||||
$accountsystem->fetch($conf->global->CHARTOFACCOUNTS);
|
||||
|
||||
// Create mode
|
||||
if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans('NewAccountingAccount'));
|
||||
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Chart of account
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("Chartofaccounts") . '</span></td>';
|
||||
print '<td>';
|
||||
print $accountsystem->ref;
|
||||
print '</td></tr>';
|
||||
|
||||
// Account number
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
|
||||
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
|
||||
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"></td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';
|
||||
print '<td><input name="label" size="70" value="' . $object->label . '"</td></tr>';
|
||||
print '<td><input name="label" size="70" value="' . $object->label . '"></td></tr>';
|
||||
|
||||
// Account parent
|
||||
print '<tr><td>' . $langs->trans("Accountparent") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_account($object->account_parent, 'account_parent', 1);
|
||||
print $formaccounting->select_account($object->account_parent, 'account_parent', 1, null, 0, 0, 'minwidth200');
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
|
||||
print '<td>';
|
||||
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1);
|
||||
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1, 0, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Chart of accounts type
|
||||
print '<tr><td>' . $langs->trans("Pcgtype") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgtype($object->pcg_type, 'pcg_type');
|
||||
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(isset($_POST['pcg_type'])?GETPOST('pcg_type','alpha'):$object->pcg_type).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Chart of acounts subtype
|
||||
print '<tr><td>' . $langs->trans("Pcgsubtype") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgsubtype($object->pcg_subtype, 'pcg_subtype');
|
||||
print '<input type="text" name="pcg_subtype" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$object->pcg_subtype).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
} else if ($id) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
|
||||
if ($result > 0) {
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
|
||||
$head = accounting_prepare_head($object);
|
||||
|
||||
|
||||
// Edit mode
|
||||
if ($action == 'update')
|
||||
{
|
||||
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
|
||||
|
||||
|
||||
print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="edit">';
|
||||
print '<input type="hidden" name="id" value="' . $id . '">';
|
||||
|
||||
print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Account number
|
||||
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
|
||||
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"</td></tr>';
|
||||
|
||||
|
||||
// Label
|
||||
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';
|
||||
print '<td><input name="label" size="70" value="' . $object->label . '"</td></tr>';
|
||||
|
||||
|
||||
// Account parent
|
||||
print '<tr><td>' . $langs->trans("Accountparent") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_account($object->account_parent, 'account_parent', 1);
|
||||
print $formaccounting->select_account($object->account_parent, 'account_parent', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
print '<tr><td>'.$langs->trans("AccountingCategory").'</td>';
|
||||
print '<tr><td>'.$langs->trans("AccountingCategory").'</td>';
|
||||
print '<td>';
|
||||
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1);
|
||||
print '</td></tr>';
|
||||
$formaccounting->select_accounting_category($object->account_category, 'account_category', 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Chart of accounts type
|
||||
print '<tr><td>' . $langs->trans("Pcgtype") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgtype($object->pcg_type, 'pcg_type');
|
||||
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(isset($_POST['pcg_type'])?GETPOST('pcg_type','alpha'):$object->pcg_type).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Chart of accounts subtype
|
||||
print '<tr><td>' . $langs->trans("Pcgsubtype") . '</td>';
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgsubtype($object->pcg_subtype, 'pcg_subtype');
|
||||
print '<input type="text" name="pcg_subtype" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$object->pcg_subtype).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
|
||||
// View mode
|
||||
$linkback = '<a href="../admin/account.php">' . $langs->trans("BackToChartofaccounts") . '</a>';
|
||||
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Account number
|
||||
print '<tr><td class="titlefield">' . $langs->trans("AccountNumber") . '</td>';
|
||||
print '<td>' . $object->account_number . '</td>';
|
||||
@@ -360,31 +370,30 @@ if ($action == 'create') {
|
||||
} else {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
}*/
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
/*
|
||||
* Actions buttons
|
||||
*/
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
|
||||
if (! empty($user->rights->accounting->chartofaccount)) {
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Modify') . '</a>';
|
||||
}
|
||||
|
||||
|
||||
if (! empty($user->rights->accounting->chartofaccount)) {
|
||||
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Delete') . '</a>';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/categories.php
|
||||
* \file htdocs/accountancy/admin/categories.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Page to assign mass categories to accounts
|
||||
* \brief Page to assign mass categories to accounts
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@@ -28,12 +29,14 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action');
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$cat_id = GETPOST('account_category');
|
||||
$selectcpt = GETPOST('cpt_bk', 'array');
|
||||
$cpt_id = GETPOST('cptid');
|
||||
@@ -42,38 +45,34 @@ if ($cat_id == 0) {
|
||||
$cat_id = null;
|
||||
}
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$cancel = GETPOST('cancel');
|
||||
|
||||
// Security check
|
||||
if (! empty($user->rights->accountancy->chartofaccount))
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$AccCat = new AccountancyCategory($db);
|
||||
$accountingcategory = new AccountancyCategory($db);
|
||||
|
||||
// si ajout de comptes
|
||||
if (! empty($selectcpt)) {
|
||||
$cpts = array ();
|
||||
foreach ( $selectcpt as $selectedOption ) {
|
||||
if (! array_key_exists($selectedOption, $cpts))
|
||||
$cpts[$selectedOption] = "'" . $selectedOption . "'";
|
||||
foreach ( $selectcpt as $selectedoption ) {
|
||||
if (! array_key_exists($selectedoption, $cpts))
|
||||
$cpts[$selectedoption] = "'" . $selectedoption . "'";
|
||||
}
|
||||
|
||||
$return= $AccCat->updateAccAcc($cat_id, $cpts);
|
||||
$return= $accountingcategory->updateAccAcc($cat_id, $cpts);
|
||||
|
||||
if ($return<0) {
|
||||
setEventMessages($langs->trans('errors'), $AccCat->errors, 'errors');
|
||||
setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
if ($action == 'delete') {
|
||||
if ($cpt_id) {
|
||||
if ($AccCat->deleteCptCat($cpt_id)) {
|
||||
setEventMessages($langs->trans('Deleted'), null, 'mesgs');
|
||||
if ($accountingcategory->deleteCptCat($cpt_id)) {
|
||||
setEventMessages($langs->trans('CategoryDeleted'), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans('errors'), null, 'errors');
|
||||
}
|
||||
@@ -84,12 +83,11 @@ if ($action == 'delete') {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
llxheader('', $langs->trans('AccountAccounting'));
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$form = new Form($db);
|
||||
|
||||
print load_fiche_titre($langs->trans('AccountingCategory'));
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
@@ -106,19 +104,21 @@ $formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
if (! empty($cat_id)) {
|
||||
$return = $AccCat->getCptBK($cat_id);
|
||||
if (! empty($cat_id))
|
||||
{
|
||||
$return = $accountingcategory->getAccountsWithNoCategory($cat_id);
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $AccCat->errors, 'errors');
|
||||
setEventMessages(null, $accountingcategory->errors, 'errors');
|
||||
}
|
||||
print '<tr><td>' . $langs->trans("AddCompteFromBK") . '</td>';
|
||||
print '<tr><td>' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . '</td>';
|
||||
print '<td>';
|
||||
if (is_array($AccCat->lines_cptbk) && count($AccCat->lines_cptbk) > 0) {
|
||||
if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) {
|
||||
print '<select class="flat minwidth200" size="' . count($obj) . '" name="cpt_bk[]" multiple>';
|
||||
foreach ( $AccCat->lines_cptbk as $cpt ) {
|
||||
foreach ( $accountingcategory->lines_cptbk as $cpt ) {
|
||||
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
|
||||
}
|
||||
print '</select><br><input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
|
||||
print '</select><br>';
|
||||
print '<input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
@@ -132,26 +132,29 @@ print '</form>';
|
||||
|
||||
if ($action == 'display' || $action == 'delete') {
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><th class="liste_titre">' . $langs->trans("AccountAccounting") . '</th><th class="liste_titre">' . $langs->trans("Description") . '</th><th class="liste_titre" width="60" align="center">Action</th></tr>';
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AccountAccounting")."</td>";
|
||||
print '<td class="liste_titre" colspan="2">'.$langs->trans("Label")."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
if (! empty($cat_id)) {
|
||||
$return = $AccCat->display($cat_id);
|
||||
$return = $accountingcategory->display($cat_id);
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $AccCat->errors, 'errors');
|
||||
setEventMessages(null, $accountingcategory->errors, 'errors');
|
||||
}
|
||||
$j = 1;
|
||||
if (is_array($AccCat->lines_display) && count($AccCat->lines_display) > 0) {
|
||||
foreach ( $AccCat->lines_display as $cpt ) {
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
|
||||
if (is_array($accountingcategory->lines_display) && count($accountingcategory->lines_display) > 0) {
|
||||
foreach ( $accountingcategory->lines_display as $cpt ) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
||||
print '<td>' . $cpt->label . '</td>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"] . "?account_category=$cat_id&cptid=" . $cpt->rowid, $langs->trans("DeleteCptCategory"), $langs->trans("ConfirmDeleteCptCategory"), "delete", '', 0, "action-delete" . $j);
|
||||
print '<td><input class="button" type="button" id="action-delete' . $j . '" value="' . $langs->trans("Delete") . '"></td>';
|
||||
print '<td align="right">';
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?action=delete&account_category=" . $cat_id . "&cptid=" . $cpt->rowid."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
$j ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,4 +164,4 @@ if ($action == 'display' || $action == 'delete') {
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
@@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
|
||||
$langs->load("errors");
|
||||
$langs->load("admin");
|
||||
@@ -54,9 +54,10 @@ $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
$code=GETPOST('code','alpha');
|
||||
|
||||
// Security access
|
||||
if (! empty($user->rights->accountancy->chartofaccount))
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
@@ -73,14 +74,14 @@ $active = 1;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
if ($page == -1 || $page == null) { $page = 0 ; }
|
||||
$offset = $listlimit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
$search_country_id = GETPOST('search_country_id','int');
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('admin'));
|
||||
|
||||
// This page is a generic page to edit dictionaries
|
||||
@@ -151,7 +152,7 @@ $sourceList=array();
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
@@ -168,9 +169,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
{
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancysystem','DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
||||
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
|
||||
@@ -183,17 +181,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
// We take translate key of field
|
||||
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
|
||||
if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments';
|
||||
if ($fieldnamekey == 'nbjour') $fieldnamekey='NbOfDays';
|
||||
if ($fieldnamekey == 'decalage') $fieldnamekey='Offset';
|
||||
if ($fieldnamekey == 'module') $fieldnamekey='Module';
|
||||
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
|
||||
if ($fieldnamekey == 'note') $fieldnamekey = 'Note';
|
||||
if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate';
|
||||
if ($fieldnamekey == 'type') $fieldnamekey = 'Type';
|
||||
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
|
||||
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
|
||||
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
|
||||
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
|
||||
if ($fieldnamekey == 'category_type') $fieldnamekey = 'Calculated';
|
||||
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
|
||||
@@ -217,7 +210,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
||||
}*/
|
||||
}
|
||||
if (isset($_POST["country"]) && ($_POST["country"]=='0') && ($id != 2))
|
||||
if (isset($_POST["country"]) && ($_POST["country"]=='0'))
|
||||
{
|
||||
if (in_array($tablib[$id],array('DictionaryCompanyType','DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries
|
||||
{
|
||||
@@ -229,15 +222,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
|
||||
}
|
||||
}
|
||||
if ($id == 3 && ! is_numeric($_POST["code"]))
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric",$langs->transnoentities("Code")), null, 'errors');
|
||||
}
|
||||
|
||||
// Clean some parameters
|
||||
if ((! empty($_POST["localtax1_type"]) || ($_POST['localtax1_type'] == '0')) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
|
||||
if ((! empty($_POST["localtax2_type"]) || ($_POST['localtax2_type'] == '0')) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
|
||||
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||
@@ -385,8 +371,8 @@ if ($action == $acts[0])
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -405,8 +391,8 @@ if ($action == $acts[1])
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -425,8 +411,8 @@ if ($action == 'activate_favorite')
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -445,8 +431,8 @@ if ($action == 'disable_favorite')
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($_GET["code"]) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$_GET["code"]."'";
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
@@ -466,39 +452,17 @@ $formadmin=new FormAdmin($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$titre=$langs->trans("DictionarySetup");
|
||||
$titre=$langs->trans($tablib[$id]);
|
||||
$linkback='';
|
||||
if ($id)
|
||||
{
|
||||
$titre.=' - '.$langs->trans($tablib[$id]);
|
||||
$linkback='<a href="'.$_SERVER['PHP_SELF'].'">'.$langs->trans("BackToDictionaryList").'</a>';
|
||||
}
|
||||
$titlepicto='title_setup';
|
||||
if ($id == 10 && GETPOST('from') == 'accountancy')
|
||||
{
|
||||
$titre=$langs->trans("MenuVatAccounts");
|
||||
$titlepicto='title_accountancy';
|
||||
}
|
||||
if ($id == 7 && GETPOST('from') == 'accountancy')
|
||||
{
|
||||
$titre=$langs->trans("MenuTaxAccounts");
|
||||
$titlepicto='title_accountancy';
|
||||
}
|
||||
|
||||
print load_fiche_titre($titre,$linkback,$titlepicto);
|
||||
|
||||
if (empty($id))
|
||||
{
|
||||
print $langs->trans("DictionaryDesc");
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
||||
}
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
@@ -516,7 +480,7 @@ if ($id)
|
||||
else $sql.=" WHERE ";
|
||||
$sql.= " c.rowid = ".$search_country_id;
|
||||
}
|
||||
|
||||
|
||||
if ($sortfield)
|
||||
{
|
||||
// If sort order is "country", we use country_code instead
|
||||
@@ -543,7 +507,7 @@ if ($id)
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Form to add a new line
|
||||
@@ -563,19 +527,6 @@ if ($id)
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$align="left";
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='center';
|
||||
}
|
||||
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $align="center"; }
|
||||
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $align="center"; }
|
||||
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
|
||||
if ($fieldlist[$field]=='type') {
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,''));
|
||||
else $valuetoshow=$langs->trans("Type");
|
||||
@@ -584,55 +535,20 @@ if ($id)
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
|
||||
if ($fieldlist[$field]=='country') {
|
||||
if (in_array('region_id',$fieldlist)) { print '<td> </td>'; continue; } // For region page, we do not show the country input
|
||||
$valuetoshow=$langs->trans("Country");
|
||||
}
|
||||
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
|
||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
||||
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
||||
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
|
||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
|
||||
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
|
||||
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
|
||||
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
|
||||
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
|
||||
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
|
||||
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
|
||||
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
||||
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
||||
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||
|
||||
if ($id == 2) // Special cas for state page
|
||||
{
|
||||
if ($fieldlist[$field]=='region_id') { $valuetoshow=' '; $showfield=1; }
|
||||
if ($fieldlist[$field]=='region') { $valuetoshow=$langs->trans("Country").'/'.$langs->trans("Region"); $showfield=1; }
|
||||
}
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
@@ -645,7 +561,6 @@ if ($id)
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||
}
|
||||
|
||||
if ($id == 4) print '<td></td>';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
@@ -655,7 +570,7 @@ if ($id)
|
||||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven nodrag nodrop nohover">';
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
@@ -675,46 +590,19 @@ if ($id)
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
|
||||
print '<td colspan="4" align="right">';
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
|
||||
{
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
}
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates')
|
||||
{
|
||||
print '<tr><td colspan="8">* '.$langs->trans("AvailableVariables").": ";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail=new FormMail($db);
|
||||
$tmp=$formmail->getAvailableSubstitKey('form');
|
||||
print implode(', ', $tmp);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
$colspan=count($fieldlist)+3;
|
||||
if ($id == 4) $colspan++;
|
||||
|
||||
if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
|
||||
{
|
||||
print '<tr><td colspan="'.$colspan.'">* '.$langs->trans("LabelUsedByDefault").'.</td></tr>';
|
||||
}
|
||||
print '<tr><td colspan="'.$colspan.'"> </td></tr>'; // Keep to have a line with enough height
|
||||
}
|
||||
|
||||
|
||||
|
||||
// List of available record in database
|
||||
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
@@ -730,7 +618,7 @@ if ($id)
|
||||
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
|
||||
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
|
||||
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
|
||||
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
{
|
||||
@@ -739,108 +627,15 @@ if ($id)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Title of lines
|
||||
print '<tr class="liste_titre liste_titre_add">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$showfield=1; // By defaut
|
||||
$align="left";
|
||||
$sortable=1;
|
||||
$valuetoshow='';
|
||||
/*
|
||||
$tmparray=getLabelOfField($fieldlist[$field]);
|
||||
$showfield=$tmp['showfield'];
|
||||
$valuetoshow=$tmp['valuetoshow'];
|
||||
$align=$tmp['align'];
|
||||
$sortable=$tmp['sortable'];
|
||||
*/
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='center';
|
||||
}
|
||||
if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $align="center"; $sortable=0; }
|
||||
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
|
||||
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
|
||||
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
|
||||
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; }
|
||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
||||
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
||||
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
|
||||
if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Sens"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
if ($fieldlist[$field]=='formula') { $valuetoshow=$langs->trans("Formula"); }
|
||||
if ($fieldlist[$field]=='paper_size') { $valuetoshow=$langs->trans("PaperSize"); }
|
||||
if ($fieldlist[$field]=='orientation') { $valuetoshow=$langs->trans("Orientation"); }
|
||||
if ($fieldlist[$field]=='leftmargin') { $valuetoshow=$langs->trans("LeftMargin"); }
|
||||
if ($fieldlist[$field]=='topmargin') { $valuetoshow=$langs->trans("TopMargin"); }
|
||||
if ($fieldlist[$field]=='spacex') { $valuetoshow=$langs->trans("SpaceX"); }
|
||||
if ($fieldlist[$field]=='spacey') { $valuetoshow=$langs->trans("SpaceY"); }
|
||||
if ($fieldlist[$field]=='font_size') { $valuetoshow=$langs->trans("FontSize"); }
|
||||
if ($fieldlist[$field]=='custom_x') { $valuetoshow=$langs->trans("CustomX"); }
|
||||
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
||||
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
// Favorite - Only activated on country dictionary
|
||||
if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"), 0, $_SERVER["PHP_SELF"], "favorite", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print '</tr>';
|
||||
|
||||
// Title line with search boxes
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre liste_titre_add liste_titre_filter">';
|
||||
$filterfound=0;
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
$showfield=1; // By defaut
|
||||
|
||||
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
|
||||
|
||||
if ($showfield)
|
||||
{
|
||||
if ($value == 'country')
|
||||
@@ -856,27 +651,78 @@ if ($id)
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($id == 4) print '<td></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" colspan="3" align="center">';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if ($filterfound)
|
||||
{
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Title of lines
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$showfield=1; // By defaut
|
||||
$align="left";
|
||||
$sortable=1;
|
||||
$valuetoshow='';
|
||||
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); }
|
||||
if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); }
|
||||
if ($fieldlist[$field]=='taux') {
|
||||
if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate");
|
||||
else $valuetoshow=$langs->trans("Amount");
|
||||
$align='center';
|
||||
}
|
||||
if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); }
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
if ($id != 25) $valuetoshow.="*";
|
||||
}
|
||||
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
|
||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
|
||||
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
|
||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
|
||||
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
|
||||
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
|
||||
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); }
|
||||
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if ($num)
|
||||
{
|
||||
// Lines with values
|
||||
while ($i < $num)
|
||||
{
|
||||
$var = ! $var;
|
||||
|
||||
$obj = $db->fetch_object($resql);
|
||||
//print_r($obj);
|
||||
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">';
|
||||
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
|
||||
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
|
||||
{
|
||||
$tmpaction='edit';
|
||||
@@ -885,9 +731,11 @@ if ($id)
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
// Show fields
|
||||
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
||||
if (empty($reshook)) fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'edit');
|
||||
|
||||
print '<td colspan="3" align="center">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="center">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
@@ -907,7 +755,7 @@ if ($id)
|
||||
{
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
|
||||
|
||||
$showfield=1;
|
||||
$align="left";
|
||||
$valuetoshow=$obj->{$fieldlist[$field]};
|
||||
@@ -937,19 +785,6 @@ if ($id)
|
||||
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
|
||||
}
|
||||
}
|
||||
else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
$valuetoshow=yn($valuetoshow);
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='type_cdr') {
|
||||
if(empty($valuetoshow)) $valuetoshow = $langs->trans('None');
|
||||
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
|
||||
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
|
||||
$valuetoshow=price($valuetoshow);
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
@@ -1028,9 +863,6 @@ if ($id)
|
||||
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
|
||||
$showfield=0;
|
||||
}
|
||||
else if ($fieldlist[$field]=='unicode') {
|
||||
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
|
||||
@@ -1039,32 +871,6 @@ if ($id)
|
||||
$langs->load("products");
|
||||
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
|
||||
{
|
||||
$key = $langs->trans('SizeUnit'.strtolower($obj->unit));
|
||||
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax1_type') {
|
||||
if ($obj->localtax1 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax2_type') {
|
||||
if ($obj->localtax2 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
}
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
$align="center";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
{
|
||||
$align="center";
|
||||
@@ -1082,7 +888,7 @@ if ($id)
|
||||
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
||||
if (isset($obj->code) && $id != 10)
|
||||
if (isset($obj->code))
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
@@ -1098,16 +904,6 @@ if ($id)
|
||||
if ($param) $url .= '&'.$param;
|
||||
$url.='&';
|
||||
|
||||
// Favorite
|
||||
// Only activated on country dictionary
|
||||
if ($id == 4)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($iserasable) print '<a href="'.$url.'action='.$acts[$obj->favorite].'_favorite">'.$actl[$obj->favorite].'</a>';
|
||||
else print $langs->trans("AlwaysActive");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
@@ -1129,7 +925,7 @@ if ($id)
|
||||
{
|
||||
print '<td align="center">';
|
||||
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionnary can be edited by other profile than admin
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@@ -1172,17 +968,17 @@ $db->close();
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
*/
|
||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
global $form;
|
||||
global $form, $mysoc;
|
||||
global $region_id;
|
||||
global $elementList,$sourceList,$localtax_typeList;
|
||||
global $bc;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
if (! empty($conf->accounting->enabled)) $formaccountancy = new FormVentilation($db);
|
||||
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
@@ -1197,7 +993,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
} // For state page, we do not show the country input (we link to region, not country)
|
||||
print '<td>';
|
||||
$fieldname='country';
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:$mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'country_id')
|
||||
@@ -1325,7 +1121,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
$fieldname = $fieldlist[$field];
|
||||
$accountancy_account = (! empty($obj->$fieldname) ? $obj->$fieldname : 0);
|
||||
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/index.php
|
||||
* \file htdocs/accountancy/admin/defaultaccounts.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
@@ -32,16 +32,17 @@ require '../../main.inc.php';
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
$langs->load("loan");
|
||||
|
||||
// Security check
|
||||
if (! empty($user->rights->accountancy->chartofaccount))
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
@@ -49,23 +50,26 @@ if (! empty($user->rights->accountancy->chartofaccount))
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
|
||||
$list_account_main = array (
|
||||
'ACCOUNTING_ACCOUNT_CUSTOMER',
|
||||
'ACCOUNTING_ACCOUNT_SUPPLIER',
|
||||
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
|
||||
);
|
||||
|
||||
$list_account = array (
|
||||
'ACCOUNTING_ACCOUNT_SUPPLIER',
|
||||
'ACCOUNTING_ACCOUNT_CUSTOMER',
|
||||
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
|
||||
'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
|
||||
'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_SERVICE_BUY_ACCOUNT',
|
||||
'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_VAT_BUY_ACCOUNT',
|
||||
'ACCOUNTING_VAT_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_VAT_PAY_ACCOUNT',
|
||||
'ACCOUNTING_ACCOUNT_SUSPENSE',
|
||||
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
|
||||
'DONATION_ACCOUNTINGACCOUNT',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
|
||||
'ACCOUNTING_PRODUCT_BUY_ACCOUNT',
|
||||
'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_SERVICE_BUY_ACCOUNT',
|
||||
'ACCOUNTING_SERVICE_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_VAT_BUY_ACCOUNT',
|
||||
'ACCOUNTING_VAT_SOLD_ACCOUNT',
|
||||
'ACCOUNTING_VAT_PAY_ACCOUNT',
|
||||
'ACCOUNTING_ACCOUNT_SUSPENSE',
|
||||
'ACCOUNTING_ACCOUNT_TRANSFER_CASH',
|
||||
'DONATION_ACCOUNTINGACCOUNT',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
|
||||
);
|
||||
|
||||
|
||||
@@ -92,15 +96,23 @@ if (GETPOST('change_chart'))
|
||||
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
foreach ( $list_account as $constname ) {
|
||||
|
||||
foreach ( $list_account_main as $constname ) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ( $list_account as $constname ) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
@@ -113,15 +125,14 @@ if ($action == 'update') {
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccountancy = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$linkback = '';
|
||||
print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy');
|
||||
|
||||
print '<br>';
|
||||
print $langs->trans("DefaultBindingDesc").'<br>';
|
||||
print '<br>';
|
||||
|
||||
@@ -129,20 +140,48 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
// Define Chart of accounts
|
||||
|
||||
// Define main accounts for thirdparty
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
foreach ( $list_account as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
foreach ($list_account_main as $key) {
|
||||
|
||||
print '<tr class="oddeven value">';
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
$keydesc=$key.'_Desc';
|
||||
|
||||
$htmltext = $langs->trans($keydesc);
|
||||
print '<td class="fieldrequired" width="50%">';
|
||||
print $form->textwithpicto($label, $htmltext);
|
||||
print '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Define default accounts
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
foreach ($list_account as $key) {
|
||||
|
||||
print '<tr class="oddeven value">';
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td>' . $label . '</td>';
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
// Value
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '<td>'; // Do not force align=right, or it align also the content of the select box
|
||||
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@@ -38,7 +38,7 @@ $langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
|
||||
// Security check
|
||||
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||
if (empty($user->admin) && empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
@@ -47,7 +47,7 @@ $action = GETPOST('action', 'alpha');
|
||||
|
||||
// Parameters ACCOUNTING_EXPORT_*
|
||||
$main_option = array (
|
||||
'ACCOUNTING_EXPORT_PREFIX_SPEC'
|
||||
'ACCOUNTING_EXPORT_PREFIX_SPEC'
|
||||
);
|
||||
|
||||
$model_option = array (
|
||||
@@ -67,10 +67,10 @@ $model_option = array (
|
||||
*/
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
|
||||
$format = GETPOST('format', 'alpha');
|
||||
$modelcsv = GETPOST('modelcsv', 'int');
|
||||
|
||||
|
||||
if (! empty($format)) {
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
@@ -78,7 +78,7 @@ if ($action == 'update') {
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
|
||||
if (! empty($modelcsv)) {
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
@@ -89,23 +89,23 @@ if ($action == 'update') {
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
|
||||
foreach ( $main_option as $constname ) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ( $model_option as $constname ) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
@@ -130,7 +130,7 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron');
|
||||
dol_fiche_head($head, 'export', $langs->trans("Configuration"), -1, 'cron');
|
||||
|
||||
$var = true;
|
||||
|
||||
@@ -148,14 +148,13 @@ $var = ! $var;
|
||||
$num = count($main_option);
|
||||
if ($num) {
|
||||
foreach ( $main_option as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
@@ -178,7 +177,7 @@ print '</tr>';
|
||||
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="50%">' . $langs->trans("Selectmodelcsv") . '</td>';
|
||||
if (! $conf->use_javascript_ajax) {
|
||||
print '<td class="nowrap">';
|
||||
@@ -188,7 +187,7 @@ if (! $conf->use_javascript_ajax) {
|
||||
print '<td>';
|
||||
$listmodelcsv = AccountancyExport::getType();
|
||||
print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0);
|
||||
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
@@ -206,13 +205,13 @@ if ($num2) {
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > AccountancyExport::$EXPORT_TYPE_NORMAL)
|
||||
{
|
||||
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||
}
|
||||
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
||||
if (! $conf->use_javascript_ajax) {
|
||||
print '<td class="nowrap">';
|
||||
@@ -225,26 +224,24 @@ if ($num2) {
|
||||
'txt' => $langs->trans("txt")
|
||||
);
|
||||
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
|
||||
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
foreach ( $model_option as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,14 +25,14 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||
|
||||
$action = GETPOST('action');
|
||||
$action = GETPOST('action','aZ09');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@@ -125,7 +125,7 @@ if ($result) {
|
||||
while ( $i < $num && $i < $max ) {
|
||||
$obj = $db->fetch_object($result);
|
||||
$fiscalyearstatic->id = $obj->rowid;
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td><a href="fiscalyear_card.php?id=' . $obj->rowid . '">' . img_object($langs->trans("ShowFiscalYear"), "technic") . ' ' . $obj->rowid . '</a></td>';
|
||||
print '<td align="left">' . $obj->label . '</td>';
|
||||
print '<td align="left">' . dol_print_date($db->jdate($obj->date_start), 'day') . '</td>';
|
||||
@@ -136,7 +136,7 @@ if ($result) {
|
||||
$i ++;
|
||||
}
|
||||
} else {
|
||||
print '<tr ' . $bc[$var] . '><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -43,10 +43,10 @@ $id = GETPOST('id', 'int');
|
||||
// List of statut
|
||||
static $tmpstatut2label = array (
|
||||
'0' => 'OpenFiscalYear',
|
||||
'1' => 'CloseFiscalYear'
|
||||
'1' => 'CloseFiscalYear'
|
||||
);
|
||||
$statut2label = array (
|
||||
''
|
||||
''
|
||||
);
|
||||
foreach ( $tmpstatut2label as $key => $val )
|
||||
$statut2label[$key] = $langs->trans($val);
|
||||
@@ -69,7 +69,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'add') {
|
||||
if (! GETPOST('cancel', 'alpha')) {
|
||||
@@ -113,7 +113,7 @@ else if ($action == 'add') {
|
||||
header("Location: ./fiscalyear.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update record
|
||||
else if ($action == 'update') {
|
||||
@@ -126,7 +126,7 @@ else if ($action == 'update') {
|
||||
$object->statut = GETPOST('statut', 'int');
|
||||
|
||||
$result = $object->update($user);
|
||||
|
||||
|
||||
if ($result > 0) {
|
||||
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||
exit();
|
||||
@@ -145,13 +145,13 @@ else if ($action == 'update') {
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans("Fiscalyear") . " - " . $langs->trans("Card");
|
||||
$helpurl = "";
|
||||
llxHeader("",$title,$helpurl);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($action == 'create')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print load_fiche_titre($langs->trans("NewFiscalYear"));
|
||||
|
||||
@@ -176,12 +176,14 @@ if ($action == 'create')
|
||||
print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend');
|
||||
print '</td></tr>';
|
||||
|
||||
/*
|
||||
// Statut
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">' . $langs->trans("Status") . '</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->selectarray('statut', $statut2label, GETPOST('statut'));
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -232,7 +234,8 @@ if ($action == 'create')
|
||||
|
||||
// Statut
|
||||
print '<tr><td>' . $langs->trans("Statut") . '</td><td>';
|
||||
print $form->selectarray('statut', $statut2label, $object->statut);
|
||||
// print $form->selectarray('statut', $statut2label, $object->statut);
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -303,9 +306,9 @@ if ($action == 'create')
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=edit&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
||||
|
||||
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||
|
||||
|
||||
// print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,7 +27,7 @@ require '../../main.inc.php';
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// langs
|
||||
$langs->load("compta");
|
||||
@@ -40,11 +39,11 @@ $langs->load("accountancy");
|
||||
if (! $user->admin)
|
||||
accessforbidden();
|
||||
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@@ -65,22 +64,22 @@ if ($_POST["action"] == 'import') {
|
||||
if (is_array($to_import) && count($to_import) > 0) {
|
||||
print '<div><font color="red">' . count($to_import) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result && ($db->num_rows($result) > 0)) {
|
||||
|
||||
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
|
||||
$cpt = 0;
|
||||
foreach ( $to_import as $maLigneCochee ) {
|
||||
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
|
||||
$monLabel = GETPOST('label' . $maLigneCochee);
|
||||
$monParentAccount = GETPOST('AccountParent' . $maLigneCochee);
|
||||
$monType = GETPOST('pcgType' . $maLigneCochee);
|
||||
$monSubType = GETPOST('pcgSubType' . $maLigneCochee);
|
||||
|
||||
|
||||
$accounting->fk_pcg_version = $obj->pcg_version;
|
||||
$accounting->account_number = $maLigneCochee;
|
||||
$accounting->label = $monLabel;
|
||||
@@ -126,10 +125,10 @@ if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
print_barre_liste($langs->trans("ImportAccount"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="action" value="import">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>' . $langs->trans("AccountAccouting") . '</td>';
|
||||
print '<td>' . $langs->trans("label") . '</td>';
|
||||
@@ -138,45 +137,43 @@ if ($result) {
|
||||
print '<td>' . $langs->trans("Pcgsubtype") . '</td>';
|
||||
print '<td align="center">' . $langs->trans("Import") . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$form = new Form($db);
|
||||
$htmlacc = new FormVentilation($db);
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$var = ! $var;
|
||||
print '<tr'. $bc[$var].'>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td align="left">';
|
||||
print $objp->accounting;
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td align="left">';
|
||||
print '<input name="label" size="30" value="">';
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Colonne choix du compte
|
||||
print '<td>';
|
||||
print $htmlacc->select_account($accounting->account_parent, 'AccountParent');
|
||||
print $formaccounting->select_account($accounting->account_parent, 'AccountParent');
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgtype($accounting->pcg_type, 'pcgType');
|
||||
print '<input type="text" name="pcgType" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$accounting->pcg_type).'">';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td>';
|
||||
print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcgSubType');
|
||||
print '<input type="text" name="pcgSubType" value="'.dol_escape_htmltag(isset($_POST['pcg_subtype'])?GETPOST('pcg_subtype','alpha'):$accounting->pcg_subtype).'">';
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Colonne choix ligne a ventiler
|
||||
|
||||
$checked = ('label' == 'O') ? ' checked' : '';
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<input type="checkbox" name="mesCasesCochees[]" ' . $checked . ' value="' . $objp->accounting . '"/>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '</tr>';
|
||||
$i ++;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -32,7 +32,6 @@ require '../../main.inc.php';
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
@@ -52,8 +51,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$list = array (
|
||||
'ACCOUNTING_LENGTH_GACCOUNT',
|
||||
'ACCOUNTING_LENGTH_AACCOUNT' ,
|
||||
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
||||
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
||||
// 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
||||
// 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
||||
);
|
||||
|
||||
|
||||
@@ -66,28 +65,29 @@ $accounting_mode = defined('ACCOUNTING_MODE') ? ACCOUNTING_MODE : 'RECETTES-DEPE
|
||||
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
|
||||
$accounting_modes = array (
|
||||
'RECETTES-DEPENSES',
|
||||
'CREANCES-DETTES'
|
||||
'CREANCES-DETTES'
|
||||
);
|
||||
|
||||
|
||||
$accounting_mode = GETPOST('accounting_mode', 'alpha');
|
||||
|
||||
|
||||
if (in_array($accounting_mode, $accounting_modes)) {
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
|
||||
if ($error) {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
|
||||
foreach ($list as $constname) {
|
||||
foreach ($list as $constname)
|
||||
{
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
@@ -141,18 +141,17 @@ if ($action == 'setmanagezero') {
|
||||
}
|
||||
|
||||
if ($action == 'setdisabledirectinput') {
|
||||
$setdisabledirectinput = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
$setdisabledirectinput = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "BANK_DISABLE_DIRECT_INPUT", $setdisabledirectinput, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@@ -160,7 +159,6 @@ if ($action == 'setdisabledirectinput') {
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
$formaccountancy = new FormVentilation($db);
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
|
||||
@@ -171,7 +169,7 @@ print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
|
||||
dol_fiche_head($head, 'general', $langs->trans("Configuration"), -1, 'cron');
|
||||
|
||||
|
||||
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
|
||||
@@ -214,8 +212,7 @@ print "</tr>\n";
|
||||
if (! empty($user->admin))
|
||||
{
|
||||
// TO DO Mutualize code for yes/no constants
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||
@@ -228,8 +225,7 @@ if (! empty($user->admin))
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||
@@ -242,22 +238,20 @@ if (! empty($user->admin))
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
$var = ! $var;
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||
@@ -272,19 +266,21 @@ if (! empty($user->admin))
|
||||
}
|
||||
|
||||
|
||||
// Param a user $user->rights->accountancy->chartofaccount can access
|
||||
foreach ($list as $key)
|
||||
// Param a user $user->rights->accounting->chartofaccount can access
|
||||
foreach ($list as $key)
|
||||
{
|
||||
$var = ! $var;
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td>'.$label.'</td>';
|
||||
// Value
|
||||
print '<td align="right">';
|
||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '<input type="text" class="maxwidth100" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -301,7 +297,7 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy"));
|
||||
print '<div class="opacitymedium">'.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")).'</div>';
|
||||
|
||||
print '<br>';
|
||||
print '</form>';
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/journal.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure accounting expert module
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
|
||||
// Security check
|
||||
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
// Other parameters ACCOUNTING_*
|
||||
$list = array (
|
||||
'ACCOUNTING_SELL_JOURNAL',
|
||||
'ACCOUNTING_PURCHASE_JOURNAL',
|
||||
'ACCOUNTING_SOCIAL_JOURNAL',
|
||||
'ACCOUNTING_MISCELLANEOUS_JOURNAL',
|
||||
'ACCOUNTING_EXPENSEREPORT_JOURNAL'
|
||||
);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
// Save vars
|
||||
foreach ($list as $constname)
|
||||
{
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
// Save bank account journals
|
||||
$arrayofbankaccount = GETPOST('bank_account', 'array');
|
||||
foreach($arrayofbankaccount as $key => $code)
|
||||
{
|
||||
$bankaccount = new Account($db);
|
||||
$res = $bankaccount->fetch($key);
|
||||
if ($res > 0)
|
||||
{
|
||||
$bankaccount->accountancy_journal = $code;
|
||||
$bankaccount->update($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
|
||||
|
||||
$head = admin_accounting_prepare_head(null);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
dol_fiche_head($head, 'journal', $langs->trans("Configuration"), 0, 'cron');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">' . $langs->trans('Journaux') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%"><label for="' . $key . '">' . $label . '</label></td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">' . $langs->trans('JournalFinancial') . ' ('.$langs->trans('Opened').')</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Bank account
|
||||
$sql = "SELECT rowid, ref, label, number, account_number, accountancy_journal";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "bank_account";
|
||||
$sql .= " WHERE entity = " . $conf->entity;
|
||||
$sql .= " AND clos = 0";
|
||||
$sql .= " ORDER BY label";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$numr = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
if ($numr > 0)
|
||||
|
||||
$bankaccountstatic = new Account($db);
|
||||
|
||||
while ( $i < $numr ) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$var = ! $var;
|
||||
|
||||
$bankaccountstatic->rowid = $objp->rowid;
|
||||
$bankaccountstatic->id = $objp->rowid;
|
||||
$bankaccountstatic->ref = $objp->ref;
|
||||
$bankaccountstatic->label = $objp->label;
|
||||
$bankaccountstatic->number = $objp->number;
|
||||
$bankaccountstatic->account_number = $objp->account_number;
|
||||
$bankaccountstatic->accountancy_journal = $objp->accountancy_journal;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
print '<td width="50%"><label for="' . $objp->rowid . '">' . $langs->trans("Journal");
|
||||
print ' - '.$bankaccountstatic->getNomUrl(1);
|
||||
print '</label></td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" id="' . $objp->rowid . '" name="bank_account['.$objp->rowid.']" value="' . $objp->accountancy_journal . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
$i ++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
747
htdocs/accountancy/admin/journals_list.php
Normal file
@@ -0,0 +1,747 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/admin/journals_list.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Setup page to configure journals
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
$langs->load("accountancy");
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$id=GETPOST('id','int');
|
||||
$rowid=GETPOST('rowid','alpha');
|
||||
$code=GETPOST('code','alpha');
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$acts[0] = "activate";
|
||||
$acts[1] = "disable";
|
||||
$actl[0] = img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$actl[1] = img_picto($langs->trans("Activated"),'switch_on');
|
||||
|
||||
$listoffset=GETPOST('listoffset');
|
||||
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
|
||||
$active = 1;
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1 || $page == null) { $page = 0 ; }
|
||||
$offset = $listlimit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (empty($sortfield)) $sortfield='code';
|
||||
if (empty($sortorder)) $sortorder='ASC';
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('admin'));
|
||||
|
||||
// This page is a generic page to edit dictionaries
|
||||
// Put here declaration of dictionaries properties
|
||||
|
||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||
$taborder=array(35);
|
||||
|
||||
// Name of SQL tables of dictionaries
|
||||
$tabname=array();
|
||||
$tabname[35]= MAIN_DB_PREFIX."accounting_journal";
|
||||
|
||||
// Dictionary labels
|
||||
$tablib=array();
|
||||
$tablib[35]= "DictionaryAccountancyJournal";
|
||||
|
||||
// Requests to extract data
|
||||
$tabsql=array();
|
||||
$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a";
|
||||
|
||||
// Criteria to sort dictionaries
|
||||
$tabsqlsort=array();
|
||||
$tabsqlsort[35]="code ASC";
|
||||
|
||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||
$tabfield=array();
|
||||
$tabfield[35]= "code,label,nature";
|
||||
|
||||
// Nom des champs d'edition pour modification d'un enregistrement
|
||||
$tabfieldvalue=array();
|
||||
$tabfieldvalue[35]= "code,label,nature";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
$tabfieldinsert=array();
|
||||
$tabfieldinsert[35]= "code,label,nature";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
// "nameoffield" if id field is not "rowid" or has not autoincrement on
|
||||
$tabrowid=array();
|
||||
$tabrowid[35]= "";
|
||||
|
||||
// Condition to show dictionary in setup page
|
||||
$tabcond=array();
|
||||
$tabcond[35]= ! empty($conf->accounting->enabled);
|
||||
|
||||
// List of help for fields
|
||||
$tabhelp=array();
|
||||
$tabhelp[35] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck=array();
|
||||
$tabfieldcheck[35] = array();
|
||||
|
||||
// Complete all arrays with entries found into modules
|
||||
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
|
||||
|
||||
|
||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||
$elementList = array();
|
||||
// Must match ids defined into eldy.lib.php
|
||||
$sourceList = array(
|
||||
'1' => $langs->trans('AccountingJournalType1'),
|
||||
'2' => $langs->trans('AccountingJournalType2'),
|
||||
'3' => $langs->trans('AccountingJournalType3'),
|
||||
'4' => $langs->trans('AccountingJournalType4'),
|
||||
'5' => $langs->trans('AccountingJournalType5'),
|
||||
'9' => $langs->trans('AccountingJournalType9')
|
||||
);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
|
||||
{
|
||||
$search_country_id = '';
|
||||
}
|
||||
|
||||
// Actions add or modify an entry into a dictionary
|
||||
if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
{
|
||||
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
|
||||
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
|
||||
$listfieldmodify=explode(',',$tabfieldinsert[$id]);
|
||||
$listfieldvalue=explode(',',$tabfieldvalue[$id]);
|
||||
|
||||
// Check that all fields are filled
|
||||
$ok=1;
|
||||
foreach ($listfield as $f => $value)
|
||||
{
|
||||
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
|
||||
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
|
||||
if ($fieldnamekey == 'nature') $fieldnamekey = 'Nature';
|
||||
}
|
||||
// Other checks
|
||||
if (isset($_POST["code"]))
|
||||
{
|
||||
if ($_POST["code"]=='0')
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
|
||||
}
|
||||
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
|
||||
{
|
||||
$ok = 0;
|
||||
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
||||
}*/
|
||||
}
|
||||
|
||||
// Clean some parameters
|
||||
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
|
||||
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
if ($ok && GETPOST('actionadd'))
|
||||
{
|
||||
if ($tabrowid[$id])
|
||||
{
|
||||
// Recupere id libre pour insertion
|
||||
$newid=0;
|
||||
$sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id];
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$newid=($obj->newid + 1);
|
||||
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// Add new entry
|
||||
$sql = "INSERT INTO ".$tabname[$id]." (";
|
||||
// List of fields
|
||||
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
|
||||
$sql.= $tabrowid[$id].",";
|
||||
$sql.= $tabfieldinsert[$id];
|
||||
$sql.=",active)";
|
||||
$sql.= " VALUES(";
|
||||
|
||||
// List of values
|
||||
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
|
||||
$sql.= $newid.",";
|
||||
$i=0;
|
||||
foreach ($listfieldinsert as $f => $value)
|
||||
{
|
||||
if ($value == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
|
||||
$i++;
|
||||
}
|
||||
$sql.=",1)";
|
||||
|
||||
dol_syslog("actionadd", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
|
||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
if ($ok && GETPOST('actionmodify'))
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
|
||||
// Modify entry
|
||||
$sql = "UPDATE ".$tabname[$id]." SET ";
|
||||
// Modifie valeur des champs
|
||||
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldmodify))
|
||||
{
|
||||
$sql.= $tabrowid[$id]."=";
|
||||
$sql.= "'".$db->escape($rowid)."', ";
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($listfieldmodify as $field)
|
||||
{
|
||||
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
|
||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||
}
|
||||
else if ($field == 'entity') {
|
||||
$_POST[$listfieldvalue[$i]] = $conf->entity;
|
||||
}
|
||||
if ($i) $sql.=",";
|
||||
$sql.= $field."=";
|
||||
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
|
||||
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
|
||||
$i++;
|
||||
}
|
||||
$sql.= " WHERE ".$rowidcol." = '".$rowid."'";
|
||||
|
||||
dol_syslog("actionmodify", LOG_DEBUG);
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
setEventMessages($db->error(), null, 'errors');
|
||||
}
|
||||
}
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
|
||||
if (GETPOST('actioncancel'))
|
||||
{
|
||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
|
||||
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
|
||||
|
||||
dol_syslog("delete", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
|
||||
{
|
||||
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// activate
|
||||
if ($action == $acts[0])
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// disable
|
||||
if ($action == $acts[1])
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
else { $rowidcol="rowid"; }
|
||||
|
||||
if ($rowid) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
|
||||
}
|
||||
elseif ($code) {
|
||||
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formadmin=new FormAdmin($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$titre=$langs->trans("DictionarySetup");
|
||||
$linkback='';
|
||||
if ($id)
|
||||
{
|
||||
$titre.=' - '.$langs->trans($tablib[$id]);
|
||||
$titlepicto='title_accountancy';
|
||||
}
|
||||
|
||||
print load_fiche_titre($titre,$linkback,$titlepicto);
|
||||
|
||||
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
//var_dump($elementList);
|
||||
|
||||
/*
|
||||
* Show a dictionary
|
||||
*/
|
||||
if ($id)
|
||||
{
|
||||
// Complete requete recherche valeurs avec critere de tri
|
||||
$sql=$tabsql[$id];
|
||||
|
||||
if ($search_country_id > 0)
|
||||
{
|
||||
if (preg_match('/ WHERE /',$sql)) $sql.= " AND ";
|
||||
else $sql.=" WHERE ";
|
||||
$sql.= " c.rowid = ".$search_country_id;
|
||||
}
|
||||
|
||||
if ($sortfield)
|
||||
{
|
||||
// If sort order is "country", we use country_code instead
|
||||
if ($sortfield == 'country') $sortfield='country_code';
|
||||
$sql.= " ORDER BY ".$sortfield;
|
||||
if ($sortorder)
|
||||
{
|
||||
$sql.=" ".strtoupper($sortorder);
|
||||
}
|
||||
$sql.=", ";
|
||||
// Clear the required sort criteria for the tabsqlsort to be able to force it with selected value
|
||||
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i','',$tabsqlsort[$id]);
|
||||
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.',/i','',$tabsqlsort[$id]);
|
||||
}
|
||||
else {
|
||||
$sql.=" ORDER BY ";
|
||||
}
|
||||
$sql.=$tabsqlsort[$id];
|
||||
$sql.=$db->plimit($listlimit+1,$offset);
|
||||
//print $sql;
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// Form to add a new line
|
||||
if ($tabname[$id])
|
||||
{
|
||||
$alabelisused=0;
|
||||
$var=false;
|
||||
|
||||
$fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
// Line for title
|
||||
print '<tr class="liste_titre">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
$align="left";
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
|
||||
{
|
||||
$valuetoshow=$langs->trans("Label");
|
||||
}
|
||||
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
|
||||
|
||||
if ($valuetoshow != '')
|
||||
{
|
||||
print '<td align="'.$align.'">';
|
||||
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
|
||||
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
|
||||
else print $valuetoshow;
|
||||
print '</td>';
|
||||
}
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||
print '</td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '<td style="min-width: 26px;"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Line to enter new values
|
||||
print '<tr class="oddeven nodrag nodrap nohover">';
|
||||
|
||||
$obj = new stdClass();
|
||||
// If data was already input, we define them in obj to populate input fields.
|
||||
if (GETPOST('actionadd'))
|
||||
{
|
||||
foreach ($fieldlist as $key=>$val)
|
||||
{
|
||||
if (GETPOST($val) != '')
|
||||
$obj->$val=GETPOST($val);
|
||||
}
|
||||
}
|
||||
|
||||
$tmpaction = 'create';
|
||||
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
|
||||
print '<td colspan="4" align="right">';
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
print '<tr><td colspan="7"> </td></tr>'; // Keep to have a line with enough height
|
||||
}
|
||||
|
||||
|
||||
|
||||
// List of available record in database
|
||||
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
|
||||
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
|
||||
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
|
||||
|
||||
// There is several pages
|
||||
if ($num > $listlimit)
|
||||
{
|
||||
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
|
||||
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Title of lines
|
||||
print '<tr class="liste_titre liste_titre_add">';
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
// Determine le nom du champ par rapport aux noms possibles
|
||||
// dans les dictionnaires de donnees
|
||||
$showfield=1; // By defaut
|
||||
$align="left";
|
||||
$sortable=1;
|
||||
$valuetoshow='';
|
||||
/*
|
||||
$tmparray=getLabelOfField($fieldlist[$field]);
|
||||
$showfield=$tmp['showfield'];
|
||||
$valuetoshow=$tmp['valuetoshow'];
|
||||
$align=$tmp['align'];
|
||||
$sortable=$tmp['sortable'];
|
||||
*/
|
||||
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
|
||||
$valuetoshow=$langs->trans($valuetoshow); // try to translate
|
||||
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
|
||||
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); }
|
||||
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
|
||||
|
||||
// Affiche nom du champ
|
||||
if ($showfield)
|
||||
{
|
||||
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
|
||||
}
|
||||
}
|
||||
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print getTitleFieldOfList('');
|
||||
print '</tr>';
|
||||
|
||||
// Title line with search boxes
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if ($filterfound)
|
||||
{
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
// Lines with values
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
//print_r($obj);
|
||||
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
|
||||
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
|
||||
{
|
||||
$tmpaction='edit';
|
||||
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
// Show fields
|
||||
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
||||
|
||||
print '<td align="center" colspan="4">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmpaction = 'view';
|
||||
$parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
|
||||
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
|
||||
$showfield=1;
|
||||
$align="left";
|
||||
$valuetoshow=$obj->{$fieldlist[$field]};
|
||||
if ($valuetoshow=='all') {
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$langs->load("accountancy");
|
||||
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
|
||||
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
|
||||
$class='tddict';
|
||||
// Show value for field
|
||||
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
}
|
||||
}
|
||||
|
||||
// Can an entry be erased or disabled ?
|
||||
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
|
||||
if (isset($obj->code) && $id != 10)
|
||||
{
|
||||
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
|
||||
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
|
||||
}
|
||||
|
||||
$canbemodified=$iserasable;
|
||||
|
||||
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
|
||||
if ($param) $url .= '&'.$param;
|
||||
$url.='&';
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
|
||||
else print $langs->trans("AlwaysActive");
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
// Delete link
|
||||
if ($iserasable)
|
||||
{
|
||||
print '<td align="center">';
|
||||
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
|
||||
/**
|
||||
* Show fields in insert/edit mode
|
||||
*
|
||||
* @param array $fieldlist Array of fields
|
||||
* @param Object $obj If we show a particular record, obj is filled with record fields
|
||||
* @param string $tabname Name of SQL table
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
*/
|
||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
global $form, $mysoc;
|
||||
global $region_id;
|
||||
global $elementList,$sourceList,$localtax_typeList;
|
||||
global $bc;
|
||||
|
||||
$formadmin = new FormAdmin($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
if ($fieldlist[$field] == 'nature')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('nature', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
|
||||
print '<td><input type="text" class="flat minwidth100" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
$size=''; $class='';
|
||||
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
||||
if ($fieldlist[$field]=='label') $class='quatrevingtpercent';
|
||||
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
|
||||
print '<input type="text" '.$size.'class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
@@ -70,11 +70,11 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
$btn_changeaccount = GETPOST('changeaccount');
|
||||
$btn_changetype = GETPOST('changetype');
|
||||
|
||||
$limit = GETPOST("limit")?GETPOST("limit","int"):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if ($page == -1) { $page = 0; }
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
@@ -98,7 +98,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action);
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$search_ref = '';
|
||||
$search_label = '';
|
||||
@@ -111,16 +111,16 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
||||
if ($action == 'update') {
|
||||
if (! empty($btn_changetype)) {
|
||||
$error = 0;
|
||||
|
||||
|
||||
$accounting_product_modes = array (
|
||||
'ACCOUNTANCY_SELL',
|
||||
'ACCOUNTANCY_BUY'
|
||||
'ACCOUNTANCY_BUY'
|
||||
);
|
||||
|
||||
|
||||
$accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
|
||||
|
||||
if (in_array($accounting_product_mode, $accounting_product_modes)) {
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_PRODUCT_MODE', $accounting_product_mode, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
@@ -128,26 +128,26 @@ if ($action == 'update') {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! empty($btn_changeaccount)) {
|
||||
//$msg = '<div><span class="accountingprocessing">' . $langs->trans("Processing") . '...</span></div>';
|
||||
if (! empty($chk_prod)) {
|
||||
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
|
||||
//$msg .= '<div><span class="accountingprocessing">' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
|
||||
|
||||
|
||||
$cpt = 0; $ok = 0; $ko = 0;
|
||||
foreach ( $chk_prod as $productid ) {
|
||||
|
||||
|
||||
$accounting_account_id = GETPOST('codeventil_' . $productid);
|
||||
|
||||
|
||||
$result = $accounting->fetch($accounting_account_id, null, 1);
|
||||
if ($result < 0) {
|
||||
// setEventMessages(null, $accounting->errors, 'errors');
|
||||
$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||
} else {
|
||||
|
||||
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "product";
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
$sql .= " SET accountancy_code_buy = " . $accounting->account_number;
|
||||
@@ -156,7 +156,7 @@ if ($action == 'update') {
|
||||
$sql .= " SET accountancy_code_sell = " . $accounting->account_number;
|
||||
}
|
||||
$sql .= " WHERE rowid = " . $productid;
|
||||
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$ok++;
|
||||
@@ -166,7 +166,7 @@ if ($action == 'update') {
|
||||
//$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$cpt ++;
|
||||
}
|
||||
} else {
|
||||
@@ -184,7 +184,7 @@ if ($action == 'update') {
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new FormVentilation($db);
|
||||
$form = new FormAccounting($db);
|
||||
|
||||
// Defaut AccountingAccount RowId Product / Service
|
||||
// at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid
|
||||
@@ -218,7 +218,7 @@ else
|
||||
{
|
||||
$sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'";
|
||||
}
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('product').')';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
if (strlen(trim($search_current_account))) {
|
||||
$sql .= natural_search("p.accountancy_code_buy",$search_current_account);
|
||||
@@ -258,11 +258,11 @@ $sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php:: sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
@@ -271,7 +271,7 @@ if ($result)
|
||||
if ($search_desc > 0) $param.="&search_desc=".urlencode($search_desc);
|
||||
if ($search_current_account > 0) $param.="&search_current_account=".urlencode($search_current_account);
|
||||
if ($search_current_account_valid && $search_current_account_valid != '-1') $param.="&search_current_account_valid=".urlencode($search_current_account_valid);
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -279,14 +279,15 @@ if ($result)
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy');
|
||||
print '<br>';
|
||||
|
||||
|
||||
print $langs->trans("InitAccountancyDesc") . '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Select mode
|
||||
|
||||
// Select mode
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>';
|
||||
@@ -297,37 +298,23 @@ if ($result)
|
||||
print '<tr ' . $bc[true] . '><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"' . ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') . '> ' . $langs->trans('OptionModeProductBuy') . '</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans('Refresh') . '" name="changetype"></div>';
|
||||
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
|
||||
$texte=$langs->trans("ListOfProductsServices");
|
||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("OnSell"), $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("OnBuy"), $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
$fieldtosortaccount="p.accountancy_code_buy";
|
||||
}
|
||||
else $fieldtosortaccount="p.accountancy_code_sell";
|
||||
print_liste_field_titre($langs->trans("CurrentDedicatedAccountingAccount"), $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("AssignDedicatedAccountingAccount"));
|
||||
print_liste_field_titre('', '', '', '', '', 'align="center"');
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
||||
@@ -342,14 +329,30 @@ if ($result)
|
||||
print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1);
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td align="right" class="liste_titre">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1);
|
||||
print $searchpitco;
|
||||
print '<td align="center" class="liste_titre">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
$fieldtosortaccount="p.accountancy_code_buy";
|
||||
}
|
||||
else $fieldtosortaccount="p.accountancy_code_sell";
|
||||
print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AssignDedicatedAccountingAccount");
|
||||
$clickpitco=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($clickpitco, '', '', '', '', 'align="center"');
|
||||
print '</tr>';
|
||||
|
||||
$product_static = new Product($db);
|
||||
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
while ($i < min($num,$limit))
|
||||
@@ -364,7 +367,7 @@ if ($result)
|
||||
$product_static->description = $obj->description;
|
||||
$product_static->status = $obj->tosell;
|
||||
$product_static->status_buy = $obj->tobuy;
|
||||
|
||||
|
||||
if ($obj->product_type == 0) {
|
||||
$compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$compta_prodsell_id = $aarowid_prodsell;
|
||||
@@ -372,7 +375,7 @@ if ($result)
|
||||
$compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$compta_prodsell_id = $aarowid_servsell;
|
||||
}
|
||||
|
||||
|
||||
if ($obj->product_type == 0) {
|
||||
$compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$compta_prodbuy_id = $aarowid_prodbuy;
|
||||
@@ -380,42 +383,41 @@ if ($result)
|
||||
$compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
$compta_prodbuy_id = $aarowid_servbuy;
|
||||
}
|
||||
|
||||
$var = ! $var;
|
||||
print '<tr '. $bc[$var].'>';
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
print $product_static->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td align="left">'.$obj->label.'</td>';
|
||||
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
|
||||
|
||||
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
|
||||
{
|
||||
// TODO ADJUST DESCRIPTION SIZE
|
||||
// print '<td align="left">' . $obj->description . '</td>';
|
||||
// TODO: we shoul set a user defined value to adjust user square / wide screen size
|
||||
$trunclengh = defined('ACCOUNTING_LENGTH_DESCRIPTION') ? ACCOUNTING_LENGTH_DESCRIPTION : 64;
|
||||
$trunclengh = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
|
||||
print '<td style="' . $code_sell_p_l_differ . '">' . nl2br(dol_trunc($obj->description, $trunclengh)) . '</td>';
|
||||
}
|
||||
|
||||
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 0).'</td>';
|
||||
|
||||
|
||||
print '<td align="center">'.$product_static->getLibStatut(3, 1).'</td>';
|
||||
|
||||
|
||||
// Current accounting account
|
||||
print '<td align="left">';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
print length_accountg($obj->accountancy_code_buy);
|
||||
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
|
||||
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
|
||||
}
|
||||
else
|
||||
{
|
||||
print length_accountg($obj->accountancy_code_sell);
|
||||
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
|
||||
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Dedicated account
|
||||
$defaultvalue='';
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
|
||||
@@ -438,15 +440,15 @@ if ($result)
|
||||
print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
// Checkbox select
|
||||
print '<td align="right">';
|
||||
print '<td align="center">';
|
||||
print '<input type="checkbox" class="checkforselect" name="chk_prod[]" value="' . $obj->rowid . '"/></td>';
|
||||
print "</tr>";
|
||||
$i ++;
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
// Example : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
@@ -459,7 +461,7 @@ if ($result)
|
||||
/* console.log( index + ": " + $( this ).text() ); */
|
||||
if ($(this).is(\':checked\')) atleastoneselected++;
|
||||
});
|
||||
|
||||
|
||||
if (atleastoneselected) jQuery("#changeaccount").removeAttr(\'disabled\');
|
||||
else jQuery("#changeaccount").attr(\'disabled\',\'disabled\');
|
||||
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'butAction\');
|
||||
@@ -472,12 +474,12 @@ if ($result)
|
||||
init_savebutton();
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '<br><div align="center"><input type="submit" class="butAction" id="changeaccount" name="changeaccount" value="' . $langs->trans("Save") . '"></div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,8 +28,8 @@ require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
|
||||
// Langs
|
||||
@@ -51,17 +51,17 @@ if ($search_accountancy_code_end == - 1) {
|
||||
$search_accountancy_code_end = '';
|
||||
}
|
||||
|
||||
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
|
||||
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv.x") || GETPOST("button_export_csv")) {
|
||||
$action = 'export_csv';
|
||||
}
|
||||
|
||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
@@ -98,12 +98,12 @@ if (! empty($search_accountancy_code_end)) {
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
||||
*/
|
||||
|
||||
if ($action == 'export_csv') {
|
||||
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == AccountancyExport::$EXPORT_TYPE_CEGID) $sep = ";"; // For CEGID, we force separator.
|
||||
|
||||
$journal = 'bookkepping';
|
||||
|
||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||
@@ -122,11 +125,7 @@ if ($action == 'export_csv') {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
foreach ( $object->lines as $line ) {
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
|
||||
$sep = ";";
|
||||
}
|
||||
foreach ($object->lines as $line) {
|
||||
print length_accountg($line->numero_compte) . $sep;
|
||||
print $line->debit . $sep;
|
||||
print $line->credit . $sep;
|
||||
@@ -137,147 +136,137 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
|
||||
else {
|
||||
$title_page = $langs->trans("AccountBalance") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||
|
||||
llxHeader('', $title_page);
|
||||
|
||||
// List
|
||||
$title_page = $langs->trans("AccountBalance") . (($search_date_start || $search_date_end) ? ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end) : '');
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||
if ($nbtotalofrecords < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" />';
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, 0, 'title_accountancy', 0, $button);
|
||||
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (! empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="2">';
|
||||
print $langs->trans('From');
|
||||
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
|
||||
print '<br>';
|
||||
print $langs->trans('to');
|
||||
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre center"> </td>';
|
||||
print '<td class="liste_titre center"> </td>';
|
||||
print '<td class="liste_titre center"> </td>';
|
||||
|
||||
print '<td align="right" class="liste_titre">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$var = True;
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
$displayed_account = "";
|
||||
|
||||
foreach ($object->lines as $line) {
|
||||
$var = ! $var;
|
||||
$link = '';
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||
if (empty($description)) {
|
||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
}
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
|
||||
// Permet d'afficher le compte comptable
|
||||
if ($root_account_description != $displayed_account) {
|
||||
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if ($displayed_account != "") {
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Affiche le compte comptable en d<>but de ligne
|
||||
print "<tr>";
|
||||
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$displayed_account = $root_account_description;
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
}
|
||||
|
||||
// $object->get_compte_racine($line->numero_compte);
|
||||
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
print '<td>' . $description . '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
|
||||
print '<td align="center">' . $link;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Comptabilise le sous-total
|
||||
$sous_total_debit += $line->debit;
|
||||
$sous_total_credit += $line->credit;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
llxHeader('', $title_page);
|
||||
|
||||
// List
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||
if ($nbtotalofrecords < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, $offset, $filter);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('DateStart') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= $langs->trans('DateEnd') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
|
||||
$moreforfilter .= '</div>';
|
||||
|
||||
if (! empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre" colspan="5">';
|
||||
print $langs->trans('From');
|
||||
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
|
||||
print ' ';
|
||||
print $langs->trans('to');
|
||||
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td align="right" class="liste_titre">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Solde", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
$displayed_account = "";
|
||||
|
||||
foreach ($object->lines as $line) {
|
||||
$link = '';
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||
if (empty($description)) {
|
||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Permet d'afficher le compte comptable
|
||||
if ($root_account_description != $displayed_account) {
|
||||
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if ($displayed_account != "") {
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Affiche le compte comptable en d<>but de ligne
|
||||
print "<tr>";
|
||||
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">' . $root_account_description . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$displayed_account = $root_account_description;
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
}
|
||||
|
||||
// $object->get_compte_racine($line->numero_compte);
|
||||
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
print '<td>' . $description . '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit - $line->debit) . '</td>';
|
||||
print '<td align="center">' . $link;
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Comptabilise le sous-total
|
||||
$sous_total_debit += $line->debit;
|
||||
$sous_total_credit += $line->credit;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">' . price($sous_total_debit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit) . '</td><td class="nowrap" align="right">' . price($sous_total_credit - $sous_total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">' . price($total_debit) . '</td><td class="nowrap" align="right">' . price($total_credit) . '</td><td class="nowrap" align="right">' . price($total_credit - $total_debit) . '</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
}
|
||||
$db->close();
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,18 +19,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/bookkeeping/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Page to show book-entry
|
||||
* \file htdocs/accountancy/bookkeeping/card.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Page to show book-entry
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
|
||||
// Security check
|
||||
@@ -37,49 +39,63 @@ $id = GETPOST('id', 'int');
|
||||
if ($user->societe_id > 0) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$action = GETPOST('action');
|
||||
$action = GETPOST('action','aZ09');
|
||||
$mode = GETPOST('mode','aZ09'); // '' or 'tmp'
|
||||
$piece_num = GETPOST("piece_num");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
$account_number = GETPOST('account_number');
|
||||
$code_tiers = GETPOST('code_tiers');
|
||||
if ($code_tiers == - 1) {
|
||||
$code_tiers = null;
|
||||
$subledger_account = GETPOST('subledger_account');
|
||||
if ($subledger_account == - 1) {
|
||||
$subledger_account = null;
|
||||
}
|
||||
$label_compte = GETPOST('label_compte');
|
||||
$label_operation= GETPOST('label_operation');
|
||||
$debit = price2num(GETPOST('debit'));
|
||||
$credit = price2num(GETPOST('credit'));
|
||||
|
||||
$save = GETPOST('save');
|
||||
if (! empty($save)) {
|
||||
$action = 'add';
|
||||
}
|
||||
$update = GETPOST('update');
|
||||
if (! empty($update)) {
|
||||
$action = 'confirm_update';
|
||||
}
|
||||
$save = GETPOST('save','alpha');
|
||||
if (! empty($save)) $action = 'add';
|
||||
$update = GETPOST('update','alpha');
|
||||
if (! empty($update)) $action = 'confirm_update';
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == "confirm_update") {
|
||||
|
||||
$error = 0;
|
||||
|
||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$error ++;
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$action='update';
|
||||
}
|
||||
if (empty($account_number) || $account_number == '-1')
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
|
||||
$action='update';
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
if (! $error)
|
||||
{
|
||||
$book = new BookKeeping($db);
|
||||
|
||||
$result = $book->fetch($id);
|
||||
$result = $book->fetch($id, null, $mode);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
$book->numero_compte = $account_number;
|
||||
$book->code_tiers = $code_tiers;
|
||||
$book->subledger_account = $subledger_account;
|
||||
$book->label_compte = $label_compte;
|
||||
$book->label_operation= $label_operation;
|
||||
$book->debit = $debit;
|
||||
$book->credit = $credit;
|
||||
|
||||
@@ -92,11 +108,18 @@ if ($action == "confirm_update") {
|
||||
$book->sens = 'C';
|
||||
}
|
||||
|
||||
$result = $book->update($user);
|
||||
$result = $book->update($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
|
||||
$debit = 0;
|
||||
$credit = 0;
|
||||
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
@@ -106,17 +129,26 @@ if ($action == "confirm_update") {
|
||||
else if ($action == "add") {
|
||||
$error = 0;
|
||||
|
||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$error ++;
|
||||
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
if (empty($account_number) || $account_number == '-1')
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
|
||||
$action='';
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
if (! $error) {
|
||||
$book = new BookKeeping($db);
|
||||
|
||||
$book->numero_compte = $account_number;
|
||||
$book->code_tiers = $code_tiers;
|
||||
$book->subledger_account = $subledger_account;
|
||||
$book->label_compte = $label_compte;
|
||||
$book->label_operation= $label_operation;
|
||||
$book->debit = $debit;
|
||||
$book->credit = $credit;
|
||||
$book->doc_date = GETPOST('doc_date');
|
||||
@@ -137,11 +169,18 @@ else if ($action == "add") {
|
||||
$book->sens = 'C';
|
||||
}
|
||||
|
||||
$result = $book->createStd($user);
|
||||
$result = $book->createStd($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
|
||||
$debit = 0;
|
||||
$credit = 0;
|
||||
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
@@ -150,14 +189,13 @@ else if ($action == "add") {
|
||||
else if ($action == "confirm_delete") {
|
||||
$book = new BookKeeping($db);
|
||||
|
||||
$result = $book->fetch($id);
|
||||
|
||||
$result = $book->fetch($id, null, $mode);
|
||||
$piece_num = $book->piece_num;
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
$result = $book->delete($user);
|
||||
$result = $book->delete($user, false, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
}
|
||||
@@ -166,39 +204,100 @@ else if ($action == "confirm_delete") {
|
||||
}
|
||||
|
||||
else if ($action == "confirm_create") {
|
||||
$error = 0;
|
||||
|
||||
$book = new BookKeeping($db);
|
||||
$error = 0;
|
||||
|
||||
if (! GETPOST('next_num_mvt'))
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors');
|
||||
$book = new BookKeeping($db);
|
||||
|
||||
if (! GETPOST('code_journal') || GETPOST('code_journal') == '-1') {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
|
||||
$action='create';
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! GETPOST('next_num_mvt'))
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$book->label_compte = '';
|
||||
$book->debit = 0;
|
||||
$book->credit = 0;
|
||||
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
|
||||
$book->doc_type = GETPOST('doc_type');
|
||||
$book->piece_num = GETPOST('next_num_mvt');
|
||||
$book->doc_ref = GETPOST('doc_ref');
|
||||
$book->code_journal = GETPOST('code_journal');
|
||||
$book->fk_doc = 0;
|
||||
$book->fk_docdet = 0;
|
||||
|
||||
$book->montant = 0;
|
||||
|
||||
$result = $book->createStd($user);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
$book->label_compte = '';
|
||||
$book->debit = 0;
|
||||
$book->credit = 0;
|
||||
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
|
||||
$book->doc_type = GETPOST('doc_type');
|
||||
$book->piece_num = GETPOST('next_num_mvt');
|
||||
$book->doc_ref = GETPOST('doc_ref');
|
||||
$book->code_journal = GETPOST('code_journal');
|
||||
$book->fk_doc = 0;
|
||||
$book->fk_docdet = 0;
|
||||
$book->montant = 0;
|
||||
|
||||
$result = $book->createStd($user,0, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
$action = 'update';
|
||||
$id=$book->id;
|
||||
$piece_num = $book->piece_num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setdate') {
|
||||
$datedoc = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
|
||||
$result = $object->updateByMvt($piece_num,'doc_date',$db->idate($datedoc),$mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
$action = '';
|
||||
$piece_num = $book->piece_num;
|
||||
}
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setjournal') {
|
||||
$journaldoc = trim(GETPOST('code_journal'));
|
||||
$result = $object->updateByMvt($piece_num,'code_journal',$journaldoc,$mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setdocref') {
|
||||
$refdoc = trim(GETPOST('doc_ref'));
|
||||
$result = $object->updateByMvt($piece_num,'doc_ref',$refdoc,$mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
if ($mode != '_tmp')
|
||||
{
|
||||
setEventMessages($langs->trans('Saved'), null, 'mesgs');
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Validate transaction
|
||||
if ($action == 'valid') {
|
||||
$result = $object->transformTransaction(0,$piece_num);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
header("Location: list.php?sortfield=t.piece_num&sortorder=asc");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,52 +306,33 @@ else if ($action == "confirm_create") {
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$html = new Form($db);
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$accountjournal = new AccountingJournal($db);
|
||||
|
||||
/*
|
||||
* Confirmation to delete the command
|
||||
*/
|
||||
llxHeader('', $langs->trans("CreateMvts"));
|
||||
|
||||
// Confirmation to delete the command
|
||||
if ($action == 'delete') {
|
||||
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id.'&mode='. $mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
if ($action == 'create') {
|
||||
print load_fiche_titre($langs->trans("CreateMvts"));
|
||||
|
||||
$code_journal_array = array (
|
||||
$conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL,
|
||||
$conf->global->ACCOUNTING_PURCHASE_JOURNAL => $conf->global->ACCOUNTING_PURCHASE_JOURNAL,
|
||||
$conf->global->ACCOUNTING_SOCIAL_JOURNAL => $conf->global->ACCOUNTING_SOCIAL_JOURNAL,
|
||||
$conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL => $conf->global->ACCOUNTING_MISCELLANEOUS_JOURNAL,
|
||||
$conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL => $conf->global->ACCOUNTING_EXPENSEREPORT_JOURNAL
|
||||
);
|
||||
|
||||
$sql = 'SELECT DISTINCT accountancy_journal FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE clos=0';
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql) {
|
||||
setEventMessages($db->lasterror, null, 'errors');
|
||||
} else {
|
||||
while ( $obj_bank = $db->fetch_object($resql) ) {
|
||||
if (! empty($obj_bank->accountancy_journal)) {
|
||||
$code_journal_array[$obj_bank->accountancy_journal] = $obj_bank->accountancy_journal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$book = new BookKeeping($db);
|
||||
$next_num_mvt = $book->getNextNumMvt();
|
||||
if (empty($next_num_mvt))
|
||||
{
|
||||
dol_print_error('', 'Failed to get next piece number');
|
||||
}
|
||||
$next_num_mvt = $book->getNextNumMvt('_tmp');
|
||||
|
||||
if (empty($next_num_mvt))
|
||||
{
|
||||
dol_print_error('', 'Failed to get next piece number');
|
||||
}
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" name="create_mvt" method="POST">';
|
||||
print '<input type="hidden" name="action" value="confirm_create">' . "\n";
|
||||
print '<input type="hidden" name="next_num_mvt" value="' . $next_num_mvt . '">' . "\n";
|
||||
print '<input type="hidden" name="mode" value="_tmp">' . "\n";
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
@@ -271,7 +351,7 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">' . $langs->trans("Codejournal") . '</td>';
|
||||
print '<td>' . $html->selectarray('code_journal', $code_journal_array) . '</td>';
|
||||
print '<td>' . $formaccounting->select_journal(GETPOST('code_journal'),'code_journal',0,1,array(),1,1) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
@@ -281,7 +361,7 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Doctype") . '</td>';
|
||||
print '<td><input type="text" class="minwidth200" name="doc_type" value=""/></td>';
|
||||
print '<td><input type="text" class="minwidth200 name="doc_type" value=""/></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -295,44 +375,175 @@ if ($action == 'create') {
|
||||
print '</form>';
|
||||
} else {
|
||||
$book = new BookKeeping($db);
|
||||
$result = $book->fetchPerMvt($piece_num);
|
||||
$result = $book->fetchPerMvt($piece_num, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
}
|
||||
|
||||
if (! empty($book->piece_num)) {
|
||||
|
||||
print load_fiche_titre($langs->trans("UpdateMvts"), '<a href="list.php">' . $langs->trans('BackToList') . '</a>');
|
||||
$backlink = '<a href="list.php">' . $langs->trans('BackToList') . '</a>';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr class="pair">';
|
||||
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
|
||||
|
||||
$head=array();
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER['PHP_SELF'].'?piece_num='.$book->piece_num.($mode?'&mode='.$mode:'');
|
||||
$head[$h][1] = $langs->trans("Transaction");
|
||||
$head[$h][2] = 'transaction';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, 'transaction', '', -1);
|
||||
|
||||
|
||||
//dol_banner_tab($book, '', $backlink);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// account movement
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("NumMvts") . '</td>';
|
||||
print '<td>' . $book->piece_num . '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair">';
|
||||
print '<td>' . $langs->trans("Docdate") . '</td>';
|
||||
print '<td>' . dol_print_date($book->doc_date, 'daytextshort') . '</td>';
|
||||
|
||||
// date
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Docdate');
|
||||
print '</td>';
|
||||
if ($action != 'editdate')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdate&piece_num='. $book->piece_num .'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('SetDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editdate') {
|
||||
print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
$form->select_date($book->doc_date ? $book->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->doc_date ? dol_print_date($book->doc_date, 'daytext') : ' ';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair">';
|
||||
print '<td>' . $langs->trans("Codejournal") . '</td>';
|
||||
print '<td>' . $book->code_journal . '</td>';
|
||||
//journal
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Codejournal');
|
||||
print '</td>';
|
||||
if ($action != 'editjournal')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editjournal&piece_num='.$book->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editjournal') {
|
||||
print '<form name="setjournal" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setjournal">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print $formaccounting->select_journal($book->code_journal,'code_journal',0,0,array(),1,1);
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->code_journal ;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="impair">';
|
||||
print '<td>' . $langs->trans("Docref") . '</td>';
|
||||
print '<td>' . $book->doc_ref . '</td>';
|
||||
//docref
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Docref');
|
||||
print '</td>';
|
||||
if ($action != 'editdocref')
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?action=editdocref&piece_num='.$book->piece_num.'&mode='. $mode .'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editdocref') {
|
||||
print '<form name="setdocref" action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.$book->doc_ref.'">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $book->doc_ref ;
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair">';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Doc type
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Doctype") . '</td>';
|
||||
print '<td>' . $book->doc_type . '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// Validate
|
||||
/*
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("Status") . '</td>';
|
||||
print '<td>';
|
||||
if (empty($book->validated)) {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=enable">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $line->rowid . '&action=disable">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// check data
|
||||
/*
|
||||
print '<tr>';
|
||||
print '<td class="titlefield">' . $langs->trans("Control") . '</td>';
|
||||
if ($book->doc_type == 'customer_invoice')
|
||||
{
|
||||
$sqlmid = 'SELECT rowid as ref';
|
||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."facture as fac";
|
||||
$sqlmid .= " WHERE fac.rowid=" . $book->fk_doc;
|
||||
dol_syslog("accountancy/bookkeeping/card.php::sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid) {
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$invoicestatic = new Facture($db);
|
||||
$invoicestatic->fetch($objmid->ref);
|
||||
$ref=$langs->trans("Invoice").' '.$invoicestatic->getNomUrl(1);
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
print '<td>' . $ref .'</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
print "</table>\n";
|
||||
|
||||
print '</div></div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
$result = $book->fetch_all_per_mvt($piece_num);
|
||||
|
||||
|
||||
$result = $book->fetchAllPerMvt($piece_num, $mode);
|
||||
if ($result < 0) {
|
||||
setEventMessages($book->error, $book->errors, 'errors');
|
||||
} else {
|
||||
@@ -346,9 +557,8 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n";
|
||||
print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n";
|
||||
print '<input type="hidden" name="mode" value="' . $mode . '">' . "\n";
|
||||
|
||||
$var=False;
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
if (count($book->linesmvt) > 0) {
|
||||
|
||||
@@ -357,86 +567,120 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print_liste_field_titre($langs->trans("AccountAccountingShort"));
|
||||
print_liste_field_titre($langs->trans("Code_tiers"));
|
||||
print_liste_field_titre($langs->trans("Labelcompte"));
|
||||
print_liste_field_titre($langs->trans("Debit"), "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre($langs->trans("Credit"), "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre($langs->trans("Amount"), "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre($langs->trans("Sens"), "", "", "", "", 'align="center"');
|
||||
print_liste_field_titre($langs->trans("Action"), "", "", "", "", 'width="60" align="center"');
|
||||
print_liste_field_titre("AccountAccountingShort");
|
||||
print_liste_field_titre("SubledgerAccount");
|
||||
print_liste_field_titre("Labelcompte");
|
||||
print_liste_field_titre("Label");
|
||||
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
|
||||
print_liste_field_titre("Action", "", "", "", "", 'width="60" align="center"');
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($book->linesmvt as $line) {
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
|
||||
foreach ( $book->linesmvt as $line ) {
|
||||
print '<tr class="oddeven">';
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
|
||||
if ($action == 'update' && $line->id == $id) {
|
||||
|
||||
print '<td>';
|
||||
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($line->numero_compte, 'account_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers', 1);
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||
print '<td align="right">' . price($line->montant) . '</td>';
|
||||
print '<td align="center">' . $line->sens . '</td>';
|
||||
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
|
||||
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
print '<td>' . length_accounta($line->code_tiers) . '</td>';
|
||||
print '<td>' . length_accounta($line->subledger_account) . '</td>';
|
||||
print '<td>' . $line->label_compte . '</td>';
|
||||
print '<td>' . $line->label_operation. '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . price($line->montant) . '</td>';
|
||||
print '<td align="center">' . $line->sens . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
|
||||
print img_edit();
|
||||
print '</a> ';
|
||||
print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
print '</a> ';
|
||||
|
||||
$actiontodelete='detele';
|
||||
if ($mode == '_tmp') $actiontodelete='confirm_delete';
|
||||
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action='.$actiontodelete.'&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
|
||||
print img_delete();
|
||||
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if ($total_debit != $total_credit)
|
||||
if (price2num($total_debit) != price2num($total_credit))
|
||||
{
|
||||
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
|
||||
}
|
||||
|
||||
if ($action == "" || $action == 'add') {
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($account_number, 'account_number', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $formventilation->select_auxaccount($code_tiers, 'code_tiers', 1);
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="subledger_account" value="">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
|
||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
if ($mode=='_tmp' && $action=='')
|
||||
{
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
if ($total_debit == $total_credit)
|
||||
{
|
||||
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $credit, $debit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
|
||||
}
|
||||
|
||||
print ' ';
|
||||
print '<a class="button" href="' . DOL_URL_ROOT.'/accountancy/bookkeeping/list.php">'.$langs->trans("Cancel").'</a>';
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
print '</form>';
|
||||
}
|
||||
}
|
||||
@@ -445,5 +689,6 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,7 +16,6 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,12 +24,12 @@
|
||||
* \brief List operation of book keeping
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
@@ -46,11 +45,11 @@ $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETP
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt")) {
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
}
|
||||
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv")) {
|
||||
$action = 'export_csv';
|
||||
if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOST("button_export_file")) {
|
||||
$action = 'export_file';
|
||||
}
|
||||
|
||||
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||
@@ -79,7 +78,7 @@ $search_direction = GETPOST('search_direction', 'alpha');
|
||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page','int');
|
||||
@@ -93,12 +92,12 @@ if ($sortfield == "") $sortfield = "t.rowid";
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction'])) {
|
||||
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
|
||||
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||
}
|
||||
@@ -112,7 +111,7 @@ if ($action != 'export_csv' && ! isset($_POST['begin']) && ! isset($_GET['begin'
|
||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_mvt_num = '';
|
||||
$search_doc_type = '';
|
||||
@@ -170,19 +169,19 @@ if (! empty($search_accountancy_code_end)) {
|
||||
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||
}
|
||||
if (! empty($search_accountancy_aux_code)) {
|
||||
$filter['t.code_tiers'] = $search_accountancy_aux_code;
|
||||
$filter['t.subledger_account'] = $search_accountancy_aux_code;
|
||||
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
|
||||
}
|
||||
if (! empty($search_accountancy_aux_code_start)) {
|
||||
$filter['t.code_tiers>='] = $search_accountancy_aux_code_start;
|
||||
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
|
||||
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
|
||||
}
|
||||
if (! empty($search_accountancy_aux_code_end)) {
|
||||
$filter['t.code_tiers<='] = $search_accountancy_aux_code_end;
|
||||
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
|
||||
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
|
||||
}
|
||||
if (! empty($search_mvt_label)) {
|
||||
$filter['t.label_compte'] = $search_mvt_label;
|
||||
$filter['t.label_operation'] = $search_mvt_label;
|
||||
$param .= '&search_mvt_label=' . $search_mvt_label;
|
||||
}
|
||||
if (! empty($search_direction)) {
|
||||
@@ -222,7 +221,7 @@ if ($action == 'delbookkeepingyearconfirm') {
|
||||
$deljournal=0;
|
||||
}
|
||||
|
||||
if (! empty($delyear) || ! empty($deljournal))
|
||||
if (! empty($delyear) || ! empty($deljournal))
|
||||
{
|
||||
$result = $object->deleteByYearAndJournal($delyear,$deljournal);
|
||||
if ($result < 0) {
|
||||
@@ -260,9 +259,8 @@ if ($action == 'delmouvconfirm') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'export_csv') {
|
||||
|
||||
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||
// Export into a file with format defined into setup
|
||||
if ($action == 'export_file') {
|
||||
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||
|
||||
@@ -291,7 +289,6 @@ $title_page = $langs->trans("Bookkeeping");
|
||||
llxHeader('', $title_page);
|
||||
|
||||
// List
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
|
||||
@@ -321,8 +318,8 @@ if ($action == 'delbookkeepingyear') {
|
||||
if (empty($delyear)) {
|
||||
$delyear = dol_print_date(dol_now(), '%Y');
|
||||
}
|
||||
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
$journal_array = $formventilation->selectjournal_accountancy_bookkepping($deljournal, 'deljournal', 0, 'array');
|
||||
$year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
$journal_array = $formaccounting->select_journal($deljournal, 'deljournal', '', 1, 1, 1, '', 0, 1);
|
||||
|
||||
$form_question['delyear'] = array (
|
||||
'name' => 'delyear',
|
||||
@@ -333,9 +330,9 @@ if ($action == 'delbookkeepingyear') {
|
||||
);
|
||||
$form_question['deljournal'] = array (
|
||||
'name' => 'deljournal',
|
||||
'type' => 'select',
|
||||
'type' => 'other', // We don't use select here, the journal_array is already a select html component
|
||||
'label' => $langs->trans('DelJournal'),
|
||||
'values' => $journal_array,
|
||||
'value' => $journal_array,
|
||||
'default' => $deljournal
|
||||
);
|
||||
|
||||
@@ -354,59 +351,77 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$button = '<a class="butAction" name="button_export_csv" href="'.$_SERVER["PHP_SELF"].'?action=export_csv'.($param?'&'.$param:'').'">';
|
||||
$listofformat=AccountancyExport::getType();
|
||||
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
|
||||
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
|
||||
else $button.= $langs->trans("ExportList");
|
||||
$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
|
||||
$button.= '</a>';
|
||||
|
||||
$groupby = ' <a href="./listbyaccount.php">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php"">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit);
|
||||
|
||||
print '<div class="tabsAction">' . "\n";
|
||||
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountAccountingShort"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Code_tiers"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="' . dol_escape_htmltag($search_mvt_num) . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
print $langs->trans('From') . ': ';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From') . ' ';
|
||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
print $langs->trans('to') . ': ';
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to') . ' ';
|
||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
|
||||
print '<td class="liste_titre">';
|
||||
print $langs->trans('From');
|
||||
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
|
||||
print '<br>';
|
||||
print $langs->trans('to');
|
||||
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200');
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to').' ';
|
||||
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200');
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print $langs->trans('From');
|
||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
||||
print '<br>';
|
||||
print $langs->trans('to');
|
||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('From').' ';
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
|
||||
}
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to').' ';
|
||||
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
|
||||
// use setup of keypress to select thirdparty and this hang browser on large database.
|
||||
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
|
||||
{
|
||||
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
|
||||
}
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
|
||||
@@ -415,38 +430,61 @@ print '<td class="liste_titre center"> </td>';
|
||||
print '<td class="liste_titre center"> </td>';
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var = True;
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("SubledgerAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
$checkpicto='';
|
||||
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
|
||||
print_liste_field_titre($checkpicto, $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
|
||||
foreach ($object->lines as $line ) {
|
||||
$var = ! $var;
|
||||
$i=0;
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$line = $object->lines[$i];
|
||||
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
|
||||
print '<tr '. $bc[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
|
||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
print '<td>' . $line->doc_ref . '</td>';
|
||||
print '<td class="nowrap">' . $line->doc_ref . '</td>';
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
print '<td>' . length_accounta($line->code_tiers) . '</td>';
|
||||
print '<td>' . $line->label_compte . '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="center">' . $line->code_journal . '</td>';
|
||||
print '<td>' . length_accounta($line->subledger_account) . '</td>';
|
||||
print '<td>' . $line->label_operation . '</td>';
|
||||
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
|
||||
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
|
||||
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('',$line->code_journal);
|
||||
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal);
|
||||
print '<td align="center">' . $journaltoshow . '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
@@ -456,10 +494,10 @@ print '</td>';
|
||||
print '<td align="right">';
|
||||
print price($total_debit);
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td align="right">';
|
||||
print price($total_credit);
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td colspan="2"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr> largely based on the great work of :
|
||||
* - Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* - Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* - Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -29,8 +28,8 @@ require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
|
||||
// Langs
|
||||
@@ -59,7 +58,7 @@ $search_direction = GETPOST('search_direction', 'alpha');
|
||||
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page','int');
|
||||
@@ -75,10 +74,6 @@ if (empty($search_date_end)) $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
$options = '';
|
||||
$filter = array ();
|
||||
@@ -97,18 +92,18 @@ if (! empty($search_doc_date)) {
|
||||
}
|
||||
|
||||
|
||||
if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
if (! GETPOST('button_removefilter_x','alpha') && ! GETPOST('button_removefilter.x','alpha') && ! GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
if (! empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte'] = $search_accountancy_code_start;
|
||||
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||
}
|
||||
if (! empty($search_label_account)) {
|
||||
$filter['t.label_compte'] = $search_label_account;
|
||||
$filter['t.label_operation'] = $search_label_account;
|
||||
$options .= '&search_label_account=' . $search_label_account;
|
||||
}
|
||||
if (! empty($search_mvt_label)) {
|
||||
$filter['t.label_compte'] = $search_mvt_label;
|
||||
$filter['t.label_operation'] = $search_mvt_label;
|
||||
$options .= '&search_mvt_label=' . $search_mvt_label;
|
||||
}
|
||||
if (! empty($search_direction)) {
|
||||
@@ -126,7 +121,7 @@ if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Bot
|
||||
* Action
|
||||
*/
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_doc_date = '';
|
||||
$search_accountancy_code = '';
|
||||
@@ -156,12 +151,15 @@ if ($action == 'delmouvconfirm') {
|
||||
* View
|
||||
*/
|
||||
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting");
|
||||
|
||||
llxHeader('', $title_page);
|
||||
|
||||
// List
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
|
||||
@@ -174,7 +172,9 @@ $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $f
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
$nbtotalofrecords = $result;
|
||||
|
||||
$num=count($object->lines);
|
||||
|
||||
|
||||
if ($action == 'delmouv') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||
@@ -188,7 +188,7 @@ if ($action == 'delbookkeepingyear') {
|
||||
if (empty($delyear)) {
|
||||
$delyear = dol_print_date(dol_now(), '%Y');
|
||||
}
|
||||
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
$year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
|
||||
$form_question['delyear'] = array (
|
||||
'name' => 'delyear',
|
||||
@@ -205,9 +205,9 @@ if ($action == 'delbookkeepingyear') {
|
||||
|
||||
|
||||
|
||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a href="./list.php">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$viewflat = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'',$limit);
|
||||
|
||||
@@ -217,22 +217,11 @@ if ( preg_match('/^asc/i', $sortorder) )
|
||||
else
|
||||
$sortorder = "desc";
|
||||
|
||||
print '<div class="tabsAction">' . "\n";
|
||||
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||
print '</div>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
||||
print_liste_field_titre($langs->trans("TransactionNumShort"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices"));
|
||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||
@@ -248,41 +237,55 @@ print '<td class="liste_titre"><input type="text" size="7" class="flat" name="se
|
||||
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||
print '<td class="liste_titre" align="right" colspan="2">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpitco;
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']);
|
||||
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label");
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$var = True;
|
||||
|
||||
$total_debit = 0;
|
||||
$total_credit = 0;
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
||||
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
|
||||
|
||||
foreach ( $object->lines as $line ) {
|
||||
$var = ! $var;
|
||||
$i=0;
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$line = $object->lines[$i];
|
||||
|
||||
$total_debit += $line->debit;
|
||||
$total_credit += $line->credit;
|
||||
|
||||
$accountg = length_accountg($line->numero_compte);
|
||||
//if (empty($accountg)) $accountg = '-';
|
||||
|
||||
|
||||
// Is it a break ?
|
||||
if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) {
|
||||
|
||||
|
||||
// Affiche un Sous-Total par compte comptable
|
||||
if (isset($displayed_account_number)) {
|
||||
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
// Show the break account
|
||||
$colspan = 9;
|
||||
print "<tr>";
|
||||
@@ -291,48 +294,51 @@ foreach ( $object->lines as $line ) {
|
||||
else print '<span class="error">'.$langs->trans("Unknown").'</span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$displayed_account_number = $accountg;
|
||||
//if (empty($displayed_account_number)) $displayed_account_number='-';
|
||||
$sous_total_debit = 0;
|
||||
$sous_total_credit = 0;
|
||||
}
|
||||
|
||||
print '<tr '. $bc[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$line->piece_num.'</td>';
|
||||
print '<td align="right"><a href="./card.php?piece_num=' . $line->piece_num . '">'.$line->piece_num.'</a></td>';
|
||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
|
||||
|
||||
|
||||
// TODO Add a link according to doc_type and fk_doc
|
||||
print '<td class="nowrap">';
|
||||
//if ($line->doc_type == 'supplier_invoice')
|
||||
//if ($line->doc_type == 'customer_invoice')
|
||||
print $line->doc_ref;
|
||||
print '</td>';
|
||||
|
||||
// Affiche un lien vers la facture client/fournisseur
|
||||
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||
if ($line->doc_type == 'supplier_invoice')
|
||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||
elseif ($line->doc_type == 'customer_invoice')
|
||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||
else
|
||||
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br /><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
|
||||
|
||||
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . ($line->debit ? price($line->debit) :''). '</td>';
|
||||
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
|
||||
print '<td align="center">' . $line->code_journal . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Comptabilise le sous-total
|
||||
$sous_total_debit += $line->debit;
|
||||
$sous_total_credit += $line->credit;
|
||||
// Comptabilise le sous-total
|
||||
$sous_total_debit += $line->debit;
|
||||
$sous_total_credit += $line->credit;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Affiche un Sous-Total du dernier compte comptable affiché
|
||||
print '<tr class="liste_total">';
|
||||
print '<td align="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "<td> </td>\n";
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -352,6 +358,4 @@ print "</table>";
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -29,7 +29,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
@@ -37,7 +37,7 @@ $langs->load("accountancy");
|
||||
$page = GETPOST("page");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
$sortfield = GETPOST("sortfield");
|
||||
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
$search_doc_type = GETPOST('search_doc_type', 'alpha');
|
||||
@@ -52,22 +52,22 @@ $search_numero_compte_end = GETPOST('search_numero_compte_end', 'alpha');
|
||||
if ($search_numero_compte_end == - 1) {
|
||||
$search_numero_compte_end = '';
|
||||
}
|
||||
$search_code_tiers = GETPOST('search_code_tiers', 'alpha');
|
||||
$search_code_tiers_start = GETPOST('search_code_tiers_start', 'alpha');
|
||||
if ($search_code_tiers_start == - 1) {
|
||||
$search_code_tiers_start = '';
|
||||
$search_subledger_account = GETPOST('search_subledger_account', 'alpha');
|
||||
$search_subledger_account_start = GETPOST('search_subledger_account_start', 'alpha');
|
||||
if ($search_subledger_account_start == - 1) {
|
||||
$search_subledger_account_start = '';
|
||||
}
|
||||
$search_code_tiers_end = GETPOST('search_code_tiers_end', 'alpha');
|
||||
if ($search_code_tiers_end == - 1) {
|
||||
$search_code_tiers_end = '';
|
||||
$search_subledger_account_end = GETPOST('search_subledger_account_end', 'alpha');
|
||||
if ($search_subledger_account_end == - 1) {
|
||||
$search_subledger_account_end = '';
|
||||
}
|
||||
$search_label_compte = GETPOST('search_label_compte', 'alpha');
|
||||
$search_label_operation = GETPOST('search_label_operation', 'alpha');
|
||||
$search_sens = GETPOST('search_sens', 'alpha');
|
||||
$search_code_journal = GETPOST('search_code_journal', 'alpha');
|
||||
|
||||
$object = new BookKeeping($db);
|
||||
$form = new Form($db);
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
// Filter
|
||||
if (empty($search_date_start)) {
|
||||
@@ -81,16 +81,19 @@ if ($sortfield == "")
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
llxHeader('', $langs->trans("Bookkeeping"));
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_doc_type = "";
|
||||
$search_doc_date = "";
|
||||
$search_doc_ref = "";
|
||||
$search_numero_compte = "";
|
||||
$search_code_tiers = "";
|
||||
$search_label_compte = "";
|
||||
$search_subledger_account = "";
|
||||
$search_label_operation = "";
|
||||
$search_sens = "";
|
||||
$search_code_journal = "";
|
||||
}
|
||||
@@ -129,21 +132,21 @@ if (! empty($search_numero_compte_end)) {
|
||||
$filter['t.numero_compte<='] = $search_numero_compte_end;
|
||||
$options .= '&search_numero_compte_end=' . $search_numero_compte_end;
|
||||
}
|
||||
if (! empty($search_code_tiers)) {
|
||||
$filter['t.code_tiers'] = $search_code_tiers;
|
||||
$options .= '&search_code_tiers=' . $search_code_tiers;
|
||||
if (! empty($search_subledger_account)) {
|
||||
$filter['t.subledger_account'] = $search_subledger_account;
|
||||
$options .= '&search_subledger_account=' . $search_subledger_account;
|
||||
}
|
||||
if (! empty($search_code_tiers_start)) {
|
||||
$filter['t.code_tiers>='] = $search_code_tiers_start;
|
||||
$options .= '&search_code_tiers_start=' . $search_code_tiers_start;
|
||||
if (! empty($search_subledger_account_start)) {
|
||||
$filter['t.subledger_account>='] = $search_subledger_account_start;
|
||||
$options .= '&search_subledger_account_start=' . $search_subledger_account_start;
|
||||
}
|
||||
if (! empty($search_code_tiers_end)) {
|
||||
$filter['t.code_tiers<='] = $search_code_tiers_end;
|
||||
$options .= '&search_code_tiers_end=' . $search_code_tiers_end;
|
||||
if (! empty($search_subledger_account_end)) {
|
||||
$filter['t.subledger_account<='] = $search_subledger_account_end;
|
||||
$options .= '&search_subledger_account_end=' . $search_subledger_account_end;
|
||||
}
|
||||
if (! empty($search_label_compte)) {
|
||||
$filter['t.label_compte'] = $search_label_compte;
|
||||
$options .= '&search_label_compte=' . $search_label_compte;
|
||||
if (! empty($search_label_operation)) {
|
||||
$filter['t.label_operation'] = $search_label_operation;
|
||||
$options .= '&search_label_operation=' . $search_label_operation;
|
||||
}
|
||||
if (! empty($search_sens)) {
|
||||
$filter['t.sens'] = $search_sens;
|
||||
@@ -154,10 +157,13 @@ if (! empty($search_code_journal)) {
|
||||
$options .= '&search_code_journal=' . $search_code_journal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Mode List
|
||||
* Actions
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans("Bookkeeping"));
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
|
||||
@@ -182,32 +188,32 @@ print $form->select_date($search_date_end, 'date_end');
|
||||
print '</div>';
|
||||
print '<div class="liste_titre">';
|
||||
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
|
||||
print $formventilation->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
|
||||
print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': ';
|
||||
print $formventilation->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
|
||||
print $formaccounting->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
|
||||
print '</div>';
|
||||
print '<div class="liste_titre">';
|
||||
print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
|
||||
print $formventilation->select_auxaccount($search_code_tiers_start, 'search_code_tiers_start', 1);
|
||||
print $formaccounting->select_auxaccount($search_subledger_account_start, 'search_subledger_account_start', 1);
|
||||
print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
|
||||
print $formventilation->select_auxaccount($search_code_tiers_end, 'searchcode_tiers_end', 1);
|
||||
print $formaccounting->select_auxaccount($search_subledger_account_end, 'search_subledger_account_end', 1);
|
||||
print '</div>';
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountAccounting"), $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("ThirdPartyAccount"), $_SERVER['PHP_SELF'], "t.code_tiers", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("NumPiece", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Doctype", $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("ThirdPartyAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Sens", $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@@ -232,11 +238,11 @@ print '<input type="text" size=6 class="flat" name="search_numero_compte" value=
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" size=6 class="flat" name="search_code_tiers" value="' . $search_code_tiers . '"/>';
|
||||
print '<input type="text" size=6 class="flat" name="search_subledger_account" value="' . $search_subledger_account . '"/>';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" size=6 class="flat" name="search_label_compte" value="' . $search_label_compte . '"/>';
|
||||
print '<input type="text" size=6 class="flat" name="search_label_operation" value="' . $search_label_operation . '"/>';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
@@ -264,19 +270,16 @@ print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$var = True;
|
||||
|
||||
foreach ( $object->lines as $line ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr '. $bc[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . $line->piece_num . '</td>' . "\n";
|
||||
print '<td>' . $line->doc_type . '</td>' . "\n";
|
||||
print '<td align="center">' . dol_print_date($line->doc_date) . '</td>';
|
||||
print '<td>' . $line->doc_ref . '</td>';
|
||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||
print '<td>' . length_accounta($line->code_tiers) . '</td>';
|
||||
print '<td>' . $line->label_compte . '</td>';
|
||||
print '<td>' . length_accounta($line->subledger_account) . '</td>';
|
||||
print '<td>' . $line->label_operation . '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . price($line->montant) . '</td>';
|
||||
|
||||
331
htdocs/accountancy/bookkeeping/thirdparty_lettrage.php
Normal file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file accounting/bookkeeping/thirdparty_lettrage.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Onglet de gestion de parametrages des ventilations
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
$show_files=GETPOST('show_files','int');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if ($sortorder == "") $sortorder = "ASC";
|
||||
if ($sortfield == "") $sortfield = "bk.rowid";
|
||||
|
||||
$search_year = GETPOST ( "search_year" );
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid",'int');
|
||||
// if ($user->societe_id) $socid=$user->societe_id;
|
||||
|
||||
$object = new Societe($db);
|
||||
$object->id = $socid;
|
||||
$object->fetch($socid);
|
||||
|
||||
|
||||
$form = new Form($db);
|
||||
$BookKeeping = new lettering($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
|
||||
if ($action == 'lettering') {
|
||||
|
||||
$result = $BookKeeping->updatelettrage($_POST['ids']);
|
||||
|
||||
// var_dump($result);
|
||||
if( $result < 0 ){
|
||||
setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
$error++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'autolettrage') {
|
||||
|
||||
$result = $BookKeeping->LettrageTiers($socid);
|
||||
|
||||
if( $result < 0 ){
|
||||
setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
$error++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
llxHeader ( '', 'Compta - Grand Livre' );
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
|
||||
|
||||
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||
$object->next_prev_filter="te.fournisseur = 1";
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans("CustomerCode"). '</td><td colspan="3">';
|
||||
print $object->code_client;
|
||||
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$langs->load('compta');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print '</td><td colspan="3">';
|
||||
print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
|
||||
dol_print_address($object->address,'gmap','thirdparty',$object->id);
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
//$img=picto_from_langcode($object->country_code);
|
||||
$img='';
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER. "' )" ;
|
||||
|
||||
|
||||
|
||||
if (dol_strlen ( $search_year )) {
|
||||
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " ORDER BY bk.lettering_code ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
|
||||
|
||||
// echo $sql;
|
||||
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
|
||||
$resql = $db->query ( $sql );
|
||||
if ($resql) {
|
||||
$num = $db->num_rows ( $resql );
|
||||
$i = 0;
|
||||
|
||||
|
||||
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="action" value="lettering">';
|
||||
print '<input type="hidden" name="socid" value="'.$object->id.'">';
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td></td>';
|
||||
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
|
||||
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
|
||||
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
||||
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
||||
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
||||
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
|
||||
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
||||
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
||||
// print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
||||
// print_liste_field_titre("Sens", "liste.php", "bk.sens" );
|
||||
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<form action="" method="GET">';
|
||||
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
|
||||
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
|
||||
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
|
||||
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
|
||||
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
|
||||
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
// print '<td> </td>';
|
||||
// print '<td> </td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '</form>';
|
||||
print '</tr>';
|
||||
|
||||
$var = false;
|
||||
|
||||
$debit = 0;
|
||||
$credit = 0;
|
||||
$solde = 0;
|
||||
$tmp = '';
|
||||
while ( $i < $num ) {
|
||||
$obj = $db->fetch_object ( $resql );
|
||||
|
||||
if($tmp !=$obj->lettering_code || empty($tmp) )
|
||||
$tmp =$obj->lettering_code;
|
||||
|
||||
if($tmp !=$obj->lettering_code || empty($obj->lettering_code))
|
||||
$var = ! $var;
|
||||
|
||||
|
||||
$debit+= $obj->debit;
|
||||
$credit+= $obj->credit;
|
||||
|
||||
$solde+=($obj->credit-$obj->debit);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>' . $obj->rowid . '</td>';
|
||||
if(empty($obj->lettering_code)){
|
||||
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
|
||||
print img_edit ();
|
||||
print '</a> ' . $obj->doc_type . '</td>' . "\n";
|
||||
}
|
||||
else
|
||||
print '<td>'.$obj->doc_type . '</td>' . "\n";
|
||||
|
||||
|
||||
|
||||
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
|
||||
print '<td>' . $obj->doc_ref . '</td>';
|
||||
// print '<td>' . $obj->numero_compte . '</td>';
|
||||
// print '<td>' . $obj->code_tiers . '</td>';
|
||||
print '<td>' . $obj->label_compte . '</td>';
|
||||
print '<td>' . $obj->debit . '</td>';
|
||||
print '<td>' . $obj->credit . '</td>';
|
||||
// print '<td>' . $obj->montant . '</td>';
|
||||
// print '<td>' . $obj->sens . '</td>';
|
||||
print '<td>' . $obj->code_journal . '</td>';
|
||||
print '<td>' . round($solde, 2) . '</td>';
|
||||
|
||||
if(empty($obj->lettering_code)){
|
||||
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
|
||||
}
|
||||
else
|
||||
print '<td>' . $obj->lettering_code . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$i ++;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
||||
print '<td></td>';
|
||||
// print '<td></td>';
|
||||
// print '<td></td>';
|
||||
print '<td><strong>' . $debit . '</strong></td>';
|
||||
print '<td><strong>' . $credit . '</strong></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td colspan="5">Solde Comptable</td>' . "\n";
|
||||
// print '<td></td>';
|
||||
// print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<input class="butAction" type="submit" value="lettering">';
|
||||
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
|
||||
print "</form>";
|
||||
$db->free($resql);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
335
htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php
Normal file
@@ -0,0 +1,335 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file accounting/bookkeeping/thirdparty_lettrage.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Onglet de gestion de parametrages des ventilations
|
||||
*/
|
||||
|
||||
// Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
$show_files=GETPOST('show_files','int');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
|
||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
$page = GETPOST("page",'int');
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if ($sortorder == "") $sortorder = "ASC";
|
||||
if ($sortfield == "") $sortfield = "bk.rowid";
|
||||
|
||||
$search_year = GETPOST ( "search_year" );
|
||||
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST("socid",'int');
|
||||
// if ($user->societe_id) $socid=$user->societe_id;
|
||||
|
||||
$object = new Societe($db);
|
||||
$object->id = $socid;
|
||||
$object->fetch($socid);
|
||||
|
||||
$form = new Form($db);
|
||||
$BookKeeping = new lettering($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
if ($action == 'lettering') {
|
||||
|
||||
$result = $BookKeeping->updatelettrage($_POST['ids']);
|
||||
|
||||
// var_dump($result);
|
||||
if( $result < 0 ){
|
||||
setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
$error++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'autolettrage') {
|
||||
|
||||
$result = $BookKeeping->LettrageTiers($socid);
|
||||
|
||||
if( $result < 0 ){
|
||||
setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
$error++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
llxHeader ( '', 'Compta - Grand Livre' );
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
|
||||
|
||||
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||
$object->next_prev_filter="te.fournisseur = 1";
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans("SupplierCode"). '</td><td colspan="3">';
|
||||
print $object->code_fournisseur;
|
||||
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$langs->load('compta');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
|
||||
print '</td><td colspan="3">';
|
||||
print $form->editfieldval("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
|
||||
dol_print_address($object->address,'gmap','thirdparty',$object->id);
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
//$img=picto_from_langcode($object->country_code);
|
||||
$img='';
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
// print_r($soc);
|
||||
// exit;
|
||||
// [code_compta] => 411DOUA
|
||||
// [code_compta_fournisseur] => 401SUPPCODE
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta_fournisseur . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER. "' )" ;
|
||||
|
||||
|
||||
|
||||
if (dol_strlen ( $search_year )) {
|
||||
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " ORDER BY bk.lettering ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
|
||||
|
||||
// echo $sql;
|
||||
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
|
||||
$resql = $db->query ( $sql );
|
||||
if ($resql) {
|
||||
$num = $db->num_rows ( $resql );
|
||||
$i = 0;
|
||||
|
||||
|
||||
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
|
||||
print '<input type="hidden" name="action" value="lettering">';
|
||||
print '<input type="hidden" name="socid" value="'.$object->id.'">';
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td></td>';
|
||||
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
|
||||
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
|
||||
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
|
||||
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
|
||||
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
|
||||
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
|
||||
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
|
||||
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
|
||||
print_liste_field_titre("Amount", "liste.php", "bk.montant" );
|
||||
print_liste_field_titre("Sens", "liste.php", "bk.sens" );
|
||||
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<form action="" method="GET">';
|
||||
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
|
||||
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
|
||||
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
|
||||
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
|
||||
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
|
||||
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '</form>';
|
||||
print '</tr>';
|
||||
|
||||
$var = false;
|
||||
|
||||
$debit = 0;
|
||||
$credit = 0;
|
||||
$solde = 0;
|
||||
$tmp = '';
|
||||
while ( $i < $num ) {
|
||||
$obj = $db->fetch_object ( $resql );
|
||||
|
||||
if($tmp !=$obj->lettering || empty($tmp) )
|
||||
$tmp =$obj->lettering;
|
||||
|
||||
if($tmp !=$obj->lettering || empty($obj->lettering))
|
||||
$var = ! $var;
|
||||
|
||||
|
||||
$debit+= $obj->debit;
|
||||
$credit+= $obj->credit;
|
||||
|
||||
$solde+=($obj->credit-$obj->debit);
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td>' . $obj->rowid . '</td>';
|
||||
if(empty($obj->lettering)){
|
||||
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
|
||||
print img_edit ();
|
||||
print '</a> ' . $obj->doc_type . '</td>' . "\n";
|
||||
}
|
||||
else
|
||||
print '<td>'.$obj->doc_type . '</td>' . "\n";
|
||||
|
||||
|
||||
|
||||
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
|
||||
print '<td>' . $obj->doc_ref . '</td>';
|
||||
// print '<td>' . $obj->numero_compte . '</td>';
|
||||
// print '<td>' . $obj->code_tiers . '</td>';
|
||||
print '<td>' . $obj->label_compte . '</td>';
|
||||
print '<td>' . $obj->debit . '</td>';
|
||||
print '<td>' . $obj->credit . '</td>';
|
||||
print '<td>' . $obj->montant . '</td>';
|
||||
print '<td>' . $obj->sens . '</td>';
|
||||
print '<td>' . $obj->code_journal . '</td>';
|
||||
print '<td>' . round($solde, 2) . '</td>';
|
||||
|
||||
if(empty($obj->lettering)){
|
||||
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
|
||||
}
|
||||
else
|
||||
print '<td>' . $obj->lettering . '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$i ++;
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td colspan="4">Mouvement totaux</td>' . "\n";
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td><strong>' . $debit . '</strong></td>';
|
||||
print '<td><strong>' . $credit . '</strong></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td colspan="5">Solde Comptable</td>' . "\n";
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<input class="butAction" type="submit" value="lettering">';
|
||||
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
|
||||
print "</form>";
|
||||
$db->free ( $resql );
|
||||
} else {
|
||||
dol_print_error ( $db );
|
||||
}
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Jamal Elbaz <jamelbaz@gmail.pro>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountancycategory.class.php
|
||||
* \file htdocs/accountancy/class/accountancycategory.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief File of class to manage categories of an accounting category_type
|
||||
* \brief File of class to manage categories of an accounting category_type
|
||||
*/
|
||||
|
||||
// Class
|
||||
@@ -72,7 +72,6 @@ class AccountancyCategory
|
||||
$this->lines_display[] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
return $num;
|
||||
} else {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
@@ -84,7 +83,7 @@ class AccountancyCategory
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to select accountiing category of an accounting account present in chart of accounts
|
||||
* Function to select accounting category of an accounting account present in chart of accounts
|
||||
*
|
||||
* @param int $id Id category
|
||||
*
|
||||
@@ -93,7 +92,7 @@ class AccountancyCategory
|
||||
public function getCptBK($id) {
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT t.numero_compte, t.label_compte, t.doc_ref";
|
||||
$sql = "SELECT t.numero_compte, t.label_operation, t.doc_ref";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
|
||||
$sql .= " WHERE t.numero_compte NOT IN (";
|
||||
$sql .= " SELECT t.account_number";
|
||||
@@ -105,7 +104,7 @@ class AccountancyCategory
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1)";
|
||||
$sql .= " GROUP BY t.numero_compte, t.label_compte, t.doc_ref";
|
||||
$sql .= " GROUP BY t.numero_compte, t.label_operation, t.doc_ref";
|
||||
$sql .= " ORDER BY t.numero_compte";
|
||||
|
||||
$this->lines_CptBk = array ();
|
||||
@@ -130,6 +129,47 @@ class AccountancyCategory
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to select accounting category of an accounting account present in chart of accounts
|
||||
*
|
||||
* @param int $id Id category
|
||||
*
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function getAccountsWithNoCategory($id) {
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT aa.account_number as numero_compte, aa.label as label_compte";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " WHERE (aa.fk_accounting_category != ".$id." OR aa.fk_accounting_category IS NULL)";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1";
|
||||
$sql .= " GROUP BY aa.account_number, aa.label";
|
||||
$sql .= " ORDER BY aa.account_number, aa.label";
|
||||
|
||||
$this->lines_CptBk = array ();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
if ($num) {
|
||||
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||
$this->lines_cptbk[] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
return $num;
|
||||
} else {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
dol_syslog(__METHOD__ . " " . implode(',' . $this->errors), LOG_ERR);
|
||||
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to add an accounting account in an accounting category
|
||||
*
|
||||
@@ -151,7 +191,7 @@ class AccountancyCategory
|
||||
$sql .= " AND aa.active = 1";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) {
|
||||
@@ -161,9 +201,9 @@ class AccountancyCategory
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ( $obj = $this->db->fetch_object($resql))
|
||||
while ( $obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
if (array_key_exists(length_accountg($obj->account_number), $cpts))
|
||||
if (array_key_exists(length_accountg($obj->account_number), $cpts))
|
||||
{
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
|
||||
$sql .= " SET fk_accounting_category=" . $id_cat;
|
||||
@@ -292,7 +332,7 @@ class AccountancyCategory
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to show result of an accounting account from the general ledger with a sens and a period
|
||||
* Function to show result of an accounting account from the ledger with a direction and a period
|
||||
*
|
||||
* @param int $cpt Id accounting account
|
||||
* @param string $month Specifig month - Can be empty
|
||||
@@ -389,4 +429,160 @@ class AccountancyCategory
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCats() {
|
||||
global $db, $langs, $user, $mysoc;
|
||||
|
||||
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
|
||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
exit();
|
||||
}
|
||||
|
||||
if (! empty($mysoc->country_id)) {
|
||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||
$sql .= " WHERE c.active = 1 ";
|
||||
$sql .= " AND c.fk_country = " . $mysoc->country_id;
|
||||
$sql .= " ORDER BY c.position ASC";
|
||||
} else {
|
||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
|
||||
$sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid";
|
||||
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
|
||||
$sql .= " ORDER BY c.position ASC";
|
||||
}
|
||||
|
||||
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$obj = '';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$data = array ();
|
||||
if ($num) {
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$data[] = array (
|
||||
'rowid' => $obj->rowid,
|
||||
'code' => $obj->code,
|
||||
'position' => $obj->position,
|
||||
'label' => $obj->label,
|
||||
'formula' => $obj->formula,
|
||||
'category_type' => $obj->category_type
|
||||
);
|
||||
$i ++;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
} else {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
dol_syslog(__METHOD__ . " " . implode(',', $this->errors), LOG_ERR);
|
||||
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// calcule
|
||||
|
||||
const PATTERN = '/(?:\-?\d+(?:\.?\d+)?[\+\-\*\/])+\-?\d+(?:\.?\d+)?/';
|
||||
|
||||
const PARENTHESIS_DEPTH = 10;
|
||||
|
||||
public function calculate($input){
|
||||
if(strpos($input, '+') != null || strpos($input, '-') != null || strpos($input, '/') != null || strpos($input, '*') != null){
|
||||
// Remove white spaces and invalid math chars
|
||||
$input = str_replace(',', '.', $input);
|
||||
$input = preg_replace('[^0-9\.\+\-\*\/\(\)]', '', $input);
|
||||
|
||||
// Calculate each of the parenthesis from the top
|
||||
$i = 0;
|
||||
while(strpos($input, '(') || strpos($input, ')')){
|
||||
$input = preg_replace_callback('/\(([^\(\)]+)\)/', 'self::callback', $input);
|
||||
|
||||
$i++;
|
||||
if($i > self::PARENTHESIS_DEPTH){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate the result
|
||||
if(preg_match(self::PATTERN, $input, $match)){
|
||||
return $this->compute($match[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
private function compute($input){
|
||||
$compute = create_function('', 'return '.$input.';');
|
||||
|
||||
return 0 + $compute();
|
||||
}
|
||||
|
||||
private function callback($input){
|
||||
if(is_numeric($input[1])){
|
||||
return $input[1];
|
||||
}
|
||||
elseif(preg_match(self::PATTERN, $input[1], $match)){
|
||||
return $this->compute($match[0]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* get cpts of category
|
||||
*
|
||||
* @param int $cat_id Id accounting account category
|
||||
*
|
||||
* @return array Result in table
|
||||
*/
|
||||
public function getCptsCat($cat_id) {
|
||||
global $mysoc;
|
||||
$sql = "";
|
||||
|
||||
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
|
||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
exit();
|
||||
}
|
||||
|
||||
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
|
||||
$sql .= " WHERE t.fk_accounting_category = ".$cat_id;
|
||||
$sql .= " ORDER BY t.account_number ";
|
||||
|
||||
//echo $sql;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$obj = '';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$data = array ();
|
||||
if ($num) {
|
||||
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||
$name_cat = $obj->name_cat;
|
||||
$data[] = array (
|
||||
'id' => $obj->rowid,
|
||||
'account_number' => $obj->account_number,
|
||||
'name_cpt' => $obj->name_cpt,
|
||||
);
|
||||
$i ++;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
} else {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -32,14 +32,15 @@
|
||||
*
|
||||
* Manage the different format accountancy export
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
|
||||
|
||||
class AccountancyExport
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var Type of export
|
||||
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
||||
*/
|
||||
public static $EXPORT_TYPE_NORMAL = 1;
|
||||
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
|
||||
public static $EXPORT_TYPE_CEGID = 2;
|
||||
public static $EXPORT_TYPE_COALA = 3;
|
||||
public static $EXPORT_TYPE_BOB50 = 4;
|
||||
@@ -47,6 +48,7 @@ class AccountancyExport
|
||||
public static $EXPORT_TYPE_QUADRATUS = 6;
|
||||
public static $EXPORT_TYPE_EBP = 7;
|
||||
public static $EXPORT_TYPE_COGILOG = 8;
|
||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -80,7 +82,7 @@ class AccountancyExport
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all export type are available
|
||||
* Array wit all export type available (key + label)
|
||||
*
|
||||
* @return array of type
|
||||
*/
|
||||
@@ -96,6 +98,7 @@ class AccountancyExport
|
||||
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
|
||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -145,6 +148,9 @@ class AccountancyExport
|
||||
case self::$EXPORT_TYPE_COGILOG :
|
||||
$this->exportCogilog($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_AGIRIS :
|
||||
$this->exportAgiris($TData);
|
||||
break;
|
||||
default:
|
||||
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
|
||||
break;
|
||||
@@ -167,7 +173,7 @@ class AccountancyExport
|
||||
print $date . $this->separator;
|
||||
print $line->doc_ref . $this->separator;
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
print length_accounta($line->code_tiers) . $this->separator;
|
||||
print length_accounta($line->subledger_account) . $this->separator;
|
||||
print price($line->debit) . $this->separator;
|
||||
print price($line->credit) . $this->separator;
|
||||
print $line->code_journal . $this->separator;
|
||||
@@ -190,10 +196,10 @@ class AccountancyExport
|
||||
print $date . $separator;
|
||||
print $line->code_journal . $separator;
|
||||
print length_accountg($line->numero_compte) . $separator;
|
||||
print length_accounta($line->code_tiers) . $separator;
|
||||
print length_accounta($line->subledger_account) . $separator;
|
||||
print $line->sens . $separator;
|
||||
print price($line->montant) . $separator;
|
||||
print $line->label_compte . $separator;
|
||||
print $line->label_operation . $separator;
|
||||
print $line->doc_ref;
|
||||
print $this->end_line;
|
||||
}
|
||||
@@ -215,7 +221,7 @@ class AccountancyExport
|
||||
print $line->piece_num . $this->separator;
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
print '' . $this->separator;
|
||||
print $line->label_compte . $this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
print $date . $this->separator;
|
||||
if ($line->sens=='D') {
|
||||
print price($line->montant) . $this->separator;
|
||||
@@ -225,7 +231,7 @@ class AccountancyExport
|
||||
print price($line->montant) . $this->separator;
|
||||
}
|
||||
print $line->doc_ref . $this->separator;
|
||||
print $line->label_compte . $this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
@@ -249,7 +255,7 @@ class AccountancyExport
|
||||
print price($line->debit) . $this->separator;
|
||||
print price($line->credit) . $this->separator;
|
||||
print 'E' . $this->separator;
|
||||
print length_accountg($line->code_tiers) . $this->separator;
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
@@ -269,7 +275,7 @@ class AccountancyExport
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
print $date . $this->separator;
|
||||
|
||||
if (empty($line->code_tiers)) {
|
||||
if (empty($line->subledger_account)) {
|
||||
print 'G' . $this->separator;
|
||||
print length_accounta($line->numero_compte) . $this->separator;
|
||||
} else {
|
||||
@@ -279,12 +285,12 @@ class AccountancyExport
|
||||
if (substr($line->numero_compte, 0, 3) == '401') {
|
||||
print 'F' . $this->separator;
|
||||
}
|
||||
print length_accountg($line->code_tiers) . $this->separator;
|
||||
print length_accountg($line->subledger_account) . $this->separator;
|
||||
}
|
||||
|
||||
print price($line->debit) . $this->separator;
|
||||
print price($line->credit) . $this->separator;
|
||||
print dol_trunc($line->label_compte, 32) . $this->separator;
|
||||
print dol_trunc($line->label_operation, 32) . $this->separator;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
@@ -302,11 +308,11 @@ class AccountancyExport
|
||||
$this->end_line ="\r\n";
|
||||
|
||||
$i = 1;
|
||||
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
||||
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
||||
foreach ( $TData as $data ) {
|
||||
$code_compta = $data->numero_compte;
|
||||
if (! empty($data->code_tiers))
|
||||
$code_compta = $data->code_tiers;
|
||||
if (! empty($data->subledger_account))
|
||||
$code_compta = $data->subledger_account;
|
||||
|
||||
$Tab = array ();
|
||||
$Tab['num_ecriture'] = str_pad($i, 5);
|
||||
@@ -315,11 +321,11 @@ class AccountancyExport
|
||||
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
|
||||
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
|
||||
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . $data->label_compte, 25), 25);
|
||||
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . $data->label_operation, 25), 25);
|
||||
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
|
||||
$Tab['type_montant'] = str_pad($data->sens, 1);
|
||||
$Tab['vide'] = str_repeat(' ', 18);
|
||||
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_compte, 34), 34);
|
||||
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_operation, 34), 34);
|
||||
$Tab['end'] = 'O2003';
|
||||
|
||||
$Tab['end_line'] = $this->end_line;
|
||||
@@ -344,8 +350,8 @@ class AccountancyExport
|
||||
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||
foreach ( $TData as $data ) {
|
||||
$code_compta = $data->numero_compte;
|
||||
if (! empty($data->code_tiers))
|
||||
$code_compta = $data->code_tiers;
|
||||
if (! empty($data->subledger_account))
|
||||
$code_compta = $data->subledger_account;
|
||||
|
||||
$Tab = array ();
|
||||
$Tab['type_ligne'] = 'M';
|
||||
@@ -354,7 +360,7 @@ class AccountancyExport
|
||||
$Tab['folio'] = '000';
|
||||
$Tab['date_ecriture'] = $date_ecriture;
|
||||
$Tab['filler'] = ' ';
|
||||
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
|
||||
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 20), 20);
|
||||
$Tab['sens'] = $data->sens; // C or D
|
||||
$Tab['signe_montant'] = '+';
|
||||
$Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
|
||||
@@ -370,7 +376,7 @@ class AccountancyExport
|
||||
$Tab['devis'] = str_pad($conf->currency, 3);
|
||||
$Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3);
|
||||
$Tab['filler3'] = str_repeat(' ', 3);
|
||||
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 32), 32);
|
||||
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 32), 32);
|
||||
$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10);
|
||||
$Tab['filler4'] = str_repeat(' ', 73);
|
||||
|
||||
@@ -382,7 +388,7 @@ class AccountancyExport
|
||||
|
||||
|
||||
/**
|
||||
* Export format : Normal
|
||||
* Export format : EBP
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
@@ -401,7 +407,7 @@ class AccountancyExport
|
||||
print $line->code_journal . $this->separator;
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
|
||||
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
|
||||
print '"'.dol_trunc($line->label_operation,40,'right','UTF-8',1).'"' . $this->separator;
|
||||
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
|
||||
print price2num($line->montant).$this->separator;
|
||||
print $line->sens.$this->separator;
|
||||
@@ -412,6 +418,42 @@ class AccountancyExport
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export format : Agiris Isacompta
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exportAgiris($objectLines) {
|
||||
|
||||
$this->separator = ';';
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
print $line->piece_num . $this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
print $date . $this->separator;
|
||||
print $line->label_operation . $this->separator;
|
||||
|
||||
if (empty($line->subledger_account)) {
|
||||
print length_accountg($line->numero_compte) . $this->separator;
|
||||
} else {
|
||||
print length_accounta($line->subledger_account) . $this->separator;
|
||||
}
|
||||
|
||||
print $line->doc_ref . $this->separator;
|
||||
print price($line->debit) . $this->separator;
|
||||
print price($line->credit) . $this->separator;
|
||||
print price($line->montant).$this->separator;
|
||||
print $line->sens.$this->separator;
|
||||
print $line->code_journal;
|
||||
print $this->end_line;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -37,7 +37,7 @@ class AccountancySystem
|
||||
var $label;
|
||||
var $account_number;
|
||||
var $account_parent;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@@ -46,7 +46,56 @@ class AccountancySystem
|
||||
function __construct($db) {
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Load record in memory
|
||||
*
|
||||
* @param int $rowid Id
|
||||
* @param string $ref ref
|
||||
* @return int <0 if KO, Id of record if OK and found
|
||||
*/
|
||||
function fetch($rowid = 0, $ref = '')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($rowid > 0 || $ref)
|
||||
{
|
||||
$sql = "SELECT a.pcg_version, a.label, a.active";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a";
|
||||
$sql .= " WHERE";
|
||||
if ($rowid) {
|
||||
$sql .= " a.rowid = '" . $rowid . "'";
|
||||
} elseif ($ref) {
|
||||
$sql .= " a.pcg_version = '" . $ref . "'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
if ($obj) {
|
||||
$this->id = $obj->rowid;
|
||||
$this->rowid = $obj->rowid;
|
||||
$this->pcg_version = $obj->pcg_version;
|
||||
$this->ref = $obj->pcg_version;
|
||||
$this->label = $obj->label;
|
||||
$this->active = $obj->active;
|
||||
|
||||
return $this->id;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
$this->errors[] = "Error " . $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
return - 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Insert accountancy system name into database
|
||||
*
|
||||
@@ -55,16 +104,16 @@ class AccountancySystem
|
||||
*/
|
||||
function create($user) {
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_system";
|
||||
$sql .= " (date_creation, fk_user_author, numero, label)";
|
||||
$sql .= " VALUES (" . $this->db->idate($now) . "," . $user->id . ",'" . $this->numero . "','" . $this->label . "')";
|
||||
|
||||
$sql .= " VALUES ('" . $this->db->idate($now) . "'," . $user->id . ",'" . $this->numero . "','" . $this->label . "')";
|
||||
|
||||
dol_syslog(get_class($this) . "::create sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_system");
|
||||
|
||||
|
||||
if ($id > 0) {
|
||||
$this->rowid = $id;
|
||||
$result = $this->rowid;
|
||||
@@ -78,7 +127,7 @@ class AccountancySystem
|
||||
$this->error = "AccountancySystem::Create Erreur $result";
|
||||
dol_syslog($this->error, LOG_ERR);
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
@@ -150,12 +150,19 @@ class AccountingAccount extends CommonObject
|
||||
if (isset($this->active))
|
||||
$this->active = trim($this->active);
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
if (empty($this->pcg_type) || $this->pcg_type == '-1')
|
||||
{
|
||||
$this->pcg_type = 'XXXXXX';
|
||||
}
|
||||
if (empty($this->pcg_subtype) || $this->pcg_subtype == '-1')
|
||||
{
|
||||
$this->pcg_subtype = 'XXXXXX';
|
||||
}
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_account(";
|
||||
|
||||
$sql .= "datec";
|
||||
$sql .= ", entity";
|
||||
$sql .= ", fk_pcg_version";
|
||||
@@ -167,9 +174,7 @@ class AccountingAccount extends CommonObject
|
||||
$sql .= ", fk_accounting_category";
|
||||
$sql .= ", fk_user_author";
|
||||
$sql .= ", active";
|
||||
|
||||
$sql .= ") VALUES (";
|
||||
|
||||
$sql .= " '" . $this->db->idate($now) . "'";
|
||||
$sql .= ", " . $conf->entity;
|
||||
$sql .= ", " . (empty($this->fk_pcg_version) ? 'NULL' : "'" . $this->db->escape($this->fk_pcg_version) . "'");
|
||||
@@ -225,23 +230,33 @@ class AccountingAccount extends CommonObject
|
||||
/**
|
||||
* Update record
|
||||
*
|
||||
* @param User $user Use making update
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param User $user Use making update
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user) {
|
||||
$this->db->begin();
|
||||
function update($user)
|
||||
{
|
||||
// Check parameters
|
||||
if (empty($this->pcg_type) || $this->pcg_type == '-1')
|
||||
{
|
||||
$this->pcg_type = 'XXXXXX';
|
||||
}
|
||||
if (empty($this->pcg_subtype) || $this->pcg_subtype == '-1')
|
||||
{
|
||||
$this->pcg_subtype = 'XXXXXX';
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
|
||||
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
|
||||
$sql .= " , pcg_subtype = " . ($this->pcg_subtype ? "'" . $this->db->escape($this->pcg_subtype) . "'" : "null");
|
||||
$sql .= " , account_number = '" . $this->account_number . "'";
|
||||
$sql .= " , account_parent = '" . $this->account_parent . "'";
|
||||
$sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'";
|
||||
$sql .= " , account_parent = '" . $this->db->escape($this->account_parent) . "'";
|
||||
$sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "null");
|
||||
$sql .= " , fk_accounting_category = '" . $this->account_category . "'";
|
||||
$sql .= " , fk_accounting_category = '" . $this->db->escape($this->account_category) . "'";
|
||||
$sql .= " , fk_user_modif = " . $user->id;
|
||||
$sql .= " , active = '" . $this->active . "'";
|
||||
|
||||
$sql .= " , active = " . $this->active;
|
||||
$sql .= " WHERE rowid = " . $this->id;
|
||||
|
||||
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
|
||||
@@ -349,27 +364,63 @@ class AccountingAccount extends CommonObject
|
||||
/**
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @return string Chaine avec URL
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $withlabel 0=No label, 1=Include label of account
|
||||
* @param int $nourl 1=Disable url
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto = 0) {
|
||||
global $langs;
|
||||
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
|
||||
$link = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id . '">';
|
||||
$linkend = '</a>';
|
||||
|
||||
|
||||
$url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id;
|
||||
|
||||
$picto = 'billr';
|
||||
|
||||
$label = $langs->trans("Show") . ': ' . $this->account_number . ' - ' . $this->label;
|
||||
|
||||
if ($withpicto)
|
||||
$result .= ($link . img_object($label, $picto) . $linkend);
|
||||
if ($withpicto && $withpicto != 2)
|
||||
$result .= ' ';
|
||||
if ($withpicto != 2)
|
||||
$result .= $link . $this->account_number . $linkend;
|
||||
$label='';
|
||||
|
||||
$label = '<u>' . $langs->trans("ShowAccountingAccount") . '</u>';
|
||||
if (! empty($this->account_number))
|
||||
$label .= '<br><b>'.$langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number);
|
||||
if (! empty($this->label))
|
||||
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
|
||||
if ($moretitle) $label.=' - '.$moretitle;
|
||||
|
||||
$linkclose='';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowAccoutingAccount");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.=' class="classfortooltip"';
|
||||
}
|
||||
|
||||
$linkstart='<a href="'.$url.'"';
|
||||
$linkstart.=$linkclose.'>';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($nourl)
|
||||
{
|
||||
$linkstart = '';
|
||||
$linkclose = '';
|
||||
$linkend = '';
|
||||
}
|
||||
|
||||
$label_link = length_accountg($this->account_number);
|
||||
if ($withlabel) $label_link .= ' - ' . $this->label;
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
||||
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
276
htdocs/accountancy/class/accountingjournal.class.php
Normal file
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/accountingjournal.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief File of class to manage accounting journals
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class to manage accounting accounts
|
||||
*/
|
||||
class AccountingJournal extends CommonObject
|
||||
{
|
||||
public $element='accounting_journal';
|
||||
public $table_element='accounting_journal';
|
||||
public $fk_element = '';
|
||||
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $rowid;
|
||||
|
||||
public $code;
|
||||
public $label;
|
||||
public $nature; // 0:various operations, 1:sale, 2:purchase, 3:bank, 4:expense-report, 9: has-new
|
||||
public $active;
|
||||
|
||||
public $lines;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handle
|
||||
*/
|
||||
function __construct($db) {
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load an object from database
|
||||
*
|
||||
* @param int $rowid Id of record to load
|
||||
* @param string $journal_code Journal code
|
||||
* @return int <0 if KO, Id of record if OK and found
|
||||
*/
|
||||
function fetch($rowid = null, $journal_code = null)
|
||||
{
|
||||
if ($rowid || $journal_code)
|
||||
{
|
||||
$sql = "SELECT rowid, code, label, nature, active";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_journal";
|
||||
$sql .= " WHERE";
|
||||
if ($rowid) {
|
||||
$sql .= " rowid = " . (int) $rowid;
|
||||
} elseif ($journal_code) {
|
||||
$sql .= " code = '" . $this->db->escape($journal_code) . "'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=" . $sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
if ($obj) {
|
||||
$this->id = $obj->rowid;
|
||||
$this->rowid = $obj->rowid;
|
||||
|
||||
$this->code = $obj->code;
|
||||
$this->ref = $obj->code;
|
||||
$this->label = $obj->label;
|
||||
$this->nature = $obj->nature;
|
||||
$this->active = $obj->active;
|
||||
|
||||
return $this->id;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
$this->errors[] = "Error " . $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit offset limit
|
||||
* @param int $offset offset limit
|
||||
* @param array $filter filter array
|
||||
* @param string $filtermode filter mode (AND or OR)
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
||||
$sql = "SELECT rowid, code, label, nature, active";
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||
// Manage filter
|
||||
$sqlwhere = array();
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
if ($key == 't.code' || $key == 't.label' || $key == 't.nature') {
|
||||
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
||||
} elseif ($key == 't.rowid' || $key == 't.active') {
|
||||
$sqlwhere[] = $key . '=' . $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql .= ' WHERE 1 = 1';
|
||||
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere);
|
||||
}
|
||||
|
||||
if (! empty($sortfield)) {
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
if (! empty($limit)) {
|
||||
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
$this->lines = array();
|
||||
|
||||
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||
$line = new self($this->db);
|
||||
|
||||
$line->id = $obj->rowid;
|
||||
$line->code = $obj->code;
|
||||
$line->label = $obj->label;
|
||||
$line->nature = $obj->nature;
|
||||
$line->active = $obj->active;
|
||||
|
||||
$this->lines[] = $line;
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
return $num;
|
||||
} else {
|
||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $withlabel 0=No label, 1=Include label of journal
|
||||
* @param int $nourl 1=Disable url
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||
|
||||
$result = '';
|
||||
|
||||
$url = DOL_URL_ROOT . '/accountancy/admin/journals_list.php?id=35';
|
||||
|
||||
$picto = 'billr';
|
||||
$label='';
|
||||
|
||||
$label = '<u>' . $langs->trans("ShowAccountingJournal") . '</u>';
|
||||
if (! empty($this->code))
|
||||
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
|
||||
if (! empty($this->label))
|
||||
$label .= '<br><b>'.$langs->trans('Label') . ':</b> ' . $this->label;
|
||||
if ($moretitle) $label.=' - '.$moretitle;
|
||||
|
||||
$linkclose='';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
$label=$langs->trans("ShowAccoutingJournal");
|
||||
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose.=' class="classfortooltip"';
|
||||
}
|
||||
|
||||
$linkstart='<a href="'.$url.'"';
|
||||
$linkstart.=$linkclose.'>';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($nourl)
|
||||
{
|
||||
$linkstart = '';
|
||||
$linkclose = '';
|
||||
$linkend = '';
|
||||
}
|
||||
|
||||
$label_link = $this->code;
|
||||
if ($withlabel) $label_link .= ' - ' . $this->label;
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
||||
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le libelle du statut d'un user (actif, inactif)
|
||||
*
|
||||
* @param int $mode 0=libelle long, 1=libelle court
|
||||
* @return string Label of type
|
||||
*/
|
||||
function getLibType($mode=0)
|
||||
{
|
||||
return $this->LibType($this->nature,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return type of an accounting journal
|
||||
*
|
||||
* @param int $nature Id type
|
||||
* @param int $mode 0=libelle long, 1=libelle court
|
||||
* @return string Label of type
|
||||
*/
|
||||
function LibType($nature,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$langs->load("accountancy");
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
$prefix='';
|
||||
if ($nature == 9) return $langs->trans('AccountingJournalType9');
|
||||
if ($nature == 5) return $langs->trans('AccountingJournalType5');
|
||||
if ($nature == 4) return $langs->trans('AccountingJournalType4');
|
||||
if ($nature == 3) return $langs->trans('AccountingJournalType3');
|
||||
if ($nature == 2) return $langs->trans('AccountingJournalType2');
|
||||
if ($nature == 1) return $langs->trans('AccountingJournalType1');
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
if ($nature == 9) return $langs->trans('AccountingJournalType9');
|
||||
if ($nature == 5) return $langs->trans('AccountingJournalType5');
|
||||
if ($nature == 4) return $langs->trans('AccountingJournalType4');
|
||||
if ($nature == 3) return $langs->trans('AccountingJournalType3');
|
||||
if ($nature == 2) return $langs->trans('AccountingJournalType2');
|
||||
if ($nature == 1) return $langs->trans('AccountingJournalType1');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,372 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/class/html.formventilation.class.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief File of class with all html predefined components
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class to manage generation of HTML components for bank module
|
||||
*/
|
||||
class FormVentilation extends Form
|
||||
{
|
||||
|
||||
private $options_cache = array();
|
||||
|
||||
|
||||
/**
|
||||
* Return select filter with date of transaction
|
||||
*
|
||||
* @param string $htmlname Name of select field
|
||||
* @param string $selectedkey Value
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') {
|
||||
$options = array();
|
||||
|
||||
$sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'accounting_bookkeeping';
|
||||
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
|
||||
$sql .= ' ORDER BY import_key DESC';
|
||||
|
||||
dol_syslog(get_class($this) . "::select_bookkeeping_importkey", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
dol_syslog(get_class($this) . "::select_bookkeeping_importkey " . $this->error, LOG_ERR);
|
||||
return - 1;
|
||||
}
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$options[$obj->import_key] = dol_print_date($obj->import_key, 'dayhourtext');
|
||||
}
|
||||
|
||||
return Form::selectarray($htmlname, $options, $selectedkey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of accounts with label by chart of accounts
|
||||
*
|
||||
* @param string $selectid Preselected id or code of accounting accounts (depends on $select_in)
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
* @param int $select_in 0=selectid value is a aa.rowid (default) or 1=selectid is aa.account_number
|
||||
* @param int $select_out Set value returned by select. 0=rowid (default), 1=account_number
|
||||
* @param string $morecss More css non HTML object
|
||||
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
$options = array();
|
||||
if ($usecache && ! empty($this->options_cache[$usecache]))
|
||||
{
|
||||
$options = $this->options_cache[$usecache];
|
||||
$selected=$selectid;
|
||||
}
|
||||
else
|
||||
{
|
||||
$trunclength = defined('ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT') ? $conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT : 50;
|
||||
|
||||
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1";
|
||||
$sql .= " ORDER BY aa.account_number";
|
||||
|
||||
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error " . $this->db->lasterror();
|
||||
dol_syslog(get_class($this) . "::select_account " . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$out = ajax_combobox($htmlname, $event);
|
||||
|
||||
$selected = 0;
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
$label = length_accountg($obj->account_number) . ' - ' . $obj->label;
|
||||
$label = dol_trunc($label, $trunclength);
|
||||
|
||||
$select_value_in = $obj->rowid;
|
||||
$select_value_out = $obj->rowid;
|
||||
|
||||
// Try to guess if we have found default value
|
||||
if ($select_in == 1) {
|
||||
$select_value_in = $obj->account_number;
|
||||
}
|
||||
if ($select_out == 1) {
|
||||
$select_value_out = $obj->account_number;
|
||||
}
|
||||
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
|
||||
// Because same account_number can be share between different accounting_system and do have the same meaning
|
||||
if ($selectid != '' && $selectid == $select_value_in) {
|
||||
//var_dump("Found ".$selectid." ".$select_value_in);
|
||||
$selected = $select_value_out;
|
||||
}
|
||||
|
||||
$options[$select_value_out] = $label;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($usecache)
|
||||
{
|
||||
$this->options_cache[$usecache] = $options;
|
||||
}
|
||||
}
|
||||
|
||||
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1);
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of accounts with label by class of accounts
|
||||
*
|
||||
* @param string $selectid Preselected pcg_type
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
*
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
function select_pcgtype($selectid, $htmlname = 'pcg_type', $showempty = 0, $event = array()) {
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT DISTINCT pcg_type ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " ORDER BY pcg_type";
|
||||
|
||||
dol_syslog(get_class($this) . "::select_pcgtype", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::select_pcgtype ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$options = array();
|
||||
$out = ajax_combobox($htmlname, $event);
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$options[$obj->pcg_type] = $obj->pcg_type;
|
||||
}
|
||||
|
||||
$out .= Form::selectarray($htmlname, $options, $selectid, $showempty);
|
||||
|
||||
$this->db->free($resql);
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of accounts with label by sub_class of accounts
|
||||
*
|
||||
* @param string $selectid Preselected pcg_type
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
*
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
function select_pcgsubtype($selectid, $htmlname = 'pcg_subtype', $showempty = 0, $event = array()) {
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT DISTINCT pcg_subtype ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " ORDER BY pcg_subtype";
|
||||
|
||||
dol_syslog(get_class($this) . "::select_pcgsubtype", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
$options = array();
|
||||
$out = ajax_combobox($htmlname, $event);
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$options[$obj->pcg_subtype] = $obj->pcg_subtype;
|
||||
}
|
||||
|
||||
$out .= Form::selectarray($htmlname, $options, $selectid, $showempty);
|
||||
|
||||
$this->db->free($resql);
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return list of auxilary thirdparty accounts
|
||||
*
|
||||
* @param string $selectid Preselected pcg_type
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
*
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) {
|
||||
|
||||
$aux_account = array();
|
||||
|
||||
// Auxiliary customer account
|
||||
$sql = "SELECT DISTINCT code_compta, nom ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " WHERE entity IN (" . getEntity("societe", 1) . ")";
|
||||
$sql .= " ORDER BY code_compta";
|
||||
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if (!empty($obj->code_compta)) {
|
||||
$aux_account[$obj->code_compta] = $obj->code_compta.' ('.$obj->nom.')';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
// Auxiliary supplier account
|
||||
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " WHERE entity IN (" . getEntity("societe", 1) . ")";
|
||||
$sql .= " ORDER BY code_compta_fournisseur";
|
||||
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if (!empty($obj->code_compta_fournisseur)) {
|
||||
$aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur.' ('.$obj->nom.')';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::select_pcgsubtype ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
// Build select
|
||||
$out = ajax_combobox($htmlname, $event);
|
||||
$out .= Form::selectarray($htmlname, $aux_account, $selectid, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML combo list of years existing into book keepping
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select object
|
||||
* @param int $useempty Affiche valeur vide dans liste
|
||||
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
|
||||
* @return string/array
|
||||
*/
|
||||
function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$out_array = array();
|
||||
|
||||
$sql = "SELECT DISTINCT date_format(doc_date,'%Y') as dtyear";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
|
||||
$sql .= " ORDER BY date_format(doc_date,'%Y')";
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$out_array[$obj->dtyear] = $obj->dtyear;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($output_format == 'html') {
|
||||
return Form::selectarray($htmlname, $out_array, $selected, $useempty, 0, 0, 'placeholder="aa"');
|
||||
} else {
|
||||
return $out_array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return HTML combo list of years existing into book keepping
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select object
|
||||
* @param int $useempty Affiche valeur vide dans liste
|
||||
* @param string $output_format Html/option (for option html only)/array (to return options arrays
|
||||
* @return string/array
|
||||
*/
|
||||
function selectjournal_accountancy_bookkepping($selected = '', $htmlname = 'journalid', $useempty = 0, $output_format = 'html')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$out_array = array();
|
||||
|
||||
$sql = "SELECT DISTINCT code_journal";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||
$sql .= " WHERE entity IN (" . getEntity("accountancy", 1) . ")";
|
||||
$sql .= " ORDER BY code_journal";
|
||||
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::".__METHOD__.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$out_array[$obj->code_journal] = $obj->code_journal?$obj->code_journal:$langs->trans("NotDefined"); // TODO Not defined is accepted ? We should avoid this, shouldn't we ?
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($output_format == 'html') {
|
||||
return Form::selectarray($htmlname, $out_array, $selected, $useempty, 0, 0, 'placeholder="aa"');
|
||||
} else {
|
||||
return $out_array;
|
||||
}
|
||||
}
|
||||
}
|
||||
330
htdocs/accountancy/class/lettering.class.php
Normal file
@@ -0,0 +1,330 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file accountancy/class/bookkeeping.class.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Fichier de la classe des comptes comptable
|
||||
*/
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT."/accountancy/class/bookkeeping.class.php";
|
||||
include_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
|
||||
include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
|
||||
|
||||
|
||||
/**
|
||||
* Class lettering
|
||||
*/
|
||||
class lettering extends BookKeeping
|
||||
{
|
||||
/**
|
||||
* lettrageTiers
|
||||
*
|
||||
* @param int $socid Thirdparty id
|
||||
* @return void
|
||||
*/
|
||||
public function lettrageTiers($socid) {
|
||||
|
||||
$db = $this->db;
|
||||
|
||||
$object = new Societe($this->db);
|
||||
$object->id = $socid;
|
||||
$object->fetch($socid);
|
||||
|
||||
|
||||
if( $object->code_compta == '411CUSTCODE')
|
||||
$object->code_compta = '';
|
||||
|
||||
if( $object->code_compta_fournisseur == '401SUPPCODE')
|
||||
$object->code_compta_fournisseur = '';
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.lettering_code, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " WHERE code_journal = 'BQ' AND ( ";
|
||||
if(!empty($object->code_compta) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
|
||||
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
|
||||
$sql .= " OR ";
|
||||
if(!empty($object->code_compta_fournisseur) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
|
||||
|
||||
$sql .= " ) AND ( bk.date_lettering ='' OR bk.date_lettering IS NULL ) AND bk.lettering_code !='' ";
|
||||
|
||||
$sql .= " GROUP BY bk.lettering_code ";
|
||||
|
||||
|
||||
$resql = $db->query ( $sql );
|
||||
if ($resql) {
|
||||
$num = $db->num_rows ( $resql );
|
||||
$i = 0;
|
||||
|
||||
while ( $i < $num ) {
|
||||
$obj = $db->fetch_object ( $resql );
|
||||
$i++;
|
||||
|
||||
$sql = "SELECT bk.rowid ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " WHERE bk.lettering_code = '".$obj->lettering_code."' ";
|
||||
$sql .= " AND ( ";
|
||||
if(!empty($object->code_compta) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
|
||||
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
|
||||
$sql .= " OR ";
|
||||
if(!empty($object->code_compta_fournisseur) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
|
||||
$sql .= " ) ";
|
||||
// echo $sql;
|
||||
$resql2 = $db->query ( $sql );
|
||||
if ($resql2) {
|
||||
$num2 = $db->num_rows ( $resql2 );
|
||||
$i2 = 0;
|
||||
$ids = array();
|
||||
while ( $i2 < $num2 ) {
|
||||
$obj2 = $db->fetch_object ( $resql2 );
|
||||
$i2++;
|
||||
$ids[] = $obj2->rowid;
|
||||
}
|
||||
|
||||
|
||||
if(count($ids) > 1 ){
|
||||
$result = $this->updatelettrage($ids);
|
||||
|
||||
// var_dump($result);
|
||||
// if( $result < 0 ){
|
||||
// setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
// $error++;
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Prise en charge des lettering complexe avec prelevment , virement
|
||||
*/
|
||||
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering, bu.url_id , bu.type ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu ON(bk.fk_doc = bu.fk_bank AND bu.type IN ('payment', 'payment_supplier') ) ";
|
||||
$sql .= " WHERE code_journal = 'BQ' AND ( ";
|
||||
if(!empty($object->code_compta) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
|
||||
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
|
||||
$sql .= " OR ";
|
||||
if(!empty($object->code_compta_fournisseur) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
|
||||
|
||||
$sql .= " ) AND date_lettering ='' ";
|
||||
$sql .= " GROUP BY bk.lettering_code ";
|
||||
|
||||
// echo $sql;
|
||||
//
|
||||
$resql = $db->query ( $sql );
|
||||
if ($resql) {
|
||||
$num = $db->num_rows ( $resql );
|
||||
$i = 0;
|
||||
|
||||
while ( $i < $num ) {
|
||||
$obj = $db->fetch_object ( $resql );
|
||||
$ids = array();
|
||||
$i++;
|
||||
|
||||
// print_r($obj);
|
||||
|
||||
|
||||
|
||||
if($obj->type =='payment_supplier' ) {
|
||||
$ids[] = $obj->rowid;
|
||||
|
||||
$sql= 'SELECT bk.rowid, facf.ref, facf.ref_supplier, payf.fk_bank ';
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
|
||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
|
||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
|
||||
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = facf.ref) ";
|
||||
// $sqlmid.= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid=facf.fk_soc";
|
||||
// $sqlmid.= " INNER JOIN " . MAIN_DB_PREFIX . "c_paiement as payc ON payc.id=payf.fk_paiement";
|
||||
$sql .= " WHERE 1 ";
|
||||
$sql .= " AND fk_paiementfourn = '".$obj->url_id."' ";
|
||||
// $sql .= " AND (bk.numero_compte = '" . $object->code_compta . "' OR bk.numero_compte = '" . $object->code_compta_fournisseur . "') ";
|
||||
$sql .= " AND ( ";
|
||||
if(!empty($object->code_compta) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
|
||||
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
|
||||
$sql .= " OR ";
|
||||
if(!empty($object->code_compta_fournisseur) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
|
||||
$sql .= " ) ";
|
||||
// echo $sql;
|
||||
// exit;
|
||||
}
|
||||
elseif($obj->type =='payment' ){
|
||||
$ids[] = $obj->rowid;
|
||||
|
||||
$sql= 'SELECT bk.rowid,fac.facnumber , pay.fk_bank ';
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "facture fac ";
|
||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
|
||||
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
|
||||
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = fac.rowid) ";
|
||||
$sql .= " WHERE 1 ";
|
||||
$sql .= " AND payfac.fk_paiement = '".$obj->url_id."' ";
|
||||
$sql .= " AND ( ";
|
||||
if(!empty($object->code_compta) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
|
||||
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
|
||||
$sql .= " OR ";
|
||||
if(!empty($object->code_compta_fournisseur) )
|
||||
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
|
||||
$sql .= " ) ";
|
||||
|
||||
// echo $sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$resql2 = $db->query ( $sql );
|
||||
if ($resql2) {
|
||||
$num2 = $db->num_rows ( $resql2 );
|
||||
$i2 = 0;
|
||||
|
||||
while ( $i2 < $num2 ) {
|
||||
$obj2 = $db->fetch_object ( $resql2 );
|
||||
$i2++;
|
||||
$ids[] = $obj2->rowid;
|
||||
}
|
||||
|
||||
// print_r($ids);
|
||||
// exit;
|
||||
if(count($ids) > 1 ){
|
||||
$result = $this->updatelettrage($ids);
|
||||
|
||||
// var_dump($result);
|
||||
// if( $result < 0 ){
|
||||
// setEventMessages('', $BookKeeping->errors, 'errors' );
|
||||
// $error++;
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
// exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function updatelettrage($ids, $notrigger=false){
|
||||
$error = 0;
|
||||
|
||||
$sql = "SELECT lettering_code FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
|
||||
$sql .= " lettering_code != '' GROUP BY lettering_code ORDER BY lettering_code DESC limit 1; ";
|
||||
// echo $sql;
|
||||
$result = $this->db->query ( $sql );
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object ( $result );
|
||||
$lettre = (empty($obj->lettering_code)? 'AAA' : $obj->lettering_code );
|
||||
if(!empty($obj->lettering_code))
|
||||
$lettre++;
|
||||
}
|
||||
else{
|
||||
$this->errors[] = 'Error'.$this->db->lasterror();;
|
||||
$error++;
|
||||
}
|
||||
// var_dump(__line__, $error);
|
||||
|
||||
$sql = "SELECT SUM(ABS(debit)) as deb, SUM(ABS(credit)) as cred FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
|
||||
$sql .= " rowid IN (".implode(',', $ids).") ";
|
||||
$result = $this->db->query ( $sql );
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object ( $result );
|
||||
// print_r($obj);
|
||||
if( !(round(abs($obj->deb),2) === round(abs($obj->cred),2)) ){
|
||||
// echo $sql;
|
||||
// print_r($obj);
|
||||
$this->errors[] = 'Total not exacts '.round(abs($obj->deb),2).' vs '. round(abs($obj->cred),2);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$this->errors[] = 'Erreur sql'.$this->db->lasterror();;
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
// Update request
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET";
|
||||
$sql.= " lettering_code='".$lettre."'";
|
||||
$sql.= " , date_lettering = " .$now ; // todo correct date it's false
|
||||
$sql.= " WHERE rowid IN (".implode(',', $ids).") ";
|
||||
// echo $sql ;
|
||||
//
|
||||
// var_dump(__line__, $error);
|
||||
// print_r($this->errors);
|
||||
// exit;
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
//$interface=new Interfaces($this->db);
|
||||
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
// var_dump(__line__, $error);
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
// foreach($this->errors as $errmsg)
|
||||
// {
|
||||
// dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
|
||||
// $this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
// }
|
||||
$this->db->rollback();
|
||||
// echo $this->error;
|
||||
// var_dump(__line__, $error);
|
||||
return -1*$error;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -26,7 +26,7 @@ require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
@@ -39,9 +39,7 @@ $id = GETPOST('id');
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@@ -73,7 +71,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader("", "", "FicheVentilation");
|
||||
llxHeader("", $langs->trans('FicheVentilation'));
|
||||
|
||||
if ($cancel == $langs->trans("Cancel")) {
|
||||
$action = '';
|
||||
@@ -84,7 +82,7 @@ if ($cancel == $langs->trans("Cancel")) {
|
||||
*/
|
||||
$form = new Form($db);
|
||||
$facture_static = new Facture($db);
|
||||
$formventilation = new FormVentilation($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
if (! empty($id)) {
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price,";
|
||||
@@ -95,51 +93,51 @@ if (! empty($id)) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
||||
|
||||
if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
if ($num_lines) {
|
||||
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans('CustomersVentilation'), '', 'title_setup');
|
||||
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Ref facture
|
||||
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
|
||||
$facture_static->ref = $objp->facnumber;
|
||||
$facture_static->id = $objp->facid;
|
||||
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr><td width="20%">' . $langs->trans("Line") . '</td>';
|
||||
print '<td>' . nl2br($objp->description) . '</td></tr>';
|
||||
print '<tr><td width="20%">' . $langs->trans("Account") . '</td><td>';
|
||||
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
print $formaccounting->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print "Error";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -23,7 +23,7 @@
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/index.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Home customer ventilation
|
||||
* \brief Home customer journalization page
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@@ -40,7 +40,7 @@ $langs->load("accountancy");
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
accessforbidden();
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@@ -58,7 +58,7 @@ if ($year == 0) {
|
||||
}
|
||||
|
||||
// Validate History
|
||||
$action = GETPOST('action','alpha');
|
||||
$action = GETPOST('action','aZ09');
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ if ($action == 'validatehistory') {
|
||||
|
||||
// First clean corrupted data
|
||||
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sqlclean .= " SET fd.fk_code_ventilation = 0";
|
||||
$sqlclean .= " SET fk_code_ventilation = 0";
|
||||
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
|
||||
$sqlclean .= ' (SELECT accnt.rowid ';
|
||||
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||
@@ -91,13 +91,13 @@ if ($action == 'validatehistory') {
|
||||
$sql1 .= " AND " . MAIN_DB_PREFIX . "facturedet.fk_code_ventilation = 0";
|
||||
} else {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||
}
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
|
||||
$resql1 = $db->query($sql1);
|
||||
if (! $resql1) {
|
||||
@@ -113,7 +113,7 @@ if ($action == 'validatehistory') {
|
||||
$db->begin();
|
||||
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = 0";
|
||||
$sql1 .= " SET fk_code_ventilation = 0";
|
||||
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
|
||||
$sql1 .= ' (SELECT accnt.rowid ';
|
||||
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||
@@ -134,16 +134,16 @@ if ($action == 'validatehistory') {
|
||||
} elseif ($action == 'cleanaccountancycode') {
|
||||
$error = 0;
|
||||
$db->begin();
|
||||
|
||||
|
||||
// Now clean
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql1.= " SET fd.fk_code_ventilation = 0";
|
||||
$sql1.= " SET fk_code_ventilation = 0";
|
||||
$sql1.= " WHERE fd.fk_facture IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
|
||||
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
|
||||
$sql1.= " AND f.entity IN (" . getEntity("accountancy", 1) . ")";
|
||||
$sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")";
|
||||
$sql1.=")";
|
||||
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||
|
||||
$resql1 = $db->query($sql1);
|
||||
@@ -173,7 +173,7 @@ print $langs->trans("DescVentilCustomer") . '<br>';
|
||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
|
||||
print '<br>';
|
||||
//print '<div class="inline-block divButAction">';
|
||||
// TODO Remove this. Should be done into the repair.php script
|
||||
// TODO Remove this. Should be done always or into the repair.php script.
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||
//print '</div>';
|
||||
|
||||
@@ -187,9 +187,9 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
}
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$row = $db->fetch_row($result);
|
||||
@@ -203,10 +203,6 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
|
||||
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||
|
||||
|
||||
|
||||
|
||||
$var = true;
|
||||
|
||||
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
@@ -217,8 +213,8 @@ for($i = 1; $i <= 12; $i ++) {
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
@@ -228,7 +224,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
$sql .= " AND aa.account_number IS NULL";
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
@@ -237,16 +233,27 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
}
|
||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/customer/index.php sql=' . $sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
@@ -270,14 +277,14 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
|
||||
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
|
||||
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
|
||||
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
@@ -285,7 +292,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_factu
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
@@ -294,26 +301,37 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND aa.account_number IS NOT NULL";
|
||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
while ( $row = $db->fetch_row($resql)) {
|
||||
|
||||
$var = ! $var;
|
||||
print '<tr ' . $bc[$var] . '><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($row[13]) . '</td>';
|
||||
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
print '<tr class="oddeven"><td>';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("Unknown");
|
||||
}
|
||||
else print length_accountg($row[0]);
|
||||
print '</td>';
|
||||
print '<td align="left">';
|
||||
if ($row[0] == 'tobind')
|
||||
{
|
||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||
}
|
||||
else print $row[1];
|
||||
print '</td>';
|
||||
for($i = 2; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right">' . price($row[13]) . '</td>';
|
||||
print '<td align="right"><b>' . price($row[14]) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
@@ -321,101 +339,100 @@ print "</table>\n";
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
|
||||
{
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||
print '</tr>';
|
||||
$i ++;
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
|
||||
}
|
||||
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price($row[$i]) . '</td>';
|
||||
}
|
||||
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
print "<br>\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
|
||||
}
|
||||
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
}
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php');
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($row = $db->fetch_row($resql)) {
|
||||
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
for($i = 1; $i <= 12; $i ++) {
|
||||
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
|
||||
}
|
||||
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||