Compare commits

...

383 Commits
3.6.0 ... 3.6.2

Author SHA1 Message Date
Laurent Destailleur
c7937a9962 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-12-27 02:22:09 +01:00
Laurent Destailleur
953e736a97 Prepare version 3.6.2 2014-12-27 02:21:37 +01:00
Juanjo Menent
d40229e9cc Fix: Bad order field value 2014-12-26 09:14:19 +01:00
Laurent Destailleur
75dbcf4a78 Fixed: doxygen 2014-12-26 04:35:48 +01:00
Laurent Destailleur
d18770c1e7 Merge remote-tracking branch 'origin/3.5' into 3.6 2014-12-26 04:16:08 +01:00
Laurent Destailleur
490b0c5f3a Merge branch 'marcosgdf-bug-1768' into 3.5 2014-12-26 04:13:36 +01:00
Laurent Destailleur
77e48f8c3e Merge branch 'bug-1768' of https://github.com/marcosgdf/dolibarr into marcosgdf-bug-1768 2014-12-26 04:12:58 +01:00
Laurent Destailleur
882fd9a798 Merge branch 'marcosgdf-bug-1757' into 3.5 2014-12-26 04:11:30 +01:00
Laurent Destailleur
38c9d39c2b Merge branch 'bug-1757' of https://github.com/marcosgdf/dolibarr into
marcosgdf-bug-1757

Conflicts:
	ChangeLog
2014-12-26 04:11:15 +01:00
Laurent Destailleur
4e2c321e4d Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5
Conflicts:
	ChangeLog
2014-12-26 04:09:08 +01:00
Laurent Destailleur
83e34a1c4e Merge branch 'marcosgdf-bug-1769' into 3.5 2014-12-26 04:07:53 +01:00
Laurent Destailleur
f31bf5d80e Merge pull request #2175 from marcosgdf/bug-1752
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
2014-12-26 03:49:02 +01:00
Laurent Destailleur
ade688b589 Merge pull request #2174 from marcosgdf/bug-1723
Fix [ bug #1723 ] Draft tasks?
2014-12-26 03:48:15 +01:00
Laurent Destailleur
b2d27a7d25 Merge pull request #2173 from marcosgdf/translation
Fixed string not translated in linked objects of a project
2014-12-26 03:47:56 +01:00
Marcos García de La Fuente
8e47fe9e1c Fix: [ bug #1757 ] Sorting breaks product/service statistics 2014-12-26 00:19:09 +01:00
Marcos García de La Fuente
1d39c1acc2 Fix: [ bug #1768 ] PHP Warning when error connecting to a PostgreSQL server in install script 2014-12-26 00:12:16 +01:00
Marcos García de La Fuente
f4def9ea28 Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers 2014-12-26 00:07:24 +01:00
Laurent Destailleur
f3fded2a0a Merge pull request #2171 from marcosgdf/bug-1649
Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify
2014-12-25 23:25:22 +01:00
Laurent Destailleur
6c67df0698 Merge branch 'marcosgdf-bug-1731' into 3.6 2014-12-25 23:21:55 +01:00
Laurent Destailleur
224fa14e16 Merge branch 'bug-1731' of https://github.com/marcosgdf/dolibarr into
marcosgdf-bug-1731

Conflicts:
	ChangeLog
2014-12-25 23:21:48 +01:00
Laurent Destailleur
33045668cd Merge pull request #2168 from frederic34/patch-5
Translation error
2014-12-25 23:19:42 +01:00
Marcos García de La Fuente
c050fe2a27 Merge branch '3.6' into bug-1649
Conflicts:
	ChangeLog
2014-12-25 01:27:57 +01:00
Marcos García de La Fuente
82fa3a447b Merge branch '3.6' into translation 2014-12-25 01:18:58 +01:00
Juanjo Menent
c4a6377af5 Merge pull request #2169 from marcosgdf/bug-1736
Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
2014-12-24 14:27:06 +01:00
Marcos García de La Fuente
416f13c708 Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H 2014-12-23 16:00:04 +01:00
Marcos García de La Fuente
743867b91b Spanish translation 2014-12-23 15:57:30 +01:00
Marcos García de La Fuente
78307a748d Corrected confusing table header in task list 2014-12-23 15:56:29 +01:00
Marcos García de La Fuente
a90a03412a Fixed string not translated in linked objects of a project 2014-12-23 15:43:45 +01:00
Marcos García de La Fuente
3212fd2b27 Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify 2014-12-23 11:00:18 +01:00
Laurent Destailleur
56eddeade1 Fix merge changelog 2014-12-23 02:36:01 +01:00
Marcos García de La Fuente
db30186386 Fix: [ bug #1731 ] Can't use quick navigation on project tasks secondary tabs 2014-12-22 22:52:43 +01:00
Marcos García de La Fuente
46fe2c67e0 Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks 2014-12-22 22:32:05 +01:00
Frédéric FRANCE
748bef6134 Translation error 2014-12-22 20:02:53 +01:00
Laurent Destailleur
321fd47ffc Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-12-20 15:53:06 +01:00
Laurent Destailleur
219cd0f855 Fixed: Translation 2014-12-20 15:52:50 +01:00
Laurent Destailleur
0628f76a2b Merge pull request #2162 from FHenry/3.6
Update odt2pdf.sh
2014-12-20 13:20:53 +01:00
Laurent Destailleur
beaec59ab6 PHPCS 2014-12-20 00:29:53 +01:00
Laurent Destailleur
11368e48fe Update codesniffer to remove travis errors. 2014-12-20 00:11:12 +01:00
Laurent Destailleur
789d588fde Update codesniffer to remove travis errors. 2014-12-19 19:10:41 +01:00
Laurent Destailleur
1c2c1ff3d8 Update codesniffer to remove travis errors. 2014-12-19 19:09:15 +01:00
Laurent Destailleur
0bb431c4d0 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	dev/codesniffer/ruleset.xml
2014-12-19 19:03:05 +01:00
Laurent Destailleur
47cab90336 Update codesniffer to remove travis errors. 2014-12-19 19:01:29 +01:00
HENRY Florian
578c4ca383 Update odt2pdf.sh
Fix odt2pdf.sh
2014-12-19 12:32:43 +01:00
Laurent Destailleur
3debf56c68 Update phpcs 2014-12-18 23:54:39 +01:00
Laurent Destailleur
3c24c1b11a Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-12-18 23:53:39 +01:00
Laurent Destailleur
b1c4d32fbf Update phpcs file 2014-12-18 23:53:17 +01:00
Laurent Destailleur
7ad1553859 Merge pull request #2160 from FHenry/3.6
[ bug #1749 ] Undefined $mailchimp
2014-12-18 22:35:45 +01:00
Florian HENRY
6f43206331 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-12-18 15:42:44 +01:00
Florian HENRY
c209d16881 [ bug #1749 ] Undefined $mailchimp 2014-12-18 15:42:28 +01:00
Laurent Destailleur
2c01a46774 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
	htdocs/paypal/lib/paypal.lib.php
2014-12-18 10:13:25 +01:00
Laurent Destailleur
f5da9b5e33 Merge pull request #2149 from altatof/3.5
FIX: dont put a mess with date and datetime extrafield value if already in right format
2014-12-18 10:04:03 +01:00
Laurent Destailleur
6728ad3c37 Merge pull request #2148 from altatof/fixhook
FIX: hook insertExtraFields must return a returnvalue (0,1,-1)
2014-12-18 10:03:32 +01:00
Laurent Destailleur
4887f51174 Merge pull request #2158 from altatof/fix_fichinter_pdf_pagebreak
FIX: pagebreak on fichinter like in other documents
2014-12-18 10:02:25 +01:00
Laurent Destailleur
615456382d Merge pull request #2157 from altatof/fix_margin_jalon
FIX: avoid milestones in margin calculation
2014-12-18 10:01:11 +01:00
Christophe Battarel
c9f69279c7 FIX: pagebreak on fichinter like in other documents 2014-12-16 16:21:31 +01:00
Christophe Battarel
a4a1a991b8 FIX: avoid milestones in margin calculation 2014-12-15 14:13:57 +01:00
Christophe Battarel
27b47a4f48 FIX: dont put a mess with date and datetime extrafield value if already
in right format (the bug was in propale/order/invoice extrafields,
mainly visible with 2 datetime extrafields)
2014-12-12 14:31:36 +01:00
Christophe Battarel
a1bba472a0 FIX: hook insertExtraFields must return a returnvalue (0,1,-1) 2014-12-12 11:57:20 +01:00
Laurent Destailleur
fbb25eae11 Merge pull request #2138 from aspangaro/3.5-patch1
Correct in activity box
2014-12-10 11:31:48 +01:00
aspangaro
81dc1415de Untranslatable token in activity box 2014-12-09 05:04:39 +01:00
aspangaro
666e66e78f Correct link in activity box 2014-12-09 05:04:12 +01:00
Laurent Destailleur
b11ac14cf0 Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5 2014-12-09 01:13:34 +01:00
Laurent Destailleur
1461072801 Fix: Paypal link were broken dur to SSL v3 closed. 2014-12-09 01:12:52 +01:00
Laurent Destailleur
ae3c83b7dc Merge pull request #2133 from aspangaro/3.6-patch2
#1725 Missing table cells in services list header
2014-12-08 00:06:54 +01:00
Laurent Destailleur
293726c5e8 Merge pull request #2135 from FHenry/3.5
3.5
2014-12-07 23:58:30 +01:00
Florian HENRY
bd8b393d8a Fix [ bug #1740 ] Clone project make task date crazy 2014-12-05 21:25:43 +01:00
Florian HENRY
aaf2cca45f Fix bug n sellist extrafield filtered 2014-12-05 21:25:43 +01:00
Laurent Destailleur
a07852c699 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	build/debian/changelog
	build/exe/doliwamp/doliwamp.iss
	build/rpm/dolibarr_fedora.spec
	build/rpm/dolibarr_generic.spec
	build/rpm/dolibarr_mandriva.spec
	build/rpm/dolibarr_opensuse.spec
	htdocs/filefunc.inc.php
2014-12-04 15:22:08 +01:00
Laurent Destailleur
9e1b0d1abc Prepare 3.5.6 2014-12-04 15:09:47 +01:00
Laurent Destailleur
e21d6b0954 Merge pull request #2131 from aspangaro/3.6-patch
Untranslatable token Calendar in datepicker
2014-12-03 12:16:55 +01:00
Laurent Destailleur
4ff78c09fc Merge pull request #2132 from aspangaro/3.6-patch1
Typo
2014-12-03 12:16:20 +01:00
aspangaro
477aeecdac #1725 Missing table cells in services list header 2014-12-02 22:30:40 +01:00
aspangaro
5a05d4a4b8 Untranslatable token Calendar in datepicker 2014-12-02 20:59:00 +01:00
aspangaro
f6ab7ca0c9 Typo 2014-12-02 20:42:47 +01:00
Laurent Destailleur
a81c483061 Revert "Update objectline_create.tpl.php"
This reverts commit fdac53bfca.
2014-11-28 02:14:25 +01:00
Laurent Destailleur
4be9730518 Merge pull request #2099 from fappels/3.6
Fix: Show sender Country on PDF docs
2014-11-28 00:08:41 +01:00
Francis Appels
b1a4b8e7d0 Fix: [ bug #1624 ] POS set buy price for margin
Use lowest buying price for margin when selling with POS or external
module. A POS user does not worry about suppliers.
2014-11-25 21:20:13 +01:00
Francis Appels
18406fc550 Fix: Show sender Country on PDF docs
Show sender Country on PDF docs when sender Country != receiver Country
2014-11-25 14:26:45 +01:00
Laurent Destailleur
1dbb19e8ef Merge pull request #2058 from defrance69/patch-30
Update objectline_create.tpl.php
2014-11-24 10:57:14 +01:00
Laurent Destailleur
375d9aa336 Merge pull request #2077 from marcosgdf/3.6
Fixed [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
2014-11-23 16:53:07 +01:00
Laurent Destailleur
1f986014f1 Merge remote-tracking branch 'origin/3.5' into 3.6 2014-11-23 16:50:08 +01:00
Laurent Destailleur
bd8391163a Merge pull request #2067 from frederic34/patch-2
Fix bug 1692 Can't update phone_pro with the contact webservice
2014-11-23 16:48:33 +01:00
Laurent Destailleur
989cd87446 Merge pull request #2066 from altatof/fix_margin_recap
FIX: bad margin and buy_price calculation when total_ht = 0 (discount 100%) on a line
2014-11-23 16:48:21 +01:00
Marcos García de La Fuente
dcfaeb6606 Merge remote-tracking branch 'upstream/3.6' into 3.6 2014-11-23 16:04:23 +01:00
Marcos García de La Fuente
7a272afd12 Fixed [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state 2014-11-23 16:03:49 +01:00
Frédéric FRANCE
891f8d9442 Fix bug 1692 Can't update phone_pro with the contact webservice 2014-11-22 19:02:15 +01:00
Laurent Destailleur
9aab62ab36 Merge remote-tracking branch 'origin/3.5' into 3.6 2014-11-22 16:03:09 +01:00
Laurent Destailleur
2f4de2ef75 Merge pull request #2016 from altatof/3.5
FIX: copy extrafields when creating order from propale and creating
2014-11-22 16:02:13 +01:00
BENKE Charles
fdac53bfca Update objectline_create.tpl.php
add label tags for product mode type
2014-11-19 18:53:33 +01:00
Christophe Battarel
7d8cf99d58 FIX: bad margin and buy_price calculation when total_ht = 0 (discount
100%) on a line
2014-11-19 18:19:27 +01:00
Juanjo Menent
3dacdf4e4a Fix: Conflicts and remove duplicate code 2014-11-19 09:41:21 +01:00
Laurent Destailleur
1b24356e0f ssl option is set to CURL_SSLVERSION_TLSv1.
Some site disabled ssl v1 to 3 (ex: paypal).
2014-11-18 17:13:08 +01:00
Christophe Battarel
d0dc792b3c check extrafields before inserting in DB 2014-11-17 11:17:45 +01:00
Laurent Destailleur
01279edfc8 Fixed: [ bug #1570 ] Negative supplier invoices do not appear in bank
planned transactions.
2014-11-16 16:36:32 +01:00
Laurent Destailleur
64a2cce7c0 Merge remote-tracking branch 'origin/3.5' into 3.6 2014-11-16 14:11:19 +01:00
Laurent Destailleur
2aeb0f4f5b Merge pull request #1941 from jfefe/patch-3
Avoid missing class error for fetch_thirdparty method
2014-11-15 12:36:41 +01:00
Laurent Destailleur
314be02e65 Merge pull request #2017 from FHenry/3.6
Fix problem on task creation with chrome for french browser.
2014-11-15 12:10:49 +01:00
Florian HENRY
00c6033e11 Fix display user signature when WYSIWYG is enabled 2014-11-14 13:28:49 +01:00
Florian HENRY
c0a3606a59 Fix problem on task creation with chrome for french browser. 2014-11-12 22:53:23 +01:00
Christophe Battarel
7ed496d7d9 FIX: copy extrafields when creating order from propale and creating
invoice from order
2014-11-12 17:51:26 +01:00
Laurent Destailleur
8cb1818c4e Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-11-08 14:59:02 +01:00
Laurent Destailleur
92cdef71e8 Fix: Graph report rubbish information. Better to have them as option. 2014-11-08 14:58:43 +01:00
Laurent Destailleur
c8b5288782 Merge pull request #2008 from ndrosis/patch-10
Fix : The tva not coming from multi price for invoice
2014-11-07 21:44:37 +01:00
Drosis Nikos
24439eb1a3 Fix : tva not coming from multiprice 2014-11-07 15:31:06 +02:00
Laurent Destailleur
4f08408065 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	ChangeLog
	htdocs/core/class/commonobject.class.php
2014-11-05 16:28:44 +01:00
Laurent Destailleur
31c38cedbc Fix: checkstyle 2014-11-05 16:26:11 +01:00
Laurent Destailleur
606a3f9917 Merge remote-tracking branch 'origin/3.4' into 3.5 2014-11-04 17:54:09 +01:00
Laurent Destailleur
45d57b0492 Merge pull request #1995 from atm-maxime/3.4
Fix : actioncomme report was not filtering by entity...
2014-11-04 17:41:40 +01:00
Laurent Destailleur
420de76b4b Merge pull request #1993 from aspangaro/3.6-patch
GPLv3
2014-11-04 17:40:38 +01:00
Laurent Destailleur
fd8d571d67 Merge pull request #2003 from atm-alexis/3.6
fix bug on thm
2014-11-04 17:36:17 +01:00
Alexis Algoud
d177a2fbb4 fix bug on thm 2014-11-04 16:13:51 +01:00
Laurent Destailleur
ca69bf9d7e Fix: Infinite loop 2014-11-02 21:20:24 +01:00
Laurent Destailleur
627f5694f0 Fix: Infinite loop 2014-11-02 21:19:00 +01:00
Laurent Destailleur
53dfda1413 Fix: Chars - is no more allowed into value for code for extra fields. 2014-11-01 19:34:20 +01:00
Maxime Kohlhaas
ccddf0d1be Fix : actioncomme report was not filtering by entity... 2014-10-31 16:56:14 +01:00
aspangaro
57f49ec5d4 GPLv3 2014-10-30 20:41:08 +01:00
Laurent Destailleur
e3041f45ee Update changelog 2014-10-30 18:08:42 +01:00
Laurent Destailleur
aac24c887f Merge pull request #1973 from jfefe/patch-6
Avoid missing class error for fetch_thirdparty method
2014-10-30 18:07:49 +01:00
Laurent Destailleur
e607a53ca3 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Conflicts:
	ChangeLog
2014-10-30 17:53:38 +01:00
Laurent Destailleur
aac4609f2d Merge branch 'aspangaro-3.6-patch' into 3.6 2014-10-30 17:52:21 +01:00
Laurent Destailleur
5ec2c1c4b3 Merge branch '3.6-patch' of github.com:aspangaro/dolibarr into
aspangaro-3.6-patch

Conflicts:
	ChangeLog
2014-10-30 17:52:08 +01:00
Laurent Destailleur
bb72932601 Merge pull request #1985 from FHenry/3.6
Fix extrafield from list feature where filter is provided
2014-10-30 17:49:03 +01:00
Laurent Destailleur
2517d54196 Merge pull request #1989 from aternatik/fix_resource
Missing translate key into resource module
2014-10-30 17:32:02 +01:00
Laurent Destailleur
106b4a669f id_parent and id_children was not set.
So introduce new method to return same with no risk to break current
working code to address this.
2014-10-30 11:15:13 +01:00
jfefe
e370ffb2d4 Bad function call 2014-10-30 01:33:39 +01:00
jfefe
c5045a75d8 Missing trans key into resource module 2014-10-30 01:16:37 +01:00
Florian HENRY
834a6dc2af webservice Thirdparty parameter lastname for invidual creation is now
lastname and not ref
2014-10-28 16:50:44 +01:00
Florian HENRY
d846dd2431 Fix extrafield from list feature where filter is provided 2014-10-27 19:38:27 +01:00
Laurent Destailleur
badf379489 Fix: [ bug #1618 ] PHP Error thrown when saving a barcode 2014-10-27 01:56:06 +01:00
aspangaro
1405c03f7d Fix: Civility & birthdate wasn't save into adherent module 2014-10-26 06:48:08 +01:00
Laurent Destailleur
41f0920656 Fix for debian 2014-10-24 23:50:10 +02:00
jfefe
29db45c763 Avoid missing class error for fetch_thirdparty method 2014-10-23 01:15:05 +02:00
Laurent Destailleur
e78baab579 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-10-18 16:29:34 +02:00
Laurent Destailleur
48b2d818da Update changelog 2014-10-18 16:29:22 +02:00
Laurent Destailleur
1d0d3ab747 Merge pull request #1943 from ndrosis/patch-9
Fix Error when trying to clone an Order
2014-10-18 16:28:43 +02:00
Laurent Destailleur
3528049348 Merge pull request #1961 from FHenry/3.6
Fix right and error management
2014-10-18 14:15:13 +02:00
Florian HENRY
eeffe4ed34 Reload object when product clone failed (cause of ref already exists) if
not done result is blanck pages (header wannot be rewrite (location
herder index.php) around line 1542
2014-10-16 13:57:07 +02:00
Laurent Destailleur
a94f7dc3ad Revert "Add function dolEscapeXML"
This reverts commit 756b1d31ad.
2014-10-16 01:21:33 +02:00
Laurent Destailleur
efa171819a Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5 2014-10-16 01:19:33 +02:00
Laurent Destailleur
756b1d31ad Add function dolEscapeXML 2014-10-16 01:01:30 +02:00
Florian HENRY
722f6e0db6 Fix right on product list 2014-10-15 15:24:31 +02:00
Regis Houssin
104592b349 Fix: wrong function name 2014-10-12 19:08:34 +02:00
Laurent Destailleur
455bae98ef Fix: box of customer and propsects were not correctly disabled. 2014-10-12 15:49:29 +02:00
Laurent Destailleur
30e27014b8 Fix: box of customer and propsects were not correctly disabled. 2014-10-12 15:49:14 +02:00
Laurent Destailleur
5c07df812d Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-10-12 15:24:33 +02:00
Laurent Destailleur
cbbe909bc5 Fix: Pb in management of "or" ("|") for permission check. 2014-10-12 15:22:07 +02:00
Laurent Destailleur
c5d8012eb1 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/core/lib/date.lib.php
2014-10-12 02:13:38 +02:00
Laurent Destailleur
797ab8a150 Merge pull request #1940 from aternatik/fix-cron
Missing reprogramming task into GUI for cron module.
2014-10-12 02:10:09 +02:00
Laurent Destailleur
c30f13a03d Fix: label of input method not translated. 2014-10-12 02:07:50 +02:00
Laurent Destailleur
ac2ff5c604 Update logs 2014-10-12 01:40:18 +02:00
Laurent Destailleur
3b6618b7f6 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-10-12 01:37:53 +02:00
Laurent Destailleur
dad1e312ab Merge pull request #1939 from atm-maxime/3.6
Fix bug 1588 : relative discount
2014-10-12 01:37:39 +02:00
Laurent Destailleur
c184253951 Update doc 2014-10-11 23:56:45 +02:00
Laurent Destailleur
fc63e8b9dc Fix: ErrorBadValueForParamNotAString error message in price customer
multiprice
2014-10-11 23:55:10 +02:00
Maxime Kohlhaas
ec974cae26 Merge branch '3.6' of github.com:atm-maxime/dolibarr into 3.6 2014-10-09 13:59:27 +02:00
Maxime Kohlhaas
4fd67d725a Fix bug 1588 : relative discount not working anymore 2014-10-09 13:58:43 +02:00
Drosis Nikos
0c7cabbf37 Fix Error when trying to clone an Order 2014-10-06 16:15:11 +03:00
jfefe
6a4468d94e Not need to test if class exists with require_once 2014-10-06 14:18:28 +02:00
jfefe
87fc27c7e6 Avoid missing class error for fetch_thirdparty method 2014-10-06 13:31:01 +02:00
jfefe
fdbf2fb45d Missing reprogramming task into GUI for cron module.
Without this, a new task is never executed (because without datenextrun defined)
2014-10-06 13:28:07 +02:00
Maxime Kohlhaas
386f4bd82e Merge branch '3.6' of github.com:Dolibarr/dolibarr into 3.6 2014-10-06 10:05:48 +02:00
Maxime Kohlhaas
48072c58d7 Fix bug 1588 : relative discount not working anymore 2014-10-06 10:05:27 +02:00
Regis Houssin
692881bf59 Fix: missing $ismultientitymanaged 2014-10-06 09:07:09 +02:00
Laurent Destailleur
c73f4a14ee Fix: Bad days returned by function 2014-10-05 16:17:09 +02:00
Laurent Destailleur
742d0e37ee Fix: Bad month return by function 2014-10-05 12:54:51 +02:00
Laurent Destailleur
d518278166 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/comm/propal.php
	htdocs/comm/propal/class/propal.class.php
	htdocs/commande/fiche.php
	htdocs/compta/facture/class/facture.class.php
2014-10-03 19:17:28 +02:00
Laurent Destailleur
05fe8e45b3 Exclude module dire from package 2014-10-03 19:07:49 +02:00
Laurent Destailleur
b85a835988 Prepare 3.6.1 2014-10-03 19:03:58 +02:00
Laurent Destailleur
a853aed348 Fix: Some fields not visibles. Wrong value for calculated time. 2014-10-03 03:42:11 +02:00
Laurent Destailleur
868809caba Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-10-03 03:22:37 +02:00
Laurent Destailleur
c69565fd69 Fix: column name should not be an numeric 2014-10-03 03:12:39 +02:00
Laurent Destailleur
ebd86f5388 Merge pull request #1931 from ndrosis/patch-8
Fix Lang for Payment Type
2014-10-03 02:47:25 +02:00
Laurent Destailleur
d455ee7b56 Merge pull request #1933 from atm-maxime/3.5
Fix : tva not coming from multiprice
2014-10-03 02:46:22 +02:00
Laurent Destailleur
ae303f34a4 Merge pull request #1935 from FHenry/3.6_fix
3.6 fix -  	Fix trad currency -  Return error message on category creation failure
2014-10-03 02:42:32 +02:00
Florian HENRY
4b28ff005e Return error message on category creation failure 2014-10-02 15:24:40 +02:00
Florian HENRY
d6fc967162 Merge branch '3.6' into 3.6_fix 2014-10-02 15:22:23 +02:00
Florian HENRY
78ec4d595b Fix trad currency 2014-10-02 15:21:49 +02:00
Maxime Kohlhaas
920c9c7251 Fix : tva not coming from multiprice 2014-09-30 17:36:01 +02:00
Drosis Nikos
8c6ce79d9d Fix Lang for Payment Type 2014-09-29 18:15:09 +03:00
Laurent Destailleur
8121aeb0b6 Merge pull request #1914 from aternatik/fix_ldapgrp
Fix: gidNumber ldap attribute was not defined
2014-09-29 16:39:36 +02:00
Laurent Destailleur
2ae776e51b Merge pull request #1915 from FHenry/3.6
add ref_ext into fetch product and add hook into supplier card
2014-09-29 16:02:48 +02:00
Florian HENRY
c7d02aa1df Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-29 15:56:59 +02:00
Laurent Destailleur
c6fc07e412 Merge pull request #1926 from fmarcet/3.6
Fix: Withdrawal total amount is double
2014-09-29 15:41:59 +02:00
Laurent Destailleur
a155fc71e2 Merge pull request #1928 from FHenry/3.6_fixwebservice
3.6 fixwebservice
2014-09-29 15:36:40 +02:00
Florian HENRY
3f23c8956c Merge remote-tracking branch 'origin/3.6' into 3.6_fixwebservice 2014-09-29 11:04:43 +02:00
Florian HENRY
0ee9049374 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-29 10:52:47 +02:00
Laurent Destailleur
6a570222cc Fix: Missing fields into select 2014-09-28 14:21:57 +02:00
Laurent Destailleur
5fdd798e91 Fix: phpcheckstyle from phpcs 1.5.5 (closing tags and & char on
parameter).
2014-09-27 17:13:15 +02:00
Laurent Destailleur
e8b7c9c6bd Fix: doxygen 2014-09-27 16:00:11 +02:00
Laurent Destailleur
05f83dddf0 Fix: packager 2014-09-27 15:23:40 +02:00
Laurent Destailleur
e1ba6ccfc6 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-27 14:51:41 +02:00
Laurent Destailleur
7dcaa61218 Prepare 3.6.1 2014-09-27 13:23:38 +02:00
Laurent Destailleur
b8969edcc5 Prepare 3.6.1 2014-09-27 12:34:45 +02:00
Florian HENRY
96c5771718 Fix web service category 2014-09-26 16:18:32 +02:00
Florian HENRY
249d37a093 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-26 13:52:04 +02:00
fmarcet
7b9f154c29 Fix: Withdrawal total amount is double 2014-09-25 12:45:08 +02:00
Laurent Destailleur
959d463fc5 Merge pull request #1921 from altairis-fr/clone_extra
FIX: clone line extrafields value on quote, order and invoice
2014-09-24 17:44:49 +02:00
Christophe Battarel
2c52de3840 fix missing "," 2014-09-24 12:12:10 +02:00
Christophe Battarel
d1868b643e FIX: clone line extrafields value on quote, order and invoice 2014-09-24 11:47:34 +02:00
Laurent Destailleur
12d15cce9f Merge pull request #1919 from GPCsolutions/fixtimespent
FIX: double header
2014-09-24 01:16:08 +02:00
Raphaël Doursenaud
634d5aa549 FIX: double header 2014-09-23 19:35:45 +02:00
Florian HENRY
fa79f280ea Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-23 12:05:45 +02:00
Florian HENRY
860253759b Add hook for addMorButton into supplier card 2014-09-23 11:59:57 +02:00
Eden
248ef4fd46 Fix: gidNumber ldap attribute was not defined i using posixGroup objectClass 2014-09-23 00:13:51 +02:00
Laurent Destailleur
3b53ccbe44 Merge pull request #1893 from braito4/patch-2
problem with type of product
2014-09-22 23:46:48 +02:00
Florian HENRY
4b74b0529f Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-22 09:36:24 +02:00
Laurent Destailleur
d288b19f4d Merge remote-tracking branch 'origin/3.5' into 3.6 2014-09-19 11:07:15 +02:00
Juanjo Menent
c87e28d5f9 - Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since
3.6.0 in supplier invoices when adding a line
2014-09-19 09:57:35 +02:00
Laurent Destailleur
3a38153889 Typo error 2014-09-18 22:42:43 +02:00
Laurent Destailleur
2c56b85ab7 Merge pull request #1894 from braito4/patch-3
Missing date_start, date_end in webserver server_invoice.php
2014-09-18 17:49:08 +02:00
Laurent Destailleur
4bda5156e0 Merge pull request #1901 from ndrosis/patch-6
Correct view greek language
2014-09-18 17:28:36 +02:00
Laurent Destailleur
ea3d091f03 Merge pull request #1900 from ndrosis/patch-5
Correct view greek language in PDF
2014-09-18 17:25:44 +02:00
Laurent Destailleur
b16b1c2ce0 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/core/lib/functions2.lib.php
	htdocs/langs/en_US/errors.lang
	htdocs/product/class/product.class.php
2014-09-18 10:08:56 +02:00
Laurent Destailleur
015b0d8036 Fix: Bad calculation of total
Fix: Warning message not translated
2014-09-18 10:05:37 +02:00
Juanjo Menent
039105a3f1 Fix: Invoices payments may be older than invoices. fr and es trans 2014-09-18 10:02:03 +02:00
Juanjo Menent
ab83e22a12 Fix: Invoices payments may be older than invoices 2014-09-18 09:57:13 +02:00
Laurent Destailleur
f0ebd7721d Fix: Restore sort feature. Still did not see why previous commit is a
bug fix of dolibarr bug.
2014-09-17 17:49:39 +02:00
Drosis Nikos
a41dc3acd9 Correct view greek language 2014-09-17 18:06:31 +03:00
Drosis Nikos
de6e1c5036 Correct view greek language in PDF 2014-09-17 18:01:59 +03:00
Regis Houssin
f185028707 Fix: remove hook restriction ! 2014-09-17 16:08:14 +02:00
Regis Houssin
c6b5d0f96c Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5 2014-09-17 16:07:21 +02:00
Regis Houssin
d225d92c0b Fix: remove hook restriction ! 2014-09-17 16:03:21 +02:00
Laurent Destailleur
9c54dc57df Save some usefull cleaning requests into repair.sql 2014-09-17 12:31:35 +02:00
Florian HENRY
c570b5fbfc Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-16 20:15:54 +02:00
braito4
144da16391 Missing date_start, date_end in webserver server_invoice.php 2014-09-16 19:42:11 +02:00
braito4
b7ef2db5d9 problem with type of product
the column should be product_type
2014-09-16 19:33:07 +02:00
Laurent Destailleur
2c0a2937f6 Merge pull request #1887 from FHenry/3.5
add refext into fecth product
2014-09-15 23:19:58 +02:00
Laurent Destailleur
05f3a47018 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	build/debian/control
	htdocs/compta/bank/account.php
	htdocs/fourn/paiement/fiche.php
	htdocs/product/class/product.class.php
	htdocs/product/fiche.php
2014-09-15 22:52:59 +02:00
Laurent Destailleur
9c70c2c3d0 Fix: cents for indian ruppes are calle paisa and paise. 2014-09-15 22:43:49 +02:00
Laurent Destailleur
fffb0f1bde Fix: bad translation key 2014-09-15 20:23:04 +02:00
Florian HENRY
ffc550de6d Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-15 09:59:02 +02:00
Florian HENRY
287e2ca032 Add ref_ext into fetch product (else fetch and update set this column to
null)
2014-09-15 09:58:44 +02:00
Florian HENRY
9493e252c9 add refext into fecth product 2014-09-15 09:56:40 +02:00
Laurent Destailleur
76ba3301c3 Fix: Syntax for license key 2014-09-14 22:34:17 +02:00
Laurent Destailleur
d812262ed8 Fix: Missing source 2014-09-14 21:52:52 +02:00
Laurent Destailleur
0dcd41ff01 Merge branch 'marcosgdf-bug-1546' into 3.5 2014-09-14 21:39:42 +02:00
Laurent Destailleur
c4facf20e6 Merge branch 'bug-1546' of github.com:marcosgdf/dolibarr into
marcosgdf-bug-1546

Conflicts:
	ChangeLog
2014-09-14 21:39:25 +02:00
Laurent Destailleur
e8758bc19b Merge branch 'marcosgdf-bug-1548' into 3.5 2014-09-14 21:37:41 +02:00
Laurent Destailleur
822a3ebe7e Merge branch 'bug-1548' of github.com:marcosgdf/dolibarr into
marcosgdf-bug-1548

Conflicts:
	ChangeLog
2014-09-14 21:37:15 +02:00
Laurent Destailleur
e93d474393 Merge branch 'marcosgdf-bug-1555' into 3.5 2014-09-14 21:35:24 +02:00
Laurent Destailleur
ef99de4e84 Merge branch 'bug-1555' of github.com:marcosgdf/dolibarr into
marcosgdf-bug-1555

Conflicts:
	ChangeLog
2014-09-14 21:35:07 +02:00
Laurent Destailleur
85338bacb4 Merge branch 'marcosgdf-bug-1577' into 3.5 2014-09-14 21:32:11 +02:00
Laurent Destailleur
2704f50bd4 Merge branch 'bug-1577' of github.com:marcosgdf/dolibarr into
marcosgdf-bug-1577

Conflicts:
	ChangeLog
2014-09-14 21:31:51 +02:00
Laurent Destailleur
f0d4ebe417 Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5
Conflicts:
	ChangeLog
2014-09-14 21:26:56 +02:00
Laurent Destailleur
fcbb388a72 Merge branch 'marcosgdf-bug-1589' into 3.5 2014-09-14 21:26:04 +02:00
Laurent Destailleur
3daaaadf65 Merge pull request #1880 from marcosgdf/bug-1591
[ bug #1591 ] Linked object block shows Total HT/TTC even if not having permission to read them
2014-09-14 21:24:27 +02:00
Laurent Destailleur
19e017a2c1 Merge pull request #1879 from Cubexed/3.6
-Renamed POST "project" to "projectstart" in fiche.php
2014-09-14 21:16:51 +02:00
Marcos García de La Fuente
7bac9444e6 [ bug #1546 ] Incorrect page number when searching in the list of bank transactions 2014-09-14 14:32:17 +02:00
Marcos García de La Fuente
9426298b95 [ bug #1548 ] Supplier payment card shows type in French 2014-09-14 14:19:46 +02:00
Marcos García de La Fuente
7a28f8e4aa [ bug #1555 ] Update accountancy code of products does not throw PRODUCT_MODIFY trigger 2014-09-14 13:59:06 +02:00
Marcos García de La Fuente
afd631e6e3 [ bug #1577 ] When creating new Private individual third, selected third type is ignored 2014-09-14 13:22:05 +02:00
Marcos García de La Fuente
74e16db632 [ bug #1589 ] Menu type in "Edit menu" page is not translated 2014-09-14 13:14:03 +02:00
Marcos García de La Fuente
949ae2f160 [ bug #1591 ] Linked object block shows Total HT/TTC even if not having permission to read them 2014-09-14 13:09:31 +02:00
Laurent Destailleur
ba70c1a08a Fix: typo on debian files 2014-09-13 20:47:34 +02:00
Laurent Destailleur
f264e25514 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/adherents/liste.php
	htdocs/compta/bank/bankid_fr.php
	htdocs/holiday/index.php
	htdocs/opensurvey/list.php
2014-09-13 19:10:05 +02:00
Laurent Destailleur
09878a3a32 Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5 2014-09-13 19:05:03 +02:00
Laurent Destailleur
8dd9358214 Fix: SQL injection 2014-09-13 19:04:25 +02:00
Cubexed
8a3bc25029 -Renamed POST "project" to "projectstart" to avoid strange behavior at project start date selector, probably the generic name "project" was interfering with something 2014-09-12 17:21:48 +02:00
Laurent Destailleur
98d7ce94b8 Merge pull request #1873 from GPCsolutions/projectfixes
Projectfixes
2014-09-11 17:27:49 +02:00
Laurent Destailleur
dddafacad9 Merge pull request #1871 from KreizIT/3.6
Little fix
2014-09-11 17:15:29 +02:00
Laurent Destailleur
7851587a11 Merge pull request #1869 from FHenry/3.6
Extrafield feature select from table should try to translate multiple column when not needed
2014-09-11 17:13:28 +02:00
Laurent Destailleur
b728ccb52f Merge pull request #1865 from FHenry/3.5
Add missing image into amarok theme
2014-09-11 17:13:06 +02:00
Raphaël Doursenaud
367d225d3e Fixed missing class include for task duplication 2014-09-08 16:13:29 +02:00
Raphaël Doursenaud
c5ccf2998b Fixed forgotten rename 2014-09-08 16:13:03 +02:00
Florian HENRY
3e9b69b17c Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-08 09:57:00 +02:00
Laurent Destailleur
5a93a7620c Upgrade tcpdf to 6.0.093 to get fixes and solve a problem of licence. 2014-09-07 11:00:54 +02:00
Cedric
f62e7d6043 Little fix 2014-09-07 10:07:26 +02:00
Laurent Destailleur
996977a4a8 Fix: Missing user name 2014-09-06 17:10:52 +02:00
Laurent Destailleur
6d9cc15856 Fix: Function unaccent was not enough complete. 2014-09-06 14:40:43 +02:00
Laurent Destailleur
31eb4bda88 Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	htdocs/categories/class/categorie.class.php
	htdocs/compta/facture.php
2014-09-06 00:26:11 +02:00
Laurent Destailleur
522b5a91bc Fix: Filter on direction of payment mode was not working.
Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/fourn/facture/fiche.php
2014-09-06 00:21:09 +02:00
Laurent Destailleur
2b9b110f9c Fix: Filter on direction of payment mode was not working.
Conflicts:
	htdocs/compta/facture.php
	htdocs/core/class/html.form.class.php
	htdocs/fourn/facture/fiche.php
2014-09-06 00:16:24 +02:00
Juanjo Menent
104df1d16d Merge pull request #1866 from aspangaro/3.6
Payment VAT & Salaries :: Add controls on field required
2014-09-05 22:30:03 +02:00
aspangaro
f054d624cd Merge branch 'Upstream/3.6' 2014-09-05 20:59:44 +02:00
aspangaro
71832b5944 Changelog 2014-09-05 20:55:40 +02:00
Laurent Destailleur
0e944b0403 Fix: Pb with week position when week start on sunday. 2014-09-05 15:00:53 +02:00
Laurent Destailleur
e4bff59f1a Fix: pgsql compatibility. No upper cas into field names. 2014-09-04 20:17:25 +02:00
Laurent Destailleur
643fc6c61f Fix: Bad use of fetch_lines
Conflicts:
	htdocs/comm/propal.php
	htdocs/contrat/fiche.php
	htdocs/opensurvey/class/opensurveysondage.class.php
2014-09-04 19:03:48 +02:00
Laurent Destailleur
cd00ec29bf Fix: Dictionnary with one n
Conflicts:
	htdocs/expedition/fiche.php
2014-09-04 19:00:28 +02:00
Florian HENRY
85cabbf921 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Conflicts:
	ChangeLog
2014-09-04 18:29:17 +02:00
Laurent Destailleur
da8a1cb475 Fix: Iban was used instead of Bic into SEPA file.
Fix: Must unaccent strings into SEPA file.
2014-09-04 15:38:20 +02:00
Laurent Destailleur
b88b4fbc2c Fix: bad balance of td 2014-09-04 15:17:15 +02:00
Laurent Destailleur
395209a5db Fix: Reason to have button greyed is wrong
Conflicts:
	htdocs/compta/facture/prelevement.php
2014-09-04 15:17:05 +02:00
aspangaro
4e05afdd66 Payment Salaries :: Add field required & control on it 2014-09-03 21:32:31 +02:00
aspangaro
bd99f3943d Payment VAT :: Add control on field required 2014-09-03 21:31:40 +02:00
Florian HENRY
b04eae95e5 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-03 11:44:37 +02:00
Florian HENRY
b536c8a10c Add missing image into amarok theme 2014-09-03 10:24:41 +02:00
Laurent Destailleur
165856656a Fix: balance with td 2014-09-02 19:45:50 +02:00
Laurent Destailleur
f7c48558e6 Fix: balance with td 2014-09-02 19:45:05 +02:00
Laurent Destailleur
80968bc087 Merge pull request #1857 from aternatik/resource-fix
Fixes for resource module
2014-09-02 19:35:06 +02:00
Laurent Destailleur
257d7c41d6 Merge pull request #1863 from FHenry/3.6
Fix: list event view lost type event filter
2014-09-02 19:34:17 +02:00
Laurent Destailleur
660557b4dd Merge pull request #1862 from FHenry/3.5
Fix: list event view lost type event filter
2014-09-02 19:34:07 +02:00
Laurent Destailleur
0bc511a626 Merge pull request #1850 from braito4/patch-1
Update fiche.php
2014-09-02 19:12:09 +02:00
Laurent Destailleur
576512e339 Merge pull request #1815 from GPCsolutions/catbug
Fix categories bug
2014-09-02 19:05:05 +02:00
Laurent Destailleur
17dec4b924 Fix: Bad merge 2014-09-02 13:05:03 +02:00
Laurent Destailleur
e82e26c6fa Merge remote-tracking branch 'origin/3.5' into 3.6
Conflicts:
	ChangeLog
	htdocs/compta/facture.php
	htdocs/core/js/lib_head.js
2014-09-02 12:57:33 +02:00
Florian HENRY
9b40cc9e89 fix 2014-09-02 12:09:43 +02:00
Florian HENRY
832d1b37c1 Save also code of event 2014-09-02 11:32:38 +02:00
Florian HENRY
911aca399d save code event 2014-09-02 11:30:35 +02:00
Florian HENRY
0dd955875c Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-09-02 11:21:03 +02:00
Florian HENRY
c8a9f4600c Fix: list event view lost type event filter 2014-09-02 11:20:57 +02:00
Florian HENRY
67b308cb25 Fix: list event view lost type event filter 2014-09-02 11:15:01 +02:00
Juanjo Menent
2d0f353529 Merge pull request #1859 from FHenry/3.6
Fix SQL syntax
2014-09-01 22:26:21 +02:00
Florian HENRY
e2fac5dd91 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Conflicts:
	ChangeLog
2014-09-01 19:10:18 +02:00
Florian HENRY
772acd6bf9 Fix missing $user in create method 2014-09-01 18:32:36 +02:00
Juanjo Menent
1f0653dd6d Merge pull request #1860 from FHenry/3.5
Fix missing $user in create method
2014-09-01 18:31:22 +02:00
Juanjo Menent
4372c58714 Fix: Unsubscribe emailing not working 2014-09-01 18:24:25 +02:00
Florian HENRY
db1c97bdad changelog 2014-09-01 11:52:20 +02:00
Florian HENRY
0473bc5138 Fix missing $user into create call categorie 2014-09-01 11:51:16 +02:00
Florian HENRY
bff33166a5 Fix missing $user in create method 2014-09-01 11:49:44 +02:00
Florian HENRY
fd03f582c9 Fix SQL syntax 2014-08-31 12:38:33 +02:00
Laurent Destailleur
20475ba3e8 Fix: sql request not compatible with pgsql
Conflicts:
	htdocs/core/ajax/ziptown.php
2014-08-30 20:19:27 +02:00
Laurent Destailleur
2d14e53b45 Fix: Pb with pgsql 2014-08-30 20:00:42 +02:00
jfefe
b7a2e3783e Fix : missing translations 2014-08-30 11:11:51 +02:00
jfefe
71afc4adb0 Fix : missing actions for resource element 2014-08-30 11:11:32 +02:00
jfefe
2c68317864 Fix : bad sql request when linking resource to an element 2014-08-30 10:23:58 +02:00
Laurent Destailleur
47339d0e62 Fix: Missing field tobuy into service export.
Fix: Filter on date into export.
Fix: Tooltip help.
2014-08-29 20:26:27 +02:00
Laurent Destailleur
47fc72a001 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-08-29 11:18:36 +02:00
Laurent Destailleur
a518a7256c maj copyright 2014-08-29 11:17:38 +02:00
Regis Houssin
ff04729a07 Fix: strict mode 2014-08-28 19:38:18 +02:00
Regis Houssin
1aad1b6acd Fix: strict mode 2014-08-28 19:32:41 +02:00
Regis Houssin
48f9ef2574 Fix: php strict mode saga 2014-08-28 15:53:29 +02:00
Regis Houssin
2c46c20dfb Fix: php strict mode saga 2014-08-28 15:52:58 +02:00
Regis Houssin
714da05034 Fix: another strict mode alert 2014-08-28 15:36:22 +02:00
Regis Houssin
4fdd98c4a7 Fix: another strict mode alert 2014-08-28 15:34:50 +02:00
Juanjo Menent
0e1f22fe26 Fix: Salary payments are not reflected on the reporting sheets 2014-08-28 15:16:14 +02:00
Laurent Destailleur
1505ade3db Fix error management: When an error is returned by hooks into
dol_move_uploaded_file, message must be returned by function as if it
were an error for any other reason.

Conflicts:
	htdocs/core/lib/files.lib.php
2014-08-28 15:14:06 +02:00
Laurent Destailleur
d3a3e8786e Fix: sql request with pgsql 2014-08-28 15:08:24 +02:00
Laurent Destailleur
79b081a7b7 Merge pull request #1845 from Cubexed/patch-1
Fix unable to delete order line
2014-08-28 12:00:21 +02:00
Laurent Destailleur
3064aa2177 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Conflicts:
	htdocs/install/mysql/tables/llx_c_type_resource.key.sql
2014-08-28 11:56:19 +02:00
Laurent Destailleur
f1993e719f Merge pull request #1846 from aspangaro/3.6
Fix :: llx_c_type_resource when you update from a 3.6-beta
2014-08-28 11:55:18 +02:00
Laurent Destailleur
14ec2cd1d9 Merge pull request #1851 from grandoc/3.6
fix : missing translation
2014-08-28 11:53:00 +02:00
Laurent Destailleur
338fc5f2f8 Fix: Bad unique key 2014-08-28 11:46:47 +02:00
Regis Houssin
a446318649 Fix: strict mode anarchy ;-)
check your variable please
2014-08-27 19:03:32 +02:00
Regis Houssin
34561906fc Fix: strict mode anarchy ;-)
check your variable please
2014-08-27 19:03:01 +02:00
Philippe GRAND
08c621037c fix : missing code for extrafields 2014-08-27 11:41:18 +02:00
Philippe GRAND
61ae2f3f37 fix : missing translation 2014-08-27 11:34:24 +02:00
Regis Houssin
0674667932 Fix: error with php strict mode 2014-08-27 10:46:42 +02:00
Regis Houssin
cdd716eb9d Fix: error with php strict mode 2014-08-27 10:44:40 +02:00
Laurent Destailleur
4405f17f22 Update changelog 2014-08-26 23:47:44 +02:00
Laurent Destailleur
12c6752971 Fix: Can upload files on services. 2014-08-26 23:45:02 +02:00
braito4
f5883741bf Update fiche.php
Proyect selection was missing
2014-08-26 20:20:29 +02:00
Laurent Destailleur
21ff810952 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-08-26 15:24:51 +02:00
Laurent Destailleur
1e28fd3541 Fix: syntax error 2014-08-26 15:24:32 +02:00
Regis Houssin
ca7ff0ecfa Fix: error in strict mode 2014-08-26 09:50:26 +02:00
Regis Houssin
28ad819ab4 Fix: error in strict mode 2014-08-26 09:49:15 +02:00
aspangaro
b7daef10c6 Fix llx_c_type_resource when you update from a 3.6-beta 2014-08-26 04:35:22 +02:00
aspangaro
b561d48b5f Merge branch 'Upstream/3.6' 2014-08-26 04:20:46 +02:00
Cubexed
a97241f716 Fix unable to delete order line
Calling trigger without having globalized $conf causes error and cancels delete operation, this commit adds the missing

2014-08-23 16:52:05 ERR     127.0.0.1        Interfaces::run_triggers was called with wrong parameters action=LINEORDER_SUPPLIER_DELETE object=1 user= langs= conf=
2014-08-23 17:05:08 +02:00
Alexis Algoud
a353f816e3 FIX error sql on update ficheinter 2014-08-23 14:33:49 +02:00
Juanjo Menent
4d0301f5df Merge pull request #1844 from atm-alexis/3.5
FIX error sql on update ficheinter
2014-08-23 14:32:25 +02:00
Alexis Algoud
b0163fbed2 FIX error sql on update ficheinter 2014-08-22 16:17:45 +02:00
aspangaro
a2f0866c0c Merge branch 'Upstream/3.6' 2014-08-22 07:07:18 +02:00
Laurent Destailleur
8705dd4d1b Merge branch 'KreizIT-fix_1544' into 3.5 2014-08-21 23:30:04 +02:00
Laurent Destailleur
2cba55758b Merge branch 'fix_1544' of github.com:KreizIT/dolibarr into
KreizIT-fix_1544

Conflicts:
	ChangeLog
2014-08-21 23:29:38 +02:00
Laurent Destailleur
a32791f79d Merge pull request #1839 from aspangaro/3.6
Fix :: Sql problem for fresh install on resource table
2014-08-21 23:20:44 +02:00
Laurent Destailleur
8f18db8e3f Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-08-21 23:19:18 +02:00
Laurent Destailleur
d485e270b9 Fix: menu param is not inside allowed list 2014-08-21 23:19:01 +02:00
Laurent Destailleur
c21b389462 Fix: Pb with focus position with ckeditor 2014-08-21 14:17:27 +02:00
aspangaro
2f4e1f09e6 Fix :: Entries salaries into menu doesn't appears when this module is activated alone - Needed module tax at the moment 2014-08-21 06:47:24 +02:00
aspangaro
03f642e861 Merge branch 'Upstream/3.6' 2014-08-21 06:03:00 +02:00
aspangaro
2aa3995b73 Fix :: Sql problem for fresh install on resource table // Ok in migration script 2014-08-21 06:01:47 +02:00
Laurent Destailleur
ee65e42b1c The "final ref" of an object must be set only once all database actions
are ok. So after trigger call.
If a trigger need to know new information on an object, trigger must
make a fetch on object.

Revert "Fix: define new ref before trigger"

This reverts commit cb2b6e6e40.
2014-08-19 14:57:01 +02:00
Regis Houssin
cb2b6e6e40 Fix: define new ref before trigger 2014-08-18 20:28:58 +02:00
Regis Houssin
9fdfc740de Fix: define new ref before trigger 2014-08-18 20:25:57 +02:00
Laurent Destailleur
50eb2e2c15 Fix: backlink was wrong after deleting product or service. 2014-08-18 18:24:57 +02:00
Regis Houssin
967991f31a Fix: project builddoc trigger is used now 2014-08-18 08:36:58 +02:00
Laurent Destailleur
741c093ac9 Merge pull request #1828 from atm-maxime/3.5
Fix : VAT and NPR rates where coming from multiprice...
2014-08-17 23:36:30 +02:00
Laurent Destailleur
f7e0ef74d7 Bad translation 2014-08-17 20:05:48 +02:00
Laurent Destailleur
4f206a2125 Fix: Missing empty field 2014-08-17 19:27:25 +02:00
Laurent Destailleur
d5eb4510e2 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6 2014-08-17 17:59:30 +02:00
Laurent Destailleur
dd9a08120f Fix: no ' on command to create user on pgsql 2014-08-17 17:13:00 +02:00
Regis Houssin
0632cbdad0 Fix: broken feature: add param for use only "disabled" with delConstant
and "enabled" with setConstant
2014-08-17 15:15:52 +02:00
Regis Houssin
86f1d59e3c Fix: broken feature: add param for use only "disabled" with delConstant
and "enabled" with setConstant
2014-08-17 15:12:20 +02:00
Laurent Destailleur
e7a8de18bf Fix: Minimum size for captcha 2014-08-17 15:05:42 +02:00
Laurent Destailleur
b0ebaec0da Fix: Add more log and missing error message 2014-08-17 12:43:24 +02:00
Maxime Kohlhaas
e760201a59 Merge branch '3.5' of github.com:Dolibarr/dolibarr into 3.5 2014-08-14 14:26:01 +02:00
Maxime Kohlhaas
c6637207f8 Fix : VAT and NPR rates where coming from multiprice... 2014-08-14 14:25:41 +02:00
Raphaël Doursenaud
739d309a0d Updated category fix
Categories ID can be passed as strings
PSR code formatting
2014-08-14 08:46:51 +02:00
Cedric
8670a89ecb Fix #1544: Can remove date from invoice 2014-08-14 08:41:24 +02:00
Raphaël Doursenaud
1a9e98cda9 Fix categories bug
When using the string type,
$typeid == 1 matched all strings making other conditions ineffective.
2014-08-14 08:33:39 +02:00
Laurent Destailleur
0b2a81f4b8 Merge pull request #1821 from astebert/patch-1
Update bills.lang
2014-08-14 00:09:55 +02:00
astebert
9c7647a7ae Update bills.lang
Ligne 252 : Changement grammatical
- de "Paiements issue de l'acompte"
- en "Paiement issu de l'acompte"
2014-08-12 11:45:11 +02:00
371 changed files with 20159 additions and 9245 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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
View File

@@ -0,0 +1 @@
/doliwamp.tmp.iss

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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).

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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
View File

@@ -2,6 +2,7 @@
/custom*
/extensions*
/nltechno*
/teclib*
/bootstrap*
/google*
/multicompany*

View File

@@ -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/
*/
/**

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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;

View File

@@ -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

View File

@@ -534,4 +534,3 @@ print '<br>';
llxFooter();
$db->close();
?>

View File

@@ -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
{

View File

@@ -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">&nbsp;</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">&nbsp;</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>&nbsp;</td></tr>';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td>&nbsp;</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>';

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -143,4 +143,3 @@ print '</table>';
llxFooter();
$db->close();
?>

View File

@@ -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();

View File

@@ -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();

View File

@@ -130,4 +130,3 @@ else
llxFooter();
$db->close();
?>

View File

@@ -379,4 +379,3 @@ print '</table>';
llxFooter();
$db->close();
?>

View File

@@ -118,5 +118,3 @@ print info_admin($langs->trans("SystemInfoDesc")).'<br>';
llxFooter();
$db->close();
?>

View File

@@ -350,4 +350,3 @@ print "<br><br>";
llxFooter();
$db->close();
?>

View File

@@ -166,4 +166,3 @@ if (preg_match('/^confirm/i',$choice))
llxFooter();
$db->close();
?>

View File

@@ -174,4 +174,3 @@ if (! empty($result['return']))
llxFooter();
$db->close();
?>

View File

@@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_b
llxFooter();
$db->close();
?>

View File

@@ -146,4 +146,3 @@ print '</table>';
llxFooter();
$db->close();
?>

View File

@@ -55,6 +55,8 @@ print '</div>';
print '<div class="principal">';
$page=GETPOST('menu','alpha');
if (empty($page)) $page='facturation';
if (in_array(
$page,
array(

View File

@@ -75,4 +75,3 @@ include_once 'affPied.php';
print '</div></div></div>'."\n";
print '</body></html>'."\n";
?>

View File

@@ -191,5 +191,3 @@ $obj_facturation->paiementLe('RESET');
// Affichage des templates
require ('tpl/facturation1.tpl.php');
?>

View File

@@ -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']; ?>" />

View File

@@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
}
print '</li></ul>';
print '</div>';
?>

View File

@@ -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";

View File

@@ -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');
}
}
}

View File

@@ -520,4 +520,3 @@ if($object->type == 4)
llxFooter();
$db->close();
?>

View File

@@ -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
}
?>

View File

@@ -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

View File

@@ -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

View File

@@ -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();
?>

View File

@@ -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))
{

View File

@@ -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);

View File

@@ -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>&nbsp;</td>
</tr>
</table>

View File

@@ -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

View File

@@ -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.'&nbsp;</td>';
@@ -185,7 +185,7 @@ else
dol_print_error($db);
}
llxFooter();
$db->close();
llxFooter();
?>

View File

@@ -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))
{

View File

@@ -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);

View File

@@ -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++)

View File

@@ -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>&nbsp;</td>
</tr>
</table>

View File

@@ -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";

View File

@@ -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

View File

@@ -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;

View File

@@ -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">&nbsp;</td>';
print '<td align="center">&nbsp;</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">&nbsp;</td>';
print '<td align="center">&nbsp;</td>';

View File

@@ -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>&nbsp;</td>';
print '<td align="right">'.$obj->km.'</td>';
$tripandexpense_static->statut=$obj->fk_statut;

View File

@@ -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&amp;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>';

View File

@@ -420,4 +420,3 @@ elseif (file_exists($fileimagebis))
$db->close();
llxFooter();
?>

View File

@@ -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;

View File

@@ -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>';
}

View File

@@ -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>&nbsp;</td>
</tr>
</table>

View File

@@ -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');
}
}

View File

@@ -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

View File

@@ -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 = "&amp;statut=".$statut;
$urladd .= "&amp;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%">';

View File

@@ -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)

View File

@@ -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 = '';

View File

@@ -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>&nbsp;</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>&nbsp;</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

View File

@@ -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
*/

View File

@@ -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>';

View File

@@ -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();

View File

@@ -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>&nbsp;".$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>&nbsp;".$langs->trans("Currency".$conf->currency)."</td>\n";
print "</tr>";
$totalpaye += $objp->amount;
$i++;

View File

@@ -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');

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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&oacute;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);

View File

@@ -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);

View File

@@ -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>";

View File

@@ -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);

View File

@@ -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');
}

View File

@@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
}
}
?>

View File

@@ -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');
}
?>

View File

@@ -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) . "%'";

View File

@@ -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"',

View File

@@ -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
*

View File

@@ -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.
*

View File

@@ -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

View File

@@ -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] != '')
{

View File

@@ -201,4 +201,3 @@ class dolprintIPP
return $ipp->printer_attributes;
}
}
?>

View File

@@ -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">&nbsp;</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
*/

View File

@@ -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(

View File

@@ -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