mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
Compare commits
383 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7937a9962 | ||
|
|
953e736a97 | ||
|
|
d40229e9cc | ||
|
|
75dbcf4a78 | ||
|
|
d18770c1e7 | ||
|
|
490b0c5f3a | ||
|
|
77e48f8c3e | ||
|
|
882fd9a798 | ||
|
|
38c9d39c2b | ||
|
|
4e2c321e4d | ||
|
|
83e34a1c4e | ||
|
|
f31bf5d80e | ||
|
|
ade688b589 | ||
|
|
b2d27a7d25 | ||
|
|
8e47fe9e1c | ||
|
|
1d39c1acc2 | ||
|
|
f4def9ea28 | ||
|
|
f3fded2a0a | ||
|
|
6c67df0698 | ||
|
|
224fa14e16 | ||
|
|
33045668cd | ||
|
|
c050fe2a27 | ||
|
|
82fa3a447b | ||
|
|
c4a6377af5 | ||
|
|
416f13c708 | ||
|
|
743867b91b | ||
|
|
78307a748d | ||
|
|
a90a03412a | ||
|
|
3212fd2b27 | ||
|
|
56eddeade1 | ||
|
|
db30186386 | ||
|
|
46fe2c67e0 | ||
|
|
748bef6134 | ||
|
|
321fd47ffc | ||
|
|
219cd0f855 | ||
|
|
0628f76a2b | ||
|
|
beaec59ab6 | ||
|
|
11368e48fe | ||
|
|
789d588fde | ||
|
|
1c2c1ff3d8 | ||
|
|
0bb431c4d0 | ||
|
|
47cab90336 | ||
|
|
578c4ca383 | ||
|
|
3debf56c68 | ||
|
|
3c24c1b11a | ||
|
|
b1c4d32fbf | ||
|
|
7ad1553859 | ||
|
|
6f43206331 | ||
|
|
c209d16881 | ||
|
|
2c01a46774 | ||
|
|
f5da9b5e33 | ||
|
|
6728ad3c37 | ||
|
|
4887f51174 | ||
|
|
615456382d | ||
|
|
c9f69279c7 | ||
|
|
a4a1a991b8 | ||
|
|
27b47a4f48 | ||
|
|
a1bba472a0 | ||
|
|
fbb25eae11 | ||
|
|
81dc1415de | ||
|
|
666e66e78f | ||
|
|
b11ac14cf0 | ||
|
|
1461072801 | ||
|
|
ae3c83b7dc | ||
|
|
293726c5e8 | ||
|
|
bd8b393d8a | ||
|
|
aaf2cca45f | ||
|
|
a07852c699 | ||
|
|
9e1b0d1abc | ||
|
|
e21d6b0954 | ||
|
|
4ff78c09fc | ||
|
|
477aeecdac | ||
|
|
5a05d4a4b8 | ||
|
|
f6ab7ca0c9 | ||
|
|
a81c483061 | ||
|
|
4be9730518 | ||
|
|
b1a4b8e7d0 | ||
|
|
18406fc550 | ||
|
|
1dbb19e8ef | ||
|
|
375d9aa336 | ||
|
|
1f986014f1 | ||
|
|
bd8391163a | ||
|
|
989cd87446 | ||
|
|
dcfaeb6606 | ||
|
|
7a272afd12 | ||
|
|
891f8d9442 | ||
|
|
9aab62ab36 | ||
|
|
2f4de2ef75 | ||
|
|
fdac53bfca | ||
|
|
7d8cf99d58 | ||
|
|
3dacdf4e4a | ||
|
|
1b24356e0f | ||
|
|
d0dc792b3c | ||
|
|
01279edfc8 | ||
|
|
64a2cce7c0 | ||
|
|
2aeb0f4f5b | ||
|
|
314be02e65 | ||
|
|
00c6033e11 | ||
|
|
c0a3606a59 | ||
|
|
7ed496d7d9 | ||
|
|
8cb1818c4e | ||
|
|
92cdef71e8 | ||
|
|
c8b5288782 | ||
|
|
24439eb1a3 | ||
|
|
4f08408065 | ||
|
|
31c38cedbc | ||
|
|
606a3f9917 | ||
|
|
45d57b0492 | ||
|
|
420de76b4b | ||
|
|
fd8d571d67 | ||
|
|
d177a2fbb4 | ||
|
|
ca69bf9d7e | ||
|
|
627f5694f0 | ||
|
|
53dfda1413 | ||
|
|
ccddf0d1be | ||
|
|
57f49ec5d4 | ||
|
|
e3041f45ee | ||
|
|
aac24c887f | ||
|
|
e607a53ca3 | ||
|
|
aac4609f2d | ||
|
|
5ec2c1c4b3 | ||
|
|
bb72932601 | ||
|
|
2517d54196 | ||
|
|
106b4a669f | ||
|
|
e370ffb2d4 | ||
|
|
c5045a75d8 | ||
|
|
834a6dc2af | ||
|
|
d846dd2431 | ||
|
|
badf379489 | ||
|
|
1405c03f7d | ||
|
|
41f0920656 | ||
|
|
29db45c763 | ||
|
|
e78baab579 | ||
|
|
48b2d818da | ||
|
|
1d0d3ab747 | ||
|
|
3528049348 | ||
|
|
eeffe4ed34 | ||
|
|
a94f7dc3ad | ||
|
|
efa171819a | ||
|
|
756b1d31ad | ||
|
|
722f6e0db6 | ||
|
|
104592b349 | ||
|
|
455bae98ef | ||
|
|
30e27014b8 | ||
|
|
5c07df812d | ||
|
|
cbbe909bc5 | ||
|
|
c5d8012eb1 | ||
|
|
797ab8a150 | ||
|
|
c30f13a03d | ||
|
|
ac2ff5c604 | ||
|
|
3b6618b7f6 | ||
|
|
dad1e312ab | ||
|
|
c184253951 | ||
|
|
fc63e8b9dc | ||
|
|
ec974cae26 | ||
|
|
4fd67d725a | ||
|
|
0c7cabbf37 | ||
|
|
6a4468d94e | ||
|
|
87fc27c7e6 | ||
|
|
fdbf2fb45d | ||
|
|
386f4bd82e | ||
|
|
48072c58d7 | ||
|
|
692881bf59 | ||
|
|
c73f4a14ee | ||
|
|
742d0e37ee | ||
|
|
d518278166 | ||
|
|
05fe8e45b3 | ||
|
|
b85a835988 | ||
|
|
a853aed348 | ||
|
|
868809caba | ||
|
|
c69565fd69 | ||
|
|
ebd86f5388 | ||
|
|
d455ee7b56 | ||
|
|
ae303f34a4 | ||
|
|
4b28ff005e | ||
|
|
d6fc967162 | ||
|
|
78ec4d595b | ||
|
|
920c9c7251 | ||
|
|
8c6ce79d9d | ||
|
|
8121aeb0b6 | ||
|
|
2ae776e51b | ||
|
|
c7d02aa1df | ||
|
|
c6fc07e412 | ||
|
|
a155fc71e2 | ||
|
|
3f23c8956c | ||
|
|
0ee9049374 | ||
|
|
6a570222cc | ||
|
|
5fdd798e91 | ||
|
|
e8b7c9c6bd | ||
|
|
05f83dddf0 | ||
|
|
e1ba6ccfc6 | ||
|
|
7dcaa61218 | ||
|
|
b8969edcc5 | ||
|
|
96c5771718 | ||
|
|
249d37a093 | ||
|
|
7b9f154c29 | ||
|
|
959d463fc5 | ||
|
|
2c52de3840 | ||
|
|
d1868b643e | ||
|
|
12d15cce9f | ||
|
|
634d5aa549 | ||
|
|
fa79f280ea | ||
|
|
860253759b | ||
|
|
248ef4fd46 | ||
|
|
3b53ccbe44 | ||
|
|
4b74b0529f | ||
|
|
d288b19f4d | ||
|
|
c87e28d5f9 | ||
|
|
3a38153889 | ||
|
|
2c56b85ab7 | ||
|
|
4bda5156e0 | ||
|
|
ea3d091f03 | ||
|
|
b16b1c2ce0 | ||
|
|
015b0d8036 | ||
|
|
039105a3f1 | ||
|
|
ab83e22a12 | ||
|
|
f0ebd7721d | ||
|
|
a41dc3acd9 | ||
|
|
de6e1c5036 | ||
|
|
f185028707 | ||
|
|
c6b5d0f96c | ||
|
|
d225d92c0b | ||
|
|
9c54dc57df | ||
|
|
c570b5fbfc | ||
|
|
144da16391 | ||
|
|
b7ef2db5d9 | ||
|
|
2c0a2937f6 | ||
|
|
05f3a47018 | ||
|
|
9c70c2c3d0 | ||
|
|
fffb0f1bde | ||
|
|
ffc550de6d | ||
|
|
287e2ca032 | ||
|
|
9493e252c9 | ||
|
|
76ba3301c3 | ||
|
|
d812262ed8 | ||
|
|
0dcd41ff01 | ||
|
|
c4facf20e6 | ||
|
|
e8758bc19b | ||
|
|
822a3ebe7e | ||
|
|
e93d474393 | ||
|
|
ef99de4e84 | ||
|
|
85338bacb4 | ||
|
|
2704f50bd4 | ||
|
|
f0d4ebe417 | ||
|
|
fcbb388a72 | ||
|
|
3daaaadf65 | ||
|
|
19e017a2c1 | ||
|
|
7bac9444e6 | ||
|
|
9426298b95 | ||
|
|
7a28f8e4aa | ||
|
|
afd631e6e3 | ||
|
|
74e16db632 | ||
|
|
949ae2f160 | ||
|
|
ba70c1a08a | ||
|
|
f264e25514 | ||
|
|
09878a3a32 | ||
|
|
8dd9358214 | ||
|
|
8a3bc25029 | ||
|
|
98d7ce94b8 | ||
|
|
dddafacad9 | ||
|
|
7851587a11 | ||
|
|
b728ccb52f | ||
|
|
367d225d3e | ||
|
|
c5ccf2998b | ||
|
|
3e9b69b17c | ||
|
|
5a93a7620c | ||
|
|
f62e7d6043 | ||
|
|
996977a4a8 | ||
|
|
6d9cc15856 | ||
|
|
31eb4bda88 | ||
|
|
522b5a91bc | ||
|
|
2b9b110f9c | ||
|
|
104df1d16d | ||
|
|
f054d624cd | ||
|
|
71832b5944 | ||
|
|
0e944b0403 | ||
|
|
e4bff59f1a | ||
|
|
643fc6c61f | ||
|
|
cd00ec29bf | ||
|
|
85cabbf921 | ||
|
|
da8a1cb475 | ||
|
|
b88b4fbc2c | ||
|
|
395209a5db | ||
|
|
4e05afdd66 | ||
|
|
bd99f3943d | ||
|
|
b04eae95e5 | ||
|
|
b536c8a10c | ||
|
|
165856656a | ||
|
|
f7c48558e6 | ||
|
|
80968bc087 | ||
|
|
257d7c41d6 | ||
|
|
660557b4dd | ||
|
|
0bc511a626 | ||
|
|
576512e339 | ||
|
|
17dec4b924 | ||
|
|
e82e26c6fa | ||
|
|
9b40cc9e89 | ||
|
|
832d1b37c1 | ||
|
|
911aca399d | ||
|
|
0dd955875c | ||
|
|
c8a9f4600c | ||
|
|
67b308cb25 | ||
|
|
2d0f353529 | ||
|
|
e2fac5dd91 | ||
|
|
772acd6bf9 | ||
|
|
1f0653dd6d | ||
|
|
4372c58714 | ||
|
|
db1c97bdad | ||
|
|
0473bc5138 | ||
|
|
bff33166a5 | ||
|
|
fd03f582c9 | ||
|
|
20475ba3e8 | ||
|
|
2d14e53b45 | ||
|
|
b7a2e3783e | ||
|
|
71afc4adb0 | ||
|
|
2c68317864 | ||
|
|
47339d0e62 | ||
|
|
47fc72a001 | ||
|
|
a518a7256c | ||
|
|
ff04729a07 | ||
|
|
1aad1b6acd | ||
|
|
48f9ef2574 | ||
|
|
2c46c20dfb | ||
|
|
714da05034 | ||
|
|
4fdd98c4a7 | ||
|
|
0e1f22fe26 | ||
|
|
1505ade3db | ||
|
|
d3a3e8786e | ||
|
|
79b081a7b7 | ||
|
|
3064aa2177 | ||
|
|
f1993e719f | ||
|
|
14ec2cd1d9 | ||
|
|
338fc5f2f8 | ||
|
|
a446318649 | ||
|
|
34561906fc | ||
|
|
08c621037c | ||
|
|
61ae2f3f37 | ||
|
|
0674667932 | ||
|
|
cdd716eb9d | ||
|
|
4405f17f22 | ||
|
|
12c6752971 | ||
|
|
f5883741bf | ||
|
|
21ff810952 | ||
|
|
1e28fd3541 | ||
|
|
ca7ff0ecfa | ||
|
|
28ad819ab4 | ||
|
|
b7daef10c6 | ||
|
|
b561d48b5f | ||
|
|
a97241f716 | ||
|
|
a353f816e3 | ||
|
|
4d0301f5df | ||
|
|
b0163fbed2 | ||
|
|
a2f0866c0c | ||
|
|
8705dd4d1b | ||
|
|
2cba55758b | ||
|
|
a32791f79d | ||
|
|
8f18db8e3f | ||
|
|
d485e270b9 | ||
|
|
c21b389462 | ||
|
|
2f4e1f09e6 | ||
|
|
03f642e861 | ||
|
|
2aa3995b73 | ||
|
|
ee65e42b1c | ||
|
|
cb2b6e6e40 | ||
|
|
9fdfc740de | ||
|
|
50eb2e2c15 | ||
|
|
967991f31a | ||
|
|
741c093ac9 | ||
|
|
f7e0ef74d7 | ||
|
|
4f206a2125 | ||
|
|
d5eb4510e2 | ||
|
|
dd9a08120f | ||
|
|
0632cbdad0 | ||
|
|
86f1d59e3c | ||
|
|
e7a8de18bf | ||
|
|
b0ebaec0da | ||
|
|
e760201a59 | ||
|
|
c6637207f8 | ||
|
|
739d309a0d | ||
|
|
8670a89ecb | ||
|
|
1a9e98cda9 | ||
|
|
0b2a81f4b8 | ||
|
|
9c7647a7ae |
@@ -21,7 +21,7 @@ NuSoap 0.9.5 LGPL 2.1+ Yes
|
||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||
PHPExcel 1.7.6 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
TCPDF 6.0.021 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.0.093 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.8.2 MIT License Yes JS library
|
||||
|
||||
72
ChangeLog
72
ChangeLog
@@ -2,6 +2,50 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||
- Fix: bug 1588 : relative discount.
|
||||
- Fix: label of input method not tranlated.
|
||||
- Fix: box of customer and propsects were not correctly disabled.
|
||||
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
|
||||
- Fix: Civility & birthdate wasn't save into adherent module.
|
||||
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
|
||||
- Fix: Chars - is no more allowed into value for code for extra fields.
|
||||
- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
||||
- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
|
||||
- Fix: Show sender Country on PDF docs when sender Country <> receiver Country
|
||||
- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
|
||||
- Fix: [ bug #1749 ] Undefined $mailchimp
|
||||
- Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify
|
||||
- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
|
||||
- Fix: [ bug #1731 ] Can't use quick navigation on project tasks secondary tabs
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
- Fix: Can upload files on services.
|
||||
- Fix: sql errors on update fichinter.
|
||||
- Fix: debian script syntax error.
|
||||
- Fix: error "menu param is not inside list" into pos module.
|
||||
- Fix: Salary payments are not reflected on the reporting sheets.
|
||||
- Fix: Unsubscribe emailing not working.
|
||||
- Fix: Trigger on create category call failed because user is not passed on card.
|
||||
- Fix: list event view lost type event filter.
|
||||
- Fix: Save also code event.
|
||||
- Fix: VAT payment - Add control on field date value.
|
||||
- Fix: Salaries payment - Field date value is now required and add control on it.
|
||||
- Fix: Iban was used instead of Bic into SEPA file.
|
||||
- Fix: Must unaccent strings into SEPA file.
|
||||
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||
- Fix: cents for indian ruppes are calle paisa and paise.
|
||||
- Fix: Invoices payments may be older than invoices.
|
||||
- Fix: Withdrawal total amount is double
|
||||
- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line
|
||||
- Fix: Web service categorie WDSL declaration is correct
|
||||
- Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined
|
||||
- Fix: Category creation failed and no message output
|
||||
- Fix: Lanf for Payment Type
|
||||
- Fix: PHPCheckstyle 1.5.5
|
||||
|
||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||
For users:
|
||||
- New: Update ckeditor to version 4.
|
||||
@@ -110,6 +154,23 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
||||
- Remove add_photo_web() that is ot used anymore by core code.
|
||||
|
||||
|
||||
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
|
||||
Fix: Paypal link were broken dur to SSL v3 closed.
|
||||
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
|
||||
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
||||
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
Fix: Can't update phone_pro from web service
|
||||
Fix: Some security holes.
|
||||
Fix: copy extrafields when creating order from proposal.
|
||||
Fix: report on action was not filtering by environment.
|
||||
Fix: Avoid missing class error.
|
||||
Fix: Add function dolEscapeXML.
|
||||
Fix: Bad days and month reported by function.
|
||||
Fix: Bad margin calculation.
|
||||
|
||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
||||
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||
@@ -127,9 +188,18 @@ Fix: Link product, In list view and label product.
|
||||
Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
|
||||
Fix: When disabled, all fields to add time into task line must be disabled.
|
||||
Fix: Missing include files.lib.php in some pages that use dol_delete_recursive
|
||||
Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive.
|
||||
Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref.
|
||||
Fix: [ bug #1553 ] Saving User displays setup removes menu.
|
||||
Fix: [ bug #1544 ] Can remove date from invoice.
|
||||
Fix: list event view lost type event filter.
|
||||
Fix: Add code save on create event.
|
||||
Fix: SQL injection.
|
||||
Fix: [ bug #1589 ] Menu type in "Edit menu" page is not translated
|
||||
Fix: [ bug #1591 ] Linked object block shows Total HT/TTC even if not having permission to read them
|
||||
Fix: [ bug #1577 ] When creating new Private individual third, selected third type is ignored
|
||||
Fix: [ bug #1555 ] Update accountancy code of products does not throw PRODUCT_MODIFY trigger
|
||||
Fix: [ bug #1548 ] Supplier payment card shows type in French
|
||||
Fix: [ bug #1546 ] Incorrect page number when searching in the list of bank transactions
|
||||
|
||||
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
|
||||
Fix: Hide title of event when agenda module disabled.
|
||||
|
||||
@@ -1,69 +1,20 @@
|
||||
dolibarr (3.6.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 27 dec 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.6.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 23 Sep 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.6.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 15 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.5-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 8 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.4-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 1 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.3-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 2 May 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 14 March 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 7 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 31 Jan 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.2-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.1-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 27 Apr 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.0-3) unstable; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
|
||||
@@ -3,7 +3,7 @@ Section: web
|
||||
Priority: optional
|
||||
Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
# Uploaders: Laurent Destailleur (eldy) <eldy@users.sourceforge.net> # Only if differs from Maintainer
|
||||
Standards-Version: 3.9.4
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
@@ -16,7 +16,8 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf, libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
# php-tcpdf, libfpdi-php,
|
||||
# libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
@@ -26,9 +27,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
# fonts-dejavu-core | ttf-dejavu-core,
|
||||
xdg-utils,
|
||||
mysql-server,
|
||||
mysql-client,
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: mysql-client, apache2 | lighttpd | httpd
|
||||
Recommends: apache2 | lighttpd | httpd
|
||||
Suggests: www-browser
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
||||
@@ -39,7 +41,7 @@ Description: Web based software to manage a company or foundation
|
||||
It's a web software you can install as a standalone program or on any web
|
||||
hosting provider to use it from anywhere with any web browser.
|
||||
.
|
||||
Dolibarr was designed to be easy to use. Only the features that you need
|
||||
Dolibarr was designed to be easy to use. Only the features that you need
|
||||
are visible, depending on which modules were activated.
|
||||
.
|
||||
This is an example of most common used modules:
|
||||
@@ -68,4 +70,4 @@ Description: Web based software to manage a company or foundation
|
||||
PDF exports,
|
||||
And a lot more modules...
|
||||
.
|
||||
You can also add third parties external modules or develop yours.
|
||||
You can also add external modules from third parties or develop yours.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Dolibarr
|
||||
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Source: http://sourceforge.net/projects/dolibarr/files/
|
||||
Source: http://www.dolibarr.org/files/stable/standard/
|
||||
|
||||
Files: *
|
||||
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
@@ -61,7 +61,7 @@ License: GPL-3+
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
unknown, jackbbs
|
||||
License: BSD
|
||||
License: BSD-3-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
@@ -272,7 +272,7 @@ Comment:
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
Copyright: Flot team
|
||||
License: Public Domain
|
||||
License: Public-Domain
|
||||
This work is not subject to copyright in any jurisdiction
|
||||
Comment:
|
||||
Those files are not shipped in the binary package because we configure
|
||||
|
||||
@@ -129,7 +129,7 @@ case "$1" in
|
||||
then
|
||||
# Create an empty conf.php with permission to web server
|
||||
setup_empty_conf
|
||||
else
|
||||
#else
|
||||
# File already exist. We add params not found.
|
||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
|
||||
@@ -8,16 +8,20 @@ echo "tmpdir = $tmpdir"
|
||||
if [ -n "$1" ]; then
|
||||
uscan_opts="--download-version=$1"
|
||||
fi
|
||||
uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||
#uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||
|
||||
cd $tmpdir
|
||||
|
||||
# Other method to download (comment uscan if you use this)
|
||||
wget http://www.dolibarr.org/files/stable/standard/dolibarr-3.5.4.tgz
|
||||
|
||||
# Rename file to add +dfsg
|
||||
tgzfile=$(echo *.tgz)
|
||||
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')
|
||||
|
||||
cd - >/dev/null
|
||||
|
||||
mv $tmpdir/dolibarr-${version}.tgz ../
|
||||
echo "File ../dolibarr-${version}.tgz is ready for git-import"
|
||||
echo "File ../dolibarr-${version}.tgz is ready for git-import-orig"
|
||||
|
||||
rm -rf $tmpdir
|
||||
|
||||
1
build/exe/doliwamp/.gitignore
vendored
Normal file
1
build/exe/doliwamp/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/doliwamp.tmp.iss
|
||||
@@ -16,10 +16,10 @@
|
||||
[Setup]
|
||||
; ----- Change this -----
|
||||
AppName=DoliWamp
|
||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
AppVerName=DoliWamp-3.6.0
|
||||
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
OutputBaseFilename=DoliWamp-3.6.0
|
||||
; Replace key with DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
AppVerName=__FILENAMEEXEDOLIWAMP__
|
||||
; Replace key with DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||
OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
; Define full path from which all relative path are defined
|
||||
@@ -32,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
|
||||
AppSupportURL=http://www.dolibarr.org
|
||||
AppUpdatesURL=http://www.dolibarr.org
|
||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||
AppCopyright=Copyright (C) 2008-2013 Laurent Destailleur, NLTechno
|
||||
AppCopyright=Copyright (C) 2008-2014 Laurent Destailleur, NLTechno
|
||||
DefaultDirName=c:\dolibarr
|
||||
DefaultGroupName=Dolibarr
|
||||
;LicenseFile=COPYING
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
# \author (c)2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#
|
||||
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||
@@ -442,6 +442,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
@@ -460,8 +461,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-20100919`;
|
||||
$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/utils`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||
@@ -610,9 +611,6 @@ if ($nboftargetok) {
|
||||
|
||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||
|
||||
#print "Create directory $RPMDIR\n";
|
||||
#$ret=`mkdir -p "$RPMDIR"`;
|
||||
|
||||
print "Remove target ".$FILENAMERPM."...\n";
|
||||
unlink("$NEWDESTI/".$FILENAMERPM);
|
||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
||||
@@ -620,13 +618,13 @@ if ($nboftargetok) {
|
||||
|
||||
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
||||
|
||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
|
||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Set owners
|
||||
#print "Set owners on files/dir\n";
|
||||
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
||||
# Removed files we don't need
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||
@@ -747,10 +745,18 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
||||
# Removed duplicate license files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/scayt/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/wsc/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/freefont-20120503/COPYING`;
|
||||
# Removed files we don't need
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source`;
|
||||
|
||||
# Rename upstream changelog to match debian rules
|
||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||
|
||||
@@ -905,8 +911,6 @@ if ($nboftargetok) {
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
print "Version set to $MAJOR.$MINOR.$newbuild\n";
|
||||
#$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\"";
|
||||
#$ret=`$cmd`;
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
|
||||
$ret=`$cmd`;
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
|
||||
@@ -945,8 +949,12 @@ if ($nboftargetok) {
|
||||
|
||||
$SOURCEBACK=$SOURCE;
|
||||
$SOURCEBACK =~ s/\//\\/g;
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"";
|
||||
|
||||
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
|
||||
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
|
||||
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
|
||||
print "$cmd\n";
|
||||
$ret= `$cmd`;
|
||||
#print "$ret\n";
|
||||
@@ -956,6 +964,9 @@ if ($nboftargetok) {
|
||||
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
|
||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||
|
||||
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,14 +36,13 @@ complete release of Dolibarr, step by step.
|
||||
- Update version number with x.y.z in build/exe/doliwamp/doliwamp.iss
|
||||
- Update version number with x.y.z in build/rpm/*.spec
|
||||
- Commit all changes.
|
||||
- Add a Tag (x.y.z)
|
||||
|
||||
- Build Dolibarr and DoliWamp packages with makepack-dolibarr.pl
|
||||
- Check content of built packages.
|
||||
- Move build files into www.dolibarr.org web site
|
||||
(/home/dolibarr/wwwroot/files/stable).
|
||||
- Run makepack-dolibarr.pl again with option to publish files on
|
||||
sourceforge.
|
||||
sourceforge. This will also add official tag.
|
||||
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
|
||||
on server to point to new files (used by some web sites).
|
||||
|
||||
|
||||
@@ -333,23 +333,11 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -569,23 +569,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -338,23 +338,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -349,23 +349,12 @@ fi
|
||||
|
||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||
%changelog
|
||||
* Sat Dec 27 2014 Laurent Destailleur 3.6.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@@ -6,17 +6,34 @@
|
||||
<exclude-pattern>*/conf.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/*</exclude-pattern>
|
||||
<exclude-pattern>*/documents/*</exclude-pattern>
|
||||
<exclude-pattern>*/dev/vagrant/*</exclude-pattern>
|
||||
<exclude-pattern>*/custom/*</exclude-pattern>
|
||||
<exclude-pattern>*/nltechno*</exclude-pattern>
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedIF">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSE">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.DetectedELSEIF">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
@@ -105,7 +122,7 @@
|
||||
<rule ref="Generic.Metrics.CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="complexity" value="80" />
|
||||
<property name="absoluteComplexity" value="200" />
|
||||
<property name="absoluteComplexity" value="250" />
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.Metrics.NestingLevel">
|
||||
@@ -162,7 +179,75 @@
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!--
|
||||
<rule ref="PEAR.Commenting.FileComment" />
|
||||
<rule ref="PEAR.Commenting.FileComment.WrongStyle">
|
||||
@@ -219,6 +304,24 @@
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
@@ -236,6 +339,10 @@
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
||||
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
1
htdocs/.gitignore
vendored
1
htdocs/.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
/custom*
|
||||
/extensions*
|
||||
/nltechno*
|
||||
/teclib*
|
||||
/bootstrap*
|
||||
/google*
|
||||
/multicompany*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* 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
|
||||
* 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,
|
||||
@@ -17,6 +17,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,7 +94,7 @@ abstract class ActionsAdherentCardCommon
|
||||
/**
|
||||
* Load data control
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id of object
|
||||
* @return void
|
||||
*/
|
||||
@@ -228,7 +228,7 @@ abstract class ActionsAdherentCardCommon
|
||||
/**
|
||||
* Set content of ->tpl array, to use into template
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return string HTML output
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
/**
|
||||
* Assign custom values for canvas
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 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
|
||||
@@ -124,7 +125,7 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Fonction envoyant un email a l'adherent avec le texte fourni en parametre.
|
||||
* Function sending an email has the adherent with the text supplied in parameter.
|
||||
*
|
||||
* @param string $text Content of message (not html entities encoded)
|
||||
* @param string $subject Subject of message
|
||||
@@ -247,9 +248,9 @@ class Adherent extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Renvoie le libelle traduit de la nature d'un adherent (physique ou morale)
|
||||
* Return translated label by the nature of a adherent (physical or moral)
|
||||
*
|
||||
* @param string $morphy Nature physique ou morale de l'adherent
|
||||
* @param string $morphy Nature of the adherent (physical or moral)
|
||||
* @return string Label
|
||||
*/
|
||||
function getmorphylib($morphy='')
|
||||
@@ -348,12 +349,12 @@ class Adherent extends CommonObject
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if (count($this->errors))
|
||||
@@ -1081,7 +1082,7 @@ class Adherent extends CommonObject
|
||||
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||
elseif ($ref || $fk_soc) {
|
||||
$sql.= " AND d.entity IN (".getEntity().")";
|
||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
||||
if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'";
|
||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||
}
|
||||
elseif ($ref_ext)
|
||||
@@ -1101,7 +1102,7 @@ class Adherent extends CommonObject
|
||||
$this->ref = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref_ext = $obj->ref_ext;
|
||||
$this->civility_id = $obj->civility;
|
||||
$this->civility_id = $obj->civility_id;
|
||||
$this->firstname = $obj->firstname;
|
||||
$this->lastname = $obj->lastname;
|
||||
$this->login = $obj->login;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 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
|
||||
@@ -707,7 +708,7 @@ else
|
||||
{
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Fiche creation */
|
||||
/* Creation card */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
$object->canvas=$canvas;
|
||||
@@ -870,7 +871,7 @@ else
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Profil public
|
||||
|
||||
@@ -534,4 +534,3 @@ print '<br>';
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -473,7 +473,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
||||
}*/
|
||||
}
|
||||
if (isset($_POST["country"]) && $_POST["country"]=='0') {
|
||||
if (isset($_POST["country"]) && $_POST["country"]=='0')
|
||||
{
|
||||
$ok=0;
|
||||
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors');
|
||||
}
|
||||
@@ -532,7 +533,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$result = $db->query($sql);
|
||||
if ($result) // Add is ok
|
||||
{
|
||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||
setEventMessage($langs->transnoentities("RecordSaved"));
|
||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -159,7 +159,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
// Other
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -283,7 +283,7 @@ else // Show
|
||||
// Language
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
@@ -327,7 +327,7 @@ else // Show
|
||||
// Other
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
|
||||
@@ -219,6 +219,10 @@ if (function_exists("ldap_connect"))
|
||||
$info=$object->_load_ldap_info();
|
||||
$dn=$object->_load_ldap_dn($info);
|
||||
|
||||
// Get a gid number for objectclass PosixGroup
|
||||
if(in_array('posixGroup',$info['objectclass']))
|
||||
$info['gidNumber'] = $ldap->getNextGroupGid();
|
||||
|
||||
$result1=$ldap->delete($dn); // To be sure to delete existing records
|
||||
$result2=$ldap->add($dn,$info,$user); // Now the test
|
||||
$result3=$ldap->delete($dn); // Clean what we did
|
||||
|
||||
@@ -206,9 +206,9 @@ else
|
||||
// Add vat rates examples specific to country
|
||||
$vat_rates=array();
|
||||
|
||||
$sql.="SELECT taux as vat_rate";
|
||||
$sql="SELECT taux as vat_rate";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
||||
$sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux != 0";
|
||||
$sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux <> 0";
|
||||
$sql.=" ORDER BY t.taux ASC";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@@ -317,7 +317,7 @@ if ($action == 'create')
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>';
|
||||
if ($parent_rowid)
|
||||
{
|
||||
print 'Left';
|
||||
print $langs->trans('Left');
|
||||
print '<input type="hidden" name="type" value="left">';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -143,4 +143,3 @@ print '</table>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -77,7 +77,7 @@ if($action)
|
||||
if($action == 'STOCK_USE_VIRTUAL_STOCK') {
|
||||
$res = dolibarr_set_const($db, "STOCK_USE_VIRTUAL_STOCK", GETPOST('STOCK_USE_VIRTUAL_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
|
||||
if($action == 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE') {
|
||||
$res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_INVOICE", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_INVOICE','alpha'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
@@ -329,7 +329,7 @@ if ($virtualdiffersfromphysical)
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -81,7 +81,7 @@ else
|
||||
print '<td width="300">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
// arraytest is an array of test to do
|
||||
$arraytest=array();
|
||||
if (preg_match('/mysql/i',$db->type))
|
||||
@@ -91,7 +91,7 @@ else
|
||||
'collation_database'=>array('var'=>'dolibarr_main_db_collation','valifempty'=>'utf8_general_ci')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$listtouse=array();
|
||||
if ($listname == 'listofvars') $listtouse=$listofvars;
|
||||
if ($listname == 'listofstatus') $listtouse=$listofstatus;
|
||||
@@ -124,4 +124,5 @@ else
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -130,4 +130,3 @@ else
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -379,4 +379,3 @@ print '</table>';
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -118,5 +118,3 @@ print info_admin($langs->trans("SystemInfoDesc")).'<br>';
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
?>
|
||||
|
||||
@@ -350,4 +350,3 @@ print "<br><br>";
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -166,4 +166,3 @@ if (preg_match('/^confirm/i',$choice))
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -174,4 +174,3 @@ if (! empty($result['return']))
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_b
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -146,4 +146,3 @@ print '</table>';
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -55,6 +55,8 @@ print '</div>';
|
||||
print '<div class="principal">';
|
||||
|
||||
$page=GETPOST('menu','alpha');
|
||||
if (empty($page)) $page='facturation';
|
||||
|
||||
if (in_array(
|
||||
$page,
|
||||
array(
|
||||
|
||||
@@ -75,4 +75,3 @@ include_once 'affPied.php';
|
||||
|
||||
print '</div></div></div>'."\n";
|
||||
print '</body></html>'."\n";
|
||||
?>
|
||||
@@ -191,5 +191,3 @@ $obj_facturation->paiementLe('RESET');
|
||||
|
||||
// Affichage des templates
|
||||
require ('tpl/facturation1.tpl.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -39,6 +39,7 @@ if ( $_SESSION['uid'] > 0 )
|
||||
}
|
||||
|
||||
$usertxt=GETPOST('user','',1);
|
||||
$err=GETPOST("err");
|
||||
|
||||
|
||||
/*
|
||||
@@ -64,7 +65,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);
|
||||
|
||||
<div class="contenu">
|
||||
<div class="principal_login">
|
||||
<?php if (! empty($_GET["err"])) print $_GET["err"]."<br><br>\n"; ?>
|
||||
<?php if ($err) print dol_escape_htmltag($err)."<br><br>\n"; ?>
|
||||
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Identification"); ?></legend>
|
||||
<form id="frmLogin" method="POST" action="index_verif.php">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
|
||||
@@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
||||
}
|
||||
print '</li></ul>';
|
||||
print '</div>';
|
||||
?>
|
||||
@@ -74,7 +74,7 @@ class Categorie extends CommonObject
|
||||
function fetch($id,$label='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
// Check parameters
|
||||
if (empty($id) && empty($label)) return -1;
|
||||
|
||||
@@ -137,7 +137,7 @@ class Categorie extends CommonObject
|
||||
* -3 : categorie invalide
|
||||
* -4 : category already exists
|
||||
*/
|
||||
function create($user='')
|
||||
function create($user)
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
$langs->load('categories');
|
||||
@@ -1137,11 +1137,11 @@ class Categorie extends CommonObject
|
||||
$cats = array();
|
||||
|
||||
$typeid=-1; $table='';;
|
||||
if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; }
|
||||
if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; }
|
||||
else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='societe'; $type='fournisseur'; }
|
||||
else if ($type == '2' || $type == 'customer') { $typeid=2; $table='societe'; $type='societe'; }
|
||||
else if ($type == '3' || $type == 'member') { $typeid=3; $table='member'; $type='member'; }
|
||||
else if ($type == '4' || $type == 'contact') { $typeid=4; $table='socpeople'; $type='contact'; }
|
||||
else if ($type == '4' || $type == 'contact') { $typeid=4; $table='socpeople'; $type='contact'; }
|
||||
|
||||
$sql = "SELECT ct.fk_categorie, c.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_".$type." as ct, ".MAIN_DB_PREFIX."categorie as c";
|
||||
|
||||
@@ -138,11 +138,13 @@ if ($action == 'add' && $user->rights->categorie->creer)
|
||||
// Create category in database
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->create();
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$action = 'confirmed';
|
||||
$_POST["addcat"] = '';
|
||||
} else {
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,4 +520,3 @@ if($object->type == 4)
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -140,6 +140,7 @@ class ActionComm extends CommonObject
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->type_id=$cactioncomm->id;
|
||||
$this->code=$cactioncomm->code;
|
||||
}
|
||||
else if ($result == 0)
|
||||
{
|
||||
@@ -283,7 +284,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " u.firstname, u.lastname as lastname";
|
||||
@@ -877,7 +878,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " u.firstname, u.lastname,";
|
||||
$sql.= " s.nom as socname,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle";
|
||||
@@ -1070,4 +1071,3 @@ class ActionComm extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -184,18 +184,19 @@ if ($action=='show_week')
|
||||
$prev_month = $prev['prev_month'];
|
||||
$prev_day = $prev['prev_day'];
|
||||
$first_day = $prev['first_day'];
|
||||
|
||||
$first_month= $prev['first_month'];
|
||||
$first_year = $prev['first_year'];
|
||||
$week = $prev['week'];
|
||||
|
||||
$day = (int) $day;
|
||||
$next = dol_get_next_week($day, $week, $month, $year);
|
||||
$next = dol_get_next_week($first_day, $week, $first_month, $first_year);
|
||||
$next_year = $next['year'];
|
||||
$next_month = $next['month'];
|
||||
$next_day = $next['day'];
|
||||
|
||||
// Define firstdaytoshow and lastdaytoshow
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year);
|
||||
$lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year);
|
||||
$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year);
|
||||
$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd');
|
||||
|
||||
$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year));
|
||||
|
||||
@@ -870,39 +871,27 @@ elseif ($action == 'show_week') // View by week
|
||||
}
|
||||
echo " </tr>\n";
|
||||
|
||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||
//var_dump($eventarray);
|
||||
//print $tmpday;
|
||||
|
||||
echo " <tr>\n";
|
||||
|
||||
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
||||
{
|
||||
if(($tmpday <= $max_day_in_month))
|
||||
{
|
||||
// Show days of the current week
|
||||
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
|
||||
// Show days of the current week
|
||||
$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');
|
||||
$tmparray = dol_getdate($curtime,'fast');
|
||||
$tmpday = $tmparray['mday'];
|
||||
$tmpmonth = $tmparray['mon'];
|
||||
$tmpyear = $tmparray['year'];
|
||||
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
$today=0;
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||
if ($today) $style='cal_today';
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
$today=0;
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||
if ($today) $style='cal_today';
|
||||
|
||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo " </td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month_right';
|
||||
echo ' <td class="'.$style.' nowrap" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo "</td>\n";
|
||||
}
|
||||
$tmpday++;
|
||||
echo ' <td class="'.$style.'" width="14%" valign="top">';
|
||||
show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300);
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " </tr>\n";
|
||||
|
||||
@@ -966,7 +955,7 @@ llxFooter();
|
||||
* @param int $year Year
|
||||
* @param int $monthshown Current month shown in calendar view
|
||||
* @param string $style Style to use for this day
|
||||
* @param array &$eventarray Array of events
|
||||
* @param array $eventarray Array of events
|
||||
* @param int $maxprint Nb of actions to show each day on month view (0 means no limit)
|
||||
* @param int $maxnbofchar Nb of characters to show for event line
|
||||
* @param string $newparam Parameters on current URL
|
||||
|
||||
@@ -195,7 +195,7 @@ if ($resql)
|
||||
$head = calendars_prepare_head('');
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans('Events'), 0, 'list');
|
||||
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,-1);
|
||||
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,-1,$actioncode);
|
||||
dol_fiche_end();
|
||||
|
||||
// Add link to show birthdays
|
||||
|
||||
@@ -79,17 +79,21 @@ $object = new Societe($db);
|
||||
$parameters = array('socid' => $id);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some
|
||||
|
||||
//Some actions show a "cancel" input submit button with name="cancel"
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
|
||||
if ($action == 'setcustomeraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesgs[]=join(',',$object->errors);
|
||||
if (!$cancelbutton) {
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesgs[]=join(',',$object->errors);
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
|
||||
// conditions de reglement
|
||||
@@ -139,10 +143,14 @@ if ($action == 'cstc')
|
||||
// Update communication level
|
||||
if ($action == 'setOutstandingBill')
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit=GETPOST('OutstandingBill');
|
||||
$result=$object->set_OutstandingBill($user);
|
||||
if ($result < 0) setEventMessage($object->error,'errors');
|
||||
if (!$cancelbutton) {
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit = GETPOST('OutstandingBill');
|
||||
$result = $object->set_OutstandingBill($user);
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -821,11 +829,11 @@ if ($id > 0)
|
||||
/*
|
||||
* Barre d'actions
|
||||
*/
|
||||
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
|
||||
|
||||
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
|
||||
@@ -933,4 +941,3 @@ dol_htmloutput_mesg('',$mesgs);
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -612,12 +612,12 @@ else if ($action == 'addline' && $user->rights->propal->creer) {
|
||||
// On defini prix unitaire
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->client->price_level)
|
||||
{
|
||||
$pu_ht = $prod->multiprices [$object->client->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
$pu_ht = $prod->multiprices[$object->client->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-214 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -413,7 +413,15 @@ class Propal extends CommonObject
|
||||
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// Mise en option de la ligne
|
||||
@@ -565,7 +573,15 @@ class Propal extends CommonObject
|
||||
$this->line->skip_update_total = $skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
$this->line->date_start=$date_start;
|
||||
@@ -797,7 +813,10 @@ class Propal extends CommonObject
|
||||
$fk_parent_line,
|
||||
$this->lines[$i]->fk_fournprice,
|
||||
$this->lines[$i]->pa_ht,
|
||||
$this->lines[$i]->label
|
||||
$this->lines[$i]->label,
|
||||
$this->lines[$i]->date_start,
|
||||
$this->lines[$i]->date_end,
|
||||
$this->lines[$i]->array_options
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@@ -932,6 +951,10 @@ class Propal extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = dol_clone($this);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 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
|
||||
@@ -27,6 +28,8 @@
|
||||
|
||||
<?php
|
||||
|
||||
global $user;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
@@ -52,17 +55,23 @@ foreach($linkedObjectBlock as $object)
|
||||
<a href="<?php echo DOL_URL_ROOT.'/comm/propal.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowPropal"),"propal").' '.$object->ref; ?></a></td>
|
||||
<td><?php echo $object->ref_client; ?></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->propale->lire) {
|
||||
$total = $total + $object->total_ht;
|
||||
echo price($object->total_ht);
|
||||
} ?></td>
|
||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total = $total + $object->total_ht;
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="3"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->propale->lire) {
|
||||
echo price($total);
|
||||
} ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU *General Public License as published by
|
||||
* 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.
|
||||
*
|
||||
@@ -291,6 +291,13 @@ class Commande extends CommonOrder
|
||||
}
|
||||
}
|
||||
|
||||
// Set new ref and current status
|
||||
if (! $error)
|
||||
{
|
||||
$this->ref = $num;
|
||||
$this->statut = 1;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Appel des triggers
|
||||
@@ -301,13 +308,6 @@ class Commande extends CommonOrder
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
// Set new ref and current status
|
||||
if (! $error)
|
||||
{
|
||||
$this->ref = $num;
|
||||
$this->statut = 1;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
@@ -725,7 +725,8 @@ class Commande extends CommonOrder
|
||||
$fk_parent_line,
|
||||
$this->lines[$i]->fk_fournprice,
|
||||
$this->lines[$i]->pa_ht,
|
||||
$this->lines[$i]->label
|
||||
$this->lines[$i]->label,
|
||||
$this->lines[$i]->array_options
|
||||
);
|
||||
if ($result < 0)
|
||||
{
|
||||
@@ -863,6 +864,10 @@ class Commande extends CommonOrder
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = dol_clone($this);
|
||||
|
||||
@@ -893,6 +898,13 @@ class Commande extends CommonOrder
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
|
||||
// Set ref
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/commande/".$conf->global->COMMANDE_ADDON.'.php';
|
||||
$obj = $conf->global->COMMANDE_ADDON;
|
||||
$modCommande = new $obj;
|
||||
$this->ref = $modCommande->getNextValue($objsoc,$this);
|
||||
|
||||
|
||||
// Create clone
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
@@ -980,7 +992,12 @@ class Commande extends CommonOrder
|
||||
$line->marge_tx = $marginInfos[1];
|
||||
$line->marque_tx = $marginInfos[2];
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
// get extrafields from original line
|
||||
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||
$line->array_options[$options_key] = $value;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
$this->socid = $object->socid;
|
||||
@@ -999,6 +1016,11 @@ class Commande extends CommonOrder
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
|
||||
// get extrafields from original line
|
||||
$object->fetch_optionals($object->id);
|
||||
foreach($object->array_options as $options_key => $value)
|
||||
$this->array_options[$options_key] = $value;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||
if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects))
|
||||
@@ -1192,7 +1214,15 @@ class Commande extends CommonOrder
|
||||
$this->line->date_end=$date_end;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// TODO Ne plus utiliser
|
||||
@@ -2399,7 +2429,15 @@ class Commande extends CommonOrder
|
||||
$this->line->skip_update_total=$skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
//by external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
// TODO deprecated
|
||||
|
||||
@@ -156,7 +156,7 @@ if ($resql)
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>';
|
||||
|
||||
|
||||
$result='';
|
||||
$lien=$lienfin='';
|
||||
$lien = '<a href="'.dol_buildpath('/commande/orderstoinvoice.php',1).'?socid='.$obj->rowid.'">';
|
||||
@@ -164,7 +164,7 @@ if ($resql)
|
||||
$name=$obj->nom;
|
||||
$result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
|
||||
$result.=$lien.(dol_trunc($name,$maxlen)).$lienfin;
|
||||
|
||||
|
||||
print $result;
|
||||
print '</td>';
|
||||
print '<td>'.$obj->town.' </td>';
|
||||
@@ -185,7 +185,7 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
|
||||
@@ -269,10 +269,12 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
|
||||
if (! $error) {
|
||||
if (! $error)
|
||||
{
|
||||
$object_id = $object->create($user);
|
||||
|
||||
if ($object_id > 0) {
|
||||
if ($object_id > 0)
|
||||
{
|
||||
dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
|
||||
|
||||
$classname = ucfirst($subelement);
|
||||
@@ -280,15 +282,20 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
||||
|
||||
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
|
||||
$result = $srcobject->fetch($object->origin_id);
|
||||
if ($result > 0) {
|
||||
if ($result > 0)
|
||||
{
|
||||
$lines = $srcobject->lines;
|
||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines'))
|
||||
$lines = $srcobject->fetch_lines();
|
||||
{
|
||||
$srcobject->fetch_lines();
|
||||
$lines = $srcobject->lines;
|
||||
}
|
||||
|
||||
$fk_parent_line = 0;
|
||||
$num = count($lines);
|
||||
|
||||
for($i = 0; $i < $num; $i ++) {
|
||||
for($i = 0; $i < $num; $i ++)
|
||||
{
|
||||
$label = (! empty($lines [$i]->label) ? $lines [$i]->label : '');
|
||||
$desc = (! empty($lines [$i]->desc) ? $lines [$i]->desc : $lines [$i]->libelle);
|
||||
$product_type = (! empty($lines [$i]->product_type) ? $lines [$i]->product_type : 0);
|
||||
@@ -581,8 +588,8 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
|
||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ $langs->load("sendings");
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
$comid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$comid = GETPOST("id",'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'commande',$comid,'');
|
||||
|
||||
@@ -47,8 +47,8 @@ $result=restrictedArea($user,'commande',$comid,'');
|
||||
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||
|
||||
$commande = new Commande($db);
|
||||
$commande->fetch($_GET["id"]);
|
||||
$commande->info($_GET["id"]);
|
||||
$commande->fetch($comid);
|
||||
$commande->info($comid);
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($commande->socid);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ $langs->load('companies');
|
||||
if (! $user->rights->facture->creer)
|
||||
accessforbidden();
|
||||
|
||||
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
|
||||
$id = (GETPOST('id')?GETPOST('id','int'):GETPOST("facid")); // For backward compatibility
|
||||
$ref = GETPOST('ref','alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
$confirm = GETPOST('confirm','alpha');
|
||||
@@ -97,7 +97,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('products');
|
||||
$langs->load('main');
|
||||
@@ -213,13 +213,17 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
|
||||
$result=$objectsrc->fetch($orders_id[$ii]);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($closeOrders)
|
||||
if ($closeOrders)
|
||||
{
|
||||
$objectsrc->classifyBilled();
|
||||
$objectsrc->setStatut(3);
|
||||
}
|
||||
$lines = $objectsrc->lines;
|
||||
if (empty($lines) && method_exists($objectsrc,'fetch_lines')) $lines = $objectsrc->fetch_lines();
|
||||
if (empty($lines) && method_exists($objectsrc, 'fetch_lines'))
|
||||
{
|
||||
$objectsrc->fetch_lines();
|
||||
$lines = $objectsrc->lines;
|
||||
}
|
||||
$fk_parent_line=0;
|
||||
$num=count($lines);
|
||||
for ($i=0;$i<$num;$i++)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 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
|
||||
@@ -22,6 +23,8 @@
|
||||
|
||||
<?php
|
||||
|
||||
global $user;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
@@ -47,17 +50,23 @@ foreach($linkedObjectBlock as $object)
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/commande/fiche.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->commande->lire) {
|
||||
$total = $total + $object->total_ht;
|
||||
echo price($object->total_ht);
|
||||
} ?></td>
|
||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total = $total + $object->total_ht;
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="2"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->commande->lire) {
|
||||
echo price($total);
|
||||
} ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -259,17 +259,22 @@ if ($id > 0 || ! empty($ref))
|
||||
//Total pages
|
||||
$totalPages = ceil($total_lines/$viewline);
|
||||
|
||||
if ($page > 0)
|
||||
{
|
||||
$limitsql = ($totalPages - $page) * $viewline;
|
||||
if ($limitsql < $viewline) $limitsql = $viewline;
|
||||
$nbline = $limitsql;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($totalPages == 0) {
|
||||
$page = 0;
|
||||
$limitsql = $nbline;
|
||||
} else {
|
||||
|
||||
if ($page > 0) {
|
||||
$limitsql = ($totalPages - $page) * $viewline;
|
||||
if ($limitsql < $viewline) {
|
||||
$limitsql = $viewline;
|
||||
}
|
||||
$nbline = $limitsql;
|
||||
} else {
|
||||
$page = 0;
|
||||
$limitsql = $nbline;
|
||||
}
|
||||
}
|
||||
|
||||
//print $limitsql.'-'.$page.'-'.$viewline;
|
||||
|
||||
// Onglets
|
||||
@@ -467,7 +472,7 @@ if ($id > 0 || ! empty($ref))
|
||||
// VAT
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='payment_vat'";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."tva as t ON bu2.url_id = t.rowid";
|
||||
|
||||
|
||||
// Salary payment
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu3 ON bu3.fk_bank = b.rowid AND bu3.type='payment_salary'";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as sal ON bu3.url_id = sal.rowid";
|
||||
|
||||
@@ -34,7 +34,7 @@ $langs->load("categories");
|
||||
$langs->load("bills");
|
||||
|
||||
$action=GETPOST('action');
|
||||
$id=GETPOST('id');
|
||||
$id=GETPOST('id','int');
|
||||
$ref=GETPOST('ref');
|
||||
|
||||
// Security check
|
||||
|
||||
@@ -164,7 +164,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$sql.= " ORDER BY dlr ASC";
|
||||
|
||||
// Supplier invoices
|
||||
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
|
||||
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref as ref, ff.ref_supplier as ref_supplier, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
|
||||
$sql2.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";
|
||||
@@ -260,12 +260,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
|
||||
if ($obj->family == 'invoice_supplier')
|
||||
{
|
||||
// TODO This code is to avoid to count suppliers credit note (ff.type = 2)
|
||||
// Ajouter gestion des avoirs fournisseurs, champ
|
||||
if (($obj->total_ttc < 0 && $obj->type != 2)
|
||||
|| ($obj->total_ttc > 0 && $obj->type == 2))
|
||||
$showline=1;
|
||||
// Uncomment this line to avoid to count suppliers credit note (ff.type = 2)
|
||||
//$showline=(($obj->total_ttc < 0 && $obj->type != 2) || ($obj->total_ttc > 0 && $obj->type == 2))
|
||||
if ($showline)
|
||||
{
|
||||
$facturefournstatic->ref=$obj->ref;
|
||||
$ref=$obj->ref;
|
||||
$facturefournstatic->ref=$ref;
|
||||
$facturefournstatic->id=$obj->objid;
|
||||
$facturefournstatic->type=$obj->type;
|
||||
$ref = $facturefournstatic->getNomUrl(1,'');
|
||||
@@ -304,7 +305,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
if ($paiement) $total_ttc = $obj->total_ttc - $paiement;
|
||||
$solde += $total_ttc;
|
||||
|
||||
// We discard with a remain to pay to 0
|
||||
// We discard lines with a remainder to pay to 0
|
||||
if (price2num($total_ttc) != 0)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
@@ -111,7 +111,7 @@ if ($conf->salaries->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@@ -144,7 +144,7 @@ if ($conf->salaries->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
@@ -174,7 +174,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"cs.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@@ -304,7 +304,7 @@ if ($conf->tax->enabled)
|
||||
$total = 0 ;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="140px"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder);
|
||||
@@ -337,7 +337,7 @@ if ($conf->tax->enabled)
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
|
||||
@@ -56,6 +56,7 @@ $search_ref=GETPOST('search_ref','alpha');
|
||||
*/
|
||||
|
||||
$tripandexpense_static=new Deplacement($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
@@ -132,12 +133,23 @@ if ($resql)
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
// Id
|
||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.'</a></td>';
|
||||
// Type
|
||||
print '<td>'.$langs->trans($obj->type).'</td>';
|
||||
// Date
|
||||
print '<td>'.dol_print_date($db->jdate($obj->dd),'day').'</td>';
|
||||
print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->firstname.' '.$obj->name.'</a></td>';
|
||||
// User
|
||||
print '<td align="left">';
|
||||
$userstatic->id = $obj->rowid;
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
if ($obj->socid) print '<td>'.$soc->getNomUrl(1).'</td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
print '<td align="right">'.$obj->km.'</td>';
|
||||
|
||||
$tripandexpense_static->statut=$obj->fk_statut;
|
||||
|
||||
@@ -248,18 +248,23 @@ else if ($action == 'setmode' && $user->rights->facture->creer) {
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setinvoicedate' && $user->rights->facture->creer) {
|
||||
else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$old_date_lim_reglement = $object->date_lim_reglement;
|
||||
$object->date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
|
||||
$date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
|
||||
if (empty($date))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate');
|
||||
exit;
|
||||
}
|
||||
$object->date=$date;
|
||||
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
||||
if ($new_date_lim_reglement > $old_date_lim_reglement)
|
||||
$object->date_lim_reglement = $new_date_lim_reglement;
|
||||
if ($object->date_lim_reglement < $object->date)
|
||||
$object->date_lim_reglement = $object->date;
|
||||
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement;
|
||||
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date;
|
||||
$result = $object->update($user);
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
||||
@@ -267,18 +272,14 @@ else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
||||
$object->cond_reglement_code = 0; // To clean property
|
||||
$object->cond_reglement_id = 0; // To clean property
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
|
||||
$old_date_lim_reglement = $object->date_lim_reglement;
|
||||
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
||||
if ($new_date_lim_reglement > $old_date_lim_reglement)
|
||||
$object->date_lim_reglement = $new_date_lim_reglement;
|
||||
if ($object->date_lim_reglement < $object->date)
|
||||
$object->date_lim_reglement = $object->date;
|
||||
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement;
|
||||
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date;
|
||||
$result = $object->update($user);
|
||||
if ($result < 0)
|
||||
dol_print_error($db, $object->error);
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
|
||||
@@ -923,7 +924,11 @@ else if ($action == 'add' && $user->rights->facture->creer)
|
||||
if ($result > 0)
|
||||
{
|
||||
$lines = $srcobject->lines;
|
||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines')) $lines = $srcobject->fetch_lines();
|
||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines'))
|
||||
{
|
||||
$srcobject->fetch_lines();
|
||||
$lines = $srcobject->lines;
|
||||
}
|
||||
|
||||
$fk_parent_line=0;
|
||||
$num=count($lines);
|
||||
@@ -1143,12 +1148,12 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
// We define price for product
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level))
|
||||
{
|
||||
$pu_ht = $prod->multiprices [$object->client->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
$pu_ht = $prod->multiprices[$object->client->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||
}
|
||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
@@ -2210,7 +2215,7 @@ if ($action == 'create')
|
||||
|
||||
// Payment mode
|
||||
print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
|
||||
$form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id');
|
||||
$form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id', 'CRDT');
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
@@ -3150,10 +3155,13 @@ if ($action == 'create')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editmode') {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
||||
} else {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'none');
|
||||
if ($action == 'editmode')
|
||||
{
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT');
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none', 'CRDT');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -420,4 +420,3 @@ elseif (file_exists($fileimagebis))
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
@@ -391,7 +391,7 @@ class Facture extends CommonInvoice
|
||||
$this->lines[$i]->fk_fournprice,
|
||||
$this->lines[$i]->pa_ht,
|
||||
$this->lines[$i]->label,
|
||||
''
|
||||
$this->lines[$i]->array_options
|
||||
);
|
||||
if ($result < 0)
|
||||
{
|
||||
@@ -593,6 +593,10 @@ class Facture extends CommonInvoice
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// get extrafields so they will be clone
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = dol_clone($this);
|
||||
|
||||
@@ -721,6 +725,11 @@ class Facture extends CommonInvoice
|
||||
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
|
||||
$line->pa_ht = $marginInfos[0];
|
||||
|
||||
// get extrafields from original line
|
||||
$object->lines[$i]->fetch_optionals($object->lines[$i]->rowid);
|
||||
foreach($object->lines[$i]->array_options as $options_key => $value)
|
||||
$line->array_options[$options_key] = $value;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
@@ -740,6 +749,11 @@ class Facture extends CommonInvoice
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
|
||||
// get extrafields from original line
|
||||
$object->fetch_optionals($object->id);
|
||||
foreach($object->array_options as $options_key => $value)
|
||||
$this->array_options[$options_key] = $value;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$this->linked_objects[$this->origin] = $this->origin_id;
|
||||
if (! empty($object->other_linked_objects) && is_array($object->other_linked_objects))
|
||||
@@ -1564,11 +1578,11 @@ class Facture extends CommonInvoice
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('BILL_CANCEL',$this,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
$error++;
|
||||
$this->errors=$interface->errors;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
||||
|
||||
}
|
||||
// Fin appel triggers
|
||||
|
||||
@@ -2199,7 +2213,15 @@ class Facture extends CommonInvoice
|
||||
$this->line->skip_update_total = $skip_update_total;
|
||||
|
||||
// infos marge
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
||||
// POS or external module, take lowest buying price
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($fk_product);
|
||||
$this->line->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
} else {
|
||||
$this->line->fk_fournprice = $fk_fournprice;
|
||||
}
|
||||
$this->line->pa_ht = $pa_ht;
|
||||
|
||||
if (is_array($array_option) && count($array_option)>0) {
|
||||
@@ -3463,6 +3485,14 @@ class FactureLigne extends CommonInvoiceLine
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// POS or by external module, take lowest buying price
|
||||
if (!empty($this->fk_product) && empty($this->fk_fournprice) && empty($this->pa_ht)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
$productFournisseur->find_min_price_product_fournisseur($this->fk_product);
|
||||
$this->fk_fournprice = $productFournisseur->product_fourn_price_id;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -3574,7 +3604,7 @@ class FactureLigne extends CommonInvoiceLine
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result = $interface->run_triggers('LINEBILL_INSERT',$this,$user,$langs,$conf);
|
||||
if ($result < 0)
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
$this->errors=$interface->errors;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
@@ -142,7 +142,7 @@ if ($object->id > 0)
|
||||
|
||||
/*
|
||||
* Facture
|
||||
*/
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
@@ -450,7 +450,7 @@ if ($object->id > 0)
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
*/
|
||||
print "\n<div class=\"tabsAction\">\n";
|
||||
|
||||
// Add a withdraw request
|
||||
@@ -467,7 +467,11 @@ if ($object->id > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($num == 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
if ($num == 0)
|
||||
{
|
||||
if ($object->statut > 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 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
|
||||
@@ -22,6 +23,8 @@
|
||||
|
||||
<?php
|
||||
|
||||
global $user;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
@@ -47,16 +50,22 @@ foreach($linkedObjectBlock as $object)
|
||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->facture->lire) {
|
||||
$total = $total + $object->total_ht;
|
||||
echo price($object->total_ht);
|
||||
} ?></td>
|
||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total = $total + $object->total_ht;
|
||||
}
|
||||
?>
|
||||
<tr class="liste_total">
|
||||
<td align="left" colspan="2"><?php echo $langs->trans("TotalHT"); ?></td>
|
||||
<td align="right"><?php echo price($total); ?></td>
|
||||
<td align="right"><?php
|
||||
if ($user->rights->facture->lire) {
|
||||
echo price($total);
|
||||
} ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -108,8 +108,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$error++;
|
||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
||||
//$error++;
|
||||
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -164,7 +165,7 @@ class BonPrelevement extends CommonObject
|
||||
/**
|
||||
* Add line to withdrawal
|
||||
*
|
||||
* @param int &$line_id id line to add
|
||||
* @param int $line_id id line to add
|
||||
* @param int $client_id id invoice customer
|
||||
* @param string $client_nom name of cliente
|
||||
* @param int $amount amount of invoice
|
||||
@@ -917,7 +918,7 @@ class BonPrelevement extends CommonObject
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||
$sql.= " ref, entity, datec";
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= "'".$ref."'";
|
||||
$sql.= "'".$this->db->escape($ref)."'";
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ", '".$this->db->idate($now)."'";
|
||||
$sql.= ")";
|
||||
@@ -1219,11 +1220,11 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Generate a withdrawal file. Generation Formats:
|
||||
* France: CFONB
|
||||
* Spain: AEB19 (if external module EsAEB is enabled)
|
||||
* Others: Warning message
|
||||
* File is generated with name this->filename
|
||||
* Generate a withdrawal file.
|
||||
* Generation Formats:
|
||||
* - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled)
|
||||
* - Others countries: Warning message
|
||||
* File is generated with name this->filename
|
||||
*
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
@@ -1410,8 +1411,8 @@ class BonPrelevement extends CommonObject
|
||||
fputs($this->file, ' </PmtInf>'.$CrLf);
|
||||
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
|
||||
fputs($this->file, '</Document>'.$CrLf);
|
||||
|
||||
$sql = "SELECT pl.amount";
|
||||
|
||||
/*$sql = "SELECT pl.amount";
|
||||
$sql.= " FROM";
|
||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
|
||||
@@ -1419,14 +1420,14 @@ class BonPrelevement extends CommonObject
|
||||
$sql.= " WHERE pl.fk_prelevement_bons = ".$this->id;
|
||||
$sql.= " AND pl.rowid = pf.fk_prelevement_lignes";
|
||||
$sql.= " AND pf.fk_facture = f.rowid";
|
||||
|
||||
|
||||
//Lines
|
||||
$i = 0;
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
@@ -1437,7 +1438,7 @@ class BonPrelevement extends CommonObject
|
||||
else
|
||||
{
|
||||
$result = -2;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -1574,7 +1575,7 @@ class BonPrelevement extends CommonObject
|
||||
* @param string $row_bic rib.bic AS bic,
|
||||
* @param string $row_datec soc.datec,
|
||||
* @param string $row_drum soc.rowid AS drum
|
||||
* @return void
|
||||
* @return string Return string with SEPA part DrctDbtTxInf
|
||||
*/
|
||||
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
|
||||
{
|
||||
@@ -1598,15 +1599,15 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR .=' </DrctDbtTx>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DbtrAgt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <FinInstnId>'.$CrLf;
|
||||
$XML_DEBITOR .=' <BIC>'.$row_iban.'</BIC>'.$CrLf;
|
||||
$XML_DEBITOR .=' <BIC>'.$row_bic.'</BIC>'.$CrLf;
|
||||
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
||||
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Nm>'.strtoupper($row_nom).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.$row_zip.' '.$row_town.'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
|
||||
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
||||
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
||||
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
||||
@@ -1689,7 +1690,8 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Write sender of request (me)
|
||||
* Write sender of request (me).
|
||||
* Note: The tag PmtInf is opened here but closed into caller
|
||||
*
|
||||
* @param string $configuration conf
|
||||
* @param date $ladate Date
|
||||
|
||||
@@ -78,19 +78,19 @@ $sql.= " AND f.entity = ".$conf->entity;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
if ($search_line)
|
||||
{
|
||||
$sql.= " AND pl.rowid = '".$search_line."'";
|
||||
$sql.= " AND pl.rowid = '".$db->escape($search_line)."'";
|
||||
}
|
||||
if ($search_bon)
|
||||
{
|
||||
$sql.= " AND p.ref LIKE '%".$search_bon."%'";
|
||||
$sql.= " AND p.ref LIKE '%".$db->escape($search_bon)."%'";
|
||||
}
|
||||
if ($search_code)
|
||||
{
|
||||
$sql.= " AND s.code_client LIKE '%".$search_code."%'";
|
||||
$sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
||||
}
|
||||
if ($search_societe)
|
||||
{
|
||||
$sql .= " AND s.nom LIKE '%".$search_societe."%'";
|
||||
$sql .= " AND s.nom LIKE '%".$db->escape($search_societe)."%'";
|
||||
}
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
$sql.=$db->plimit($conf->liste_limit+1, $offset);
|
||||
@@ -104,7 +104,7 @@ if ($result)
|
||||
$urladd = "&statut=".$statut;
|
||||
$urladd .= "&search_bon=".$search_bon;
|
||||
|
||||
print_barre_liste($langs->trans("WithdrawalsLines"), $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
||||
print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
@@ -76,7 +76,8 @@ $sql.= " AND pl.fk_prelevement_bons = p.rowid";
|
||||
$sql.= " AND pl.fk_soc = s.rowid";
|
||||
$sql.= " AND p.entity = ".$conf->entity;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||
$sql.= " ".$db->order($sortfield, $sortorder);
|
||||
$sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
|
||||
@@ -30,7 +30,7 @@ $langs->load("companies");
|
||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||
|
||||
// Security check
|
||||
$socid = $_GET["socid"];
|
||||
$socid = GETPOST("socid",'int');
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -538,6 +539,69 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
/*
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount, u.firstname, u.lastname, p.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||
|
||||
$sql.= " GROUP BY u.rowid";
|
||||
$sql.= " ORDER BY u.firstname";
|
||||
|
||||
dol_syslog("get payment salaries sql=".$sql);
|
||||
$result=$db->query($sql);
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=true;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$total_ht -= $obj->amount;
|
||||
$total_ttc -= $obj->amount;
|
||||
$subtotal_ht += $obj->amount;
|
||||
$subtotal_ttc += $obj->amount;
|
||||
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
|
||||
print "<td>".$langs->trans("Salaries")." <a href=\"".DOL_URL_ROOT."/compta/salaries/index.php?filtre=s.fk_user=".$obj->fk_user."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var]."><td> </td>";
|
||||
print '<td colspan="3">'.$langs->trans("None").'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print '<tr class="liste_total">';
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
||||
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
/*
|
||||
* VAT
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -469,6 +470,44 @@ $parameters["mode"] = $modecompta;
|
||||
$hookmanager->initHooks(array('externalbalance'));
|
||||
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
/*
|
||||
* Salaries
|
||||
*/
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, dm";
|
||||
|
||||
dol_syslog("get social salaries payments sql=".$sql);
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Show result array
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
$sal->num_payment=GETPOST("num_payment");
|
||||
$sal->fk_user_creat=$user->id;
|
||||
|
||||
if (empty($datep) || empty($datesp) || empty($dateep))
|
||||
if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
|
||||
$error++;
|
||||
@@ -219,7 +219,7 @@ if ($action == 'create')
|
||||
print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("DateValue").'</td><td>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
|
||||
print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ $form = new Form($db);
|
||||
$salstatic = new PaymentSalary($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm, s.fk_typepayment as type,";
|
||||
$sql.= " s.num_payment, pst.code as payment_code";
|
||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm, s.fk_typepayment as type, s.num_payment,";
|
||||
$sql.= " pst.code as payment_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
||||
@@ -87,7 +87,7 @@ if ($filtre) {
|
||||
if ($typeid) {
|
||||
$sql .= " AND s.fk_typepayment=".$typeid;
|
||||
}
|
||||
$sql.= " GROUP BY s.rowid, s.fk_typepayment, s.amount, s.datev, s.label";
|
||||
//$sql.= " GROUP BY u.rowid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev, s.fk_typepayment, s.num_payment, pst.code";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit+1,$offset);
|
||||
|
||||
@@ -176,6 +176,7 @@ else
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -300,7 +300,7 @@ if ($id > 0)
|
||||
* Payments
|
||||
*/
|
||||
$sql = "SELECT p.rowid, p.num_paiement, datep as dp, p.amount,";
|
||||
$sql.= "c.libelle as paiement_type";
|
||||
$sql.= "c.code as type_code,c.libelle as paiement_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."c_paiement as c ";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
@@ -333,8 +333,9 @@ if ($id > 0)
|
||||
print "<tr ".$bc[$var]."><td>";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||
print "<td>".$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
|
||||
print "<td>".$labeltype.' '.$objp->num_paiement."</td>\n";
|
||||
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||
print "</tr>";
|
||||
$totalpaye += $objp->amount;
|
||||
$i++;
|
||||
|
||||
@@ -72,6 +72,16 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
$tva->label=GETPOST("label");
|
||||
$tva->note=GETPOST("note");
|
||||
|
||||
if (empty($tva->datev))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateValue")),'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($tva->datep))
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DatePayment")),'errors');
|
||||
$error++;
|
||||
}
|
||||
if (empty($tva->type_payment) || $tva->type_payment < 0)
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors');
|
||||
|
||||
@@ -94,7 +94,7 @@ abstract class ActionsContactCardCommon
|
||||
/**
|
||||
* Load data control
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id of object
|
||||
* @return void
|
||||
*/
|
||||
@@ -228,7 +228,7 @@ abstract class ActionsContactCardCommon
|
||||
/**
|
||||
* Set content of ->tpl array, to use into template
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return string HTML output
|
||||
*/
|
||||
|
||||
@@ -75,7 +75,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
||||
/**
|
||||
* Assign custom values for canvas
|
||||
*
|
||||
* @param string &$action Type of action
|
||||
* @param string $action Type of action
|
||||
* @param int $id Id
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -31,22 +31,22 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
|
||||
$langs->load("companies");
|
||||
|
||||
// Security check
|
||||
$contactid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$contactid = GETPOST("id",'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
$contact->info($_GET["id"]);
|
||||
$contact->fetch($contactid, $user);
|
||||
$contact->info($contactid);
|
||||
|
||||
|
||||
$head = contact_prepare_head($contact);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -41,6 +41,7 @@ class Contrat extends CommonObject
|
||||
public $table_element='contrat';
|
||||
public $table_element_line='contratdet';
|
||||
public $fk_element='fk_contrat';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
@@ -411,7 +412,7 @@ class Contrat extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
||||
if ($ref)
|
||||
{
|
||||
$sql.= " WHERE ref='".$ref."'";
|
||||
$sql.= " WHERE ref='".$this->db->escape($ref)."'";
|
||||
$sql.= " AND entity IN (".getEntity('contract').")";
|
||||
}
|
||||
else $sql.= " WHERE rowid=".$id;
|
||||
@@ -1964,7 +1965,7 @@ class ContratLigne
|
||||
$sql.= " t.commentaire";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as t";
|
||||
if ($id) $sql.= " WHERE t.rowid = ".$id;
|
||||
if ($ref) $sql.= " WHERE t.rowid = '".$ref."'";
|
||||
if ($ref) $sql.= " WHERE t.rowid = '".$this->db->escape($ref)."'";
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
@@ -250,7 +250,11 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
||||
{
|
||||
$srcobject->fetch_thirdparty();
|
||||
$lines = $srcobject->lines;
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
|
||||
if (empty($lines) && method_exists($srcobject,'fetch_lines'))
|
||||
{
|
||||
$srcobject->fetch_lines();
|
||||
$lines = $srcobject->lines;
|
||||
}
|
||||
|
||||
$fk_parent_line=0;
|
||||
$num=count($lines);
|
||||
@@ -337,10 +341,10 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
|
||||
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
@@ -715,7 +719,7 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra
|
||||
$error ++;
|
||||
|
||||
if (! $error) {
|
||||
|
||||
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
@@ -948,7 +952,7 @@ if ($action == 'create')
|
||||
// Other attributes
|
||||
$parameters=array('objectsrc' => $objectsrc,'colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
// Other attributes
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label)) {
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
@@ -1112,7 +1116,7 @@ else
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
$res = $object->fetch_optionals($object->id, $extralabels);
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label)) {
|
||||
foreach ($extrafields->attribute_label as $key => $label) {
|
||||
@@ -1132,16 +1136,16 @@ else
|
||||
if (in_array($extrafields->attribute_type [$key], array('date','datetime'))) {
|
||||
$value = isset($_POST ["options_" . $key]) ? dol_mktime($_POST ["options_" . $key . "hour"], $_POST ["options_" . $key . "min"], 0, $_POST ["options_" . $key . "month"], $_POST ["options_" . $key . "day"], $_POST ["options_" . $key . "year"]) : $db->jdate($object->array_options ['options_' . $key]);
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'edit_extras' && $user->rights->commande->creer && GETPOST('attribute') == $key) {
|
||||
print '<form enctype="multipart/form-data" action="' . $_SERVER["PHP_SELF"] . '" method="post" name="formcontract">';
|
||||
print '<input type="hidden" name="action" value="update_extras">';
|
||||
print '<input type="hidden" name="attribute" value="' . $key . '">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
||||
|
||||
|
||||
print $extrafields->showInputField($key, $value);
|
||||
|
||||
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
print '</form>';
|
||||
} else {
|
||||
@@ -1153,9 +1157,9 @@ else
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
$langs->load("contracts");
|
||||
|
||||
// Security check
|
||||
$contratid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$contratid = GETPOST("id",'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'contrat',$contratid,'');
|
||||
|
||||
@@ -41,8 +41,8 @@ $result = restrictedArea($user, 'contrat',$contratid,'');
|
||||
llxHeader();
|
||||
|
||||
$contrat = new Contrat($db);
|
||||
$contrat->fetch($_GET["id"]);
|
||||
$contrat->info($_GET["id"]);
|
||||
$contrat->fetch($contratid);
|
||||
$contrat->info($contratid);
|
||||
|
||||
$head = contract_prepare_head($contrat);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ $extrasize=GETPOST('size');
|
||||
if (GETPOST('type')=='double' && strpos($extrasize,',')===false) $extrasize='24,8';
|
||||
if (GETPOST('type')=='date') $extrasize='';
|
||||
if (GETPOST('type')=='datetime') $extrasize='';
|
||||
if (GETPOST('type')=='select') $extrasize='';
|
||||
if (GETPOST('type')=='select') $extrasize='';
|
||||
|
||||
|
||||
// Add attribute
|
||||
@@ -87,7 +87,7 @@ if ($action == 'add')
|
||||
$mesg[]=$langs->trans("ErrorNoValueForRadioType");
|
||||
$action = 'create';
|
||||
}
|
||||
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param'))
|
||||
if (((GETPOST('type')=='radio') || (GETPOST('type')=='checkbox')) && GETPOST('param'))
|
||||
{
|
||||
// Construct array for parameter (value of select list)
|
||||
$parameters = GETPOST('param');
|
||||
@@ -95,7 +95,7 @@ if ($action == 'add')
|
||||
foreach($parameters_array as $param_ligne)
|
||||
{
|
||||
if (!empty($param_ligne)) {
|
||||
if (preg_match_all('/,/',$param_ligne,$matches))
|
||||
if (preg_match_all('/,/',$param_ligne,$matches))
|
||||
{
|
||||
if (count($matches[0])>1) {
|
||||
$error++;
|
||||
@@ -104,7 +104,7 @@ if ($action == 'add')
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
@@ -112,12 +112,12 @@ if ($action == 'add')
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// attrname must be alphabetical and lower case only
|
||||
// attrname must be alphabetical and lower case only
|
||||
if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/",$_POST['attrname']))
|
||||
{
|
||||
// Construct array for parameter (value of select list)
|
||||
@@ -139,8 +139,8 @@ if ($action == 'add')
|
||||
list($key,$value) = explode(',',$param_ligne);
|
||||
$params['options'][$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0),$default_value,$params);
|
||||
if ($result > 0)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ if ($action == 'add')
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
setEventMessage($mesg,'errors');
|
||||
}
|
||||
|
||||
@@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -43,5 +43,3 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
|
||||
if ($result < 0) setEventMessage($object->error,'errors');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -65,9 +65,10 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
||||
$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
|
||||
$sql.= ", p.rowid as fk_country, p.code as country_code, p.libelle as country";
|
||||
$sql.= ", d.rowid as fk_county, d.code_departement as county_code, d.nom as county";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_ziptown as z,".MAIN_DB_PREFIX."c_pays as p)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_ziptown as z";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON z.fk_county = d.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."c_pays as p";
|
||||
$sql.= " WHERE z.fk_pays = p.rowid";
|
||||
$sql.= " AND z.active = 1 AND p.active = 1";
|
||||
if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'";
|
||||
@@ -81,8 +82,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
||||
$sql.= ", p.code as country_code, p.libelle as country";
|
||||
$sql.= ", d.code_departement as county_code , d.nom as county";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON fk_departement = d.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid';
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON s.fk_departement = d.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid';
|
||||
$sql.= " WHERE";
|
||||
if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'";
|
||||
if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'";
|
||||
|
||||
@@ -114,7 +114,7 @@ class box_activity extends ModeleBoxes
|
||||
$billurl="viewstatut=2&paye=1&year=".$objp->annee;
|
||||
|
||||
$this->info_box_contents[$i][2] = array('td' => 'align="right"',
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/liste.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
'text' => $objp->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills"
|
||||
);
|
||||
|
||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"',
|
||||
|
||||
@@ -37,12 +37,28 @@ class box_clients extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $param;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for box to show them later
|
||||
*
|
||||
|
||||
@@ -39,11 +39,28 @@ class box_prospect extends ModeleBoxes
|
||||
var $depends = array("societe");
|
||||
|
||||
var $db;
|
||||
var $enabled = 1;
|
||||
|
||||
var $info_box_head = array();
|
||||
var $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data into info_box_contents array to show array later.
|
||||
*
|
||||
|
||||
@@ -125,7 +125,7 @@ class Canvas
|
||||
/**
|
||||
* Shared method for canvas to assign values for templates
|
||||
*
|
||||
* @param string &$action Action string
|
||||
* @param string $action Action string
|
||||
* @param int $id Object id (if ref not provided)
|
||||
* @param string $ref Object ref (if id not provided)
|
||||
* @return void
|
||||
@@ -181,7 +181,7 @@ class Canvas
|
||||
/**
|
||||
* Shared method for canvas to execute actions
|
||||
*
|
||||
* @param string &$action Action string
|
||||
* @param string $action Action string
|
||||
* @param int $id Object id
|
||||
* @return mixed Return return code of doActions of canvas
|
||||
* @deprecated This function is called if you add a doActions class inside your canvas. Try to not
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -609,6 +609,8 @@ abstract class CommonObject
|
||||
|
||||
if (empty($this->socid) && empty($this->fk_soc)) return 0;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
|
||||
$thirdparty = new Societe($this->db);
|
||||
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc);
|
||||
$this->client = $thirdparty; // deprecated
|
||||
@@ -1089,7 +1091,6 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Save a new position (field rang) for details lines.
|
||||
* You can choose to set position for lines with already a position or lines without any position defined.
|
||||
@@ -2039,7 +2040,7 @@ abstract class CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " WHERE entity IN (".getEntity($this->element, 1).")";
|
||||
if (! empty($id)) $sql.= " AND rowid = ".$id;
|
||||
if (! empty($ref)) $sql.= " AND ref = '".$ref."'";
|
||||
if (! empty($ref)) $sql.= " AND ref = '".$this->db->escape($ref)."'";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
@@ -2121,11 +2122,11 @@ abstract class CommonObject
|
||||
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
// Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine)
|
||||
if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key))
|
||||
// Test fetch_array ! is_int($key) because fetch_array result is a mix table with some key as alpha and some key as int (depend db engine)
|
||||
if ($key != 'rowid' && $key != 'tms' && ! is_int($key))
|
||||
{
|
||||
// we can add this attribute to adherent object
|
||||
$this->array_options["options_$key"]=$value;
|
||||
// we can add this attribute to object properties
|
||||
$this->array_options["options_".$key]=$value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2219,10 +2220,10 @@ abstract class CommonObject
|
||||
$this->array_options[$key] = price2num($this->array_options[$key]);
|
||||
break;
|
||||
case 'date':
|
||||
$this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
if (is_numeric($this->array_options[$key])) $this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
break;
|
||||
case 'datetime':
|
||||
$this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
if (is_numeric($this->array_options[$key])) $this->array_options[$key]=$this->db->idate($this->array_options[$key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2236,7 +2237,7 @@ abstract class CommonObject
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field of attribut
|
||||
if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||
if (isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate
|
||||
$sql.=",".$attributeKey;
|
||||
}
|
||||
$sql .= ") VALUES (".$this->id;
|
||||
@@ -2244,7 +2245,7 @@ abstract class CommonObject
|
||||
{
|
||||
$attributeKey = substr($key,8); // Remove 'options_' prefix
|
||||
// Add field o fattribut
|
||||
if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||
if(isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate)
|
||||
{
|
||||
if ($this->array_options[$key] != '')
|
||||
{
|
||||
|
||||
@@ -201,4 +201,3 @@ class dolprintIPP
|
||||
return $ipp->printer_attributes;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -154,7 +154,7 @@ class ExtraFields
|
||||
{
|
||||
$table=$elementtype.'_extrafields';
|
||||
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9_]*$/",$attrname) && ! is_numeric($attrname))
|
||||
{
|
||||
if ($type=='boolean') {
|
||||
$typedb='int';
|
||||
@@ -226,8 +226,7 @@ class ExtraFields
|
||||
// Clean parameters
|
||||
if (empty($pos)) $pos=0;
|
||||
|
||||
|
||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname))
|
||||
{
|
||||
if(is_array($param) and count($param) > 0)
|
||||
{
|
||||
@@ -681,6 +680,7 @@ class ExtraFields
|
||||
}
|
||||
|
||||
$out.='<select class="flat" name="options_'.$key.$keyprefix.'" id="options_'.$key.$keyprefix.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out.='<option value="0"> </option>';
|
||||
foreach ($param['options'] as $key=>$val )
|
||||
{
|
||||
list($val, $parent) = explode('|', $val);
|
||||
@@ -743,15 +743,17 @@ class ExtraFields
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||
{
|
||||
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
|
||||
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
|
||||
}
|
||||
}else {
|
||||
$sqlwhere.= ' WHERE 1';
|
||||
}
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it.
|
||||
$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//print $sql;
|
||||
|
||||
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
||||
@@ -975,11 +977,14 @@ class ExtraFields
|
||||
// Several field into label (eq table:code|libelle:rowid)
|
||||
$fields_label = explode('|',$InfoFieldList[1]);
|
||||
|
||||
if(is_array($fields_label))
|
||||
if(is_array($fields_label) && count($fields_label)>1)
|
||||
{
|
||||
foreach ($fields_label as $field_toshow)
|
||||
{
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
$translabel='';
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
}
|
||||
if ($translabel!=$field_toshow) {
|
||||
$value.=dol_trunc($translabel,18).' ';
|
||||
}else {
|
||||
@@ -989,7 +994,10 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
$translabel='';
|
||||
if (!empty($obj->$InfoFieldList[1])) {
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
}
|
||||
if ($translabel!=$obj->$InfoFieldList[1]) {
|
||||
$value=dol_trunc($translabel,18);
|
||||
}else {
|
||||
@@ -1040,7 +1048,7 @@ class ExtraFields
|
||||
* Fill array_options property of object by extrafields value (using for data sent by forms)
|
||||
*
|
||||
* @param array $extralabels $array of extrafields
|
||||
* @param object &$object Object
|
||||
* @param object $object Object
|
||||
* @param string $onlykey Only following key is filled
|
||||
* @return int 1 if array_options set / 0 if no value
|
||||
*/
|
||||
|
||||
@@ -114,8 +114,8 @@ class HookManager
|
||||
*
|
||||
* @param string $method Name of method hooked ('doActions', 'printSearchForm', 'showInputField', ...)
|
||||
* @param array $parameters Array of parameters
|
||||
* @param Object &$object Object to use hooks on
|
||||
* @param string &$action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
||||
* @param Object $object Object to use hooks on
|
||||
* @param string $action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
||||
* @return mixed For doActions,formObjectOptions,pdf_xxx: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
|
||||
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Deprecated. Must always return an int and things to print into ->resprints.
|
||||
* Can also return some values into an array ->results.
|
||||
@@ -131,6 +131,7 @@ class HookManager
|
||||
// Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated.
|
||||
$hooktype='output';
|
||||
if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win.
|
||||
if ($method =='insertExtraFields') $hooktype='returnvalue';
|
||||
if (in_array(
|
||||
$method,
|
||||
array(
|
||||
|
||||
@@ -1492,9 +1492,9 @@ class Form
|
||||
/**
|
||||
* constructProductListOption
|
||||
*
|
||||
* @param resultset &$objp Resultset of fetch
|
||||
* @param string &$opt Option
|
||||
* @param string &$optJson Option
|
||||
* @param resultset $objp Resultset of fetch
|
||||
* @param string $opt Option
|
||||
* @param string $optJson Option
|
||||
* @param int $price_level Price level
|
||||
* @param string $selected Preselected value
|
||||
* @return void
|
||||
@@ -2329,8 +2329,8 @@ class Form
|
||||
dol_syslog(get_class($this)."::select_type_paiements ".$selected.", ".$htmlname.", ".$filtertype.", ".$format,LOG_DEBUG);
|
||||
|
||||
$filterarray=array();
|
||||
if ($filtertype == 'CRDT') $filterarray=array(0,2);
|
||||
elseif ($filtertype == 'DBIT') $filterarray=array(1,2);
|
||||
if ($filtertype == 'CRDT') $filterarray=array(0,2,3);
|
||||
elseif ($filtertype == 'DBIT') $filterarray=array(1,2,3);
|
||||
elseif ($filtertype != '' && $filtertype != '-1') $filterarray=explode(',',$filtertype);
|
||||
|
||||
$this->load_cache_types_paiements();
|
||||
@@ -3055,12 +3055,13 @@ class Form
|
||||
/**
|
||||
* Affiche formulaire de selection des modes de reglement
|
||||
*
|
||||
* @param string $page Page
|
||||
* @param int $selected Id mode pre-selectionne
|
||||
* @param string $htmlname Name of select html field
|
||||
* @param string $page Page
|
||||
* @param int $selected Id mode pre-selectionne
|
||||
* @param string $htmlname Name of select html field
|
||||
* @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
|
||||
* @return void
|
||||
*/
|
||||
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id')
|
||||
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='')
|
||||
{
|
||||
global $langs;
|
||||
if ($htmlname != "none")
|
||||
@@ -3070,7 +3071,7 @@ class Form
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
print '<tr><td>';
|
||||
$this->select_types_paiements($selected,$htmlname);
|
||||
$this->select_types_paiements($selected,$htmlname,$filtertype);
|
||||
print '</td>';
|
||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
@@ -4079,7 +4080,7 @@ class Form
|
||||
/**
|
||||
* Return HTML code to output a barcode
|
||||
*
|
||||
* @param Object &$object Object containing data to retrieve file name
|
||||
* @param Object $object Object containing data to retrieve file name
|
||||
* @param int $width Width of photo
|
||||
* @return string HTML code to output barcode
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user