diff --git a/.mailmap b/.mailmap index 3aadbbedfca..436b557ee63 100644 --- a/.mailmap +++ b/.mailmap @@ -6,8 +6,8 @@ Laurent Destailleur eldy Laurent Destailleur Laurent Destailleur Laurent Destailleur eldy10 Laurent Destailleur Laurent Destailleur -Regis Houssin Regis Houssin -Regis Houssin Régis Houssin +Regis Houssin Regis Houssin +Regis Houssin Régis Houssin Juanjo Menent simnandez Juanjo Menent Juanjo Menent Juanjo Menent Simnandez diff --git a/build/debian/copyright b/build/debian/copyright index 8207df4b6d7..72e531d7007 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -8,7 +8,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville 2003-2006, Jean-Louis Bergamo 2003-2013, Laurent Destailleur 2003, Xavier Dutoit - 2004-2013, Regis Houssin + 2004-2013, Regis Houssin 2004, Sebastien Di Cintio 2004, Benoit Mortier 2004, Christophe Combelles diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index 2e49327ae1d..0091a61d300 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -6,7 +6,7 @@ # WARNING: This script erase all data of database # with data into dump file # -# Regis Houssin - regis.houssin@capnetworks.com +# Regis Houssin - regis.houssin@inodbox.com # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ # Usage: initdemo.sh diff --git a/dev/initdemo/removeconfdemo.sh b/dev/initdemo/removeconfdemo.sh index de297fd1808..b5f76c45205 100755 --- a/dev/initdemo/removeconfdemo.sh +++ b/dev/initdemo/removeconfdemo.sh @@ -3,7 +3,7 @@ # Script to remove setup of a Dolibarr installation. # Note: "dialog" tool need to be available. # -# Regis Houssin - regis.houssin@capnetworks.com +# Regis Houssin - regis.houssin@inodbox.com # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ # WARNING: This script erase setup of instance, diff --git a/dev/initdemo/savedemo.sh b/dev/initdemo/savedemo.sh index 20aebb29b28..90b99995585 100755 --- a/dev/initdemo/savedemo.sh +++ b/dev/initdemo/savedemo.sh @@ -3,7 +3,7 @@ # Script to extrac a database with demo values. # Note: "dialog" tool need to be available if no parameter provided. # -# Regis Houssin - regis.houssin@capnetworks.com +# Regis Houssin - regis.houssin@inodbox.com # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ # Usage: savedemo.sh diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 245220e0d4d..e8f6b8e43b7 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2011 Remy Younes diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 03538b759e7..6ef4bdda90b 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -44,7 +44,7 @@ if (empty($user->rights->accounting->chartofaccount)) $action = GETPOST('action', 'aZ09'); // Parameters ACCOUNTING_EXPORT_* -$main_option = array ( +$main_option = array( 'ACCOUNTING_EXPORT_PREFIX_SPEC', ); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index b07f76a22df..6074a49f537 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -69,7 +69,15 @@ class BookKeeping extends CommonObject public $doc_date; public $date_lim_reglement; - public $doc_type; + + /** + * @var string doc_type + */ + public $doc_type; + + /** + * @var string doc_ref + */ public $doc_ref; /** @@ -82,12 +90,35 @@ class BookKeeping extends CommonObject */ public $fk_docdet; - public $thirdparty_code; + /** + * @var string thirdparty code + */ + public $thirdparty_code; + + /** + * @var string subledger account + */ public $subledger_account; + + /** + * @var string subledger label + */ public $subledger_label; + + /** + * @var string doc_type + */ public $numero_compte; - public $label_compte; - public $label_operation; + + /** + * @var string label compte + */ + public $label_compte; + + /** + * @var string label operation + */ + public $label_operation; public $debit; public $credit; public $montant; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index da974af644e..4c0bf9a55fa 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 182be61d61c..a767d469120 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 034348fbee8..1b71b288c6b 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index b4a364cd912..21736195073 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index ba43b6d47a6..cb1fdfac816 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2012 J. Fernando Lagrange * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 36c7091a47b..9ee06cd3fa7 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2012 J. Fernando Lagrange * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index 0ec1968ab34..81896a12490 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index 3a5226d00f4..ab9815a8057 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 91df8e59ea5..51aca179195 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -1,7 +1,7 @@ * Copyright (C) 2006-2015 Laurent Destailleur - * Copyright (C) 2006-2012 Regis Houssin + * Copyright (C) 2006-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index f22070107ca..f13efd96300 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Brice Davoleau - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010 Juanjo Menent diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index b84534af37a..d4c7147da57 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index c841f83b297..5ead332bf5f 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2011 Laurent Destailleur * Copyright (C) 2012-2018 Philippe Grand * diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index 81f34706966..99174e7770b 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * Copyright (C) 2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 4a699b75a22..a0331fee35e 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * Copyright (C) 2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index f19ba96c167..14439bb6e87 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index ffe6390ef18..534ae4a06ac 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2018 Regis Houssin + * Copyright (C) 2005-2018 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2012-2018 Philippe Grand * Copyright (C) 2015-2016 Alexandre Spangaro diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index ea8850931dc..9d6c5d02bb4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2009-2017 Regis Houssin + * Copyright (C) 2009-2017 Regis Houssin * Copyright (C) 2014-2016 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2015-2018 Frédéric France diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 20a85c7bf3e..984cf49d44d 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2009-2017 Regis Houssin + * Copyright (C) 2009-2017 Regis Houssin * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index eb722b987a9..310a40c52b3 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2005-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 8591dd13195..2da35df7e2c 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Regis Houssin * * 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 diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php index ecf7f45d371..e82b126529b 100644 --- a/htdocs/adherents/class/api_memberstypes.class.php +++ b/htdocs/adherents/class/api_memberstypes.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Regis Houssin * * 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 diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 7e46b7864f8..e8d80898041 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index ffe75df1c81..beb8d44cdc3 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 5b830623a4b..f45042d6581 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2017 Regis Houssin + * Copyright (C) 2006-2017 Regis Houssin * * 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 diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 69958f60d76..feebd776d94 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 9c505477309..5f7abe63253 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2012-2017 Regis Houssin + * Copyright (C) 2012-2017 Regis Houssin * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index eb8f8e4eab3..a792da530f1 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Regis Houssin + * Copyright (C) 2005-2006 Regis Houssin * * 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 diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index a3033ec090d..eec61e3ba22 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 6261a379049..fc147ad8fa1 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro * diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index c18074130aa..3cd57e43390 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2017 Regis Houssin + * Copyright (C) 2006-2017 Regis Houssin * * 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 diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 7f41927b478..1c6e5c16fcf 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2011 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 887fba847e4..29323020325 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 8215bdbe0b1..2a370cdf580 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2011 Regis Houssin * Copyright (C) 2011-2017 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Charlie Benke diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index d76d95da47a..d55a3713ae1 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -1,7 +1,7 @@ * Copyright (C) 2012-2013 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index 3b95c158f27..f6a729743cf 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 6a356843d6b..431d93e2a96 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9f3453f7587..c0480bb7e50 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 64df9194197..d4d7b789974 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Andre Cianfarani - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2016 Philippe Grand diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index cc564bfb08e..96a7b533095 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011-2017 Philippe Grand * Copyright (C) 2015 Alexandre Spangaro diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 214c30dc544..86d96227f3c 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2013-2017 Philippe Grand * Copyright (C) 2014 Marcos García diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index 9e6745e6c29..660f7c7c500 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2016 Juanjo Menent ù * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index be5f785f9e4..cfda870e9da 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 4d75ab44235..f7a2a031dbf 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017-2018 Regis Houssin + * Copyright (C) 2017-2018 Regis Houssin * * 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 diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index add4e2aec80..a48be10b4e0 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Simon Tosser - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2016 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 5d83a78ed17..1b03101a2ae 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2011-2015 Philippe Grand * Copyright (C) 2011 Remy Younes diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 3280492701e..cbe5d74003e 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -103,25 +103,6 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; } - -if ($action == 'confirm_collect') -{ - dol_include_once('/emailcollector/class/emailcollector.class.php'); - - $res = $object->doCollect(); - - if ($res == 0) - { - setEventMessages($object->output, null, 'mesgs'); - } - else - { - setEventMessages($object->error, null, 'errors'); - } - - $action = ''; -} - if (GETPOST('addfilter','alpha')) { $emailcollectorfilter = new EmailCollectorFilter($db); @@ -190,6 +171,25 @@ if ($action == 'deleteoperation') } } +if ($action == 'confirm_collect') +{ + dol_include_once('/emailcollector/class/emailcollector.class.php'); + + $res = $object->doCollectOneCollector(); + + if ($res > 0) + { + setEventMessages($object->output, null, 'mesgs'); + } + else + { + setEventMessages($object->error, null, 'errors'); + } + + $action = ''; +} + + /* @@ -373,7 +373,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ $morehtmlref .= ''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + $morehtml = $langs->trans("NbOfEmailsInInbox").' : '; + + $sourcedir = $object->source_directory; + $targetdir = ($object->target_directory ? $object->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag' + + $connectstringserver = $object->getConnectStringIMAP(); + $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); + $connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); + + $connection = imap_open($connectstringsource, $object->user, $object->password); + if (! $connection) + { + $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; + } + else + { + //$morehtmlstatus .= imap_num_msg($connection).'
'; + $morehtml .= imap_num_msg($connection); + } + + imap_close($connection); + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref.'
'.$morehtml.'
', '', 0, '', '', 0, ''); print '
'; print '
'; @@ -404,7 +426,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Add filter print ''; print ''; - $arrayoftypes=array('from'=>'MailFrom', 'to'=>'MailTo', 'cc'=>'Cc', 'bcc'=>'Bcc', 'subject'=>'Subject', 'body'=>'Body', 'seen'=>'AlreadyRead', 'unseen'=>'NotRead'); + $arrayoftypes=array('from'=>'MailFrom', 'to'=>'MailTo', 'cc'=>'Cc', 'bcc'=>'Bcc', 'subject'=>'Subject', 'body'=>'Body', 'seen'=>'AlreadyRead', 'unseen'=>'NotRead', 'withtrackingid'=>'WithDolTrackingID', 'withouttrackingid'=>'WithoutDolTrackingID'); print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1); print ''; print ''; @@ -442,9 +464,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Add operation print ''; print ''; - $arrayoftypes=array('recordevent'=>'RecordEvent'); + $arrayoftypes=array('loadthirdparty'=>'LoadThirdPartyFromName', 'loadandcreatethirdparty'=>'LoadThirdPartyFromNameOrCreate', 'recordevent'=>'RecordEvent'); if ($conf->projet->enabled) $arrayoftypes['project']='CreateLeadAndThirdParty'; - print $form->selectarray('operationtype', $arrayoftypes, '', 0, 0, 0, '', 1); + print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1); print ''; print ''; print ''; @@ -474,7 +496,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print '
'; - print '
'; + print '
'; // End
print '

'; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index c851010635e..2ae3a7cad99 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index b7c8ddffa71..87682fe7514 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index cc5a9bddfa5..e533ca64ac3 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 78287f71eab..f8429069611 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 3fedf935405..99de68e9e14 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index 292c3604799..c4ad077296a 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 970971c8d29..048d002a3b7 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 5cb093cc443..46a11e363fd 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2012-2013 Juanjo Menent * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index bed1d4d9bcb..8751d906918 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-20113 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index c714c0c6c1b..7fd349363e1 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 8861d1abb68..e2168ec2d76 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2018 Ferran Marcet * diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 1f7b803a50e..dc21ca36daa 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index dd85a998383..f5f5f868801 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005 Regis Houssin + * Copyright (C) 2005 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 2650fe4fe6e..247ecfb28aa 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005 Regis Houssin + * Copyright (C) 2005 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 61da334a90d..818ec5aaff6 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2008 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index e845fd37adc..912d4ee3ea9 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 87df901cfa9..934fcf8e03e 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005 Regis Houssin + * Copyright (C) 2005 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2016 Juanjo Menent * diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index ca4b8fca512..6342f731347 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 91fb9f964e4..bc82d03d8d7 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php index 55fe6f10362..31144581564 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/livraison_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/livraisondet_extrafields.php index e70b4f2d09b..32000c67642 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/livraisondet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index 460a2d43abe..65c7f5e8d68 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 3576ec845d1..3c6e6a14e6c 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 59fc0ade0cd..7ce5add09a3 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU * diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index ab169afc096..fdda38e956d 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2011 Remy Younes diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 09907652df0..6037304350a 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 0db2d3cd6d1..4d5cc2be274 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2012 Laurent Destailleur - * Copyright (C) 2009-2011 Regis Houssin + * Copyright (C) 2009-2011 Regis Houssin * Copyright (C) 2016 Meziane Sof * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 9d0178c956d..d7ef0c4d62b 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2012 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 7b1a73f2f09..6e5f0d77b4b 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 13f72e7c4b3..781f1fd380b 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Regis Houssin * * 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 diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 09192ea4a36..2376cc58988 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 828bb13384f..789120a7da7 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 929e49c4ab3..d998cddb35c 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 50d8fb5b927..37c836043a0 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012-2107 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index db4e1f33553..e7cf64d768e 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2011 Herve Prot * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index cdfcd451f2c..9fc4f46e54f 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2014 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -232,13 +232,13 @@ print ''; print ''; //EntToEnd -print ''.$langs->trans("END_TO_END").''; +print ''.$langs->trans("END_TO_END").''; print ''; print ''; print ''; //USTRD -print ''.$langs->trans("USTRD").''; +print ''.$langs->trans("USTRD").''; print ''; print ''; print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index bc91729829f..cf860cd64ba 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index b8ea860ac25..41d8d91cffd 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2016 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 58f349ffe55..26dcdc85b8d 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2013-2015 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 1b7098c55aa..87e0d6dd941 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 0e3da947fa8..b1e4f745560 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 45071117c89..84570e75e2a 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index d179c66d58d..02500c6d8f9 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 858422c598c..2ce29bca165 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012-2013 Juanjo Menent * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Florian Henry diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 3db96ddd8a4..45d588fb031 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 72050867dfa..88cb18d5d80 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index eeb148e9d99..056982c4d08 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index bbda698a778..ee987ed83a1 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Juanjo Menent diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index cdf128871fd..a9d92a4ecd0 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Juanjo Menent diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 640b6375c57..e0b7dabb942 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 65fe0537ba7..b94c78f67e8 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index d9ab678faa8..14a319b8020 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2013 Juanjo Menent * diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index ba61203191a..95edc057468 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2007 Regis Houssin * * 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 diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index 9df49489e34..4e6aadbe4b4 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2007-2012 Regis Houssin + * Copyright (C) 2007-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index d510cc07773..fef49bd5c12 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * * 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 diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 17d72edf20a..addeb3793c6 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 392c083c382..2cf249c0f74 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 99a07c17248..85c3a8a1d94 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2007-2012 Regis Houssin + * Copyright (C) 2007-2012 Regis Houssin * * 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 @@ -140,8 +140,11 @@ print ''.$langs->trans("Session") print ''.$langs->trans("SessionSavePath").''.session_save_path().''."\n"; print ''.$langs->trans("SessionName").''.session_name().''."\n"; print ''.$langs->trans("SessionId").''.session_id().''."\n"; -print ''.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); +print ''.$langs->trans("CurrentSessionTimeOut").' (session.gc_maxlifetime)'.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; +print ''."\n"; +print ''."\n"; +print ''."\n"; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "\n"; print ''.$langs->trans("CurrentTheme").''.$conf->theme.''."\n"; diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index e978ac85b55..895393eec1d 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2007-2012 Regis Houssin + * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2017 Nicolas ZABOURI * diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index cf79ae910b3..f0d91d8cf65 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index c70ad1b7fba..bcc952b0079 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index 251025a4c9e..b354402b465 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index aa502cde421..d2fb9352042 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2016 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 304f9b79bd0..76e7496cc4e 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2015-2018 Alexandre Spangaro * diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 4c69f2ead48..3c242e8048f 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2018 Regis Houssin + * Copyright (C) 2006-2018 Regis Houssin * * 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 diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 9dc3deec5ac..90220f1bb23 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2012 Regis Houssin + * Copyright (C) 2006-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/tools/index.php b/htdocs/admin/tools/index.php index aed25ae45a3..e1e1fc046c5 100644 --- a/htdocs/admin/tools/index.php +++ b/htdocs/admin/tools/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2006 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 9afe7c5fcb3..eedb22f0aa8 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Bahfir Abbes * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 8ddc1d65525..7cbb82fbe6e 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 097fc507240..48968ff1d27 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2012 Regis Houssin + * Copyright (C) 2006-2012 Regis Houssin * * 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 diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 1ec7c98552e..a3c6a73e711 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index da26d6648cd..6b893a4a78b 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2017 Regis Houssin + * Copyright (C) 2009-2017 Regis Houssin * Copyright (C) 2017 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 2cf8fc5b6f3..dc0edc6302b 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2015 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index c1b55dcec6a..60c872abed8 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2015 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 24a39ce827a..26b66136d76 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 4017f3c93ac..23c4ea7f316 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2016 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012-2018 Regis Houssin + * Copyright (C) 2012-2018 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 60a51074d58..d3f1afa62a3 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Regis Houssin * Copyright (C) 2017 Neil Orley * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/api/index.php b/htdocs/api/index.php index e66a19c981a..e55a30304a4 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Regis Houssin * * 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 diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index 2a3c0279df8..11b36f09d53 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2009 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * * 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 diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php index 9ff676531f1..c06a140f550 100644 --- a/htdocs/cashdesk/affIndex.php +++ b/htdocs/cashdesk/affIndex.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index bcfc1e82f82..c30b5654828 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2009 Laurent Destailleur - * Copyright (C) 2015 Regis Houssin + * Copyright (C) 2015 Regis Houssin * * 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 diff --git a/htdocs/cashdesk/javascript/dhtml.js b/htdocs/cashdesk/javascript/dhtml.js index db05855a3b2..e2000abf56e 100644 --- a/htdocs/cashdesk/javascript/dhtml.js +++ b/htdocs/cashdesk/javascript/dhtml.js @@ -1,6 +1,6 @@ /* Copyright (C) 2007-2008 Jeremie Ollivier - * Copyright (C) 2015 Regis Houssin + * Copyright (C) 2015 Regis Houssin * * 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 diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 2ff71e2a359..3a3fcd0a6b8 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2008 Jeremie Ollivier * Copyright (C) 2011 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2015 Regis Houssin + * Copyright (C) 2015 Regis Houssin * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index afe2c0da4ec..d65a39fc6aa 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * Copyright (C) 2017 Juanjo Menent * Copyright (C) 2012 Marcos García * diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index abea3f41eeb..a346d86f50e 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 44b209e4371..e69ec4a852d 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2006-2017 Laurent Destailleur - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 480edb83390..ad7128c31ef 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Matthieu Valleton * Copyright (C) 2005 Davoleau Brice * Copyright (C) 2005 Rodolphe Quiedeville - * Copyright (C) 2006-2012 Regis Houssin + * Copyright (C) 2006-2012 Regis Houssin * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2013-2016 Juanjo Menent @@ -1004,7 +1004,7 @@ class Categorie extends CommonObject $current_lang = $langs->getDefaultLang(); // Init $this->cats array - $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; @@ -1024,6 +1024,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['label'] = ! empty($obj->label_trans) ? $obj->label_trans : $obj->label; $this->cats[$obj->rowid]['description'] = ! empty($obj->description_trans) ? $obj->description_trans : $obj->description; $this->cats[$obj->rowid]['color'] = $obj->color; + $this->cats[$obj->rowid]['visible'] = $obj->visible; $i++; } } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index cdfac54fb9d..3f4bbad8192 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -1,7 +1,7 @@ * Copyright (C) 2006-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Patrick Raguin * * This program is free software; you can redistribute it and/or modify @@ -35,7 +35,7 @@ $langs->load("categories"); $id=GETPOST('id','int'); $ref=GETPOST('ref'); $type=GETPOST('type'); -$action=GETPOST('action','aZ09'); +$action=(GETPOST('action','aZ09')?GETPOST('action','aZ09'):'edit'); $confirm=GETPOST('confirm'); $cancel=GETPOST('cancel','alpha'); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 316a21892af..b7e99e50ca0 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Eric Seigne * Copyright (C) 2006-2016 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 095c0c611c5..d1a35ddd7fa 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index d3287703695..6783b565b99 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2010-2016 Destailleur Laurent * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 560cb4613be..2092c6c52c5 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Matthieu Valleton * Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 4e8b87eb591..8eae0e2650e 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Cedric GROSS @@ -252,19 +252,19 @@ if ($action == 'add') } } $object->fk_project = isset($_POST["projectid"])?$_POST["projectid"]:0; - + $taskid = GETPOST('taskid','int'); if(!empty($taskid)){ - + $taskProject = new Task($db); if($taskProject->fetch($taskid)>0){ $object->fk_project = $taskProject->fk_project; } - + $object->fk_element = $taskid; $object->elementtype = 'task'; } - + $object->datep = $datep; $object->datef = $datef; $object->percentage = $percentage; @@ -888,17 +888,17 @@ if ($action == 'create') { // Projet associe $langs->load("projects"); - + $projectid = GETPOST('projectid', 'int'); print ''.$langs->trans("Project").''; $numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1); - + print '   '.$langs->trans("AddProject").''; $urloption='?action=create'; $url = dol_buildpath('comm/action/card.php',2).$urloption; - + // update task list print "\n".''."\n"; - + print ''; - + print ''.$langs->trans("Task").''; - + $projectsListId=false; if(!empty($projectid)){ $projectsListId=$projectid; } $tid=GETPOST("projecttaskid")?GETPOST("projecttaskid"):''; @@ -1230,7 +1230,7 @@ if ($id > 0) $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } - $listofcontactid=$object->socpeopleassigned; // Contact assigned (not used yet) + $listofcontactid=$object->socpeopleassigned; // Contact assigned $listofotherid=$object->otherassigned; // Other undefined email (not used yet) print ''.$langs->trans("ActionAssignedTo").''; @@ -1309,14 +1309,14 @@ if ($id > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print ''; print ''.$langs->trans("LinkedObject").''; - + if ($object->elementtype == 'task' && ! empty($conf->projet->enabled)) { print ''; - + $urloption='?action=create'; // we use create not edit for more flexibility $url = DOL_URL_ROOT.'/comm/action/card.php'.$urloption; - + // update task list print "\n".''."\n"; - + $formproject->selectTasks((! empty($societe->id)?$societe->id:-1), $object->fk_element, 'fk_element', 24, 0, 0, 1, 0, 0, 'maxwidth500',$object->fk_project); print ''; - + print ''; } else @@ -1343,7 +1343,7 @@ if ($id > 0) print ''; print ''; } - + print ''; } diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index e84ef93da2d..1c42945fbe7 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2017 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index d3c2070d321..f3a7af8fc11 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006 Roman Ozana * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013-2014 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index a5998e220f7..a22a5c411f3 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2013 Cédric Salvador * diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 0bc022956b1..144a2159deb 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2015 Marcos García diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index b34ba87d7a3..63a6a78ee8c 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Open-DSI * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 0347f73a453..67a4534ca14 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2018 Frédéric France diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index b145dfa54ed..19a7e33d23d 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2018 Frédéric France diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index ff1c7746afa..323113eb12e 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 4b32eea153a..f9cf7dc5bf1 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2006 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index becfabc949c..7b58bd6666d 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 7172c0e5b7c..3fa03a7e8e8 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Florian Henry * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index d11a81f5bdb..8fa1e9a8f97 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Alexandre Spangaro diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index b6d9f0922aa..b5cdd58bbc5 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index cb384408e91..81685f3fda8 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index e4f74f5c35f..a2a6f743db8 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2016 Regis Houssin + * Copyright (C) 2005-2016 Regis Houssin * * 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 diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 761a2bcc41d..57d6adc1ba9 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index bc6f3beabd2..11708c3b4ca 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index f1745b406fd..cb062e00777 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Laurent Destailleur - * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 3c1e6e2cffa..79b3d209ec7 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index eb81649a03e..9f0cabea76f 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 975ee10dbfb..74dbd659bce 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2010-2018 Philippe Grand @@ -380,6 +380,7 @@ if (empty($reshook)) } } else { $object->ref = GETPOST('ref'); + $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); $object->ref_client = GETPOST('ref_client'); $object->datep = $datep; $object->date_livraison = $date_delivery; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index e11f62bb446..0fcdcd47546 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Marc Barilley - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2014 Juanjo Menent @@ -874,6 +874,7 @@ class Propal extends CommonObject $now=dol_now(); // Clean parameters + if (empty($this->entity)) $this->entity = $conf->entity; if (empty($this->date)) $this->date=$this->datep; $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600); if (empty($this->availability_id)) $this->availability_id=0; @@ -983,7 +984,7 @@ class Propal extends CommonObject $sql.= ", ".($this->fk_project?$this->fk_project:"null"); $sql.= ", ".(int) $this->fk_incoterms; $sql.= ", '".$this->db->escape($this->location_incoterms)."'"; - $sql.= ", ".$conf->entity; + $sql.= ", ".$this->entity; $sql.= ", ".(int) $this->fk_multicurrency; $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql.= ", ".(double) $this->multicurrency_tx; @@ -3428,13 +3429,7 @@ class Propal extends CommonObject global $conf,$langs; $langs->load("propal"); - $constant = 'PROPALE_ADDON_'.$this->entity; - - if (! empty($conf->global->$constant)) { - $classname = $conf->global->$constant; // for multicompany proposal sharing - } else { - $classname = $conf->global->PROPALE_ADDON; - } + $classname = $conf->global->PROPALE_ADDON; if (! empty($classname)) { diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index bb4e0ab56f4..bdd4a9dfba2 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (c) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 4e017ff13d9..7fc556a3b12 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2016 Destailleur Laurent - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2015 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index cbdfd44383c..07ef56bc1eb 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index b47a4506412..3f0085ad33a 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 7879612b099..1a1760ce7cf 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2006 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index eea0acfbe6b..89b6211d644 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2010-2011 Philippe Grand diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index a346f8df18f..381b7d105da 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index fc2b9c17ba4..c44d23e8d5c 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 724e0bcce15..0d8c2064010 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index 6d7e93af4be..53176c8b76f 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 6ea34c1c619..1bcad6da62c 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 4402735e188..3dc168f14c5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2011 Jean Heimburger diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 13d7e245f05..3c6ec07c6cb 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index bd00116e026..b40a284e728 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2015 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 42def36ee28..2f7e1831457 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012 Juanjo Menent diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index fc8192f7edb..402467553fb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 4c596620c6c..a87c4d868bf 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 6c0b5f42ec6..c52fbd45a37 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 68ceea38203..a6acfcfd029 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index bf02c9b993c..1a783f3aae7 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index a8da25e07f9..75570939afb 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012-2018 Juanjo Menent diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index d85b30792be..a40d27b4e14 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 758a37eddb8..392d2455e2a 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 47f31eac308..64f4e15cce6 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Charles-Fr BENKE * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index bcb7f348bdf..94885ab118b 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Vinícius Nogueira * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index ccec902bf7c..1d20c4a0d00 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 6d2fa406ea7..9abe8c82b6c 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2003 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index f76f73183b3..926252053e2 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Charles-Fr BENKE * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 5a8d1326e48..7cb6b09fbaf 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015-2016 Marcos García * Copyright (C) 2015-2017 Alexandre Spangaro diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index cc291c6be64..9efdf3932ff 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * Copyright (C) 2016 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index f908b68b35c..e9fdc37a79f 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -3,7 +3,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * * 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 diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 517c616ec28..958ff129a06 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 2d4ac69c288..c77f99ba667 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Xavier DUTOIT * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 3ec4d88db2f..2395a3c23de 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Ferran Marcet * diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 3f1bede8e20..f123dd35eb5 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2017 Patrick Delcroix * diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 38109b964b4..ae6b625b6e5 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 9bd00c81894..ef471aea693 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008-2009 Laurent Destailleur (Eldy) * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2015 Marcos García * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index ceb9324961e..2fa9eecec73 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 383ff1c571a..b213bd25061 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 2476f65b09f..2c21c2694ae 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index e490c90f1ed..ae93eb094d9 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2005-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 7ec837c81f2..b17974b444a 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 84c0c718c70..ef28a7909f9 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * * 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 diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 20d300d9da4..3dfbac0e726 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 1fe26e82a54..b0816d762a8 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur -* Copyright (C) 2012 Regis Houssin +* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Jean-Francois FERRY * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 23c0d79a33c..153f959b381 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur -* Copyright (C) 2012 Regis Houssin +* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Jean-Francois FERRY * Copyright (C) 2017 John BOTELLA * diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 0947f788719..74da2466e1e 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur -* Copyright (C) 2012 Regis Houssin +* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Jean-Francois FERRY * Copyright (C) 2013 Florian Henry * diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index 46d9ed28335..637928e80ee 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur -* Copyright (C) 2012 Regis Houssin +* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Jean-Francois FERRY * Copyright (C) 2013 Florian Henry * diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index dc3fba6cc3e..8987f523f90 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel @@ -109,9 +109,23 @@ if ($id > 0 || ! empty($ref)) { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('invoicecard','globalcard')); -$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php -$permissiondellink=$user->rights->facture->creer; // Used by the include of actions_dellink.inc.php -$permissiontoedit = $user->rights->facture->creer; // Used by the include of actions_lineupdonw.inc.php +$usercanread = $user->rights->facture->lire; +$usercancreate = $user->rights->facture->creer; +$usercanissuepayment = $user->rights->facture->paiement; +$usercandelete = $user->rights->facture->supprimer; +$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->validate))); +$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send); +$usercanreopen = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->reopen); +$usercanunvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($usercancreate)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))); + +$usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); +$usercancreatemargin = $user->rights->margins->creer; +$usercanreadallmargin = $user->rights->margins->liretous; +$usercancreatewithdrarequest = $user->rights->prelevement->bons->creer; + +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php +$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdonw.inc.php // Security check $fieldid = (! empty($ref) ? 'facnumber' : 'rowid'); @@ -147,7 +161,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) { + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { // if (1 == 0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { // $mesgs [] = '
' . $langs->trans("NoCloneOptionsSpecified") . '
'; // } else { @@ -165,7 +179,7 @@ if (empty($reshook)) } // Change status of invoice - else if ($action == 'reopen' && $user->rights->facture->creer) { + else if ($action == 'reopen' && $usercancreate) { $result = $object->fetch($id); if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced') || ($object->statut == 1 && $object->paye == 1)) { // ($object->statut == 1 && $object->paye == 1) should not happened but can be found when data are corrupted $result = $object->set_unpaid($user); @@ -194,8 +208,8 @@ if (empty($reshook)) $isErasable=$object->is_erasable(); - if (($user->rights->facture->supprimer && $isErasable > 0) - || ($user->rights->facture->creer && $isErasable == 1)) + if (($usercandelete && $isErasable > 0) + || ($usercancreate && $isErasable == 1)) { $result = $object->delete($user, 0, $idwarehouse); if ($result > 0) { @@ -209,7 +223,7 @@ if (empty($reshook)) } // Delete line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer) + else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -243,7 +257,7 @@ if (empty($reshook)) } // Delete link of credit note to invoice - else if ($action == 'unlinkdiscount' && $user->rights->facture->creer) + else if ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); @@ -251,7 +265,7 @@ if (empty($reshook)) } // Validation - else if ($action == 'valid' && $user->rights->facture->creer) + else if ($action == 'valid' && $usercancreate) { $object->fetch($id); @@ -271,7 +285,7 @@ if (empty($reshook)) } } - else if ($action == 'set_thirdparty' && $user->rights->facture->creer) + else if ($action == 'set_thirdparty' && $usercancreate) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY'); @@ -280,13 +294,13 @@ if (empty($reshook)) exit(); } - else if ($action == 'classin' && $user->rights->facture->creer) + else if ($action == 'classin' && $usercancreate) { $object->fetch($id); $object->setProject($_POST['projectid']); } - else if ($action == 'setmode' && $user->rights->facture->creer) + else if ($action == 'setmode' && $usercancreate) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); @@ -295,16 +309,16 @@ if (empty($reshook)) } // Multicurrency Code - else if ($action == 'setmulticurrencycode' && $user->rights->facture->creer) { + else if ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) { + else if ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } - else if ($action == 'setinvoicedate' && $user->rights->facture->creer) + else if ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; @@ -323,7 +337,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setdate_pointoftax' && $user->rights->facture->creer) + else if ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); @@ -332,7 +346,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setconditions' && $user->rights->facture->creer) + else if ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property @@ -348,7 +362,7 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } - else if ($action == 'setpaymentterm' && $user->rights->facture->creer) + else if ($action == 'setpaymentterm' && $usercancreate) { $object->fetch($id); $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); @@ -361,7 +375,7 @@ if (empty($reshook)) dol_print_error($db, $object->error); } - else if ($action == 'setrevenuestamp' && $user->rights->facture->creer) + else if ($action == 'setrevenuestamp' && $usercancreate) { $object->fetch($id); $object->revenuestamp = GETPOST('revenuestamp'); @@ -378,18 +392,18 @@ if (empty($reshook)) } // bank account - else if ($action == 'setbankaccount' && $user->rights->facture->creer) + else if ($action == 'setbankaccount' && $usercancreate) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } - else if ($action == 'setremisepercent' && $user->rights->facture->creer) + else if ($action == 'setremisepercent' && $usercancreate) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); } - else if ($action == "setabsolutediscount" && $user->rights->facture->creer) + else if ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -447,17 +461,14 @@ if (empty($reshook)) } } - else if ($action == 'setref_client' && $user->rights->facture->creer) + else if ($action == 'setref_client' && $usercancreate) { $object->fetch($id); $object->set_ref_client(GETPOST('ref_client')); } // Classify to validated - else if ($action == 'confirm_valid' && $confirm == 'yes' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->validate))) - ) + else if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -557,10 +568,7 @@ if (empty($reshook)) } // Go back to draft status (unvalidate) - else if ($action == 'confirm_modif' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) - ) + else if ($action == 'confirm_modif' && $usercanunvalidate) { $idwarehouse = GETPOST('idwarehouse','int'); @@ -640,13 +648,13 @@ if (empty($reshook)) } // Classify "paid" - else if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->facture->paiement) + else if ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); $result = $object->set_paid($user); if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } // Classif "paid partialy" - else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement) + else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); $close_code = GETPOST("close_code",'none'); @@ -671,7 +679,7 @@ if (empty($reshook)) } // Convertir en reduc - else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->facture->creer) + else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $object->fetch_thirdparty(); @@ -797,7 +805,7 @@ if (empty($reshook)) } // Delete payment - elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $user->rights->facture->creer) + elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0) @@ -817,7 +825,7 @@ if (empty($reshook)) /* * Insert new invoice in database */ - else if ($action == 'add' && $user->rights->facture->creer) + else if ($action == 'add' && $usercancreate) { if ($socid > 0) $object->socid = GETPOST('socid', 'int'); @@ -869,6 +877,7 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); // Proprietes particulieres a facture de remplacement $object->fk_facture_source = $_POST['fac_replacement']; @@ -921,6 +930,7 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); // Proprietes particulieres a facture avoir $object->fk_facture_source = $sourceinvoice > 0 ? $sourceinvoice : ''; @@ -1102,6 +1112,7 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); // Source facture $object->fac_rec = GETPOST('fac_rec', 'int'); @@ -1152,6 +1163,7 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + $object->entity = (GETPOSTISSET('entity')?GETPOST('entity', 'int'):$conf->entity); if (GETPOST('type') == Facture::TYPE_SITUATION) { @@ -1634,7 +1646,7 @@ if (empty($reshook)) } // Add a new line - else if ($action == 'addline' && $user->rights->facture->creer) + else if ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; @@ -1967,7 +1979,7 @@ if (empty($reshook)) if ($tva_npr) $info_bits |= 0x01; - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS) )&& (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { + if ($usercanproductignorepricemin && (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); setEventMessages($mesg, null, 'errors'); } else { @@ -2039,7 +2051,7 @@ if (empty($reshook)) } } - elseif ($action == 'updateline' && $user->rights->facture->creer && ! GETPOST('cancel','alpha')) + elseif ($action == 'updateline' && $usercancreate && ! GETPOST('cancel','alpha')) { if (! $object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -2130,7 +2142,7 @@ if (empty($reshook)) $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); // Check price is not lower than minimum (check is done only for standard or replacement invoices) - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS) ) && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))) { + if ($usercanproductignorepricemin && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))) { setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error++; } @@ -2167,7 +2179,7 @@ if (empty($reshook)) // Update line if (! $error) { - if (empty($user->rights->margins->creer)) + if (empty($usercancreatemargin)) { foreach ($object->lines as &$line) { @@ -2245,7 +2257,7 @@ if (empty($reshook)) } } - else if ($action == 'updatealllines' && $user->rights->facture->creer && $_POST['all_percent'] == $langs->trans('Modifier')) + else if ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) { if (!$object->fetch($id) > 0) dol_print_error($db); if (!is_null(GETPOST('all_progress')) && GETPOST('all_progress') != "") @@ -2262,23 +2274,22 @@ if (empty($reshook)) } } - else if ($action == 'updateline' && $user->rights->facture->creer && $_POST['cancel'] == $langs->trans('Cancel')) { + else if ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); // Pour reaffichage de la fiche en cours d'edition exit(); } // Outing situation invoice from cycle - elseif ($action == 'confirm_situationout' && $confirm == 'yes' && $user->rights->facture->creer) + elseif ($action == 'confirm_situationout' && $confirm == 'yes' && $usercancreate) { $object->fetch($id,'', '','', true); if ($object->statut == Facture::STATUS_VALIDATED && $object->type == Facture::TYPE_SITUATION - && $user->rights->facture->creer + && $usercancreate && !$objectidnext && $object->is_last_in_cycle() - && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) + && $usercanunvalidate ) { $outingError = 0; @@ -2388,7 +2399,7 @@ if (empty($reshook)) // add lines from objectlinked elseif($action == 'import_lines_from_object' - && $user->rights->facture->creer + && $usercancreate && $object->statut == Facture::STATUS_DRAFT && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION)) { @@ -2481,7 +2492,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->facture->dir_output; - $permissioncreate=$user->rights->facture->creer; + $permissioncreate=$usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -2508,7 +2519,7 @@ if (empty($reshook)) $action = 'edit_extras'; } - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture->creer) { + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { if ($action == 'addcontact') { $result = $object->fetch($id); @@ -3474,11 +3485,10 @@ else if ($id > 0 || ! empty($ref)) $formquestion = array(); // remove situation from cycle if ($object->statut == Facture::STATUS_VALIDATED - && $user->rights->facture->creer + && $usercancreate && !$objectidnext && $object->is_last_in_cycle() - && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) + && $usercanunvalidate ) { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $label, $text, 'confirm_situationout', $formquestion, "yes", 1); @@ -3689,8 +3699,8 @@ else if ($id > 0 || ! empty($ref)) $morehtmlref='
'; // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1); + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1,'customer'); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' ('.$langs->trans("OtherBills").')'; @@ -3699,7 +3709,7 @@ else if ($id > 0 || ! empty($ref)) { $langs->load("projects"); $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($user->rights->facture->creer) + if ($usercancreate) { if ($action != 'classify') $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; @@ -3798,7 +3808,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) + if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print ''; print '
'; print $langs->trans('DateInvoice'); print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; print ''; @@ -3839,7 +3849,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && $user->rights->facture->creer) + if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && $usercancreate) print ''; print '
'; print $langs->trans('PaymentConditionsShort'); print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . '
'; print ''; @@ -3860,7 +3870,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $user->rights->facture->creer) + if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $usercancreate) print ''; print '
'; print $langs->trans('DateMaxPayment'); print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; print ''; @@ -3884,7 +3894,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editmode' && $user->rights->facture->creer) + if ($action != 'editmode' && $usercancreate) print ''; print '
'; print $langs->trans('PaymentMode'); print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . '
'; print ''; @@ -3907,15 +3917,12 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editmulticurrencycode' && ! empty($object->brouillon)) + if ($usercancreate && $action != 'editmulticurrencycode' && ! empty($object->brouillon)) print ''; print '
'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print ''; - if ($action == 'editmulticurrencycode') { - $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); - } else { - $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none'); - } + $htmlname = (($usercancreate && $action == 'editmulticurrencycode')?'multicurrency_code':'none'); + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, $htmlname); print ''; print ''; @@ -3923,7 +3930,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + if ($usercancreate && $action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) print ''; print '
'; print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; print ''; @@ -3931,7 +3938,7 @@ else if ($id > 0 || ! empty($ref)) if($action == 'actualizemulticurrencyrate') { list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); } - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, ($usercancreate?'multicurrency_tx':'none'), $object->multicurrency_code); } else { $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { @@ -3948,7 +3955,7 @@ else if ($id > 0 || ! empty($ref)) print ''; print '
'; print $langs->trans('BankAccount'); print ''; - if (($action != 'editbankaccount') && $user->rights->facture->creer) + if (($action != 'editbankaccount') && $usercancreate) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; print ''; @@ -3975,7 +3982,7 @@ else if ($id > 0 || ! empty($ref)) print '
'; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->facture->creer) print ''.img_edit().''; + if ($usercancreate) print ''.img_edit().''; else print ' '; print '
'; print ''; @@ -4049,7 +4056,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) + if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $usercancreate) { print ''; } @@ -4525,7 +4532,7 @@ else if ($id > 0 || ! empty($ref)) if (! empty($conf->margin->enabled) && empty($user->societe_id)) { print ''; - if ((! empty($conf->global->DISPLAY_MARGIN_RATES) || ! empty($conf->global->DISPLAY_MARK_RATES)) && $user->rights->margins->liretous) { + if ((! empty($conf->global->DISPLAY_MARGIN_RATES) || ! empty($conf->global->DISPLAY_MARK_RATES)) && $usercanreadallmargin) { print ''; } } @@ -4576,7 +4583,7 @@ else if ($id > 0 || ! empty($ref)) $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); // Form to add new line - if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline' && ($object->is_first() || !$object->situation_cycle_ref)) + if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline' && ($object->is_first() || !$object->situation_cycle_ref)) { if ($action != 'editline' && $action != 'selectlines') { @@ -4617,8 +4624,7 @@ else if ($id > 0 || ! empty($ref)) { if (! $objectidnext && $object->is_last_in_cycle()) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) + if ($usercanunvalidate) { print ''; } else { @@ -4645,7 +4651,7 @@ else if ($id > 0 || ! empty($ref)) || ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id)) || ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))) && ($object->statut == 2 || $object->statut == 3 || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data - && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->invoice_advance->reopen))) // A paid invoice (partially or completely) + && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) // A paid invoice (partially or completely) { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { @@ -4657,8 +4663,7 @@ else if ($id > 0 || ! empty($ref)) // Validate if ($object->statut == Facture::STATUS_DRAFT && count($object->lines) > 0 && ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) || ($object->type == Facture::TYPE_CREDIT_NOTE && $object->total_ttc <= 0))) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->validate))) + if ($usercanvalidate) { print ''; } @@ -4669,7 +4674,7 @@ else if ($id > 0 || ! empty($ref)) if ($objectidnext) { print '
' . $langs->trans('SendMail') . '
'; } else { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { + if ($usercansend) { print ''; } else print ''; @@ -4681,7 +4686,7 @@ else if ($id > 0 || ! empty($ref)) { if ($resteapayer > 0) { - if ($user->rights->prelevement->bons->creer) + if ($usercancreatewithdrarequest) { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { @@ -4702,7 +4707,7 @@ else if ($id > 0 || ! empty($ref)) } // Create payment - if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) { + if ($object->type != Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercanissuepayment) { if ($objectidnext) { print '
' . $langs->trans('DoPayment') . '
'; } else { @@ -4717,7 +4722,7 @@ else if ($id > 0 || ! empty($ref)) // Reverse back money or convert to reduction if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_STANDARD) { // For credit note only - if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) + if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercanissuepayment) { if ($resteapayer == 0) { @@ -4730,24 +4735,24 @@ else if ($id > 0 || ! empty($ref)) } // For standard invoice with excess received - if ($object->type == Facture::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $user->rights->facture->creer && empty($discount->id)) + if ($object->type == Facture::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) { print ''; } // For credit note - if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) { + if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercancreate && $object->getSommePaiement() == 0) { print ''; } // For deposit invoice - if ($object->type == Facture::TYPE_DEPOSIT && $user->rights->facture->creer && $object->statut > 0 && empty($discount->id)) + if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > 0 && empty($discount->id)) { print ''; } } // Classify paid - if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0)) - || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $user->rights->facture->paiement && empty($discount->id)) + if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0)) + || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id)) ) { print ''; @@ -4755,7 +4760,7 @@ else if ($id > 0 || ! empty($ref)) // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) - if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 && $user->rights->facture->paiement) + if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 && $usercanissuepayment) { if ($totalpaye > 0 || $totalcreditnotes > 0) { @@ -4779,13 +4784,13 @@ else if ($id > 0 || ! empty($ref)) } // Clone - if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $user->rights->facture->creer) + if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $usercancreate) { print ''; } // Clone as predefined / Create template - if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $user->rights->facture->creer) + if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut == 0 && $usercancreate) { if (! $objectidnext && count($object->lines) > 0) { @@ -4794,7 +4799,7 @@ else if ($id > 0 || ! empty($ref)) } // Create a credit note - if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $user->rights->facture->creer) + if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate) { if (! $objectidnext) { @@ -4805,14 +4810,13 @@ else if ($id > 0 || ! empty($ref)) // For situation invoice with excess received if ($object->statut > Facture::STATUS_DRAFT && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) > 0 - && $user->rights->facture->creer + && $usercancreate && !$objectidnext && $object->is_last_in_cycle() && $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE ) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) + if ($usercanunvalidate) { print ''; } else { @@ -4823,12 +4827,11 @@ else if ($id > 0 || ! empty($ref)) // remove situation from cycle if ($object->statut > Facture::STATUS_DRAFT && $object->type == Facture::TYPE_SITUATION - && $user->rights->facture->creer + && $usercancreate && !$objectidnext && $object->situation_counter > 1 && $object->is_last_in_cycle() - && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) + && $usercanunvalidate ) { if(($object->total_ttc - $totalcreditnotes ) == 0 ) @@ -4842,7 +4845,7 @@ else if ($id > 0 || ! empty($ref)) } // Create next situation invoice - if ($user->rights->facture->creer && ($object->type == 5) && ($object->statut == 1 || $object->statut == 2)) { + if ($usercancreate && ($object->type == 5) && ($object->statut == 1 || $object->statut == 2)) { if ($object->is_last_in_cycle() && $object->situation_final != 1) { print ''; } else if (!$object->is_last_in_cycle()) { @@ -4854,7 +4857,7 @@ else if ($id > 0 || ! empty($ref)) // Delete $isErasable = $object->is_erasable(); - if ($user->rights->facture->supprimer || ($user->rights->facture->creer && $isErasable == 1)) // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) + if ($usercandelete || ($usercancreate && $isErasable == 1)) // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) { //var_dump($isErasable); if ($isErasable == -4) { @@ -4901,8 +4904,8 @@ else if ($id > 0 || ! empty($ref)) $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); $urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id; - $genallowed = $user->rights->facture->lire; - $delallowed = $user->rights->facture->creer; + $genallowed = $usercanread; + $delallowed = $usercancreate; print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); $somethingshown = $formfile->numoffiles; @@ -4911,7 +4914,7 @@ else if ($id > 0 || ! empty($ref)) $linktoelem = $form->showLinkToObjectBlock($object, null, array('invoice')); $compatibleImportElementsList = false; - if($user->rights->facture->creer + if($usercancreate && $object->statut == Facture::STATUS_DRAFT && ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA || $object->type == Facture::TYPE_SITUATION) ) { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index ad33432484f..56f87d2eac3 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013 Florian Henry diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a27b559105f..227ae42b266 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2010-2016 Juanjo Menent diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 1201c429a2a..7a9a9621a78 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 948056fe404..baf466cc60c 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Destailleur Laurent - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2015 Philippe Grand * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 0ce8ad7eb92..4693587de07 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2017 Frédéric France diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 2a9028b5125..856433173ad 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index e077abedbbc..c0a80c86b74 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index fb6f769db94..83925a38b08 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index c46d3ed690e..507bb8f458d 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 7c8ffb7d417..0cb3d3a04eb 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 1a55771b963..2ed8b081ceb 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php index 5f224bc2026..4333aa65a5a 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García * diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 3d6cf735999..ac6479afc0b 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2015-2016 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 2d43d48d778..8974c1b78e0 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011-2014 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2011-2012 Alexandre spangaro * Copyright (C) 2013 Marcos García * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 3b4be22a81d..f88f5643c40 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011-2014 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2011-2012 Alexandre Spangaro * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2013 Marcos García diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 94cd53b5424..32e042c5731 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2014 Raphaël Doursenaud diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 1475cfd6e45..1898a270222 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Marcos García * Copyright (C) 2015 Juanjo Menent * @@ -231,9 +231,10 @@ $disable_delete = 0; // Bank account if (! empty($conf->banque->enabled)) { + $bankline=new AccountLine($db); + if ($object->fk_account > 0) { - $bankline=new AccountLine($db); $bankline->fetch($object->bank_line); if ($bankline->rappro) { diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 9f42ef9b16c..9a21ff3dee8 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2011 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2015-2016 Alexandre Spangaro diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index d190beffae2..28973d3c4e2 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index c3cf1634557..1748a3fa9d2 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2011 Laurent Destailleur - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * Copyright (C) 2016 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 2f0c6592694..d9ac1ab11eb 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2007-2016 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 5b5124b2b80..768792c978c 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Juanjo Menent diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 12cd2a0aa0e..f645edf4563 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index a6d1f480a06..e4fb8bc0757 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2017 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 9d2b828b3eb..4089ffd76e2 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2014-2016 Ferran Marcet diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index d8434caefd8..7e100022c7a 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2015 Marcos García * diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index ebe76a6aab3..6c99cc5562c 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index dff5ab39f3d..02ccee567f5 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2015 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 10c390ed5bd..3129d4af3c8 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index a53db70544b..1f0309f13f3 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2017 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 7cb862389d7..2daf4bbf427 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2010-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 673b83d15aa..a73e9d4f835 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Florian Henry * diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 30cc21ae977..38e5f91ec2b 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index ead1bfff08f..1313658a5f7 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 5c38b29954e..4e71efc5379 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2005-2012 Laurent Destailleur * diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index ab233a61be3..e7bd8622fa2 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 94426ed54eb..e08ebb17ed1 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Dourseanud * Copyright (C) 2014-2106 Ferran Marcet diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 1e2719eac81..33c3883f8ef 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014-2016 Ferran Marcet * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 493e0a3c5ee..33e92ecaf3b 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index d7d762464ee..6a0d53d6987 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2016-2018 Frédéric France * Copyright (C) 2017 Alexandre Spangaro * diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 6e033bccc80..6b5fd8f9e52 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index b25ab142058..636cb92978a 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2016 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 48b2698c762..936c2c9c0f2 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 4f49b9492ff..c00c0e52849 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Antoine Iauch * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index fb53989fe74..f49f15afa1f 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Antoine Iauch * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index c5ceccdad61..711c8ec2bb7 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2017 Olivier Geffroy * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 69483d84be0..cd015e96c11 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index 790058c20a9..1228fcb5125 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 8e4fccf4168..4691b577368 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index d835b0264e1..7c0d813c2cb 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2017 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 183433b02f9..5a9ef88f8ed 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2005 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2016 Alexandre Spangaro diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 7e413854846..bac7c9059a9 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * * 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 diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 5831b943d76..1847e19a0ed 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 1561f046845..9f2bdd4b114 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 1eaccff5a1f..39c3604416b 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index 6041e7c3e2c..c1d6de80964 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2012 Regis Houssin * * 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 diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index e995352c38d..129a7ced8ed 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2005 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2016 Alexandre Spangaro diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b1d83abac77..3d247bfd5ca 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2004 Rodolphe Quiedeville * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2013 Florian Henry @@ -87,17 +87,17 @@ class Contact extends CommonObject /** * @deprecated - * @see state_id + * @see $state_id */ public $fk_departement; /** * @deprecated - * @see state_code + * @see $state_code */ public $departement_code; /** * @deprecated - * @see state + * @see $state */ public $departement; public $state_id; // Id of department @@ -682,12 +682,13 @@ class Contact extends CommonObject /** * Load object contact * - * @param int $id id du contact - * @param User $user Utilisateur (abonnes aux alertes) qui veut les alertes de ce contact - * @param string $ref_ext External reference, not given by Dolibarr - * @return int -1 if KO, 0 if OK but not found, 1 if OK + * @param int $id id du contact + * @param User $user Utilisateur (abonnes aux alertes) qui veut les alertes de ce contact + * @param string $ref_ext External reference, not given by Dolibarr + * @param string $email Email + * @return int -1 if KO, 0 if OK but not found, 1 if OK */ - function fetch($id, $user=0, $ref_ext='') + function fetch($id, $user=null, $ref_ext='', $email='') { global $langs; @@ -721,9 +722,15 @@ class Contact extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.rowid = u.fk_socpeople"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; if ($id) $sql.= " WHERE c.rowid = ". $id; - elseif ($ref_ext) { + else + { $sql .= " WHERE c.entity IN (".getEntity($this->element).")"; - $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; + if ($ref_ext) { + $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; + } + if ($email) { + $sql .= " AND c.email = '".$this->db->escape($email)."'"; + } } $resql=$this->db->query($sql); diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 07795da30d0..d118c4de3b9 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -1,7 +1,7 @@ * Copyright (C) 2015 Frederic France - * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Regis Houssin * * 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 diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 7ddee3f7722..05862e0e9aa 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * * 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 diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 045cdfcd2c5..eaf165136e2 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2017 Regis Houssin + * Copyright (C) 2006-2017 Regis Houssin * * 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 diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 0994312016b..637e1879d20 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013 Alexandre Spangaro diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 731dadb6433..8958e8dcf6a 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Florian Henry * diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 4932d549df4..8e74c33cd14 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 5229a0e8416..be45fabf099 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index d19c91e0bf2..3e3e82f6e0b 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2018 Philippe Grand * diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index af2585eaf3a..69cfd219fcf 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2014 Florian Henry * Copyright (C) 2013 Philippe Grand * diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 0c0247dc7fa..d53413efee0 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2017 Juanjo Menent * Copyright (C) 2013 Christophe Battarel diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index f05b2818816..16e343aaba8 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Destailleur Laurent - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand * Copyright (C) 2010-2016 Juanjo Menent diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index b659aa01aab..d68eee4eb5a 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Destailleur Laurent - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index cd98f787ff6..7373278df1a 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2017 Ferran Marcet diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index c0404b5cf3f..69e2b0d0ca8 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 3631effa7b8..056362bb2d2 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Claudio Aschieri diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index ec93d112ef4..193c25e0398 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index da484b31747..806bff48605 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Frédéric France diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 328be816327..64d40edebc0 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 61c4b636758..9ffaceadb26 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -427,8 +427,9 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $object->socid = $sendtosocid; // To link to a company $object->sendtoid = $sendtoid; // To link to contact addresses. This is an array. $object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) - $object->actionmsg = $actionmsg; // Long text - $object->actionmsg2 = $actionmsg2; // Short text + $object->actionmsg = $actionmsg; // Long text (@TODO Replace this with $message, we already have details of email in dedicated properties) + $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...); + $object->trackid = $trackid; $object->fk_element = $object->id; $object->elementtype = $object->element; @@ -439,9 +440,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $object->sendtouserid = $sendtouserid; } - // TODO Set object->email_xxx properties + $object->email_msgid = $mailfile->msgid; // @TODO Set msgid into $mailfile after sending + $object->email_from = $from; + $object->email_subject = $subject; + $object->email_to = $sendto; + $object->email_tocc = $sendtocc; + $object->email_tobcc = $sendtobcc; + $object->email_subject = $subject; $object->email_msgid = $mailfile->msgid; - //... // Call of triggers if (! empty($trigger_name)) diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 82f83595537..5056844bcee 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2007 Rodolphe Quiedeville * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005 Simon Tosser - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010 Pierre Morin * Copyright (C) 2013 Marcos García * diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index f6bd5b5214a..93b317a43c9 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007-2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index 9e9f8a0d799..0f733f4df5c 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2015 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index b03b9f128cf..777fa076639 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * Copyright (C) 2016 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index 908c1ef9f11..e5972d29d70 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/fileupload.php b/htdocs/core/ajax/fileupload.php index 9405aa26cf1..1cf5678cb00 100644 --- a/htdocs/core/ajax/fileupload.php +++ b/htdocs/core/ajax/fileupload.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2012 Regis Houssin * Copyright (C) 2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/ajax/getaccountcurrency.php b/htdocs/core/ajax/getaccountcurrency.php index 2289d8e1c0f..d58c81efdba 100644 --- a/htdocs/core/ajax/getaccountcurrency.php +++ b/htdocs/core/ajax/getaccountcurrency.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 099f66ba3de..abf3efba7db 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2014 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index 86073a5a409..3eab18216d1 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php index 98f18df8a68..2dba328610e 100644 --- a/htdocs/core/ajax/row.php +++ b/htdocs/core/ajax/row.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2015 Regis Houssin * Copyright (C) 2017 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 7070d1a8799..188dcbb29da 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2012 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/security.php b/htdocs/core/ajax/security.php index fa1ce2103d4..d6bfe51b45c 100644 --- a/htdocs/core/ajax/security.php +++ b/htdocs/core/ajax/security.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2015 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/vatrates.php b/htdocs/core/ajax/vatrates.php index 3826e521d06..8fe38d02552 100644 --- a/htdocs/core/ajax/vatrates.php +++ b/htdocs/core/ajax/vatrates.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 2100d3d3600..c1af6a2ac22 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * Copyright (C) 2011-204 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 05bbdba3831..aea85fd111e 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2014 Charles-Fr BENKE * Copyright (C) 2015 Frederic France * diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 96ccd7b675d..9b1e4e34261 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 5aeb6179207..3f86909f04a 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 8606d9b91f7..5a5c2f59986 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -1,7 +1,7 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Frederic France * diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 4feb101c090..2d9d7e9461b 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2018 Josep Lluís Amador * diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 7592f882b59..7239fa78919 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2016-2017 Laurent Destailleur * diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index f08c809627d..679509774e2 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 36c472cfc22..c76ea8d825b 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index c865cf185c4..617f041d7d2 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index e8dedf59c41..bd8fde32aab 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index dd64a07b8d9..10edddf4667 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 0ca14fae7f5..c66c7f674c2 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 16668987a40..138326d6c01 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2016 Charlie Benke * diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 6f7e62aa457..b0f999f54f1 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index cadda2b8058..24699f0e9f6 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 648da118e09..896ceb93df6 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005-2012 Maxime Kohlhaas * Copyright (C) 2015 Frederic France * Copyright (C) 2015 Juanjo Menent diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 6db4ac11250..2b3426f21b8 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 629da790f3c..a4382f86048 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 7c73bbbe328..6a74cd005ab 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2017 Laurent Destailleur - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2017 Nicolas Zabouri * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 97b4bf8feec..4621950843e 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012 Raphaël Doursenaud * Copyright (C) 2015 Frederic France * diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 47646a0facf..9ae35403ec7 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Raphaël Doursenaud * Copyright (C) 2015 Frederic France * diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index f64e18abb32..2b7532481c0 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2000-2005 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index b6c334f7e1c..86ffed48551 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2000-2005 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index c67e3f5f59d..1b45d490d9d 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2000-2005 Rodolphe Quiedeville * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index cf830048cc0..4694a5e4652 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 92458831d0b..d429d96ccac 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018 Frédéric France diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 7174d48a5ee..1dd218ecc82 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud * diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1e5c4ec779d..3db628a88f9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2018 Philippe Grand diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 2ea53a345d8..199b29b87cd 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * * 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 diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index fc7f6792274..c9669fc5ca9 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2003 Xavier Dutoit * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006 Jean Heimburger * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/dolexception.class.php b/htdocs/core/class/dolexception.class.php index cb3c71cfd5c..b61bc6e388c 100644 --- a/htdocs/core/class/dolexception.class.php +++ b/htdocs/core/class/dolexception.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 020998fa37a..c4b726b19d1 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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 diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5cb88c0e2ad..a52a759f841 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2012 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Charles-Fr BENKE * Copyright (C) 2016 Raphaël Doursenaud diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index c3a40599877..027fdda0514 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2012 Regis Houssin * Copyright (C) 2011-2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index b078fdc0405..4b0ed682e49 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2014 Regis Houssin + * Copyright (C) 2010-2014 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 730c75867d6..9a1ac5cb834 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Marc Barilley/Ocebo * Copyright (C) 2007 Franky Van Liedekerke diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 25a3973cbd8..821bff099d2 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2010-2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 510b34c8f47..32a421a7b61 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2007 Patrick Raguin * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index eb08aab6de7..857f8ee5c42 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2008-2012 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 273a84cbc94..60017d82570 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2008-2012 Regis Houssin + * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2017 Rui Strecht * diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 38c8af45e85..09298fe1bff 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2014 Regis Houssin + * Copyright (C) 2010-2014 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index a71a0a15da0..1406586cea6 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2015-2017 Marcos García * Copyright (C) 2015-2017 Nicolas ZABOURI diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index d2800ce1906..8ca0b988fda 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Marc Barilley/Ocebo * Copyright (C) 2007 Franky Van Liedekerke diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index 1c5c733491c..dedf3ec384f 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * * 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 diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 51eafd3ef7a..abcf2132efa 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2006 Rodolphe Quiedeville - * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2010 Regis Houssin * * 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 diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 38f7a1f2f53..8c42d691d39 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2015 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 1ca10d9dd9b..7f4ab7c6d4a 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index dfb070aa5b9..1a58e14796a 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2008-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 3f36a286c08..599bf25d33d 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Destailleur Laurent - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 546ca757234..6d0cd48ccfe 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -1,7 +1,7 @@ - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2014 Juanjo Menent * * This file is a modified version of datepicker.php from phpBSM to fix some diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index db233dda1b4..54b950fdee7 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2007 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014-2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index a8483ec1401..f9e982961c9 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2007 Simon Desee * Copyright (C) 2015 Cedric GROSS * diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 868712a31d0..185ebe1a56f 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 78a3b91279e..85abdf2b004 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Yann Droneaud * Copyright (C) 2012 Florian Henry * Copyright (C) 2015 Marcos García diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 97e799a2b69..bbd5853f95f 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/doxygen.php b/htdocs/core/doxygen.php index 55ea34a5778..542a0effeb2 100644 --- a/htdocs/core/doxygen.php +++ b/htdocs/core/doxygen.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2009 Regis Houssin * * 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 diff --git a/htdocs/core/js/blockUI.js b/htdocs/core/js/blockUI.js index 20c2bd348d4..b485565ee07 100644 --- a/htdocs/core/js/blockUI.js +++ b/htdocs/core/js/blockUI.js @@ -1,4 +1,4 @@ -// Copyright (C) 2012 Regis Houssin +// Copyright (C) 2012 Regis Houssin // // 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 diff --git a/htdocs/core/js/dst.js b/htdocs/core/js/dst.js index 486e7027b43..739beebeac5 100644 --- a/htdocs/core/js/dst.js +++ b/htdocs/core/js/dst.js @@ -1,5 +1,5 @@ // Copyright (C) 2011-2014 Laurent Destailleur -// Copyright (C) 2011-2012 Regis Houssin +// Copyright (C) 2011-2012 Regis Houssin // Copyright (C) 2015 Marcos García // // This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/js/editinplace.js b/htdocs/core/js/editinplace.js index d1d4b6254ee..8501474ec0c 100644 --- a/htdocs/core/js/editinplace.js +++ b/htdocs/core/js/editinplace.js @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2014 Regis Houssin +// Copyright (C) 2011-2014 Regis Houssin // Copyright (C) 2011-2017 Laurent Destailleur // // This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index cf8d641893a..15594570fd7 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/js/timepicker.js.php b/htdocs/core/js/timepicker.js.php index f93bb3410f2..8e67f517b44 100644 --- a/htdocs/core/js/timepicker.js.php +++ b/htdocs/core/js/timepicker.js.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 89f511c18c2..9d3bc24bd76 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2016 Regis Houssin + * Copyright (C) 2005-2016 Regis Houssin * Copyright (C) 2012 J. Fernando Lagrange * Copyright (C) 2015 Raphaël Doursenaud * @@ -1731,7 +1731,7 @@ function email_admin_prepare_head() $h = 0; $head = array(); - if ($user->admin && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) + if (! empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) { $head[$h][0] = DOL_URL_ROOT."/admin/mails.php"; $head[$h][1] = $langs->trans("OutGoingEmailSetup"); @@ -1752,7 +1752,7 @@ function email_admin_prepare_head() $head[$h][2] = 'templates'; $h++; - if ($conf->global->MAIN_FEATURES_LEVEL >= 1) + if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && ! empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) { $head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php"; $head[$h][1] = $langs->trans("EmailSenderProfiles"); diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 86d3a68fed4..23d5fcf30dc 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index bb08018b7f6..afff8198e09 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2007-2015 Regis Houssin + * Copyright (C) 2007-2015 Regis Houssin * Copyright (C) 2012 Christophe Battarel * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index ded980e3246..28845122f0d 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index e8a7dfcb0ff..4d85c412bab 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011 Regis Houssin * * 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 diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 5dc74909b8f..febd4fcb703 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2006 Rodolphe Quiedeville * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index f1d721b62e6..3c61410230f 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2017 Regis Houssin + * Copyright (C) 2010-2017 Regis Houssin * Copyright (C) 2015 Frederic France * Copyright (C) 2015 Raphaël Doursenaud * diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 9d986e983bc..c7434e80878 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2009-2012 Regis Houssin * * 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 diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 84048ac9c66..7ad40349589 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011-2015 Juanjo Menent * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index ae8410bd188..b5e607fbbc5 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2006 Rodolphe Quiedeville * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 1981ae63d09..459bb3e3f2b 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2015 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index 0fa5f0ae643..275970c41c1 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2015 Claudio Aschieri * diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 779e6c9e174..da1a7048dee 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011 Regis Houssin * * 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 diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index 20e257eee2f..0ef39203f57 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2016 Gilles Poirier * Copyright (C) 2018 charlene Benke diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1a114c62a01..1bca14827e6 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012-2015 Regis Houssin + * Copyright (C) 2012-2015 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Raphaël Doursenaud diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index ac956abf524..c251c5d03b9 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Marc Barilley * Copyright (C) 2011-2013 Philippe Grand * diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ff5a9fa4776..7bb634cde2a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Christophe Combelles - * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2018 Juanjo Menent * Copyright (C) 2013 Cédric Salvador @@ -2837,35 +2837,50 @@ function isValidPhone($phone) * @param string $stringencoding Encoding of string * @return int Length of string */ -function dol_strlen($string,$stringencoding='UTF-8') +function dol_strlen($string, $stringencoding='UTF-8') { if (function_exists('mb_strlen')) return mb_strlen($string,$stringencoding); else return strlen($string); } /** - * Make a substring. Works even in mbstring module is not enabled. + * Make a substring. Works even if mbstring module is not enabled for better compatibility. * * @param string $string String to scan * @param string $start Start position - * @param int $length Length + * @param int $length Length (in nb of characters or nb of bytes depending on trunconbytes param) * @param string $stringencoding Page code used for input string encoding + * @param int $trunconbytes 1=Length is max of bytes instead of max of characters * @return string substring */ -function dol_substr($string,$start,$length,$stringencoding='') +function dol_substr($string, $start, $length, $stringencoding='', $trunconbytes=0) { global $langs; if (empty($stringencoding)) $stringencoding=$langs->charset_output; $ret=''; - if (function_exists('mb_substr')) + if (empty($trunconbytes)) { - $ret=mb_substr($string,$start,$length,$stringencoding); + if (function_exists('mb_substr')) + { + $ret=mb_substr($string, $start, $length, $stringencoding); + } + else + { + $ret=substr($string, $start, $length); + } } else { - $ret=substr($string,$start,$length); + if (function_exists('mb_strcut')) + { + $ret=mb_strcut($string, $start, $length, $stringencoding); + } + else + { + $ret=substr($string, $start, $length); + } } return $ret; } @@ -3063,7 +3078,7 @@ function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie', * @param string $trunc Where to trunc: right, left, middle (size must be a 2 power), wrap * @param string $stringencoding Tell what is source string encoding * @param int $nodot Truncation do not add ... after truncation. So it's an exact truncation. - * @param int $display Trunc is use to display and can be changed for small screen. TODO Remove this param (must be dealt with CSS) + * @param int $display Trunc is used to display data and can be changed for small screen. TODO Remove this param (must be dealt with CSS) * @return string Truncated string. WARNING: length is never higher than $size if $nodot is set, but can be 3 chars higher otherwise. */ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodot=0, $display=0) @@ -6782,26 +6797,27 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id if ($key == '') return ''; // Check in cache - if (isset($cache_codes[$tablename][$key])) // Can be defined to 0 or '' + if (isset($cache_codes[$tablename][$key][$fieldid])) // Can be defined to 0 or '' { - return $cache_codes[$tablename][$key]; // Found in cache + return $cache_codes[$tablename][$key][$fieldid]; // Found in cache } + dol_syslog('dol_getIdFromCode (value not found into cache)', LOG_DEBUG); + $sql = "SELECT ".$fieldid." as valuetoget"; $sql.= " FROM ".MAIN_DB_PREFIX.$tablename; $sql.= " WHERE ".$fieldkey." = '".$db->escape($key)."'"; if (! empty($entityfilter)) $sql.= " AND entity IN (" . getEntity($tablename) . ")"; - dol_syslog('dol_getIdFromCode', LOG_DEBUG); $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $cache_codes[$tablename][$key]=$obj->valuetoget; - else $cache_codes[$tablename][$key]=''; + if ($obj) $cache_codes[$tablename][$key][$fieldid]=$obj->valuetoget; + else $cache_codes[$tablename][$key][$fieldid]=''; $db->free($resql); - return $cache_codes[$tablename][$key]; + return $cache_codes[$tablename][$key][$fieldid]; } else { @@ -6889,8 +6905,6 @@ function picto_from_langcode($codelang, $moreatt = '') if (empty($codelang)) return ''; - if (empty($codelang)) return ''; - if ($codelang == 'auto') { return ''; @@ -7061,6 +7075,7 @@ function printCommonFooter($zone='private') if (! empty($conf->use_javascript_ajax)) { print '
'; print $langs->trans('RevenueStamp'); print 'id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . '