Compare commits

...

167 Commits
3.6.1 ... 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
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
96 changed files with 697 additions and 426 deletions

View File

@@ -2,10 +2,28 @@
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 updat fichinter.
- 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.
@@ -136,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.

View File

@@ -1,3 +1,10 @@
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) ]
@@ -11,66 +18,3 @@ dolibarr (3.6.0-3) unstable; urgency=low
* 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

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>

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.1
; 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.1
; 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

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'
@@ -911,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\"";
@@ -951,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";
@@ -962,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

@@ -333,26 +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,26 +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,26 +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,26 +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>

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

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

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

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

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

View File

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

View File

@@ -898,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++;
@@ -985,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;
@@ -1004,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))
@@ -1197,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
@@ -2404,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

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

@@ -1152,6 +1152,8 @@ else if ($action == 'addline' && $user->rights->facture->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];
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

@@ -725,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;
}
@@ -744,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))
@@ -2203,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) {
@@ -3467,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();

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;

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

@@ -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
@@ -2218,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;
}
}
@@ -2235,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;
@@ -2243,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

@@ -154,7 +154,7 @@ class ExtraFields
{
$table=$elementtype.'_extrafields';
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname))
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9_]*$/",$attrname) && ! is_numeric($attrname))
{
if ($type=='boolean') {
$typedb='int';
@@ -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);
@@ -979,7 +981,10 @@ class ExtraFields
{
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 {

View File

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

@@ -4,7 +4,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,
@@ -14,6 +14,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

@@ -1033,6 +1033,7 @@ class FormOther
if ($nbboxactivated)
{
$langs->load("boxes");
$langs->load("projects");
$emptybox=new ModeleBoxes($db);

View File

@@ -39,6 +39,7 @@ require_once '../main.inc.php';
if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php
$langs->load("main");
$langs->load("agenda");
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
@@ -57,7 +58,7 @@ if (GETPOST('mode') && GETPOST('mode') == 'test')
}
else
{
print '<title>Calendar</title>';
print '<title>'.$langs->trans("Calendar").'</title>';
}
// Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8)

View File

@@ -351,7 +351,6 @@ class DoliDBMysqli extends DoliDB
* @return int Nombre de lignes
* @see num_rows
*/
function affected_rows($resultset)
{
// If resultset not provided, we take the last used by connexion

View File

@@ -387,7 +387,7 @@ class DoliDBPgsql extends DoliDB
if ((! empty($host) && $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
{
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
$this->db = pg_connect($con_string);
$this->db = @pg_connect($con_string);
}
// if local connection failed or not requested, use TCP/IP
@@ -397,7 +397,7 @@ class DoliDBPgsql extends DoliDB
if (! $port) $port = 5432;
$con_string = "host='".$host."' port='".$port."' dbname='".$name."' user='".$login."' password='".$passwd."'";
$this->db = pg_connect($con_string);
$this->db = @pg_connect($con_string);
}
// now we test if at least one connect method was a success
@@ -832,7 +832,7 @@ class DoliDBPgsql extends DoliDB
// Test charset match LC_TYPE (pgsql error otherwise)
//print $charset.' '.setlocale(LC_CTYPE,'0'); exit;
$sql='CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\'';
$sql='CREATE DATABASE "'.$database.'" OWNER "'.$owner.'" ENCODING \''.$charset.'\'';
dol_syslog($sql,LOG_DEBUG);
$ret=$this->query($sql);
return $ret;

View File

@@ -482,7 +482,7 @@ function dol_get_last_day($year,$month=12,$gm=false)
* @param int $month Month
* @param int $year Year
* @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date.
* @return array year,month, week,first_day,prev_year,prev_month,prev_day
* @return array year,month,week,first_day,prev_year,prev_month,prev_day
*/
function dol_get_first_day_week($day,$month,$year,$gm=false)
{
@@ -524,7 +524,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
}
$tmpmonth = $prev_month;
$tmpyear = $prev_year;
//Get first day of next week
$tmptime=dol_mktime(12,0,0,$month,$tmpday,$year,1,0);
$tmptime-=24*60*60*7;
@@ -532,7 +532,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
$prev_day = $tmparray['mday'];
//Check prev day of week is in same month than first day or not
if ($prev_day>$tmpday)
if ($prev_day > $tmpday)
{
$prev_month = $month-1;
$prev_year = $year;
@@ -544,7 +544,7 @@ function dol_get_first_day_week($day,$month,$year,$gm=false)
}
}
$week = date("W",dol_mktime(0,0,0,$month,$tmpday,$year,$gm));
$week = date("W",dol_mktime(0,0,0,$tmpmonth,$tmpday,$tmpyear,$gm));
return array('year' => $year, 'month' => $month, 'week' => $week, 'first_day' => $tmpday, 'first_month' => $tmpmonth, 'first_year' => $tmpyear, 'prev_year' => $prev_year, 'prev_month' => $prev_month, 'prev_day' => $prev_day);
}
@@ -563,9 +563,10 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
$nbFerie = 0;
// Check to ensure we use correct parameters
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hour and be GMT dates';
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates';
while ($timestampStart < $timestampEnd) // Loop end when equals
$i=0;
while ($timestampStart < $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop)
{
$ferie=false;
$countryfound=0;
@@ -573,7 +574,6 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
$jour = date("d", $timestampStart);
$mois = date("m", $timestampStart);
$annee = date("Y", $timestampStart);
if ($countrycode == 'FR')
{
$countryfound=1;
@@ -676,8 +676,10 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
if ($ferie) $nbFerie++;
// Increase number of days (on go up into loop)
$jour++;
$timestampStart=dol_mktime(0,0,0,$mois,$jour,$annee,1); // Generate GMT date for next day
$timestampStart=dol_time_plus_duree($timestampStart, 1, 'd');
//var_dump($jour.' '.$mois.' '.$annee.' '.$timestampStart);
$i++;
}
return $nbFerie;
@@ -718,13 +720,16 @@ function num_between_day($timestampStart, $timestampEnd, $lastday=0)
* @param int $inhour 0: return number of days, 1: return number of hours
* @param int $lastday We include last day, 0: no, 1:yes
* @param int $halfday Tag to define half day when holiday start and end
* @param string $country_code Country code (company country code if not defined)
* @return int Number of days or hours
*/
function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0)
function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $halfday=0, $country_code='')
{
global $langs;
global $langs,$mysoc;
dol_syslog('num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday);
if (empty($country_code)) $country_code=$mysoc->country_code;
dol_syslog('num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday.' country_code='.$country_code);
// Check parameters
if (! is_int($timestampStart) && ! is_float($timestampStart)) return 'ErrorBadParameter_num_open_day';
@@ -733,7 +738,9 @@ function num_open_day($timestampStart, $timestampEnd, $inhour=0, $lastday=0, $ha
//print 'num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday;
if ($timestampStart < $timestampEnd)
{
$nbOpenDay = num_between_day($timestampStart, $timestampEnd, $lastday) - num_public_holiday($timestampStart, $timestampEnd, $lastday);
$numdays = num_between_day($timestampStart, $timestampEnd, $lastday);
$numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code);
$nbOpenDay = $numdays - $numholidays;
$nbOpenDay.= " " . $langs->trans("Days");
if ($inhour == 1 && $nbOpenDay <= 3) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort");
return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday));

View File

@@ -719,11 +719,12 @@ function dol_bc($var,$moreclass='')
* @param Object $object A company or contact object
* @param int $withcountry 1=Add country into address string
* @param string $sep Separator to use to build string
* @param Tranlsate $outputlangs Object lang that contains language for text translation.
* @return string Formated string
*/
function dol_format_address($object,$withcountry=0,$sep="\n")
function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
{
global $conf;
global $conf,$langs;
$ret='';
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
@@ -768,8 +769,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n")
$ret.=", ".$object->state;
}
}
if ($withcountry) $ret.=($object->country?$sep.$object->country:'');
if (! is_object($outputlangs)) $outputlangs=$langs;
if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):'');
return $ret;
}
@@ -1053,7 +1054,11 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
$default_timezone=@date_default_timezone_get();
}
}
else $localtz = new DateTimeZone('UTC');
if (empty($localtz)) {
$localtz = new DateTimeZone('UTC');
}
$dt = new DateTime(null,$localtz);
$dt->setDate($year,$month,$day);
$dt->setTime((int) $hour, (int) $minute, (int) $second);

View File

@@ -738,7 +738,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
$sql = "SELECT MAX(".$sqlstring.") as val";
$sql.= " FROM ".MAIN_DB_PREFIX.$table;
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
$sql.= " AND ".$field." NOT LIKE '(PROV%)'";
$sql.= " AND entity IN (".getEntity($table, 1).")";
if ($where) $sql.=$where;
if ($sqlwhere) $sql.=' AND '.$sqlwhere;

View File

@@ -2,19 +2,20 @@
/*
* Copyright (C) 2009-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file htdocs/core/lib/invoice2.lib.php

View File

@@ -309,7 +309,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if ($mode == 'source')
{
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n";
$withCountry = 0;
if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1;
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n";
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
{

View File

@@ -174,11 +174,17 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature
}
else if (! empty($feature2)) // This should be used for future changes
{
$tmpreadok=1;
foreach($feature2 as $subfeature)
{
if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $readok=0; $nbko++; }
else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $readok=0; $nbko++; }
else { $readok=1; break; } // Break is to bypass second test if the first is ok
if (! empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok=0; }
else if (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok=0; }
else { $tmpreadok=1; break; } // Break is to bypass second test if the first is ok
}
if (! $tmpreadok) // We found a test on feature that is ko
{
$readok=0; // All tests are ko (we manage here the and, the or will be managed later using $nbko).
$nbko++;
}
}
else if (! empty($feature) && ($feature!='user' && $feature!='usergroup')) // This is for old permissions

View File

@@ -184,6 +184,7 @@ class CommActionRapport
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
$sql.= " AND a.entity = ".$conf->entity;
$sql.= " ORDER BY a.datep DESC";
dol_syslog(get_class($this)."::_page sql=".$sql);

View File

@@ -1177,7 +1177,7 @@ class pdf_einstein extends ModelePDFCommandes
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -1134,7 +1134,7 @@ class pdf_proforma extends ModelePDFCommandes
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -520,7 +520,7 @@ class pdf_strato extends ModelePDFContract
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -516,7 +516,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetTextColor(0,0,0);
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
$pdf->SetFont('','', $default_font_size - 3);
$pdf->SetXY($blSocX,$blSocY+4);

View File

@@ -564,7 +564,7 @@ class pdf_rouget extends ModelePdfExpedition
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posx=$this->marge_gauche;

View File

@@ -1363,7 +1363,7 @@ class pdf_crabe extends ModelePDFFactures
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -253,7 +253,32 @@ class pdf_soleil extends ModelePDFFicheinter
$txt='<strong>'.dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration),1,$outputlangs->charset_output).'</strong>';
$desc=dol_htmlentitiesbr($objectligne->desc,1);
$pdf->startTransaction();
$pdf->writeHTMLCell(0, 0, $curX, $curY + 1, dol_concatdesc($txt,$desc), 0, 1, 0);
$pageposafter=$pdf->getPage();
if ($pageposafter > $pageposbefore) // There is a pagebreak
{
$pdf->rollbackTransaction(true);
$pageposafter=$pageposbefore;
//print $pageposafter.'-'.$pageposbefore;exit;
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
$pdf->writeHTMLCell(0, 0, $curX, $curY, $txt.'<br>'.$desc, LR, 1, 0);
$pageposafter=$pdf->getPage();
$posyafter=$pdf->GetY();
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{
$pdf->AddPage('','',true);
$pdf->setPage($pageposafter+1);
}
}
}
else // No pagebreak
{
$pdf->commitTransaction();
}
$nexY = $pdf->GetY();
$pageposafter=$pdf->getPage();
@@ -505,7 +530,7 @@ class pdf_soleil extends ModelePDFFicheinter
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -749,7 +749,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -1269,7 +1269,7 @@ class pdf_azur extends ModelePDFPropales
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -961,7 +961,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -1005,7 +1005,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy=42;

View File

@@ -203,7 +203,7 @@ else {
<?php } ?>
<td align="right"><input type="text" size="2" name="qty" class="flat" value="<?php echo (isset($_POST["qty"])?$_POST["qty"]:1); ?>">
</td>
<td align="right" class="nowrap"><input type="text" size="1" class="flat" value="<?php echo (isset($_POST["remise_percent"])?$_POST["remise_percent"]:$buyer->remise_client); ?>" name="remise_percent"><span class="hideonsmartphone">%</span></td>
<td align="right" class="nowrap"><input type="text" size="1" class="flat" value="<?php echo (isset($_POST["remise_percent"])?$_POST["remise_percent"]:$buyer->remise_percent); ?>" name="remise_percent"><span class="hideonsmartphone">%</span></td>
<?php
if (! empty($usemargins))

View File

@@ -95,9 +95,18 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
}
else
{
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
else setEventMessage($langs->trans("JobFinished"),'mesgs');
$action='';
$res = $object->reprogram_jobs($user->login);
if ($res > 0)
{
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
else setEventMessage($langs->trans("JobFinished"),'mesgs');
$action='';
}
else
{
setEventMessage($object->error,'errors');
$action='';
}
}
}

View File

@@ -100,6 +100,21 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
if ($result < 0) {
setEventMessage($object->error,'errors');
}
else
{
$res = $object->reprogram_jobs($user->login);
if ($res > 0)
{
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
else setEventMessage($langs->trans("JobFinished"),'mesgs');
$action='';
}
else
{
setEventMessage($object->error,'errors');
$action='';
}
}
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-1'); // Make a call to avoid to run twice job when using back
exit;

View File

@@ -152,6 +152,11 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich
else if ($action == 'add' && $user->rights->ficheinter->creer)
{
// Fill array 'array_options' with data from add form
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
if ($ret < 0) $error ++;
$object->socid = $socid;
$object->duree = GETPOST('duree','int');
$object->fk_project = GETPOST('projectid','int');

View File

@@ -29,7 +29,7 @@
* \brief File that include conf.php file and commons lib like functions.lib.php
*/
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.1');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.2');
if (! defined('EURO')) define('EURO',chr(128));
// Define syslog constants

View File

@@ -2016,7 +2016,8 @@ class CommandeFournisseur extends CommonOrder
}
/**
* Returns the translated input method
* Returns the translated input method of object (defined if $this->methode_commande_id > 0).
* This function make a sql request to get translation. No cache yet, try to not use it inside a loop.
*
* @return string
*/
@@ -2026,21 +2027,19 @@ class CommandeFournisseur extends CommonOrder
if ($this->methode_commande_id > 0)
{
$sql = "SELECT rowid, code, libelle";
$sql = "SELECT rowid, code, libelle as label";
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method';
$sql.= " WHERE active=1 AND rowid = ".$db->escape($this->methode_commande_id);
$query = $db->query($sql);
if ($query && $db->num_rows($query))
{
$result = $db->fetch_object($query);
$obj = $db->fetch_object($query);
$string = $langs->trans($result->code);
if ($string == $result->code)
$string = $langs->trans($obj->code);
if ($string == $obj->code)
{
$string = $obj->libelle != '-' ? $obj->libelle : '';
$string = $obj->label != '-' ? $obj->label : '';
}
return $string;

View File

@@ -60,14 +60,18 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action
if ($action == 'setsupplieraccountancycode')
{
$result=$object->fetch($id);
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
$result=$object->update($object->id,$user,1,0,1);
if ($result < 0)
{
$mesg=join(',',$object->errors);
}
$action="";
$cancelbutton = GETPOST('cancel');
if (!$cancelbutton) {
$result = $object->fetch($id);
$object->code_compta_fournisseur = $_POST["supplieraccountancycode"];
$result = $object->update($object->id, $user, 1, 0, 1);
if ($result < 0) {
$mesg = join(',', $object->errors);
}
$action = "";
}
}
// conditions de reglement
if ($action == 'setconditions' && $user->rights->societe->creer)

View File

@@ -28,10 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics
ProductsStatistics=Products statistics
ProductsOnSell=Available products
ProductsNotOnSell=Obsolete products
ProductsOnSellAndOnBuy=Products not for sale nor purchase
ProductsOnSellAndOnBuy=Products for sale and for purchase
ServicesOnSell=Available services
ServicesNotOnSell=Obsolete services
ServicesOnSellAndOnBuy=Services not for sale nor purchase
ServicesOnSellAndOnBuy=Services for sale and for purchase
InternalRef=Internal reference
LastRecorded=Last products/services on sell recorded
LastRecordedProductsAndServices=Last %s recorded products/services

View File

@@ -3,6 +3,7 @@ RefProject=Ref. project
ProjectId=Project Id
Project=Project
Projects=Projects
ProjectStatus=Project status
SharedProject=Everybody
PrivateProject=Contacts of project
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).

View File

@@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Resource linked with success
TitleResourceCard=Resource card
ConfirmDeleteResource=Confirm to delete this resource
RessourceSuccessfullyDeleted=Resource successfully deleted
DictionaryResourceType=Type of resources
DictionaryResourceType=Type of resources
SelectResource=Select resource

View File

@@ -3,6 +3,7 @@ RefProject=Ref. proyecto
ProjectId=Id proyecto
Project=Proyecto
Projects=Proyectos
ProjectStatus=Estado del proyecto
SharedProject=Proyecto compartido
PrivateProject=Contactos del proyecto
MyProjectsDesc=Esta vista muestra aquellos proyectos en los que usted es un contacto afectado (cualquier tipo).

View File

@@ -257,7 +257,7 @@ CreditNotes=Avoirs
Deposit=Acompte
Deposits=Acomptes
DiscountFromCreditNote=Remise issue de l'avoir %s
DiscountFromDeposit=Paiements issue de l'acompte %s
DiscountFromDeposit=Paiement issu de l'acompte %s
AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur une facture non validée
CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédit
NewGlobalDiscount=Nouvelle ligne de déduction

View File

@@ -199,7 +199,7 @@ AccountancyJournal=Code journal comptabilité
COMPTA_PRODUCT_BUY_ACCOUNT=Code comptable par défaut pour l'achat de produits
COMPTA_PRODUCT_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits
COMPTA_SERVICE_BUY_ACCOUNT=Code comptable par défaut pour l'achat de services
COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits
COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de services
COMPTA_VAT_ACCOUNT=Code comptable par défaut pour l'encaissement de TVA
COMPTA_VAT_BUY_ACCOUNT=Code comptable par défaut pour le versement de la TVA
COMPTA_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients

View File

@@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Ressource liée avec succès
TitleResourceCard=Fiche ressource
ConfirmDeleteResource=Confirmer la suppression de cette ressource?
RessourceSuccessfullyDeleted=Ressource effacée avec succès
DictionaryResourceType=Type de ressources
DictionaryResourceType=Type de ressources
SelectResource=Sélectionner la ressource

View File

@@ -57,9 +57,9 @@ $pagenext = $page + 1;
$startdate=$enddate='';
if (!empty($_POST['startdatemonth']))
$startdate = dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
$startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
if (!empty($_POST['enddatemonth']))
$enddate = dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
/*
* View
@@ -109,8 +109,8 @@ $sql = "SELECT";
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
$sql.= " sum(d.total_ht) as selling_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ;
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE);
@@ -119,6 +119,7 @@ $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND sc.fk_soc = f.fk_soc";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if (! empty($conf->global->AGENT_CONTACT_TYPE))
$sql.= " AND ((e.fk_socpeople IS NULL AND sc.fk_user = u.rowid) OR (e.fk_socpeople IS NOT NULL AND e.fk_socpeople = u.rowid))";
else

View File

@@ -164,8 +164,8 @@ $sql = "SELECT";
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql.= " sum(d.total_ht) as selling_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
@@ -173,6 +173,7 @@ $sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.fk_statut > 0";
$sql.= " AND s.entity = ".$conf->entity;
$sql.= " AND d.fk_facture = f.rowid";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if ($client)
$sql.= " AND f.fk_soc = ".$socid;
if (!empty($startdate))

View File

@@ -167,8 +167,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,";
if ($id > 0) $sql.= " d.fk_product,";
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql.= " sum(d.total_ht) as selling_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."product as p";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";

View File

@@ -683,7 +683,8 @@ function hash_call($methodName,$nvpStr)
exit;*/
curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
//curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
curl_setopt($ch, CURLOPT_SSLVERSION, 1); // Force TLSv1
//turning off the server and peer verification(TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

View File

@@ -4,16 +4,10 @@
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2007-2011 Jean Heimburger <jean@tiaris.info>
<<<<<<< HEAD
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
=======
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2013-2014 Marcos García <marcosgdf@gmail.com>
>>>>>>> refs/remotes/origin/3.5
* Copyright (C) 2011-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

View File

@@ -124,7 +124,7 @@ if (empty($reshook))
// Barcode value
if ($action == 'setbarcode' && $createbarcode)
{
$result=$object->check_barcode(GETPOST('barcode'),GETPOT('barcode_type_code'));
$result=$object->check_barcode(GETPOST('barcode'),GETPOST('barcode_type_code'));
if ($result >= 0)
{
@@ -422,10 +422,10 @@ if (empty($reshook))
$_error++;
$action = "";
$mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$object->ref);
$mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref);
$mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
$mesg.='</div>';
setEventMessage($mesg, 'errors');
$object->fetch($id);
//dol_print_error($object->db);
}
else

View File

@@ -167,7 +167,7 @@ print $total;
print '</td></tr>';
print '</table>';
if (! empty($conf->categorie->enabled))
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS))
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
print '<br>';

View File

@@ -324,12 +324,16 @@ else
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="snom" size="12" value="'.$snom.'">';
print '</td>';
// Barcode
if (! empty($conf->barcode->enabled))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.$sbarcode.'">';
print '</td>';
}
// Date modification
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
@@ -363,16 +367,7 @@ else
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
//desiredstock
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
}
else
{
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
// Desired stock
print '<td class="liste_titre">';
print '&nbsp;';
print '</td>';
@@ -467,7 +462,7 @@ else
}
// Better buy price
if ($user->rights->produit->creer)
if ($user->rights->fournisseur->lire)
{
print '<td align="right">';
if ($objp->minsellprice != '')
@@ -501,15 +496,6 @@ else
print $product_static->stock_reel;
print '</td>';
}
else
{
print '<td>';
print '&nbsp;';
print '</td>';
print '<td>';
print '&nbsp;';
print '</td>';
}
}
// Status (to buy)

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* 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
@@ -71,7 +72,9 @@ llxHeader('','',$helpurl);
$sql = "SELECT count(*) as c";
$sql.= " FROM ".MAIN_DB_PREFIX."product";
$sql.= ' WHERE entity IN ('.getEntity('product', 1).')';
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
if ($type !== '') {
$sql.= " AND fk_product_type = ".$type;
}
$result=$db->query($sql);
if ($result)
@@ -82,11 +85,14 @@ if ($result)
$param = '';
$title = $langs->trans("ListProductServiceByPopularity");
if (isset($type))
{
if ($type !== '') {
$param = '&amp;type='.$type;
$title = $langs->trans("ListProductByPopularity");
if ($type == 1) $title = $langs->trans("ListServiceByPopularity");
if ($type == 1) {
$title = $langs->trans("ListServiceByPopularity");
} else {
$title = $langs->trans("ListProductByPopularity");
}
}
print_barre_liste($title, $page, "popuprop.php",$param,"","","",$num);
@@ -106,7 +112,9 @@ $sql.= " FROM ".MAIN_DB_PREFIX."propaldet as pd";
$sql.= ", ".MAIN_DB_PREFIX."product as p";
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
$sql.= " AND p.rowid = pd.fk_product";
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
if ($type !== '') {
$sql.= " AND fk_product_type = ".$type;
}
$sql.= " GROUP BY (p.rowid)";
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit, $offset);

View File

@@ -365,10 +365,14 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) {
// Prix mini
print '<tr><td>' . $langs->trans("MinPrice") . ' ' . $i . '</td><td>';
if ($object->multiprices_base_type ["$i"] == 'TTC') {
print price($object->multiprices_min_ttc ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]);
} else {
print price($object->multiprices_min ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]);
if (empty($object->multiprices_base_type["$i"])) $object->multiprices_base_type["$i"]="HT";
if ($object->multiprices_base_type["$i"] == 'TTC')
{
print price($object->multiprices_min_ttc["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
}
else
{
print price($object->multiprices_min["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
}
print '</td></tr>';

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* 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
@@ -153,7 +154,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&amp;id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&amp;id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&amp;id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&amp;id=".$product->id,'align="right"',$sortfield,$sortorder);
print "</tr>\n";

View File

@@ -769,7 +769,7 @@ class Task extends CommonObject
if ($this->db->query($sql) )
{
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
$ret = $tasktme_id;
$ret = $tasktime_id;
if (! $notrigger)
{
@@ -801,10 +801,7 @@ class Task extends CommonObject
dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR);
$ret = -2;
}
}
if ($ret >= 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time";
$sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")";
$sql.= " WHERE rowid = ".$tasktime_id;
@@ -1025,7 +1022,8 @@ class Task extends CommonObject
$error=0;
$now=dol_now();
//Use 00:00 of today if time is use on task.
$now=dol_mktime(0,0,0,dol_print_date(dol_now(),'%m'),dol_print_date(dol_now(),'%d'),dol_print_date(dol_now(),'%Y'));
$datec = $now;

View File

@@ -212,7 +212,7 @@ if ($action=="addelement")
$elementselectid = GETPOST("elementselect");
$result=$project->update_element($tablename, $elementselectid);
if ($result<0) {
setEventMessage($mailchimp->error,'errors');
setEventMessage($project->error,'errors');
}
}
@@ -373,8 +373,10 @@ foreach ($listofreferent as $key => $value)
}
}
$langs->load('margins');
// Margin display of the project
print_titre("Margin");
print_titre($langs->trans("Margins"));
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td align="left" width="200">'.$langs->trans("Element").'</td>';

View File

@@ -57,7 +57,7 @@ $projectstatic = new Project($db);
// Add new contact
if ($action == 'addcontact' && $user->rights->projet->creer)
{
$result = $object->fetch($id);
$result = $object->fetch($id, $ref);
if ($result > 0 && $id > 0)
{
@@ -87,7 +87,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
// bascule du statut d'un contact
if ($action == 'swapstatut' && $user->rights->projet->creer)
{
if ($object->fetch($id))
if ($object->fetch($id, $ref))
{
$result=$object->swapContactStatus(GETPOST('ligne'));
}
@@ -100,7 +100,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
// Efface un contact
if ($action == 'deleteline' && $user->rights->projet->creer)
{
$object->fetch($id);
$object->fetch($id, $ref);
$result = $object->delete_contact($_GET["lineid"]);
if ($result >= 0)
@@ -152,7 +152,7 @@ $userstatic = new User($db);
if ($id > 0 || ! empty($ref))
{
if ($object->fetch($id) > 0)
if ($object->fetch($id, $ref) > 0)
{
$result=$projectstatic->fetch($object->fk_project);
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
@@ -245,7 +245,7 @@ if ($id > 0 || ! empty($ref))
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
}
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
print '</td></tr>';
// Label

View File

@@ -209,7 +209,7 @@ if ($object->id > 0)
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
}
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
print '</td>';
print '</tr>';

View File

@@ -97,7 +97,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Project").'</td>';
print '<td>'.$langs->trans("Status").'</td>';
print '<td>'.$langs->trans("ProjectStatus").'</td>';
print '<td>'.$langs->trans("RefTask").'</td>';
print '<td>'.$langs->trans("LabelTask").'</td>';
print '<td align="center">'.$langs->trans("DateStart").'</td>';

View File

@@ -181,7 +181,7 @@ if ($object->id > 0)
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
}
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
print '</td></tr>';
// Label

View File

@@ -72,7 +72,7 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
if (! $error)
{
$object->fetch($id);
$object->fetch($id, $ref);
$object->timespent_note = $_POST["timespent_note"];
$object->timespent_duration = $_POST["timespent_durationhour"]*60*60; // We store duration in seconds
@@ -109,7 +109,7 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
if (! $error)
{
$object->fetch($id);
$object->fetch($id, $ref);
$object->timespent_id = $_POST["lineid"];
$object->timespent_note = $_POST["timespent_note_line"];
@@ -183,7 +183,7 @@ if ($id > 0 || ! empty($ref))
/*
* Fiche projet en mode visu
*/
if ($object->fetch($id) >= 0)
if ($object->fetch($id, $ref) >= 0)
{
$result=$projectstatic->fetch($object->fk_project);
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
@@ -277,7 +277,7 @@ if ($id > 0 || ! empty($ref))
$object->next_prev_filter=" fk_projet in (".$projectsListId.")";
}
else $object->next_prev_filter=" fk_projet = ".$projectstatic->id;
print $form->showrefnav($object,'id',$linkback,1,'rowid','ref','',$param);
print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','',$param);
print '</td></tr>';
// Label

View File

@@ -1,19 +1,20 @@
<?php
/* Copyright (C) - 2013 Jean-François FERRY <jfefe@aternatik.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file place/class/html.place.class.php

View File

@@ -23,8 +23,8 @@
*/
// Put here all includes required by your class file
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
/**
* DAO Resource object
@@ -330,12 +330,12 @@ class Resource extends CommonObject
function delete($rowid, $notrigger=0)
{
global $user,$langs,$conf;
$error=0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."resource";
$sql.= " WHERE rowid =".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql);
if ($this->db->query($sql))
{
@@ -355,7 +355,7 @@ class Resource extends CommonObject
}
// End call triggers
}
return 1;
}
else {
@@ -371,7 +371,7 @@ class Resource extends CommonObject
return -1;
}
}
/**
* Load resource objects into $this->lines
*
@@ -507,9 +507,9 @@ class Resource extends CommonObject
$line->fk_user_create = $obj->fk_user_create;
if($obj->resource_id && $obj->resource_type)
$line->objresource = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
$line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
if($obj->element_id && $obj->element_type)
$line->objelement = $this->fetchObjectByElement($obj->element_id,$obj->element_type);
$line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
$this->lines[$i] = $line;
$i++;
@@ -591,7 +591,7 @@ class Resource extends CommonObject
$line->mandatory = $obj->mandatory;
$line->fk_user_create = $obj->fk_user_create;
$this->lines[$i] = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
$this->lines[$i] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
$i++;
}
@@ -814,7 +814,7 @@ class Resource extends CommonObject
$i=0;
foreach($resources as $nb => $resource)
{
$this->lines[$i] = $this->fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
$this->lines[$i] = fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
$i++;
}
return $i;

View File

@@ -2848,10 +2848,10 @@ class Societe extends CommonObject
}
/**
* Check if thirdparty may using localtax or not
* Check if we must use localtax feature or not according to country (country of $mysocin most cases).
*
* @param int $localTaxNum To get info for only localtax1 or localtax2
* @return array array(0=>boolean, 1=>boolean)
* @return boolean true or false
*/
function useLocalTax($localTaxNum=0)
{
@@ -2873,9 +2873,9 @@ class Societe extends CommonObject
}
/**
* Check if thirdparty is from a country using revenue stamps
* Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases).
*
* @return boolean Yes or no
* @return boolean true or false
*/
function useRevenueStamp()
{

View File

@@ -159,7 +159,7 @@ print $total;
print '</td></tr>';
print '</table>';
if (! empty($conf->categorie->enabled))
if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES))
{
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$elementtype = 'societe';

View File

@@ -2220,8 +2220,6 @@ class User extends CommonObject
* Reconstruit l'arborescence hierarchique des users sous la forme d'un tableau
* Renvoi un tableau de tableau('id','id_parent',...) trie selon arbre et avec:
* id = id du user
* id_parent = id du user parent
* id_children = tableau des id enfant
* name = nom du user
* fullname = nom avec chemin complet du user
* fullpath = chemin complet compose des id
@@ -2306,6 +2304,29 @@ class User extends CommonObject
return $this->users;
}
/**
* Return list of all childs users in herarchy.
*
* @return array Array of user id lower than user. This overwrite this->users.
*/
function getAllChildIds()
{
// Init this->users
$this->get_full_tree();
$idtoscan=$this->id;
$childids=array();
dol_syslog("Build childid for id = ".$idtoscan);
foreach($this->users as $id => $val)
{
//var_dump($val['fullpath']);
if (preg_match('/_'.$idtoscan.'_/', $val['fullpath'])) $childids[$val['id']]=$val['id'];
}
return $childids;
}
/**
* For user id_user and its childs available in this->users, define property fullpath and fullname
*

View File

@@ -1208,7 +1208,11 @@ else
// Signature
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td>';
print dol_htmlentitiesbr($object->signature);
if (empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)) {
print dol_htmlentitiesbr($object->signature);
} else {
print $object->signature;
}
print "</td></tr>\n";
// Hierarchy

View File

@@ -655,6 +655,7 @@ function updateContact($authentication,$contact)
$object->province_id=$contact['province_id'];
$object->phone_pro=$contact['phone_pro'];
$object->phone_perso=$contact['phone_perso'];
$object->phone_mobile=$contact['phone_mobile'];
$object->fax=$contact['fax'];

View File

@@ -460,7 +460,7 @@ function createThirdParty($authentication,$thirdparty)
$result=$newobject->create($fuser);
if ($newobject->particulier && $result > 0) {
$newobject->firstname = $thirdparty['firstname'];
$newobject->name_bis = $thirdparty['ref'];
$newobject->name_bis = $thirdparty['lastname'];
$result = $newobject->create_individual($fuser);
}
if ($result <= 0)

View File

@@ -22,7 +22,7 @@ if [ -f "$1.odt" ]
nbprocess=$(pgrep -c soffice)
if [ $nbprocess -ne 1 ]
then
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless&
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless &
retcode=$?
if [ $retcode -ne 0 ]
then